An Abnormal Detection Method for Deep-Sea Submersible Sensor Data Based on Deep Learning

By combining the attention mechanism with the diffusion model, random step size is generated and noise removal is combined with the reverse diffusion network, the problems of insufficient data volume, difficulty in obtaining labels, hardware dependence and model overfitting in the abnormality detection of manned submersible sensors are solved, and the accuracy and performance of abnormality detection are improved.

CN116680639BActive Publication Date: 2025-06-17SHANDONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310699555.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2025-06-17
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

The existing deep learning-based manned submersible sensor data anomaly detection algorithm has problems such as insufficient data volume, difficulty in obtaining labels, hardware dependence and model overfitting, which affects its performance and reliability.

Method used

A new algorithm combining attention mechanism with diffusion model is proposed, which generates random step sizes through the multi-head self-attention mechanism, simulates the change process of sensor data, and combines the reverse diffusion network for noise removal and anomaly detection.

Benefits of technology

It improves the accuracy and performance of anomaly detection, enhances the robustness and generalization capabilities of the model, can better adapt to different data distributions and noise interference, and reduces computing cost and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680639B_ABST
    Figure CN116680639B_ABST
Patent Text Reader

Abstract

The present invention relates to an anomaly detection method for deep - sea submersible sensor data based on deep learning, including: pre - processing the sensor data of the deep - sea submersible to be detected and inputting it into a trained anomaly detection model for multi - classification anomaly detection; the anomaly detection model includes a diffusion model, a multi - head self - attention mechanism layer, and a fully - connected layer; the diffusion model outputs the extracted feature information, and through the self - attention mechanism layer, weights are assigned to each input item, and the information more critical to the current task objective is selected from the numerous feature information according to the weight size, and classification is performed through the fully - connected layer to determine whether there is an anomaly. The present invention pays better attention to the important features of the data; the attention mechanism can help the model better focus on the important features in the data, thereby improving the accuracy and performance of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an anomaly detection method for deep - sea submersible sensor data based on deep learning, belonging to the technical field of sensor device detection. Background Art

[0002] Manned submersibles are important equipment for ocean exploration and marine scientific research. Their sensor systems can collect seabed environmental data and submersible status data in real - time, playing an important role in the operation monitoring and fault diagnosis of submersibles. However, due to the complex and changeable marine environment, sensor data is affected by noise and interference, and there are cases of data anomalies, which requires real - time anomaly detection and location.

[0003] As a machine - learning technology based on artificial neural networks, deep learning can automatically learn feature representations from data and perform anomaly detection without manual intervention. Deep learning has made significant progress in fields such as image recognition, speech recognition, and natural language processing, and has gradually been applied to the field of marine science and technology. In recent years, deep - learning technology has also received extensive attention and application in the anomaly detection of submersible sensor data. Its advantages lie in the ability to automatically learn feature representations and discrimination criteria, having strong modeling capabilities for non - linear and complex data, and being able to improve the accuracy and efficiency of anomaly detection.

[0004] Although the anomaly detection algorithm for manned submersible sensor data based on deep learning has strong modeling capabilities and high - precision detection effects, there are still some defects and deficiencies, including the following aspects:

[0005] 1. Insufficient data volume: Anomaly detection algorithms based on deep learning require a large amount of data for training and verification. However, in practical applications, due to the high cost of obtaining sensor data, the data volume is usually small, which will affect the performance and generalization ability of the algorithm.

[0006] 2. Difficult label acquisition: Deep - learning algorithms require labeled data sets, which usually need to be manually labeled at a high cost, and it is difficult to obtain a complete and accurate label data set, which also affects the performance of the algorithm.

[0007] 3. Dependence on hardware: Deep - learning algorithms require a large amount of computing resources and high - performance hardware devices, which increases the cost and complexity of the algorithm.

[0008] 4. Model overfitting: Since deep - learning models have strong fitting capabilities, if the distributions of the training data set and the test data set are inconsistent, it may lead to model overfitting, affecting the performance and generalization ability of the algorithm.

[0009] Therefore, the anomaly detection method for the sensor data of manned submersibles based on deep learning still needs further optimization and improvement to enhance its performance and reliability, and to strengthen its feasibility and sustainability in practical applications.

[0010] Diffusion models can be used in anomaly detection to detect abnormal behaviors in information dissemination. Specifically, diffusion models can use statistical analysis methods based on propagation behaviors to monitor abnormal nodes and events during the information dissemination process, thereby discovering potential abnormal behaviors. For example, in social networks, diffusion models can be used to detect abnormal behaviors such as false information, phishing, and zombie fans, helping social platforms improve information security and credibility. In the financial field, diffusion models can be used to detect financial criminal behaviors such as abnormal transactions and money laundering. Generally speaking, diffusion models have broad application prospects in anomaly detection.

[0011] However, due to the relatively complex mathematical description of diffusion models, the curse of dimensionality may occur when dealing with high-dimensional data, which will lead to a significant increase in the amount of computation and also affect the accuracy and performance of the model. Diffusion models may have the problem of local optimal solutions when dealing with non-linear problems, which will affect the optimization and training effects of the model.

[0012] The smoothing process of diffusion models on data may lead to information loss. Especially for some abnormal points with obvious features, they may be smoothed out, affecting the detection effect.

[0013] Diffusion models usually require a large amount of computing resources and time. Especially when dealing with large-scale data, distributed computing and other technologies may need to be used to accelerate the calculation, which will also increase the computing cost and complexity.

[0014] In summary, although diffusion models have wide applications in many fields, in practical applications, it is also necessary to select appropriate models and algorithms according to specific situations to solve problems and avoid the impacts caused by deficiencies. Summary of the Invention

[0015] Aiming at the deficiencies of the prior art, the present invention provides an anomaly detection method for the sensor data of deep-sea submersibles based on deep learning;

[0016] Based on deep learning, the present invention proposes a new algorithm that combines the attention mechanism with the diffusion model, thereby optimizing the performance of the diffusion model and improving the accuracy of the diffusion model in data processing.

[0017] The present invention uses a multi-head self-attention mechanism to generate random step sizes, thereby simulating the change process of sensor data. First, an initial time step size is defined, and then the multi-head self-attention mechanism is introduced. Specifically, for each node, a random step size value is calculated according to the weights and diffusion coefficients of its neighbor nodes, and is used to update the value of the node. At the same time, considering the correlation relationship between different nodes in the sliding window, the size of the step can be adjusted according to the edge weights between nodes, so as to better simulate the change process of the data.

[0018] The present invention combines the multi-head attention mechanism with the reverse diffusion network in the diffusion model, compares the predicted denoised data matrix with the original data matrix at the corresponding time step, and adjusts the diffusion coefficient according to the weights of its adjacent nodes to remove noise for anomaly detection.

[0019] The technical solution of the present invention is as follows:

[0020] An anomaly detection method for deep-sea submersible sensor data based on deep learning, comprising:

[0021] Preprocess the sensor data of the deep-sea submersible to be detected and input it into a trained anomaly detection model for multi-class anomaly detection;

[0022] The anomaly detection model includes a diffusion model, a multi-head self-attention mechanism layer, and a fully connected layer; the diffusion model outputs the extracted feature information, and passes through the self-attention mechanism layer. The self-attention mechanism layer assigns weights to each input item, selects the information that is more critical to the current task goal from the numerous feature information according to the weight size, and classifies through the fully connected layer to determine whether there is an anomaly.

[0023] Preferably according to the present invention, the preprocessing includes:

[0024] Select the sensor data, remove the interference data before and after the sensor enters and exits the water, and form an initial data matrix X s (n), n ∈ R;

[0025] Perform normalization processing on each point in the initial data matrix X s (n) and obtain the matrix X nomal(n) , and the normalization processing is shown in formula (I):

[0026]

[0027] Perform slicing processing on the normalized sensor data X normal(n) to form a matrix form X' of m × 6 × 6 s ={x0, x1,..., x m}, where x m is a 6 × 6 matrix.

[0028] Preferably according to the present invention, the training process of the anomaly detection model includes:

[0029] Construct a data set: Collect the sensing data collected by six sensors, namely the fuel tank pressure sensor, VP2 fuel tank temperature sensor, 10LPM compensator displacement sensor, 15LPM compensator displacement sensor, VP1 fuel tank temperature sensor, and 24V current detection sensor of the deep - sea submersible, and perform the above - mentioned pre - processing to obtain a training data set. When the deep - sea submersible fails, the corresponding sensor data is marked as abnormal, and vice versa as normal;

[0030] Input the training data set into the anomaly detection model for training, specifically including:

[0031] Use the optimized data set X′ s Train the diffusion model. The diffusion model is divided into a forward diffusion process and a reverse diffusion process: The forward diffusion process is to continuously add Gaussian noise to the sliced data matrix X′ s while the reverse diffusion process is to continuously denoise, expecting to finally restore it to the original data matrix X′ s ;

[0032] In each round of training in the forward diffusion process, select a random time step t for the training sample, t ∈ [0, T], apply the Gaussian noise corresponding to the time step t to the optimized data matrix, and convert the time step into the corresponding time - step embedding E(t); continuously add Gaussian noise to the optimized data set X′ s to form a noise matrix X noise (t);

[0033] In the reverse diffusion process, in each round of training, take the noise matrix X noise (t) and the encoded time - step embedding E(t) as inputs to train the Unet network in the diffusion model; after each round of training, the Unet network will predict the noise to be removed from the noise matrix to form a new matrix X rnoise (t). Compare the prediction result of the Unet network with the Gaussian noise added by the corresponding time - step embedding E(t) in the forward diffusion process, calculate the predicted loss rate Loss(t), and pass this result through the multi - head self - attention mechanism layer to randomly generate the time - step embedding E(t + 1) in the next round of training;

[0034] The trained diffusion model will output the extracted features. Pass the feature information through the multi - head self - attention mechanism layer to assign weights to each input item, select the information more critical to the current task objective from the numerous feature information according to the weight size, and perform classification through the fully - connected layer. Determine whether the deep - sea submersible has a fault based on whether there is an anomaly in the classification result.

[0035] Preferably according to the present invention, the process of multi-class anomaly detection includes:

[0036] 1) Generate a random step size, including:

[0037] Define the initial time step t0;

[0038] Perform phase encoding on the initial time step t0 to obtain the initial time step embedding E(0); the value of the analog quantity within one time period is represented by a pulse time, and the pulse sequence obtained by connecting all time periods represents the change of the analog quantity during the entire time process;

[0039] During the training process of the Unet network, the loss rate Loss(t) value generated in each iteration will be used as negative feedback, and together with the time step embedding E(t), it will be used as input through the multi-head self-attention mechanism layer to generate the time step embedding E(t+1) for the next round of training iteration;

[0040] 2) Forward diffusion, including:

[0041] During each round of training process, for the data matrix X′ s Add the noise corresponding to the time step embedding E(t), and after each round of training, obtain the noise matrix X noise (t) corresponding to the time step t. After the training is completed, obtain the final noise matrix X noise (T);

[0042] For the data matrix X noise (t), within each time step, q(X noise (t)|X noise (t-1)) is represented as a normal distribution with a mean of and a variance of (1-α t )I, where I is the identity matrix: as shown in Equation (II): q(X noise (t)|X noise (t-1)) = m(X noise (t);

[0043] α t As a hyperparameter, adjust the amount of added noise according to the time step t;

[0044] From Equation (III), that is:

[0045]

[0046]

[0047] Derive Equation (IV):

[0048]

[0049] 3) Reverse diffusion, including:

[0050] In each round of training, the time step embedding E(t) and the noise matrix X noise (T) are input into the UNet network in the diffusion model, and the predicted removed noise is obtained through network training to get the matrix X rnoise (t). This prediction result is compared with the noise added by E(t) under the corresponding time step embedding, and the loss Loss(t) is calculated;

[0051] For the matrix X rnoise (t) generated after each round of training, there is equation (V) under the time step embedding E(t):

[0052]

[0053] In equation (V), ε θ (X rnoise (t), t) represents the predicted removed noise, and ε is the Gaussian noise corresponding to the time step embedding E(t);

[0054] After the reverse diffusion process ends, the matrix X rnoise (0) is finally restored;

[0055] 4) After the diffusion model training ends, the vector feature matrix of the output original data matrix X′ s

[0056] X feature = {x feature0 , x feature1 ,..., x featurem}, where x featurem is a 6×6 matrix. For the feature result x featurem of each slice, the self-attention value h m is calculated separately. Each node represents a data sample, and each edge represents the association relationship between two nodes. For each node, its value is updated according to the weights of its neighbor nodes. The weights of the nodes with greater influence on the task objective are increased, and vice versa. Then, the multi-head self-attention mechanism MultiHead(X feature ) is calculated through equation (VI), and finally the features with greater influence on detecting whether there are abnormal phenomena in the deep-sea submersible sensor are obtained:

[0057] MultiHead(X feature ) = Concat(h0, h1,..., h m ) (VI) ​

[0058] The data is classified through a fully connected layer, and the data corresponding to the abnormal state is labeled as 1, while the data corresponding to the normal state is labeled as 0.

[0059] According to a preferred embodiment of the present invention, the difference between the predicted noise and the actual noise is calculated according to the cross-entropy loss function as the loss Loss, which is used to evaluate the performance of the anomaly detection model, measure the quality of the prediction result of the anomaly detection model, and is used as a negative feedback term; the loss Loss is shown in Equation (VII):

[0060]

[0061] In Equation (VII), y i represents the label of the sample, where abnormal data is marked as 1 and normal data is marked as 0, and p i represents the probability that the sample is predicted as abnormal data.

[0062] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the anomaly detection method for deep-sea submersible sensor data based on deep learning are implemented.

[0063] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the anomaly detection method for deep-sea submersible sensor data based on deep learning are implemented.

[0064] The beneficial effects of the present invention are as follows:

[0065] The present invention uses a graph attention mechanism to calculate the weights between nodes, which can bring the following benefits:

[0066] 1. Better focus on important features of the data: The attention mechanism can help the model better focus on important features in the data, thereby improving the accuracy and performance of the model.

[0067] 2. Strengthen the discrimination ability of the model: The attention mechanism can make the model pay more attention to the differences and distinctions between different features, so that the model has stronger discrimination ability and discriminative ability.

[0068] 3. Improve the robustness of the model: The attention mechanism can make the model more flexible and robust, and can better adapt to different data distributions and noise interferences, thereby improving the generalization ability and robustness of the model.

[0069] 4. Stronger interpretability: The attention mechanism can make the model more interpretable, so as to better understand the decision-making process and results of the model, which helps to further optimize the performance and effect of the model.

[0070] 5. Can handle more complex data: The attention mechanism can make the diffusion model more suitable for processing more complex high-dimensional data, thus expanding the application scope and potential of the diffusion model. Brief Description of the Drawings

[0071] Figure 1 Flow schematic diagram of the method for detecting anomalies in deep-sea submersible sensor data based on deep learning according to the present invention:

[0072] Figure 2 Schematic diagram of the network structure of the diffusion model:

[0073] Figure 3 Schematic diagram of the network structure of the anomaly detection model according to the present invention. Detailed Embodiments

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

[0075] Embodiment 1

[0076] A method for detecting anomalies in deep-sea submersible sensor data based on deep learning, comprising:

[0077] Preprocess the sensor data of the deep-sea submersible to be detected and input it into the trained anomaly detection model for multi-class anomaly detection; the deep-sea submersible sensor data includes the sensing data collected by 6 sensors, namely the fuel tank pressure sensor, VP2 fuel tank temperature sensor, 10LPM compensator displacement sensor, 15LPM compensator displacement sensor, VP1 fuel tank temperature sensor, and 24V current detection sensor of the deep-sea submersible;

[0078] As Figure 3 shown, the anomaly detection model includes a diffusion model, a multi-head self-attention mechanism layer, and a fully connected layer; the diffusion model outputs the extracted feature information, and through the self-attention mechanism layer, the self-attention mechanism layer assigns weights to each input item, selects the information more critical to the current task objective from numerous feature information according to the weight size, and classifies through the fully connected layer to determine whether there is an anomaly.

[0079] Introducing the attention mechanism into the diffusion model in the present invention is an effective method, which can make full use of the relationship between nodes, improve the accuracy and efficiency of the model, can further improve the accuracy and performance of the diffusion model, and is helpful for better application in various data analysis and processing tasks. Compared with the traditional Euler method or implicit Euler method, the present invention can better handle complex graph data and has better applicability and universality.

[0080] The present invention proposes to introduce an attention mechanism into the diffusion model to generate random step sizes, which can enable the model to pay more attention to important nodes and edges, thereby generating more realistic and accurate random step sizes, helping to better simulate the change process of sensor data. The attention mechanism can make the model more flexible and robust, and can better adapt to different data distributions and noise interferences, thereby improving the generalization ability and robustness of the model, and can further improve the accuracy of the model, helping to further optimize the performance and effect of the model.

[0081] Embodiment 2

[0082] A method for detecting anomalies in deep-sea submersible sensor data based on deep learning according to Embodiment 1, characterized in that:

[0083] Preprocessing, including:

[0084] Select the sensor data, remove the interference data before and after the sensor enters and exits the water, and form an initial data matrix X s (n), n ∈ R; the sensor data includes: various data of the VP1 fuel tank temperature, VP2 fuel tank temperature, 24V current, fuel tank pressure, 10LPM compensator displacement, and 15LPM compensator displacement in the sensor.

[0085] For the initial data matrix X s (n), perform normalization processing on each point and obtain the matrix X normal(n) , and the normalization processing is shown in Equation (I):

[0086]

[0087] For the normalized sensor data X nomal(n) , perform slicing processing to form a matrix form X' of m×6×6 s ={x0, x1,..., x m}), where x m is a 6×6 matrix.

[0088] The training process of the anomaly detection model includes:

[0089] Build a data set: Collect the sensing data collected by 6 sensors including the fuel tank pressure sensor, VP2 fuel tank temperature sensor, 10LPM compensator displacement sensor, 15LPM compensator displacement sensor, VP1 fuel tank temperature sensor, and 24V current detection sensor of the deep-sea submersible, and perform the above-mentioned preprocessing to obtain a training data set. When the deep-sea submersible fails, the corresponding sensor data is marked as abnormal, otherwise it is marked as normal;

[0090] Input the training data set into the anomaly detection model for training, specifically including:

[0091] Use the optimized dataset X' s Train a diffusion model, which is divided into a forward diffusion process and a reverse diffusion process: in the forward diffusion process, Gaussian noise is continuously added to the sliced data matrix X' s while in the reverse diffusion process, noise is continuously removed with the expectation of finally restoring it to the original data matrix X'. s ;

[0092] In each round of the forward diffusion training process, a random time step t, t∈[0, T], is selected for the training sample, and the Gaussian noise corresponding to the time step t is applied to the optimized data matrix, and the time step is converted into the corresponding time step embedding E(t); continuously add Gaussian noise to the optimized dataset X' s to form a noise matrix X noise (t); after the forward diffusion process ends, a noise matrix X noise (T) is finally formed;

[0093] In the reverse diffusion process, in each round of training, the noise matrix X noise (t) and the encoded time step embedding E(t) are used as inputs together to train the Unet network in the diffusion model; after each round of training, the Unet network will predict the noise to be removed from the noise matrix to form a new matrix X rnoise (t), compare the prediction result of the Unet network with the Gaussian noise added by the corresponding time step embedding E(t) in the forward diffusion process, calculate the predicted loss rate Loss(t), and pass this result through the multi-head self-attention mechanism layer to randomly generate the time step embedding E(t + 1) in the next round of training;

[0094] The trained diffusion model will output the extracted features. The feature information passes through the multi-head self-attention mechanism layer to assign weights to each input item, select the information more critical to the current task objective from the numerous feature information according to the weight size, and perform classification through the fully connected layer. Whether there is a fault in the deep-sea submersible is judged according to whether there is an abnormality in the classification result.

[0095] As Figure 1 shown, the process of multi-class anomaly detection includes:

[0096] 1) Generate a random step size, including:

[0097] Define the initial time step t0;

[0098] Perform phase encoding on the initial time step t0 to obtain the initial time step embedding E(0); the value of the analog quantity within one time period is represented by a pulse time, and the pulse sequence obtained by connecting all time periods represents the change of the analog quantity during the entire time process;

[0099] During the training process of the Unet network, the loss rate Loss(t) value generated in each iteration will be used as negative feedback, and together with the time step embedding E(t), as inputs, pass through the multi-head self-attention mechanism layer to generate the time step embedding E(t+1) for the next round of training iteration;

[0100] 2) As shown by the solid line part of Figure 2 , the forward diffusion includes:

[0101] During each round of training, noise corresponding to the time step embedding E(t) is added to the data matrix X′ s After each round of training, the noise matrix X noise (t) corresponding to the time step t is obtained, and the final noise matrix X noise (T) is obtained after the training ends;

[0102] For the data matrix X noise (t), within each time step, q(X noise (t)|X noise (t-1)) is expressed as a normal distribution with a mean of and a variance of (1-α t )I, where I is the identity matrix: as shown in Equation (II):

[0103]

[0104] α t , as a hyperparameter, adjusts the amount of noise added according to the time step t;

[0105] From Equation (III), that is:

[0106]

[0107]

[0108] Equation (IV) is derived:

[0109]

[0110] 3) As shown by the dashed line part of Figure 2 , the reverse diffusion includes:

[0111] During each round of training, the time step embedding E(t) and the noise matrix X noise (T) are input into the UNet network in the diffusion model, and through network training, the predicted removed noise is obtained to get the matrix X rnoise (t). This prediction result is compared with the noise added under the corresponding time step embedding E(t) to calculate the loss Loss(t);

[0112] For the matrix X rnoise (t) generated after each round of training, there is equation (V) under the time step embedding E(t):

[0113]

[0114] In equation (V), ε θ (X rnoise (t), t) represents the predicted removed noise, and ε is the Gaussian noise corresponding to the time step embedding E(t);

[0115] After the reverse diffusion process ends, the matrix X rnoise (0) is finally restored;

[0116] 4) After the diffusion model training ends, the vector feature matrix of the output original data matrix X′ s will be

[0117] X feature ={x feature0 , x feature1 ,..., x featurem}, where x featurem is a 6×6 matrix. For the feature result x featurem of each slice, the self-attention value h m is calculated separately. Each node represents a data sample, and each edge represents the association relationship between two nodes. For each node, the value of the node is updated according to the weights of its neighbor nodes. The weights of the nodes with greater influence on the task objective are increased, and vice versa. Then, the multi-head self-attention mechanism MultiHead(X feature ) is calculated through equation (VI), and finally the features with greater influence on detecting whether there are abnormal phenomena in the deep-sea submersible sensor are obtained:

[0118] MultiHead(X feature ) = Concat(h0, h1,..., h m ) (VI)

[0119] The classification of the data is achieved through the fully connected layer. The data corresponding to the abnormal state is labeled as 1, and the data corresponding to the normal state is labeled as 0.

[0120] By combining the diffusion model and the graph attention mechanism, more accurate random step sizes can be generated, which helps to better simulate the change process of sensor data, thereby improving the performance and effect of anomaly detection.

[0121] Calculate the difference between the predicted noise and the actual noise according to the cross-entropy loss function as the loss Loss, which is used to evaluate the performance of the anomaly detection model, measure the quality of the prediction results of the anomaly detection model, and use it as a negative feedback term; the loss Loss is shown in Equation (VII):

[0122]

[0123] In Equation (VII), y i represents the label of the sample, the anomaly data is marked as 1, the normal data is marked as 0, and p i represents the probability that the sample is predicted as anomaly data.

[0124] Embodiment 3

[0125] A computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the anomaly detection method for deep-sea submersible sensor data based on deep learning described in Embodiment 1 or 2 are implemented.

[0126] Embodiment 4

[0127] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the anomaly detection method for deep-sea submersible sensor data based on deep learning described in Embodiment 1 or 2 are implemented.

Claims

1. An anomaly detection method for deep - sea submersible sensor data based on deep learning, characterized in that, Including: Preprocess the sensor data of the deep-sea submersible to be detected and input it into the trained anomaly detection model for multi-class anomaly detection. The anomaly detection model includes a diffusion model, a multi-head self-attention mechanism layer, and a fully connected layer; the diffusion model outputs the extracted feature information, which passes through the self-attention mechanism layer. The self-attention mechanism layer assigns weights to each input item, selects the information that is more critical to the current task goal from numerous feature information according to the weight size, and performs classification through the fully connected layer to determine whether there is an anomaly. The process of multi-class anomaly detection includes: 1) Generate a random step size, including: Define the initial time step t0. Perform phase encoding on the initial time step t0 to obtain the initial time step embedding E(0); the value of the analog quantity within one time period is represented by a pulse time, and the pulse sequence obtained by connecting all time periods represents the change of the analog quantity in the whole time process. During the training process of the Unet network, the loss rate Loss(t) value generated in each iteration will be used as negative feedback, and together with the time step embedding E(t), it is input through the multi-head self-attention mechanism layer to generate the time step embedding E(t + 1) in the next round of training. 2) Forward diffusion, including: In each round of the training process, for the data matrix X' s Add the noise corresponding to the time step embedding E(t). After each round of training, a noise matrix X noise (t) corresponding to the time step t is obtained. After the training is completed, the final noise matrix X noise (T) is obtained; For the noise matrix X noise (t), within each time step, q(X noise (t)|X noise (t - 1)) is represented as a normal distribution with a mean of and a variance of (1 - α t )I, where I is the identity matrix: as shown in Equation (II): α t As a hyperparameter, it adjusts the amount of added noise according to the time step t; From Equation (III), that is: Derive to obtain Equation (IV): 3) Reverse diffusion, including: In each round of training, the time step embedding E(t) and the noise matrix X noise (T) are input into the UNet network in the diffusion model, and the predicted removed noise is obtained through network training to obtain the matrix X rnoise (t). This prediction result is compared with the noise added by the corresponding time step embedding E(t), and the loss Loss(t) is calculated; For the matrix X rnoise (t) generated after each round of training, there is formula (V) under the time step embedding E(t): In formula (V), ε θ (X rnoise (t), t) represents the predicted removed noise, and ε is the Gaussian noise corresponding to the time-step embedding E(t); After the reverse diffusion process ends, the matrix X is finally restored and formed. rnoise (0).

2. The anomaly detection method for deep - sea submersible sensor data based on deep learning according to claim 1, characterized in that, Preprocessing, including: Select the sensor data, remove the interference data before and after the sensor enters and exits the water, and form the initial data matrix X s (n), n ∈ R; For the initial data matrix X s Normalize each point in (n) and obtain the matrix X normal(n) , and the normalization process is shown in Equation (I): For the normalized sensor data X normal(n) perform slicing processing to form a data matrix X′ in the form of an m×6×6 matrix s ={x0,x1,…,x m}, where x m is a 6×6 matrix.

3. The anomaly detection method for deep - sea submersible sensor data based on deep learning according to claim 1, characterized in that, The training process of the anomaly detection model includes: Build a dataset: Collect the sensing data collected by 6 sensors including the fuel tank pressure sensor, VP2 fuel tank temperature sensor, 10LPM compensator displacement sensor, 15LPM compensator displacement sensor, VP1 fuel tank temperature sensor, and 24V current detection sensor of the deep-sea submersible, and perform the above-mentioned preprocessing to obtain a training dataset. When the deep-sea submersible fails, the corresponding sensor data is marked as abnormal, and vice versa as normal. Input the training dataset into the anomaly detection model for training, specifically including: Use the optimized data matrix X′ s Train the diffusion model, which is divided into a forward diffusion process and a reverse diffusion process: the forward diffusion process is to continuously add Gaussian noise to the sliced data matrix X′ s while the reverse diffusion process is to continuously denoise, with the expectation of finally restoring it to the data matrix X′ s ; During each round of forward diffusion training, a random time step \(t\), where \(t\in[0,T]\), is selected for the training samples. The Gaussian noise corresponding to the time step \(t\) is applied to the optimized data matrix, and the time step is transformed into the corresponding time step embedding \(E(t)\); for the optimized data matrix \(X\) ′ s Gaussian noise is continuously added to form the noise matrix \(X\) noise (t); During the reverse diffusion process, in each round of training, the noise matrix X noise (t) and the encoded time step embedding E(t) are used as inputs together to train the UNet network in the diffusion model; after each round of training, the Une network will predict the noise to be removed from the noise matrix to form a new matrix X rnoise (t). Compare the prediction result of the Unet network with the Gaussian noise added by the corresponding time step embedding E(t) in the forward diffusion process, calculate the predicted loss rate Loss(t), and pass this result through the multi-head self-attention mechanism layer to randomly generate the time step embedding E(t+1) in the next round of training; The trained diffusion model will output the extracted features. The feature information passes through the multi-head self-attention mechanism layer, which assigns weights to each input item, selects the information that is more critical to the current task goal from numerous feature information according to the weight size, and performs classification through the fully connected layer. Determine whether there is a failure of the deep-sea submersible according to whether there is an anomaly in the classification result.

4. The anomaly detection method for deep - sea submersible sensor data based on deep learning according to claim 1, wherein, After the diffusion model training is completed, the output data matrix X' s will be the vector feature matrix X feature ={x feature0 ,x feature1 ,…,x featurem}, where x featurem is a 6×6 matrix. For the feature result x featurem of each slice, the self-attention value h m is calculated separately. Each node represents a data sample, and each edge represents the association relationship between two nodes. For each node, its value is updated according to the weights of its neighbor nodes. The weights of the nodes with greater influence on the task objective are increased, while those with less influence are decreased. Then, the multi-head self-attention mechanism MultiHead(X feature ) is calculated through Equation (VI), and finally, the features with greater influence on detecting whether there are abnormal phenomena in the deep-sea submersible sensor are obtained: MultiHead(X feature ) = Concat(h0, h1, …, h m ) (VI) Realize the classification of data through the fully connected layer, mark the data corresponding to the abnormal state as 1, and the data corresponding to the normal state as 0.

5. The anomaly detection method for deep - sea submersible sensor data based on deep learning according to any one of claims 1 - 4, wherein, Calculate the gap between the predicted noise and the actual noise according to the cross-entropy loss function as the loss Loss, which is used to evaluate the performance of the anomaly detection model, measure the quality of the prediction result of the anomaly detection model, and use it as a negative feedback item. The loss Loss is shown in Equation (VII): In formula (VII), y i represents the label of the sample, where the abnormal data flag is 1 and the normal data flag is 0, and p i represents the probability that the sample is predicted as abnormal data.

6. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein, When the processor executes the computer program, it implements the steps of the anomaly detection method for deep-sea submersible sensor data according to any one of claims 1-5 based on deep learning.

7. A computer - readable storage medium, on which a computer program is stored, wherein, When the computer program is executed by the processor, it implements the steps of the anomaly detection method for deep-sea submersible sensor data according to any one of claims 1-5 based on deep learning.

Citation Information

Patent Citations

  • Information diffusion prediction system based on space-time attention and heterogeneous graph convolutional network

    CN113807616A