Deep-sea submersible fault diagnosis method and system based on diffusion model domain adaptation

Through the diffusion model domain adaptation method, combined with feature extraction and detection network, the problems of heavy data labeling and low resource allocation efficiency in deep-sea submersible fault diagnosis are solved, and efficient and accurate fault diagnosis and resource optimization are achieved.

CN118468144BActive Publication Date: 2024-09-24SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410932066.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-24
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

Fault diagnosis of deep-sea submersibles in extreme environments is difficult, especially due to the complex structure and inconsistent emergency levels of different fault systems, which results in heavy data labeling work and low resource allocation efficiency. It is difficult for existing domain adaptation methods to effectively migrate labeled data to unlabeled domains. .

Method used

Using a domain adaptation method based on the diffusion model, through feature extraction network and detection model, combined with gated recurrent neural network and convolutional neural network, using cross-entropy loss function and denoising probability diffusion model, the source domain data is migrated to the target domain. data, reducing the need for data labeling.

Benefits of technology

It achieves efficient fault diagnosis, reduces labor and time costs, improves diagnostic accuracy and resource utilization efficiency, adapts to complex environmental data, and ensures real-time detection of deep-sea submersible faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468144B
    Figure CN118468144B
Patent Text Reader

Abstract

The present invention relates to a deep-sea submersible fault diagnosis method and system based on diffusion model domain adaptation, belonging to the technical field of deep-sea submersible sensor signal fault diagnosis, including: collecting raw data and preprocessing; inputting the preprocessed data into a trained feature extraction model to extract feature vectors; inputting the extracted feature vectors into a trained detection model to obtain predicted values; using an activation function to convert the predicted values ​​into probability values ​​of fault categories, wherein the fault category corresponding to the maximum probability value is used as the predicted fault type. The present invention can avoid a large amount of data labeling work through the domain adaptation method, significantly reducing manpower and time costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a deep-sea submersible sensor signal fault diagnosis method, and in particular to a deep-sea submersible fault diagnosis method and system based on diffusion model domain adaptation. Background Art

[0002] Deep-sea submersibles usually work in extreme deep-sea environments. When manned deep-sea submersibles perform missions, timely and accurate fault diagnosis is required. The complex structure of the submersible causes inconsistencies between the faulty system and the sensor signals during the submersible mission. Different fault systems have different fault urgency levels. For example, sonar failures are usually minor faults, while main control system failures are serious faults. According to the degree of the fault level, it can be divided into minor faults, general faults and serious faults. Faced with a large number of data sets of different risk levels for various systems, and in situations where real-time requirements are high, it is of great significance to study how to reduce the labeling work of data sets.

[0003] Domain adaptation methods have been proven to be of great value for submersible fault diagnosis. They can effectively transfer models based on labeled source domain data to unlabeled target domain data, thus avoiding a large amount of data labeling. Unsupervised Domain Adaptation (UDA) is a branch of transfer learning. In recent years, the research directions are mainly divided into two categories. One is based on statistical matching methods. Statistical matching methods promote domain migration by optimizing the statistical consistency or difference between the source domain and the target domain. The Maximum Mean Discrepancy (MMD) criterion is proposed based on this idea and aims to maximize the mean difference between different domains in the feature space for domain adaptation. The second is based on adversarial learning methods. Algorithms based on adversarial learning improve the feature learning capabilities of different fields by introducing discriminators.

[0004] Deep-sea submersibles are composed of various systems, such as hydraulic systems and thruster systems. Each system is equipped with various sensors to detect temperature, pressure, flow rate, direction and other data in the deep-sea environment, and return them in the form of voltage and current. The complexity of the structure makes fault detection difficult, the huge amount of data makes the marking work arduous, and the urgency of faults in different systems is inconsistent.

[0005] Deep-sea submersibles are composed of a variety of complex systems, such as hydraulic systems and thruster systems. Each of these systems is distributed with a large number of sensors to monitor data such as temperature, pressure, flow rate and direction in the deep-sea environment. Due to the complex structure of these systems, it may be difficult to identify and locate multi-point faults. Different systems may have different types of faults. Identifying these faults and making accurate judgments requires a lot of expertise and experience. The use of deep learning methods can quickly and accurately predict the occurrence of faults, but because deep learning methods require a large number of data sets, these data are continuously generated by the sensors of deep-sea submersibles and returned in the form of voltage, current, etc., reflecting various environmental parameters and system states. In order to perform effective fault detection, the data needs to be finely marked and analyzed. This is a time-consuming and labor-intensive task that often requires a lot of manpower input; the urgency of the failures of various systems of deep-sea submersibles varies. For example, the failure of the thruster system may immediately threaten the safety and operability of the submersible, while the failure of some sensor systems may not have an immediate significant impact. Managing and storing large amounts of data requires powerful computing and storage resources. With limited resources and time, how to effectively allocate resources to process data sets is also a challenge. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides a deep-sea submersible fault diagnosis method based on diffusion model domain adaptation;

[0007] The present invention aims to design a fault diagnosis algorithm based on a diffusion model domain adaptation of fault risk classification, which can effectively migrate the model based on labeled source domain data with high fault urgency to unlabeled target domain data with low fault urgency, thereby realizing fault diagnosis of unlabeled sensor signals by the detection network.

[0008] The present invention also provides a deep-sea submersible fault diagnosis system based on diffusion model domain adaptation.

[0009] To achieve the above objectives, this application provides the following technical solutions:

[0010] A deep-sea submersible fault diagnosis method based on diffusion model domain adaptation includes:

[0011] Collect raw data and pre-process them;

[0012] Input the preprocessed data into the trained feature extraction model to extract the feature vector;

[0013] The extracted feature vector is input into the trained detection model to obtain the predicted value; the activation function is used to convert the predicted value into the probability value of the fault category, where the fault category corresponding to the maximum probability value is used as the predicted fault type.

[0014] Preferably, according to the present invention, collecting raw data and preprocessing it includes:

[0015] The sensors of deep-sea submersibles are used to collect various data in the deep-sea environment, including voltage, current, temperature, pressure, flow rate, and direction;

[0016] Preprocessing the collected data, including: slicing the data; normalizing the sensor signals;

[0017] Dataset division, the preprocessed dataset is divided into source domain data and target domain data, the source domain data is labeled data, and the target domain data is unlabeled data.

[0018] Preferably, according to the present invention, the feature extraction model adopts a feature extraction network, and the feature extraction network adopts a gated recurrent neural network GRU (Gate Recurrent Unit, GRU);

[0019] The feature extraction network is used to capture complex patterns in the input sequence and generate high-level feature representations.

[0020] Preferably, according to the present invention, the detection model includes 7 layers of convolutional neural networks (CNN) and 3 layers of fully connected layers (Fully Connected Layer);

[0021] The 7-layer convolutional neural network includes 6 convolutional layers and 1 feature extraction layer;

[0022] 6 convolutional layers are used to extract features from the input data; through multi-layer convolution operations, the low-level, medium-level and high-level features of the input data are gradually extracted; each convolutional layer applies multiple convolution kernels to perform convolution operations on the input data, and the convolution kernel slides on the input data, calculates the dot product at each position and generates a feature map; after the convolution operation, nonlinearity is introduced through nonlinear activation functions (such as ReLU, Rectified Linear Unit); 1 feature extraction layer is used for feature fusion, further integrating and processing the features to generate a more recognizable feature vector. 1 feature extraction layer averages the values ​​of each feature map by using a global average pooling layer to generate a low-dimensional feature vector;

[0023] The three fully connected layers are used to map the features of the seven-layer convolutional neural network to the final classification space, where each fully connected layer implements nonlinear transformation through an activation function;

[0024] The fully connected layer maps the features extracted by the convolutional network to the classification space and converts the high-dimensional feature vector into the probability distribution of the output category; each fully connected layer implements nonlinear transformation through the activation function. The fully connected layer is implemented through matrix multiplication and addition and activation function. Each neuron in the fully connected layer is connected to all neurons in the previous layer, and the output is generated through matrix multiplication and addition, and then nonlinear transformation is performed through nonlinear activation functions (such as ReLU, sigmoid or tanh); each fully connected layer is connected to the output layer, which is used for classification and loss calculation. The output of the last fully connected layer is converted into the probability distribution of the target classification. The result of the output layer is compared with the true label, and the loss is calculated through the loss function. The output layer uses the Softmax activation function to convert the output into a probability distribution.

[0025] Preferably, according to the present invention, the source domain data is input into a trained feature extraction model to extract feature vectors; the extracted feature vectors are input into a trained detection model to calculate the loss;

[0026] The loss function of the detection model is the cross entropy loss function, which is as follows:

[0027] (1);

[0028] In formula (1), is the cross entropy loss, a loss function that needs to be minimized, which is used to measure the difference between the probability distribution predicted by the model and the true label; is the expectation of all source domain samples and their corresponding labels, is the predicted probability distribution output by the detection model, the predicted probability of each category of the input sample by the detection model; , They are the source domain samples and their corresponding labels in the source domain data, respectively.

[0029] Preferably, according to the present invention, the detection model is trained using the migrated source domain data to detect the target domain data; including:

[0030] The target domain data is extracted by the feature extraction model to obtain the target domain feature vector, and the source domain data is extracted by the feature extraction model to obtain the source domain feature vector;

[0031] Use the target domain feature vector to train the diffusion model to obtain a trained diffusion model;

[0032] The source domain feature vector is used to obtain the migrated source domain data through the trained diffusion model; including: inputting the marked source domain feature vector into the trained diffusion model for domain migration, the diffusion model processes the source domain feature vector, and generates the migrated source domain data through the reverse denoising process;

[0033] The migrated source domain data obtains source domain prediction values ​​through the detection model, and the detection model is optimized according to the cross entropy loss; including: inputting the migrated source domain data into the trained detection model for classification, the detection model extracts multi-scale features through the convolution layer, maps the features to the classification space through the fully connected layer, and outputs the source domain prediction value; calculating the cross entropy loss between the source domain prediction value and the true label, and using the back propagation algorithm to optimize the parameters of the detection model according to the cross entropy loss.

[0034] Preferably, according to the present invention, the diffusion model is a denoising probability diffusion model (Denoising Diffusion Probabilistic Models, DDPM), including a forward denoising process and a reverse denoising process;

[0035] The forward noise addition process is expressed as follows:

[0036] (2);

[0037] (3);

[0038] in, represents the data distribution function, represents the data after adding noise in step t, represents the variance of the forward process, represents the probability of the forward noise addition process, For Transfer to The probability of represents the identity matrix;

[0039] Each time step is from a mean Multiply , the variance is It is sampled from a Gaussian distribution, where , is a series of fixed values;

[0040] The forward diffusion process proceeds directly from The noise image at any time step obtained by sampling , the formula is as follows:

[0041] (4);

[0042] in, express ;

[0043] The reverse denoising process is the posterior probability distribution of the forward diffusion process. The noise prediction network, i.e. the model U-net parameters Learning, the formula is:

[0044] (5);

[0045] Ignore variance and fit the mean through neural network ,get , the formula is as follows:

[0046] (6);

[0047] in, Learn the variance for the diffusion model, is the random component during sampling, t and It is known that through the U-net model fitting , It is the difference between 1 and the variance of the forward process.

[0048] Further preferably, the loss of the noise prediction network The calculation method is as follows:

[0049] (7);

[0050] in, is the real noise added, and is the noise of the noise prediction network, i.e. the model U-net, It means expectation.

[0051] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a deep-sea submersible fault diagnosis method based on diffusion model domain adaptation are implemented.

[0052] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a deep-sea submersible fault diagnosis method based on diffusion model domain adaptation.

[0053] The deep-sea submersible fault diagnosis system based on diffusion model domain adaptation includes:

[0054] The raw data acquisition and preprocessing module is configured to: acquire raw data and perform preprocessing;

[0055] The feature extraction module is configured to: input the preprocessed data into the trained feature extraction model to extract feature vectors;

[0056] The detection module is configured to: input the extracted feature vector into the trained detection model to obtain a predicted value.

[0057] The beneficial effects of the present invention are:

[0058] 1. Efficient fault diagnosis: The method based on diffusion model domain adaptation can efficiently migrate the labeled source domain data model to the unlabeled target domain data, achieving real-time and accurate fault diagnosis.

[0059] 2. Reduce data labeling work: Through domain adaptation methods, a large amount of data labeling work can be avoided, significantly reducing manpower and time costs.

[0060] 3. Processing complex environmental data: By adopting multi-layer GRU and convolutional neural networks, it is able to process various sensor signals in complex deep-sea environments, extract high-level features, and ensure the accuracy of diagnostic results.

[0061] 4. Optimize resource allocation: By reducing the need for data labeling and improving diagnostic efficiency, computing and storage resources can be allocated more effectively to meet the real-time requirements of deep-sea submersibles. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a flowchart of a deep-sea submersible fault diagnosis method based on diffusion model domain adaptation of the present invention;

[0063] Figure 2 It is a schematic diagram of the structure of the gated recurrent neural network GRU;

[0064] Figure 3 This is a schematic diagram of the architecture of the feature extraction model;

[0065] Figure 4 This is a schematic diagram of the architecture of the detection model;

[0066] Figure 5 A flowchart for training a detection model using source domain data;

[0067] Figure 6 Schematic diagram of the domain adaptation process based on diffusion model data migration;

[0068] Figure 7 It is a structural diagram of the noise prediction network, namely the model U-net;

[0069] Figure 8 Schematic diagram of the target domain detection process of the diagnostic model. DETAILED DESCRIPTION

[0070] The present invention will be further defined below in conjunction with the accompanying drawings and embodiments, but is not limited thereto.

[0071] Example 1

[0072] Deep-sea submersible fault diagnosis method based on diffusion model domain adaptation, such as Figure 1 As shown, including:

[0073] Collect raw data and pre-process them;

[0074] Input the preprocessed data into the trained feature extraction model to extract the feature vector;

[0075] The extracted feature vector is input into the trained detection model to obtain the predicted value; the predicted value is converted into the probability value of the fault category using the activation function, where the fault category corresponding to the maximum probability value is used as the predicted fault type. If the probability of a certain category is the largest, it is considered that the submersible has a fault of that category.

[0076] Example 2

[0077] The deep-sea submersible fault diagnosis method based on diffusion model domain adaptation according to embodiment 1 is different in that:

[0078] Collect raw data and perform preprocessing; including:

[0079] The sensors of deep-sea submersibles collect various data in the deep-sea environment, including voltage, current, temperature, pressure, flow rate, and direction; data containing 10 or even more dimensions.

[0080] Preprocess the collected data, including: slicing the data; the slice size is 32; normalizing the sensor signals; scaling the attributes to the [0,1] interval;

[0081] Dataset division,The preprocessed dataset is divided into source domain data and target domain data.,Source domain data is labeled data with higher fault urgency, and,target domain data is unlabeled data with lower fault urgency.

[0082] The feature extraction model uses a feature extraction network, such as Figure 3 As shown, the feature extraction network uses a gated recurrent neural network GRU (Gate Recurrent Unit, GRU), and the number of GRU layers is set to 5;

[0083] GRU mainly consists of three parts: reset gate, update gate and candidate hidden state. The reset gate determines the information forgotten, the update gate determines the retained information, and the candidate hidden state is used to calculate the new hidden state.

[0084] The feature extraction network consists of 5 consecutively stacked GRU layers to capture complex patterns in the input sequence and generate high-level feature representations. By increasing the number of GRU layers, the feature extraction network can learn more abstract and complex feature representations, but increasing the number of layers will also increase the number of network parameters and computational complexity.

[0085] like Figure 2 As shown, in the gated recurrent neural network GRU,

[0086] Assume that the input sequence is The hidden state sequence is ,in is the input vector at time t, is the hidden state vector at time t;

[0087] Reset Gate Used to combine the hidden state of the previous moment and the current input ; as shown below:

[0088] ;

[0089] in, , and is the weight matrix and bias term of the reset gate, is the sigmoid activation function;

[0090] Update Gate Control the hidden state of the previous moment and the current candidate hidden state How to combine to update the current hidden state; as follows:

[0091] ;

[0092] in, , and is the weight matrix and bias term of the update gate;

[0093] Candidate hidden states By resetting the gate Adjust the hidden state of the previous moment and the current input As shown below:

[0094] ;

[0095] in, , and is the weight matrix and bias term of the candidate hidden state, It means element-wise multiplication;

[0096] Current hidden state By updating the gate Combined with the hidden state of the previous moment and candidate hidden states ; as shown below:

[0097] .

[0098] like Figure 4 As shown, the detection model includes 7 layers of Convolutional Neural Networks (CNN) and 3 layers of Fully Connected Layers;

[0099] The 7-layer convolutional neural network includes 6 convolutional layers and 1 feature extraction layer; convolution kernels of various sizes and different combinations of strides and padding are used to capture the multi-scale features of the input data.

[0100] The 6 convolutional layers are used to extract features from the input data. Through multi-layer convolution operations, the low-level, intermediate and high-level features of the input data are gradually extracted. Each convolutional layer applies multiple convolution kernels to perform convolution operations on the input data. The convolution kernel slides on the input data, calculates the dot product at each position and generates a feature map. After the convolution operation, nonlinearity is introduced through nonlinear activation functions (such as ReLU, Rectified Linear Unit) to increase the expressive power of the model. The 1-layer feature extraction layer is used for feature fusion, which further integrates and processes the features to generate a more recognizable feature vector and provide input for the subsequent fully connected layer. The 1-layer feature extraction layer generates a low-dimensional feature vector by averaging the values ​​of each feature map using a global average pooling layer.

[0101] The three fully connected layers are used to map the features of the seven-layer convolutional neural network to the final classification space, where each fully connected layer implements nonlinear transformation through an activation function;

[0102] The fully connected layer maps the features extracted by the convolutional network to the classification space, converting the high-dimensional feature vector into the probability distribution of the output category; each fully connected layer implements nonlinear transformation through the activation function, improving the model's expressiveness and ability to handle complex tasks. The fully connected layer is implemented through matrix multiplication and addition and activation functions. Each neuron in the fully connected layer is connected to all neurons in the previous layer, and the output is generated through matrix multiplication and addition, and then nonlinearly transformed through nonlinear activation functions (such as ReLU, sigmoid or tanh); each fully connected layer is connected to the output layer, which is used for classification and loss calculation. The output of the last fully connected layer is converted into the probability distribution of the target classification. The result of the output layer is compared with the true label, and the loss is calculated through the loss function. The output layer uses the Softmax activation function to convert the output into a probability distribution.

[0103] Input the source domain data into the trained feature extraction model to extract feature vectors; input the extracted feature vectors into the trained detection model to calculate the loss;

[0104] The loss function of the detection model is the cross entropy loss function, which is as follows:

[0105] (1);

[0106] In formula (1), is the cross entropy loss, a loss function that needs to be minimized, which is used to measure the difference between the probability distribution predicted by the model and the true label; is the expectation of all source domain samples and their corresponding labels, is the predicted probability distribution output by the detection model, the predicted probability of each category of the input sample by the detection model; , They are the source domain samples and their corresponding labels in the source domain data, respectively.

[0107] The present invention provides a domain adaptation method, in which the source domain data has labels and the target domain data has no labels, and the detection model is trained using the migrated source domain data, such as Figure 5 As shown, to detect the target domain data; including:

[0108] The target domain data is extracted by the feature extraction model to obtain the target domain feature vector, and the source domain data is extracted by the feature extraction model to obtain the source domain feature vector;

[0109] Use the target domain feature vector to train the diffusion model to obtain a trained diffusion model;

[0110] like Figure 6 As shown, the source domain feature vector obtains the migrated source domain data through the trained diffusion model; including: inputting the labeled source domain feature vector into the trained diffusion model for domain migration, the diffusion model processes the source domain feature vector, and generates the migrated source domain data through the reverse denoising process; the migrated source domain data is closer to the target domain feature vector in the feature space, which enhances the adaptability of the model to the unlabeled target domain data.

[0111] The migrated source domain data is passed through the detection model to obtain the source domain prediction value, and the detection model is optimized according to the cross entropy loss; including: inputting the migrated source domain data into the trained detection model (including 7 layers of convolutional neural network and 3 layers of fully connected layers) for classification, the detection model extracts multi-scale features through the convolution layer, maps the features to the classification space through the fully connected layer, and outputs the source domain prediction value; calculates the cross entropy loss between the source domain prediction value and the true label, and uses the back propagation algorithm to optimize the parameters of the detection model according to the cross entropy loss. Make the model predict the label of the source domain data more accurately.

[0112] The present invention provides a deep-sea sensor domain adaptation method based on a diffusion model, which can effectively migrate a model based on labeled source domain data to unlabeled target domain data, thereby realizing fault diagnosis of unlabeled submersible sensor signals by a detection network.

[0113] The diffusion model is the Denoising Diffusion Probabilistic Models (DDPM), which includes a forward denoising process and a reverse denoising process.

[0114] Exemplarily, the added noise is Gaussian noise, which can effectively simulate the randomness and uncertainty in the actual environment. Its random changes follow the statistical characteristics of the normal distribution, with a mean of 0 and a variance of 1.

[0115] The specific structure of the noise prediction network is U-net; it adopts an encoder-decoder structure and a jump connection design. The encoder consists of a convolutional layer, including four submodules, which are followed by a maximum pooling layer to achieve downsampling; the decoder contains four submodules to achieve upsampling, and the jump connection can connect the upsampling result with the submodule with the same resolution in the encoder and output it to the next submodule of the decoder. The input data size is 1*10*10, the number of convolution channels is 64, and the size of the convolution kernel is 3*3.

[0116] By gradually adding Gaussian noise to a real data until it eventually becomes pure Gaussian noise data, a time is sampled from time 1 to time T, a random noise is generated and added to the data, the predicted noise is obtained from U-net, and the U-net gradient is updated after the loss is calculated; the forward noise addition process is a Markov process, and the added noise is Gaussian noise. By gradually adding Gaussian noise to a real data until it eventually becomes pure Gaussian noise data, the formula is as follows:

[0117] (2);

[0118] (3);

[0119] in, represents the data distribution function, represents the data after adding noise in step t, represents the variance of the forward process, represents the probability of the forward noise addition process, For Transfer to The probability of represents the identity matrix;

[0120] Each time step is from a mean Multiply , the variance is It is sampled from a Gaussian distribution, where , is a series of fixed values;

[0121] The forward diffusion process proceeds directly from The noise image at any time step obtained by sampling , the formula is as follows:

[0122] (4);

[0123] in, express ;

[0124] The reverse denoising process is the posterior probability distribution of the forward diffusion process. The noise prediction network, i.e. the model U-net parameters Learning, the formula is:

[0125] (5);

[0126] Ignore variance and fit the mean through neural network ,get , the formula is as follows:

[0127] (6);

[0128] in, Learn the variance for the diffusion model, is the random component during sampling, t and It is known that through the U-net model fitting , It is the difference between 1 and the variance of the forward process.

[0129] The process of generating predictions by the noise prediction model is further described: For example, the target domain feature vector is input into the established diffusion model, and the number of noise addition and denoising steps T is set to 100, and the diffusion model is trained. The input source domain feature vector is denoised for 100 steps using the forward denoising process of the diffusion model to obtain a feature vector containing Gaussian noise, and then the reverse denoising process of the diffusion model is used to denoise the noisy source domain feature vector for 100 steps to obtain the source domain feature vector after migration to the target domain feature vector.

[0130] like Figure 7As shown in Figure 1, the network architecture of the noise prediction network, i.e., the model U-net, is divided into three main parts: the encoding path, the bottleneck layer, and the decoding path. The encoding path is used to gradually reduce the spatial size while increasing the number of feature channels to extract high-level features of the input image. Each stage contains two 3x3 convolutional layers, each followed by a ReLU activation function. At the end of each stage is a 2x2 maximum pooling layer for downsampling to halve the size of the feature map; the bottleneck layer is located between the encoding path and the decoding path and has the largest number of feature channels and the smallest spatial size. Like the encoding path, it contains two 3x3 convolutional layers, each followed by a ReLU activation function; the decoding path is used to gradually increase the spatial size while reducing the number of feature channels to restore the spatial information of the input image. Each stage begins with a 2x2 deconvolution layer or upsampling layer to double the size of the feature map. Each stage contains two 3x3 convolutional layers, each followed by a ReLU activation function. Each stage in the decoding path is concatenated with the feature map of the corresponding stage in the encoding path to retain high-resolution information. The final output layer is used to generate the final prediction results.

[0131] The step of calculating the real noise and predicted noise error using the mean square error as the loss function includes:

[0132] Noise prediction network loss The calculation method is as follows:

[0133] (7);

[0134] in, is the real noise added, and is the noise of the noise prediction network, i.e. the model U-net, It means expectation.

[0135] The above loss function is used to optimize the noise prediction network in the diffusion model. The Adam optimizer is used for optimization, and the learning rate is set to 0.0001.

[0136] The migrated source domain feature vector is input into the detection network in the fault diagnosis model, and the prediction loss is obtained according to the obtained prediction value and the label of the source domain data, which is used to optimize the detection network.

[0137] The detection network loss function of the fault diagnosis model is the cross entropy loss. The specific loss calculation method is as follows:

[0138] ;

[0139] The migrated source domain feature vector is input into the detection network with convolutional neural network as the most basic structure in the fault diagnosis model, and the network output is used as the prediction value and the label of the source domain data to calculate the prediction loss for optimizing the detection network.

[0140] The present invention uses a diffusion model to perform domain adaptation, effectively migrating labeled source domain data to unlabeled target domain data, thereby improving the fault diagnosis accuracy of the detection network on unlabeled target domain data. By inputting the target domain feature vector into the trained diffusion model, the source domain feature vector can have a feature distribution similar to that of the target domain feature vector, enhancing the generalization ability of the detection model for unlabeled data. By adding Gaussian noise during the training process and using the denoising process, the model can better adapt to the randomness and uncertainty in the real environment, and enhance the robustness and stability of the model. This enables the model to better cope with noise and abnormal conditions when processing actual sensor signal data, and improves the reliability of fault diagnosis. The present invention adopts a feature extraction and detection network architecture combining a gated recurrent neural network (GRU) and a convolutional neural network (CNN). By reasonably setting the number of network layers and parameters, it can efficiently capture the complex patterns of input data and improve the model training efficiency. At the same time, the Adam optimizer is used to optimize the loss function, which accelerates the convergence speed of the model. Through the optimized detection network, the present invention can perform real-time detection of target domain data and improve the real-time performance of deep-sea submersible sensor signal fault diagnosis. After the detection network is trained with the migrated source domain feature vectors, it can quickly respond to and accurately predict the fault status of the target domain data, ensuring the safe operation of the deep-sea submersible. The application of the diffusion model enables the source domain feature vectors to be successfully migrated to the target domain. This migration process enhances the generalization ability of the model between different data domains, enabling the fault diagnosis model to maintain high performance in different environments and conditions, which is of great significance for various complex situations that may be encountered in practical applications.

[0141] Example 3

[0142] See also Figure 8 After the fault diagnosis model is trained with the migrated source domain feature vector, it can detect the unlabeled target domain data. By inputting the target domain data into the fault diagnosis model, the target domain prediction value can be obtained.

[0143] The embodiment of the present application provides a method for fault diagnosis of deep-sea submersible sensor signals, and in particular provides a method for deep-sea sensor domain adaptation based on a diffusion model, which can effectively migrate a model based on labeled source domain data to unlabeled target domain data, thereby realizing the fault diagnosis of unlabeled submersible sensor signals by the detection network. By obtaining the parameter data of the deep-sea submersible sensor, the parameter data is related to the time series; the input source domain feature vector is denoised for 100 steps using the forward denoising process of the diffusion model to obtain a feature vector containing Gaussian noise, and then the source domain feature vector after denoising is denoised for 100 steps using the reverse denoising process of the diffusion model to obtain the source domain feature vector after migration to the target domain feature vector. The target domain feature vector is input into the constructed diffusion model, and the number of denoising and denoising steps T is set to 100, and the noise prediction network in the diffusion model is optimized using the above loss function. The migrated source domain feature vector is input into the detection network in the fault diagnosis model, and the prediction loss is obtained according to the obtained prediction value and the label of the source domain data, which is used to optimize the detection network. The optimized detection network can effectively detect the target domain data.

[0144] Example 4

[0145] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the deep-sea submersible fault diagnosis method based on diffusion model domain adaptation described in embodiment 1 or 2 are implemented.

[0146] Example 5

[0147] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the deep-sea submersible fault diagnosis method based on diffusion model domain adaptation described in Example 1 or 2.

[0148] Example 6

[0149] The deep-sea submersible fault diagnosis system based on diffusion model domain adaptation includes:

[0150] The raw data acquisition and preprocessing module is configured to: acquire raw data and perform preprocessing;

[0151] The feature extraction module is configured to: input the preprocessed data into the trained feature extraction model to extract feature vectors;

[0152] The detection module is configured to: input the extracted feature vector into the trained detection model to obtain a predicted value.

[0153] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A deep-sea submersible fault diagnosis method based on diffusion model domain adaptation, characterized in that: include: Collect raw data and preprocess them; Input the preprocessed data into the trained feature extraction model to extract the feature vector; The extracted feature vector is input into the trained detection model to obtain the predicted value; the predicted value is converted into the probability value of the fault category using the activation function, where the fault category corresponding to the maximum probability value is taken as the predicted fault type; The feature extraction model uses a feature extraction network, which uses a gated recurrent neural network GRU; the feature extraction network is used to capture complex patterns in the input sequence and generate high-level feature representations; Collect raw data and pre-process them; including: collecting various data in the deep-sea environment through sensors of deep-sea submersibles, including voltage, current, temperature, pressure, flow rate, and direction; Preprocessing the collected data, including: slicing the data; normalizing the sensor signals; Dataset division: the preprocessed dataset is divided into source domain data X s and target domain data X t , the source domain data is labeled data, and the target domain data is unlabeled data; The detection model includes 7 layers of convolutional neural network and 3 fully connected layers; The 7-layer convolutional neural network includes 6 convolutional layers and 1 feature extraction layer; the 6 convolutional layers are used to extract features from the input data; the 1 feature extraction layer is used for feature fusion, which further integrates and processes the features to generate a more recognizable feature vector; The three fully connected layers are used to map the features of the seven-layer convolutional neural network to the final classification space, where each fully connected layer implements nonlinear transformation through an activation function; Use the migrated source domain data to train the detection model to detect the target domain data; including: The target domain data is extracted by the feature extraction model to obtain the target domain feature vector, and the source domain data is extracted by the feature extraction model to obtain the source domain feature vector; Use the target domain feature vector to train the diffusion model to obtain a trained diffusion model; The source domain feature vector is used to obtain the migrated source domain data through the trained diffusion model; including: inputting the marked source domain feature vector into the trained diffusion model for domain migration, the diffusion model processes the source domain feature vector, and generates the migrated source domain data through the reverse denoising process; The migrated source domain data obtains source domain prediction values ​​through the detection model, and the detection model is optimized according to the cross entropy loss; including: inputting the migrated source domain data into the trained detection model for classification, the detection model extracts multi-scale features through the convolution layer, maps the features to the classification space through the fully connected layer, and outputs the source domain prediction value; calculating the cross entropy loss between the source domain prediction value and the true label, and using the back propagation algorithm to optimize the parameters of the detection model according to the cross entropy loss.

2. The deep-sea submersible fault diagnosis method based on diffusion model domain adaptation according to claim 1 is characterized in that: Through multi-layer convolution operations, the low-level, medium-level and high-level features of the input data are gradually extracted; each convolution layer applies multiple convolution kernels to perform convolution operations on the input data, and the convolution kernel slides on the input data, calculates the dot product at each position and generates a feature map; after the convolution operation, nonlinearity is introduced through a nonlinear activation function; 1 feature extraction layer generates a low-dimensional feature vector by averaging the values ​​of each feature map using a global average pooling layer; The fully connected layer maps the features extracted by the convolutional network to the classification space and converts the high-dimensional feature vector into the probability distribution of the output category; each fully connected layer implements nonlinear transformation through the activation function. The fully connected layer is implemented through matrix multiplication and addition and the activation function. Each neuron in the fully connected layer is connected to all the neurons in the previous layer, and the output is generated through matrix multiplication and addition, and then nonlinear transformation is performed through the nonlinear activation function; each fully connected layer is connected to the output layer, which is used for classification and loss calculation. The output of the last fully connected layer is converted into the probability distribution of the target classification. The result of the output layer is compared with the true label, and the loss is calculated through the loss function. The output layer uses the Softmax activation function to convert the output into a probability distribution.

3. The deep-sea submersible fault diagnosis method based on diffusion model domain adaptation according to claim 1 is characterized in that: Input the source domain data into the trained feature extraction model to extract feature vectors; input the extracted feature vectors into the trained detection model to calculate the loss; The loss function of the detection model is the cross entropy loss function, which is as follows: In formula (1), L ce is the cross entropy loss, a loss function that needs to be minimized to measure the difference between the probability distribution predicted by the model and the true label; is the expectation of all source domain samples and their corresponding labels, p s is the predicted probability distribution output by the detection model, which is the predicted probability of each category of the input sample; x s ,y s They are the source domain samples and their corresponding labels in the source domain data, respectively.

4. The deep-sea submersible fault diagnosis method based on diffusion model domain adaptation according to claim 1 is characterized in that: The diffusion model is a denoising probability diffusion model, which includes a forward denoising process and a reverse denoising process; The forward noise addition process is expressed as follows: Among them, q(x) represents the data distribution function, x t represents the data after adding noise in the tth step, β t represents the variance of the forward process, q(x 1:T |x0) represents the probability of the forward noise addition process, q(x t |x t-1 ) is from x t-1 Transfer to x t The probability of , I represents the identity matrix; At each time step x t is from a mean Multiply by x t-1 , with variance β t is sampled from a Gaussian distribution, where β t ,t∈[1,T] is a series of fixed values; The forward diffusion process directly samples the noise image x at any time step from x0 . , the formula is as follows: in, express The reverse denoising process is the posterior probability distribution of the forward diffusion process. The reverse denoising process p1 is learned by the noise prediction network, that is, the model U-net parameter θ, and the formula is: Ignoring the variance, we fit the mean μ1 through the neural network and get x t-1 , the formula is as follows: Among them, σ t is the variance learned by the diffusion model, z is the random component during sampling, t and x t It is known that through the U-net model fitting ∈1(x t ,t),a t It is the difference between 1 and the variance of the forward process.

5. The deep-sea submersible fault diagnosis method based on diffusion model domain adaptation according to claim 4 is characterized in that: The loss L of the noise prediction network >i@ The calculation method of (θ) is as follows: Among them, ∈ is the real noise added, and ∈1(x t ,t) is the noise of the noise prediction network, i.e., the model U-net, It means expectation.

6. A deep-sea submersible fault diagnosis system based on diffusion model domain adaptation, characterized in that: include: The raw data acquisition and preprocessing module is configured to: acquire raw data and perform preprocessing; The feature extraction module is configured to: input the preprocessed data into the trained feature extraction model to extract feature vectors; The detection module is configured to: input the extracted feature vector into the trained detection model to obtain a prediction value; Collect raw data and pre-process them; including: collecting various data in the deep-sea environment through sensors of deep-sea submersibles, including voltage, current, temperature, pressure, flow rate, and direction; Preprocessing the collected data, including: slicing the data; normalizing the sensor signals; Dataset division: the preprocessed dataset is divided into source domain data X s and target domain data X t , the source domain data is labeled data, and the target domain data is unlabeled data; The detection model includes 7 layers of convolutional neural network and 3 fully connected layers; The 7-layer convolutional neural network includes 6 convolutional layers and 1 feature extraction layer; the 6 convolutional layers are used to extract features from the input data; the 1 feature extraction layer is used for feature fusion, which further integrates and processes the features to generate a more recognizable feature vector; The three fully connected layers are used to map the features of the seven-layer convolutional neural network to the final classification space, where each fully connected layer implements nonlinear transformation through an activation function; The detection model is trained using the migrated source domain data to detect the target domain data; including: The target domain data is extracted by the feature extraction model to obtain the target domain feature vector, and the source domain data is extracted by the feature extraction model to obtain the source domain feature vector; Use the target domain feature vector to train the diffusion model to obtain a trained diffusion model; The source domain feature vector is used to obtain the migrated source domain data through the trained diffusion model; including: inputting the marked source domain feature vector into the trained diffusion model for domain migration, the diffusion model processes the source domain feature vector, and generates the migrated source domain data through the reverse denoising process; The migrated source domain data obtains source domain prediction values ​​through the detection model, and the detection model is optimized according to the cross entropy loss; including: inputting the migrated source domain data into the trained detection model for classification, the detection model extracts multi-scale features through the convolution layer, maps the features to the classification space through the fully connected layer, and outputs the source domain prediction value; calculating the cross entropy loss between the source domain prediction value and the true label, and using the back propagation algorithm to optimize the parameters of the detection model according to the cross entropy loss.