Multi-type lost data recovery model construction method and system
Through deep learning methods, the multi-type lost data recovery model is constructed, which solves the problem of data recovery under complex lost conditions in structural health monitoring, and achieves high-precision and high-rootability data recovery effect, which is suitable for multi-channel and full-channel Data missing scenarios occur simultaneously.
Patent Information
- Application Number
- CN202411199654.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art is difficult to effectively recover multiple types of data abnormalities in structural health monitoring, especially in the case of random point data loss, continuous fragment data loss and multi-channel data loss at the same time, and the generality of data recovery methods and lack of robustness, making it difficult to maintain efficient performance in complex lost working conditions.
Deep learning method is used to build a multi-type loss data recovery model, preprocessing structural health monitoring data, using a network model composed of convolutional layer, self-attention layer and improved self-attention layer, combining Smooth L1 Loss loss function and Adam optimizer , the final multi-type loss data recovery model is trained, which can handle the simultaneous data loss between multiple channels and all channels, and has good noise robustness.
It realizes high accuracy and comprehensive recovery capabilities when recovering structural vibration data, can automatically handle complex lost working conditions, fast prediction speed, and slow data recovery accuracy when facing unknown noise intensity, improving system reliability and effectiveness sex.
Smart Images

Figure CN119088619A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for constructing a multi-type lost data recovery model. Background Art
[0002] Structural health monitoring (SHM) is of great significance to ensure the safety and durability of civil structures throughout their life cycle. SHM systems have been widely used in large-scale civil infrastructure, including high-rise buildings, tunnels, and bridges, to continuously monitor their operating conditions and performance. However, due to human and environmental influences, such as sensor aging, communication failures, extreme loads, etc., the measured vibration data will inevitably contain data anomalies such as deviation, drift, gain change, accuracy degradation, and missing values; in addition, with the rapid development of anomaly detection methods, converting detected data anomalies into missing values for further recovery has become an innovative and simplified anomaly repair strategy. When data missingness accumulates to a certain extent, it may lead to false positives or false negatives of structural anomalies, thus affecting the reliability and effectiveness of SHM. In particular, in extreme cases, multiple sensors may be abnormal at the same time, which is extremely unfavorable for the structural health monitoring system to conduct real-time or post-disaster structural status assessment.
[0003] In order to avoid such situations and ensure the safety of people's lives and property, engineers of SHM systems must take effective methods to recover abnormal data. In order to simplify the data recovery scheme and provide a general method for repairing abnormal data, some scholars have proposed an innovative strategy: zeroing all detected abnormal values and converting the complex task of directly correcting abnormal data into a simpler missing data interpolation and matrix completion problem. Existing data recovery methods can be divided into two categories: finite element model-based methods and data-driven methods. The core of both methods is to establish a mapping relationship to recover missing data. The finite element model-based method uses the mapping relationship derived from the finite elements of the target structure to recover data. Its accuracy and reliability largely depend on the quality of the established finite element model. However, it becomes very difficult to establish a finite element model that accurately reflects the changes in real-time conditions. This limitation greatly limits the application of finite element methods in large-scale civil engineering. Data-driven deep learning methods can quickly obtain potential mapping relationships, which is of great help to the real-time analysis of structures. A well-built deep learning model can learn its physical properties and other potential features from the historical data of the structure. With the development of GPU computing power, the time spent on training a suitable deep learning model is getting shorter and shorter.
[0004] However, existing data recovery methods usually assume that anomalies are some kind of loss situation and perform targeted recovery. For example, they assume that anomalies are lost in a fixed-length segment of data. However, under real working conditions, the time period when anomalies occur, the duration, and the number of channels where anomalies occur simultaneously are all random, and noise can also be considered a form of data anomaly. Therefore, the abnormal data recovery method that can effectively recover multiple abnormal data at the same time and reduce the interference of noise of different intensities has not been well developed.
[0005] In summary, the prior art has the following disadvantages:
[0006] 1. The general ability of the recovery method is insufficient. General ability mainly refers to the model's ability to handle different tasks. Most of the current recovery methods can only achieve good structures under simple loss conditions. For example, the model that handles discrete random loss may not work well in continuous loss. The method that handles single-channel loss data is difficult to handle multi-channel or full-channel loss at the same time (complex loss conditions such as Figure 1 As shown), facing this kind of problem, existing methods are difficult to recover data effectively.
[0007] 2. The robustness of the data recovery method is poor. Robustness mainly refers to the robustness of the model to the input data, that is, the model can still maintain efficient performance when encountering various different data inputs. For example, can the data trained at a low noise level be used for the data recovery task of high noise level polluted data? Summary of the invention
[0008] The purpose of the present invention is to provide a method and system for constructing a multi-type lost data recovery model, aiming to solve the above-mentioned problems in the prior art.
[0009] An embodiment of the present invention provides a method for constructing a multi-type lost data recovery model, comprising:
[0010] Acquiring data of a target sensor in a structural health monitoring (SHM) system, preprocessing the data of the target sensor to obtain a restored data set; and
[0011] The recovery data set is input into a pre-built data recovery model for training, and the weight of the pre-built data recovery model is adjusted using a loss function to obtain a final multi-type lost data recovery model.
[0012] An embodiment of the present invention provides a system for constructing a multi-type lost data recovery model, including:
[0013] A data module, used to obtain data of a target sensor in a structural health monitoring (SHM) system, pre-process the data of the target sensor, and obtain a restored data set; and
[0014] A construction module is used to input the recovery data set into a pre-constructed data recovery model for training, and use a loss function to adjust the weight of the pre-constructed data recovery model to obtain a final multi-type lost data recovery model.
[0015] An embodiment of the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned method for constructing a multi-type lost data recovery model when executed by the processor.
[0016] An embodiment of the present invention further provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps of the above-mentioned method for constructing a multi-type lost data recovery model are implemented.
[0017] The use of the embodiments of the present invention can include the following beneficial effects: the embodiments of the present invention can simultaneously process random point data missing, continuous segment data missing, and multi-channel (or even all-channel) data missing during structural vibration data recovery, has strong comprehensive recovery capabilities and high accuracy, and has a high degree of automation, a fast prediction speed, good noise robustness, and can slowly reduce the data recovery accuracy when facing unknown noise intensity. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 is a schematic diagram of a complex loss condition of an embodiment of the present invention;
[0020] Figure 2 is a flow chart of a method for constructing a multi-type lost data recovery model according to an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of a method for recovering structural vibration data according to an embodiment of the present invention;
[0022] Figure 4 is a schematic diagram of a model of a data recovery method according to an embodiment of the present invention;
[0023] Figure 5 Schematic diagram of a self-attention block and a C-shaped self-attention block according to an embodiment of the present invention;
[0024] Figure 6 is a schematic diagram of a network model used in an example of an embodiment of the present invention;
[0025] Figure 7 is a schematic diagram of a model loss decline curve of an embodiment of the present invention;
[0026] Figure 8 is a schematic diagram of comparison between real data and restored data when 50% of the test set data is missing in an embodiment of the present invention;
[0027] Fig. 9 Schematic diagram of a system for constructing a multi-type lost data recovery model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0029] Method Embodiment
[0030] According to an embodiment of the present invention, a method for constructing a multi-type lost data recovery model is provided. Figure 2 is a flow chart of a method for constructing a multi-type lost data recovery model according to an embodiment of the present invention. Figure 2 As shown, the method for constructing a multi-type lost data recovery model according to an embodiment of the present invention specifically includes:
[0031] Step S201, obtaining data of a target sensor in a structural health monitoring (SHM) system, preprocessing the data of the target sensor to obtain a restored data set, specifically includes:
[0032] A low-pass filter is used to filter the data of the target sensor, noise is added to the filtered data according to Formula 1 to obtain data with additional artificial noise, the data with additional artificial noise is normalized, outliers in the normalized data are reset to zero and multiple types of missing data are added to obtain a balanced data set, and the balanced data set is segmented into a multidimensional vector using a sliding window of a preset length to obtain a restored data set;
[0033] Input=data ori +rms(data ori )*randn(L)*N Formula 1;
[0034] Among them, data ori Refers to the original data, Input represents the data with additional artificial noise, L is the data length, N is the noise level, rms() represents the root mean square error function, and randn() represents the function that generates random numbers or matrices with standard normal distribution;
[0035] Step S202, inputting the recovery data set into a pre-built data recovery model for training, and adjusting the weight of the pre-built data recovery model using a loss function to obtain a final multi-type lost data recovery model;
[0036] The pre-built data recovery model includes multiple convolutional layers, self-attention layers, and improved self-attention layers stacked alternately;
[0037] Among them, the number of convolutional layers between two self-attention layers is 1, 2 or 3 layers, the output layer is a fully connected layer, and the number of channels of the last layer output corresponds to the number of channels of the input;
[0038] The improved self-attention layer is a C-type self-attention layer;
[0039] Inputting the recovery data set into the pre-built data recovery model for training, and adjusting the weight of the pre-built data recovery model using the loss function, to obtain the final multi-type lost data recovery model specifically includes:
[0040] The restored data set is input into a pre-built data recovery model for training, features of the restored data set are extracted through multiple convolutional layers, and the feature map obtained after each convolution layer is nonlinearly transformed using a Leaky ReLU activation function or a ReLU activation function, and the transformed data is passed through a self-attention layer, an improved self-attention layer, and a fully connected layer to obtain a final output result. During the training process, the Adam optimizer is used to optimize the network, and the ReduceLROnPlateau adjustment strategy is used to adjust the learning rate. The Smooth L1 Loss loss function shown in Formula 2 is used to adjust the weight of the pre-built data recovery model, and it is continuously iterated according to the loss reduction until the model converges to obtain the final multi-type lost data recovery model;
[0041]
[0042] Among them, y i is the true value, y i ′ is the predicted value, y i -y i ′ represents the difference between the true value and the predicted value;
[0043] The method further comprises:
[0044] The data of the missing area in the structural health monitoring SHM system is recovered through the final multi-type lost data recovery model, and the obtained data is restored to obtain the final data result.
[0045] The following is a specific example of the method for constructing a multi-type lost data recovery model according to an embodiment of the present invention. Figure 3 As shown, the above technical solution of the embodiment of the present invention is described in detail.
[0046] The embodiment of the present invention provides a structural health monitoring data recovery method based on deep learning to solve the problem that it is difficult to simultaneously recover the complex missing situations of data period, duration, and random number of abnormal channels in the data recovery process of the existing SHM system, which specifically includes the following contents:
[0047] 1. Structural health monitoring raw data collection: obtain the data of target sensors in the structural health monitoring system;
[0048] 2. Further, the data is processed and a data set is constructed, including:
[0049] (1): Data filtering: Use a low-pass filter to filter the data to remove noise outside the frequency band of structural interest;
[0050] (2) Noise addition: A certain level of noise is injected into the data. The noise is a normally distributed random vector with a mean of zero and a standard deviation of zero. This step helps to improve the noise resistance of the method. For cases where the impact of noise is small, the level of injected noise can be dynamically adjusted or ignored (this step does not require knowing the exact level of noise that may exist in the real data);
[0051] (3): Normalization: Use data processing software such as MATLAB to normalize the data;
[0052] (4): Anomaly zeroing: The outliers detected by the SHM system are zeroed. At the same time, in order to ensure the data set's ability to handle various missing types, it is necessary to appropriately add multiple missing types to make the data set more balanced to cover all missing situations;
[0053] (5): Data cutting: Use a sliding window of preset length to segment the data processed in the previous step to obtain a series of fragments forming a multi-dimensional vector.
[0054] 3. Construct a data recovery network model: The model backbone is composed of multiple convolutional layers and self-attention layers and / or improved self-attention layers stacked alternately, wherein the number of convolutional layers between two self-attention layers of the model can be 1-3 layers, and the final output layer of the model can use a fully connected layer to replace the convolutional layer, and the number of channels of the final output layer of the model should correspond to the number of input channels; (The model backbone of the data recovery method is as follows Figure 4 (shown)
[0055] Other configurations of the model specifically include:
[0056] Leaky ReLU is used as the activation function after each convolution layer (ReLU can also achieve similar effects in this step), and its expression is as follows:
[0057]
[0058] Among them, x is the output of the previous layer of neurons. When x>0, the function outputs x, and in other cases, the function outputs αx.
[0059] Smooth L1 Loss is used as the loss function of the embodiment of the present invention. Smooth L1 Loss is a piecewise function that combines the advantages of L1 and L2 losses. The specific formula of the Smooth L1 Loss function is as follows:
[0060]
[0061] Among them, y i is the true value, y i ′ is the predicted value, y i -y i ′ represents the difference between the true value and the predicted value. When the absolute value is high, Smooth L1 Loss behaves as L1 loss, and when the absolute value is close to zero, it behaves as L2 loss.
[0062] The embodiment of the present invention selects Adam as the optimizer of the network. Adam optimizer has the advantages of interval gradient descent and adaptive learning rate optimizer, and is currently one of the most widely used and best optimizers;
[0063] Dynamic learning rate adjustment mechanism: ReduceLROnPlateau is used as the learning rate adjustment strategy during training. When the model has been trained for several consecutive cycles and the loss of the validation set has not decreased, ReduceLROnPlateau will automatically reduce the learning rate according to the set method;
[0064] A C-type self-attention mechanism: The embodiment of the present invention proposes a variant algorithm of the traditional self-attention mechanism - the C-type self-attention mechanism. The C-type self-attention mechanism combines the advantages of self-attention and encoding-decoding attention, making the data recovery network more adaptable to processing uncertain missing points and data noise, which further enhances the network's ability to extract structural robustness features. The specific configuration is as follows Figure 5 shown.
[0065] 4. After the data set and deep learning network are built, the model is further trained and data is recovered, including:
[0066] S41: Network training: The constructed data set with multi-channel data with multiple loss conditions and noise is used as the input of the network, and the complete data without noise is used as the label of the network. The last layer of the network needs to output the same number of restored data as the input channels. During the network training process, as the number of iterations increases, the model gradually converges;
[0067] S42: Data recovery: Use the trained weights to predict the unknown lost data that needs to be restored to obtain complete data.
[0068] The embodiment of the present invention uses acceleration data collected by a structural health monitoring system of a certain structure as an example. Specifically, five acceleration measurement data of the structure in normal operation are selected to construct a data set.
[0069] S01: Data filtering: Since the initial 15 vibration modes of the structure of the embodiment of the present invention are all within the range of 2 Hz, the raw data is first processed using a low-pass filter with a cutoff frequency of 2 Hz to retain relevant information closely related to the dynamic characteristics of the structure of interest, while effectively eliminating a large amount of redundant information and noise;
[0070] S02: Noise addition: 10% artificial noise is introduced into the input data to achieve the purpose of polluting the data. The noise data is generated by the following formula:
[0071] Input=data ori +rms(data ori )*randn(L)*N;
[0072] Among them, data ori refers to the original data, Input refers to the data with additional artificial noise, L is the data length, and N is the noise level. Noise is a normally distributed random vector with zero mean and zero standard deviation;
[0073] S03: Normalization: Use data processing tools such as MATLAB to normalize the S02 data;
[0074] S04: Anomaly zeroing: The anomaly values detected by the SHM system are zeroed. At the same time, in order to ensure the data set's ability to handle various types of missing data, it is necessary to appropriately add multiple types of missing data to make the data set more balanced to cover all loss situations. When appropriately adding multiple types of missing data, the following method can be adopted: divide the data into several unit segments with a pane of fixed-length sampling points, randomly select a certain percentage of the unit segments for missing data processing, and simulate different degrees of data missing data. The selected unit segments include all possible combinations of 1 to 5 channels that experience random losses at the same time within a specified time range. In order to simulate the unpredictability of the occurrence and duration of anomalies, 20% to 100% of the sampling points in the unit segment are randomly zeroed, and the length and starting point of all missing data segments in each unit segment are random. It should be noted that due to the random selection of missing segments, the actual missing duration of a signal may far exceed the pane of fixed-length sampling points. This situation is a simulation of the loss of long segments and long anomalies. The embodiment of the present invention further balances the degree of data missing by fusing three sets of training sets with different overall loss levels to further improve the prediction accuracy;
[0075] S05: Data cutting: Using 50% overlapping sliding window technology, the data is divided into samples containing 1024 points, and the data format is N*1024*5;
[0076] S06: Constructing a data recovery network model: Figure 6 The network model shown is demonstrated, and the feature map sizes output by each part of the network are shown in Table 1:
[0077] Table 1 Feature map sizes output by each part of the network
[0078] Module (layer) Input Shape Output shape Kernel size Activation Function C-shaped self-attention block N×1024×128 N×1024×67 - - Self-attention block N×1024×3 N×1024×131 - - C-shaped self-attention block N×1024×512 N×1024×259 - - Convolutional Layer N×1024×259 N×1024×256 128 LeakyReLU Convolutional Layer N×1024×256 N×1024×5 64 LeakyReLU
[0079] In the embodiment of the present invention, Figure 6As shown in the figure, self-attention modules 1 and 3 fully follow the C-type self-attention mechanism, and the self-attention modules calculate the weight matrix according to the traditional self-attention. In the C-type self-attention module 1, the original structural acceleration data is initially processed by the convolution layer to reduce noise and obtain representative features. The feature map output by the convolution layer will be used to calculate the key and value matrix of the C-type self-attention mechanism layer. At the same time, the feature map output by the convolution layer is also used as the input of the next convolution layer, with the purpose of further extracting higher-level features to construct the query matrix. The high-level features further extracted by the convolution layer 2 are used to calculate the query matrix of the C-type self-attention mechanism layer. At this time, the structural vibration features undergo an encoding-decoding process through the attention weights of different feature spaces. The self-attention module 3 adopts the same structure as the self-attention module 1, but has a larger receptive field to capture features of different scales. The self-attention module 2 continues to use the traditional self-attention mechanism to calculate the weights to make full use of the advantages of self-attention in processing time series data. The self-attention module 2 can further extract features from the feature map of the previous layer, while avoiding the C-type self-attention mechanism from ignoring certain important features;
[0080] S07: Leaky ReLU is used as the activation function after each convolution layer. Its expression is as follows (the hyperparameter α is selected as 0.1):
[0081]
[0082] S08: Using Smooth L1 Loss as the loss function of the embodiment of the present invention;
[0083] S09: Optimizer: Adam was selected as the optimizer of the network;
[0084] S10: Dynamic learning rate adjustment mechanism: ReduceLROnPlateau is used as the learning rate adjustment strategy during training. When the model is trained for several consecutive cycles and the loss of the validation set does not decrease, ReduceLROnPlateau will automatically reduce the learning rate according to the set method. The initial learning rate is 0.001 and the final learning rate is 0.0001.
[0085] S11: Network training: The constructed data set with multiple channels, multiple loss conditions and noise is used as the network input, and the complete data without noise is used as the network label. The last layer of the network needs to output the same number of restored data as the input channels. During the network training process, as the number of iterations increases, the model gradually converges. After multiple iterations, the model basically converges. The loss curve of the entire training process is as follows: Figure 7The loss curve of the training process shows that in the first few batches, the loss of this model dropped sharply. After 20 iterations, the training and validation losses dropped to 0.0018 and 0.0012 respectively. Subsequently, the loss of the model continued to drop steadily. After 120 trainings, the loss reached 0.0016 and 0.0012. At this time, the model can be considered to have converged.
[0086] S12: Save the trained weights in folder A;
[0087] S13: Data recovery: The method proposed in the embodiment of the present invention is tested for data recovery using data sets x1 and x2 with the aforementioned complex loss conditions and the total loss of data in the test set reaching 30% and 50%. The model weights saved in folder A are called, and the data sets x1 and x2 that the model has never seen are used as inputs, respectively, to obtain output recovery data y1 and y2, which are stored in folder B;
[0088] S14: At this point, data recovery is complete, and data processing software such as MATLAB can be used to restore the recovered data into the form of N*5;
[0089] S15: Further, in order to verify the effectiveness of the embodiment of the present invention, the restored data is verified;
[0090] S16: Time domain and frequency domain error quantification: Input the real intact data X and the restored data X′ into the data processing software, use the fast Fourier transform to convert the two data sets from time domain information to frequency domain, and use the following formulas to quantify the errors in the time domain and frequency domain of the data:
[0091]
[0092] Among them, y i is the true value, x i is the predicted value, is the Euclidean distance (also called the L2 norm) between the true value vector and the predicted value vector, is the Euclidean norm of the real value vector. The results are shown in Table 2:
[0093] Table 2 Error quantification results in time domain and frequency domain
[0094]
[0095] S17: intercept part of the real data and compare the waveform with the corresponding restored data, such as Figure 8As shown in the figure, the shaded area is used to mark the area where data is missing. The results show that even when the total loss rate of the test set reaches 50%, the recovery method proposed in the embodiment of the present invention can well recover the missing data, and the missing area has good consistency with the label. This result is obviously consistent with the conclusion that the recovery error of each channel is small obtained in S16;
[0096] S18: The FDD method is further used to identify the modal parameters of the structure with significant excitation within the 2 Hz range to evaluate the error of modal identification. At the same time, the coordinate modal assurance criterion (COMAC) is used to evaluate the accuracy of the identified modal vibration shape. The calculation formula of COMAC is as follows:
[0097]
[0098] Where m represents the total number of modes. and They represent the real part of the kth order mode estimated from the real data and the restored data respectively. The results are shown in Table 3, where the difference between the modal vibration shapes obtained from the real data and the restored data is extremely small, verifying the effectiveness of the restoration method proposed in the embodiment of the present invention;
[0099] Table 3 Comparison of modal parameters between real data and restored data
[0100]
[0101] S19: The noise adding method described in the embodiment of the present invention is further used to create missing data sets containing 0, 10%, 20%, 30%, 40%, and 50% noise to test the noise resistance of the model proposed in the embodiment of the present invention. It should be noted that the model has only seen data with 10% noise during the training process. The specific test results are shown in Table 4. It is obvious that the recovery method proposed in the embodiment of the present invention is robust in the face of unknown noise. Compared with the rising rate of the noise level, the rising rate of the model's prediction error is significantly lower.
[0102] Table 4 Noise data test results
[0103]
[0104] In summary, the structural health monitoring data recovery method based on deep learning proposed in the embodiment of the present invention has the function of recovering multi-sensor lost data under complex loss conditions and noise without the need for complete sensor channels, and includes the following contents:
[0105] Acquire the data of the target sensors in the structural health monitoring system, and perform data preprocessing and data set construction, including:
[0106] Data filtering: Use a low-pass filter to filter the data to remove noise outside the frequency band of structural interest;
[0107] Noise addition: inject a certain level of noise into the data. The noise is a normally distributed random vector with a mean of zero and a standard deviation of zero. This step helps to improve the noise resistance of the method. For cases with little noise impact, the level of injected noise can be dynamically adjusted or ignored (this step does not require knowing the exact level of noise that may exist in the real data);
[0108] Normalization: Use MATLAB and other data processing software to normalize the data;
[0109] Anomaly zeroing: The outliers detected by the SHM system are zeroed. At the same time, in order to ensure the data set's ability to handle various types of missing data, it is necessary to appropriately add multiple types of missing data to make the data set more balanced to cover all missing situations;
[0110] Data cutting: Use a sliding window of preset length to segment the data processed in the previous step to obtain a series of fragments to form a multidimensional vector (the sliding window should contain a certain data point length, usually 1024 or 2048).
[0111] Construct a data recovery deep learning neural network model, wherein the backbone of the model is formed by alternating multiple convolutional layers and self-attention layers and / or improved self-attention layers, wherein the number of convolutional layers between two self-attention layers of the model can be 1-3 layers, and the final output layer of the model can use a fully connected layer to replace the convolutional layer, and the number of channels of the final output layer of the model should correspond to the number of input channels;
[0112] According to the model proposed in the embodiment of the present invention and the characteristics of the task, Leaky ReLU and / or ReLU function are selected as the activation function, Smooth L1 Loss is used as the loss function, Adam is used as the network optimizer to appropriately adjust the hyperparameters for network training, store the trained network weights, and call the weights for data recovery when performing data recovery;
[0113] The relative Euclidean distance is used to quantify the difference between the restored data and the label;
[0114] The input data first undergoes multiple layers of convolution, and the feature map obtained after each layer of convolution passes through the Leaky ReLU function, and then passes through the C-type self-attention layer or the self-attention layer proposed in the embodiment of the present invention, and then passes through the superposition layer to form a convolution-self-attention module. After the input data passes through three convolution-self-attention modules, it goes through two layers of fully connected layers or convolution layers to adjust the output shape to obtain the final result.
[0115] Among them, Leaky ReLU is used as the activation function after each convolution layer, and its expression is as follows:
[0116]
[0117] The hyperparameter α here is different from the common value of 0.01. For this type of task, 0.1 to 0.2 can be selected, and the ReLU function can also be used;
[0118] Smooth L1 Loss is used as the loss function of the embodiment of the present invention:
[0119]
[0120] Define the real signal as y i and the prediction signal is y i ′, reduce the error through iteration;
[0121] The relative Euclidean distance is used to quantify the time domain and frequency domain differences between the recovered data and the label, and the prediction signal is defined as x i and the true signal is y i , specifically:
[0122]
[0123] Error assessment also includes: using the FDD method to identify the modal parameters of significant excitation within the modal frequency band of interest to evaluate the error of modal identification, and using the coordinate modal assurance criterion (COMAC) to evaluate the accuracy of the identified modal vibration shapes:
[0124]
[0125] Where m represents the total number of modes. and represent the real part of the kth mode estimated from the real data and the restored data respectively.
[0126] System Example
[0127] According to an embodiment of the present invention, a system for constructing a multi-type lost data recovery model is provided. Fig. 9 Schematic diagram of a system for constructing a multi-type lost data recovery model according to an embodiment of the present invention. Fig. 9 As shown, the multi-type lost data recovery model construction system according to an embodiment of the present invention specifically includes:
[0128] The data module 90 is used to obtain the data of the target sensor in the structural health monitoring SHM system, pre-process the data of the target sensor, and obtain a restored data set, specifically for:
[0129] A low-pass filter is used to filter the data of the target sensor, noise is added to the filtered data according to Formula 1 to obtain data with additional artificial noise, the data with additional artificial noise is normalized, outliers in the normalized data are reset to zero and multiple types of missing data are added to obtain a balanced data set, and the balanced data set is segmented into a multidimensional vector using a sliding window of a preset length to obtain a restored data set;
[0130] Input=data ori +rms(data ori )*randn(L)*N Formula 1;
[0131] Among them, data ori Refers to the original data, Input represents the data with additional artificial noise, L is the data length, N is the noise level, rms() represents the root mean square error function, and randn() represents the function that generates random numbers or matrices with standard normal distribution;
[0132] The construction module 92 is used to input the recovery data set into the pre-constructed data recovery model for training, and use the loss function to adjust the weight of the pre-constructed data recovery model to obtain the final multi-type lost data recovery model, which is specifically used to:
[0133] The restored data set is input into a pre-built data recovery model for training, features of the restored data set are extracted through multiple convolutional layers, and the feature map obtained after each convolution layer is nonlinearly transformed using a Leaky ReLU activation function or a ReLU activation function, and the transformed data is passed through a self-attention layer, an improved self-attention layer, and a fully connected layer to obtain a final output result. During the training process, the Adam optimizer is used to optimize the network, and the ReduceLROnPlateau adjustment strategy is used to adjust the learning rate. The Smooth L1 Loss loss function shown in Formula 2 is used to adjust the weight of the pre-built data recovery model, and it is continuously iterated according to the loss reduction until the model converges to obtain the final multi-type lost data recovery model;
[0134]
[0135] Among them, y i is the true value, y i ′ is the predicted value, y i -y i ′ represents the difference between the true value and the predicted value;
[0136] The system further comprises:
[0137] The recovery module is used to recover the data of the missing area in the structural health monitoring SHM system through the final multi-type lost data recovery model, and restore the obtained data to obtain the final data result.
[0138] The above technical solution of the embodiment of the present invention is described in detail below in combination with the specific situation of the multi-type lost data recovery model construction system of the embodiment of the present invention.
[0139] A vibration data recovery system based on convolutional self-attention network, comprising:
[0140] Data acquisition module: used to acquire and store raw data of health monitoring system sensors arranged on the structure;
[0141] Data construction module: used to pre-process the acquired data and construct the data set as required. The data set can be constructed according to the default situation, and the ratio of various loss conditions can be adjusted to obtain a data set that is closer to the actual situation. The data set with different overall loss data ratios can also be customized by adjusting parameters;
[0142] Network building module: used to build the vibration data recovery network of the required convolutional self-attention network, and to obtain the best output by adjusting various hyperparameters of the model (including the number of convolutional layers, convolution configuration, and activation function hyperparameters) according to the modeling paradigm;
[0143] Network training module: used to define the loss function, learning rate, number of iterations, and batch size during network training, reduce the training loss and validation loss through iteration, obtain the model weight, and save the weight;
[0144] Data recovery module: used to call the weights obtained from historical training to recover missing data, restore the obtained data to normal form to obtain the final result, and store the result.
[0145] In summary, the embodiment of the present invention can simultaneously handle random point data loss, continuous segment data loss, and multi-channel (even full channel) data loss when recovering structural vibration data, and has strong comprehensive recovery capabilities and high accuracy. When the embodiment of the present invention performs multi-channel data recovery, the input data does not need to rely on the data of certain complete channels to recover the data in the missing area. The deep learning algorithm used in the embodiment of the present invention directly uses the structural historical data as the training set, does not rely on the structural finite element model, does not require a large amount of manual calculation and threshold determination, has a high degree of automation, a fast prediction speed, and good noise robustness, and can slowly reduce the data recovery accuracy when facing unknown noise intensity.
[0146] Device Example 1
[0147] An embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps described in the method embodiment when executed by the processor.
[0148] Device Example 2
[0149] An embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps described in the method embodiment are implemented.
[0150] The computer-readable storage medium in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk or optical disk, etc.
[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a multi-type lost data recovery model, characterized in that include: Acquire data of a target sensor in a structural health monitoring (SHM) system, preprocess the data of the target sensor, and obtain a restored data set; as well as The recovery data set is input into a pre-built data recovery model for training, and the weight of the pre-built data recovery model is adjusted using a loss function to obtain a final multi-type lost data recovery model.
2. The method according to claim 1, characterized in that: The method further comprises: The data of the missing area in the structural health monitoring SHM system is recovered through the final multi-type lost data recovery model, and the obtained data is restored to obtain the final data result.
3. The method according to claim 1, characterized in that Preprocessing the data of the target sensor to obtain a restored data set specifically includes: A low-pass filter is used to filter the data of the target sensor, noise is added to the filtered data according to Formula 1 to obtain data with additional artificial noise, the data with additional artificial noise is normalized, outliers in the normalized data are reset to zero and multiple types of missing data are added to obtain a balanced data set, and the balanced data set is segmented into a multidimensional vector using a sliding window of a preset length to obtain a restored data set; Input = data ori +rms(data ori )*randn(L)*N Formula 1; Among them, data ori Refers to the original data, Input represents the data with additional artificial noise, L is the data length, N is the noise level, rms() represents the root mean square error function, and randn() represents a function that generates random numbers or matrices with a standard normal distribution.
4. The method according to claim 1, characterized in that: The pre-built data recovery model includes multiple convolutional layers, self-attention layers, and improved self-attention layers stacked alternately; Among them, the number of convolutional layers between two self-attention layers is 1, 2 or 3 layers, the output layer is a fully connected layer, and the number of channels of the last layer output corresponds to the number of channels of the input; The improved self-attention layer is a C-type self-attention layer.
5. The method according to claim 4, characterized in that Inputting the recovery data set into the pre-built data recovery model for training, and adjusting the weight of the pre-built data recovery model using the loss function, to obtain the final multi-type lost data recovery model specifically includes: The restored data set is input into a pre-built data recovery model for training, features of the restored data set are extracted through multiple convolutional layers, and the feature map obtained after each convolution layer is nonlinearly transformed using a Leaky ReLU activation function or a ReLU activation function, and the transformed data is passed through a self-attention layer, an improved self-attention layer, and a fully connected layer to obtain a final output result. During the training process, the Adam optimizer is used to optimize the network, and the ReduceLROnPlateau adjustment strategy is used to adjust the learning rate. The Smooth L1 Loss loss function shown in Formula 2 is used to adjust the weight of the pre-built data recovery model, and it is continuously iterated according to the loss reduction until the model converges to obtain the final multi-type lost data recovery model; Among them, y i is the true value, y′ i is the predicted value, y i -y′ i Represents the difference between the true value and the predicted value.
6. A system for constructing a multi-type lost data recovery model, characterized in that include: A data module, used for acquiring data of a target sensor in a structural health monitoring SHM system, preprocessing the data of the target sensor, and obtaining a restored data set; as well as A construction module is used to input the recovery data set into a pre-constructed data recovery model for training, and use a loss function to adjust the weight of the pre-constructed data recovery model to obtain a final multi-type lost data recovery model.
7. The system according to claim 6, characterized in that The system further comprises: The recovery module is used to recover the data of the missing area in the structural health monitoring SHM system through the final multi-type lost data recovery model, and restore the obtained data to obtain the final data result.
8. The system according to claim 6, characterized in that The data module is specifically used for: A low-pass filter is used to filter the data of the target sensor, noise is added to the filtered data according to Formula 1 to obtain data with additional artificial noise, the data with additional artificial noise is normalized, outliers in the normalized data are reset to zero and multiple types of missing data are added to obtain a balanced data set, and the balanced data set is segmented into a multidimensional vector using a sliding window of a preset length to obtain a restored data set; Input = data ori +rms(data ori )*randn(L)*N Formula 1; Among them, data ori Refers to the original data, Input represents the data with additional artificial noise, L is the data length, N is the noise level, rms() represents the root mean square error function, and randn() represents the function that generates random numbers or matrices with standard normal distribution; The building blocks are specifically used to: The restored data set is input into a pre-built data recovery model for training, features of the restored data set are extracted through multiple convolutional layers, and the feature map obtained after each convolution layer is nonlinearly transformed using a Leaky ReLU activation function or a ReLU activation function, and the transformed data is passed through a self-attention layer, an improved self-attention layer, and a fully connected layer to obtain a final output result. During the training process, the Adam optimizer is used to optimize the network, and the ReduceLROnPlateau adjustment strategy is used to adjust the learning rate. The Smooth L1 Loss loss function shown in Formula 2 is used to adjust the weight of the pre-built data recovery model, and it is continuously iterated according to the loss reduction until the model converges to obtain the final multi-type lost data recovery model; Among them, y i is the true value, y′ i is the predicted value, y i -y′ i Represents the difference between the true value and the predicted value.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method for constructing a multi-type lost data recovery model are implemented as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by the processor, the steps of the method for constructing a multi-type lost data recovery model as described in any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Natural gas demand prediction method and system based on comparative learning
CN120046773A
