Oil tank wall corrosion detection method, device, equipment and readable storage medium
By combining an autoencoder and a long short-term memory network, a multi-layer corrosion detection model was developed to solve the problems of signal reconstruction and sample feature uncertainty in the corrosion detection of oil tank walls, achieving higher detection accuracy and information utilization.
Patent Information
- Application Number
- CN202111606057.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-25
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2041-12-25
AI Technical Summary
Existing technologies for detecting corrosion on the walls of oil storage tanks suffer from problems such as difficulty in selecting signal reconstruction methods, uncertainty in sample characteristics, insufficient biological basis of neural networks, and redundancy and inefficiency, resulting in low detection accuracy.
By combining autoencoders and long short-term memory networks, the spatiotemporal features of magnetic flux leakage signals from the tank walls of oil storage tanks are extracted. Corrosion detection is performed using an unsupervised training method. A multi-layer corrosion detection network model combining long short-term memory and autoencoders is constructed for signal preprocessing and feature extraction.
It improves the accuracy of corrosion detection on oil storage tank walls, makes full use of signal information, reduces dependence on corrosion samples, and enhances detection precision.
Smart Images

Figure CN116361731B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of fault diagnosis and artificial intelligence, and particularly relates to a storage tank wall corrosion detection method, device, equipment and readable storage medium. BACKGROUND
[0002] With the vigorous development of the national economy and the continuous improvement of people's living standards, the demand for energy, especially the use of oil, has increased significantly. However, oil itself is inherently dangerous. If a leak occurs, not only will it cause economic losses, but it will also cause irreversible damage to the ecological environment. The transportation and storage conditions of oil are very demanding, and storage tanks are the most commonly used facilities for storing oil. A storage tank is composed of multiple parts: the tank wall, the tank bottom, the tank top, etc. The tank wall is prone to defects under the daily erosion of oil, which can lead to oil leakage.
[0003] Non-destructive testing is the most commonly used method for online detection of tank wall health, that is, by outputting detection signals through sensors without stopping the tank, and by analyzing the changes in the detection signals to predict the health of the tank wall. Magnetic flux leakage detection is one of the non-destructive testing methods, which has the advantages of fast detection speed and low energy consumption. Researchers analyze the changes in the magnetic flux leakage signals to detect the corrosion position of the tank wall. Therefore, accurate analysis of the magnetic flux leakage signals is crucial for detecting the corrosion position of the tank wall.
[0004] The most commonly used method for detecting tank wall corrosion using magnetic flux leakage signals is to reconstruct the collected signals and then calculate the error between the reconstructed results and the collected signals to determine whether there is corrosion. Currently, multiple data reconstruction methods have been studied, such as corrosion detection methods based on compressed sensing reconstruction and corrosion detection methods based on Gaussian regression reconstruction.
[0005] The compressed sensing method is a non-linear reconstruction method that achieves perfect reconstruction of signals. The steps are as follows: (1) determine the index corresponding to the maximum value of the product of the residual and the column of the sensing matrix; (2) find the index set from the sensing matrix; (3) obtain a new index set and an approximate value of the output result by least squares; (4) based on the above results, obtain a new residual value; (5) determine the size relationship between the new residual value and the set value, and then decide whether to stop iteration to obtain the final result.
[0006] The compressed sensing method has certain drawbacks, specifically: (1) the selection of the sparse representation matrix is very difficult; (2) the design of the compressed measurement matrix has limitations; (3) the solution of the non-convex optimization problem has certain difficulties.
[0007] The Gaussian regression method is a non-parametric model, and the steps are specifically as follows: (1) establishing a model; (2) determining a suitable kernel function; (3) obtaining specific parameter values of each matrix in the model; (4) obtaining a corresponding distribution by setting a suitable limit value; (5) obtaining a corresponding mean and variance; and (6) satisfying the variance at a minimum, and obtaining a model output result.
[0008] The Gaussian regression method has certain defects, and the defects are specifically as follows: (1) not sparse, and the integrity of samples needs to be ensured; and (2) the application effect in a high-dimensional space is poor.
[0009] At present, many corrosion detections are realized through neural networks, and the most common corrosion detection method is based on a convolutional neural network.
[0010] The convolutional neural network is a feedforward network with representation learning ability, and the steps are specifically as follows: (1) initializing weights through random numbers; (2) obtaining parameter values according to an input vector; (3) updating the weights according to the obtained parameter values; and (4) continuously performing the above process until a number of iterations is reached or the MSE error is constant, and an output result is obtained.
[0011] The convolutional neural network has certain defects, and the defects are specifically as follows: (1) lacking biological basis, and being different from the human thinking mode; (2) not having a memory function; (3) being too redundant and inefficient in a full connection mode; and (4) having certain disadvantages in feature understanding. SUMMARY
[0012] In view of the problems in the prior art, the present application provides an oil tank wall corrosion detection method, device, equipment and readable storage medium, which fully extracts spatial features and time features of signals by combining a self-encoder and a long short-term memory network, solves the problem of insufficient information application in the oil tank wall corrosion detection process, and improves the accuracy of corrosion detection.
[0013] To solve the above technical problems, the present application is implemented by the following technical solutions:
[0014] An oil tank wall corrosion detection method comprises the following steps.
[0015] Collecting magnetic flux leakage signals of healthy oil tank walls as training data and collecting magnetic flux leakage signals of to-be-detected oil tank walls as test data;
[0016] Pretreating the magnetic flux leakage signals of the healthy oil tank walls and the magnetic flux leakage signals of the to-be-detected oil tank walls, wherein the pretreatment comprises signal baseline correction and abnormal signal recovery;
[0017] The magnetic flux leakage signal of the preprocessed healthy oil storage tank wall is segmented to obtain training samples and test samples;
[0018] A multi-layer long short-term memory and autoencoder corrosion detection network model is constructed, and the multi-layer long short-term memory and autoencoder corrosion detection network model is trained using the training samples and test samples to obtain a trained multi-layer long short-term memory and autoencoder corrosion detection network model;
[0019] The magnetic flux leakage signal of the to-be-detected oil storage tank wall is input into the trained multi-layer long short-term memory and autoencoder corrosion detection network model, and an abnormal signal is output;
[0020] According to the position of the abnormal signal, the position of the corrosion of the to-be-detected oil storage tank wall is determined.
[0021] Further, the preprocessing of the magnetic flux leakage signal of the healthy oil storage tank wall and the magnetic flux leakage signal of the to-be-detected oil storage tank wall specifically includes:
[0022] The signal baseline of all magnetic flux leakage signals is corrected according to formula (1);
[0023]
[0024] Wherein: L is the number of channels of the signal; k is the number of signal count points; x ij is the original value of the jth channel at the ith count point position; x ij ′ is the corrected value of the jth channel at the ith count point position; s is the base value;
[0025] The magnetic flux leakage signal is detected using the 3s criterion abnormal signal detection method, and the abnormal signal in the magnetic flux leakage signal is recovered using the cubic spline data recovery method.
[0026] Further, the segmentation of the preprocessed magnetic flux leakage signal of the healthy oil storage tank wall to obtain training samples and test samples specifically includes:
[0027] The preprocessed magnetic flux leakage signal of the healthy oil storage tank wall is segmented using a sliding window with size a x b, and the data set D = {d1, d2,..., d n} of the segmented training signal is obtained; wherein a and b are the length and width of the sliding window, respectively, and d1-d n is each sample in the training set, and n is the number of training samples;
[0028] The preprocessed magnetic flux leakage signal of the healthy oil storage tank wall is segmented using a sliding window with size a x b, and the data set T = {t1, t2,..., t m}; wherein t1~t m m is the number of test samples.
[0029] Further, the training of the multi-layer long short-term time memory and the auto-encoder corrosion detection network model by using the training samples and the test samples comprises:
[0030] The training sample is input into the first layer convolutional layer of the auto-encoder to perform the first spatial feature extraction.
[0031] The extracted spatial feature is input into the first layer long short-term time memory network to perform the first layer time feature extraction according to formulas (2)-(7).
[0032] f t =σ(W xf (S⊙F s ) t +W hf h t-1 +b f ) (2)
[0033] i t =σ(W xi (S⊙F s ) t +W hi h t-1 +b i ) (3)
[0034] o t =σ(W xo (S⊙F s ) t +W ho h t-1 +b o ) (4)
[0035]
[0036]
[0037]
[0038] In the formula, sigma is a sigmoid activation function, f t is an LSTM memory gate output, S is a convolution kernel, F s is an output of a spatial feature extractor, (S⊙F s ) t is an input of a time feature extractor at t moment, W xf and W hfis the bias of the forget gate layer, f is the bias of the forget gate layer, t is the output value of the LSTM input gate layer, x i and W hi are the weights of the input gate layer for the input and the output of the previous moment, respectively, b i is the bias of the forget gate layer, is a new candidate value vector of the input gate layer, W xC and W hC are the weights of the input gate candidate value vector for the input and the output of the previous moment, respectively, b C is the bias of the input gate candidate value vector, o t is the output value of the output gate, W xo and W ho are the weights of the output gate layer for the input and the output of the previous moment, respectively, b o is the bias of the output gate, is the product operation, C t is the updated state variable, h t and F t is the output time feature vector;
[0039] The extracted spatial features are input into the second layer of the convolution layer of the autoencoder again for the second time to extract spatial features, and then the extracted spatial features are input into the second layer of the long short-term memory network again for the second time to extract time features, so as to complete the extraction of the space-time features;
[0040] By analogy, the spatial features and the time features are extracted p times;
[0041] The spatial features and the time features extracted p times are input into the pth layer of the deconvolution layer of the autoencoder for signal recovery;
[0042] According to the loss function in formula (8), the parameters in the multi-layer long short-term memory and the corrosion detection network model of the autoencoder are updated by using the stochastic gradient descent method to complete the training of the multi-layer long short-term memory and the corrosion detection network model of the autoencoder;
[0043]
[0044] wherein, is the output matrix of the model, and d is the input matrix of the model.
[0045] Further, all the training samples are input into the trained multi-layer long short-term memory and the corrosion detection network model of the autoencoder, the error between the input and the output is calculated, and the average value of all the errors is set as the threshold value ε of the corrosion detection, as shown in formula (9).
[0046]
[0047] in the formula, i is a subscript, is the i-th output matrix of the model, di is the i-th input matrix of the model, ε is a calculated threshold value, and n is the number of training samples.
[0048] Further, the method comprises the following steps:
[0049] The method comprises the following steps:
[0050] The error E between the output and the input is calculated by formula (10);
[0051]
[0052] It is determined according to the threshold value whether the current data corresponds to a tank wall with corrosion, as shown in formula (11);
[0053]
[0054] A tank wall corrosion detection device comprises:
[0055] A collection module is configured to collect a magnetic flux leakage signal of a healthy tank wall as training data and collect a magnetic flux leakage signal of a tank wall to be detected as test data.
[0056] A preprocessing module is configured to preprocess the magnetic flux leakage signal of the healthy tank wall and the magnetic flux leakage signal of the tank wall to be detected, and the preprocessing comprises signal baseline correction and abnormal signal recovery.
[0057] A sample segmentation module is configured to segment the preprocessed magnetic flux leakage signal of the healthy tank wall to obtain training samples and test samples.
[0058] A training module is configured to construct a corrosion detection network model of a multi-layer long short-term memory and an autoencoder, train the corrosion detection network model of the multi-layer long short-term memory and the autoencoder by using the training samples and the test samples, and obtain a trained corrosion detection network model of the multi-layer long short-term memory and the autoencoder.
[0059] An output module is configured to input the magnetic flux leakage signal of the tank wall to be detected into the trained corrosion detection network model of the multi-layer long short-term memory and the autoencoder, and output an abnormal signal.
[0060] A corrosion position determining module is configured to determine a position of the oil tank wall corrosion to be detected according to a position where the abnormal signal is located.
[0061] An apparatus includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the oil tank wall corrosion detection method when executing the computer program.
[0062] A computer readable storage medium stores a computer program, and the computer program implements the steps of the oil tank wall corrosion detection method when executed by a processor.
[0063] Compared with the prior art, the present application has at least the following beneficial effects: the oil tank wall corrosion detection method provided by the present application uses a self-encoder and a long short-term memory network as a spatial feature and a time feature extractor, respectively, and simultaneously uses the two networks to cross, so that the spatial and temporal features of the signal are extracted more fully. The advantages of the present application are that the self-encoder and the long short-term memory network have strong ability to extract spatial and temporal features, and the combination of the two methods can further promote the extraction of spatial and temporal features. In addition, the two spatial and temporal feature extractors are unsupervised methods, and do not require corrosion samples in the training process, solving the problems of uncertain corrosion sample features and small sample size. The self-encoder is a neural network with representation learning ability, which is a data compression algorithm. It uses a double hidden layer to learn the features of the sample data, has low computational complexity, has an explainable function, has an automatic feature selection feature, is mainly used for anomaly detection and dimensionality reduction, and is suitable for corrosion detection. The long short-term memory network is a recurrent neural network, and the process is as follows: first, accept the input information, then forget the state information, then update the state information, and output new information, that is, the result. The long-term dependence problem is solved very well, the established model is nonlinear, and it can also be used as a unit in a larger model. It is more applied to classification or prediction. In summary, the method proposed by the present application uses an unsupervised training method, does not require corrosion samples as training samples, and meets the problems of small number of corrosion samples, various types, and difficult prediction in actual tank wall signals. The present application fully extracts the spatial and temporal features of the oil tank wall magnetic flux leakage signal, enhances the information utilization rate, makes the reconstruction result more accurate, and thus improves the tank wall corrosion detection precision.
[0064] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application, the drawings needed to be used in the specific embodiment description will be briefly introduced as follows. Obviously, the drawings described below are some embodiments of the present application, and all other drawings obtained by those skilled in the art without creative labor based on these drawings also belong to the protection scope of the present application.
[0066] Figure 1 Flow chart of the oil tank wall corrosion detection method of the present application;
[0067] Figure 2 Corrosion detection network structure diagram of the multi-layer long and short term memory and autoencoder of the present application. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the present application will be described clearly and completely in combination with the drawings. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor also belong to the protection scope of the present application.
[0069] As a specific embodiment of the present application, an oil tank wall corrosion detection method, as shown in Figure 1 and Figure 2 , includes the following steps:
[0070] Step 1: Collect the magnetic flux leakage signals of the healthy oil tank wall as training data, and collect the magnetic flux leakage signals of the oil tank wall to be detected as test data.
[0071] Step 2: Pretreat the magnetic flux leakage signals of the healthy oil tank wall and the magnetic flux leakage signals of the oil tank wall to be detected. The pretreatment includes signal baseline correction and abnormal signal recovery, which is specifically as follows:
[0072] Step 2.1: According to formula (1), the signal baseline correction is performed on all the magnetic flux leakage signals to ensure that the signal base values of different sensors at different positions are the same.
[0073]
[0074] Wherein: L is the channel number of the signal; k is the number of signal count points; x ij is the original value of the jth channel at the ith count point position; x ij ′ is the corrected value of the jth channel at the ith count point position; s is the base value.
[0075] Step 2.2: Detect the magnetic flux leakage signal using the 3s criterion anomaly signal detection method, and recover the abnormal signal in the magnetic flux leakage signal using the cubic spline data recovery method to reduce the influence of abnormal signals on corrosion detection accuracy.
[0076] Step 3: Segment the preprocessed magnetic flux leakage signal of the healthy oil storage tank wall to obtain training samples and test samples, as follows:
[0077] Segment the preprocessed magnetic flux leakage signal of the healthy oil storage tank wall using a sliding window of size a x b. The step size v of the sliding window should be chosen to be a small value to prevent the time correlation between consecutive segmented signals from being reduced. The data set D = {d1, d2,..., dn} obtained after training signal segmentation is as follows: n where a and b are the length and width of the sliding window, respectively, and d1-dn are the training samples. n n is the number of training samples.
[0078] Similarly, segment the preprocessed magnetic flux leakage signal of the healthy oil storage tank wall using a sliding window of size a x b. The step size v' of the sliding window should also be chosen to be a small value to more accurately divide the boundaries of the corrosion sites. The data set T = {t1, t2,..., tm} obtained after test signal segmentation is as follows: m where t1-tm are the test samples. m m is the number of test samples.
[0079] Step 4: Construct a multi-layer long short-term memory and autoencoder corrosion detection network model (such as Figure 2 ), and train the multi-layer long short-term memory and autoencoder corrosion detection network model using the training samples and test samples to obtain the trained multi-layer long short-term memory and autoencoder corrosion detection network model, as follows:
[0080] Step 4.1: Input the training samples into the first convolutional layer of the autoencoder for the first time spatial feature extraction.
[0081] Step 4.2: Input the extracted spatial features into the first long short-term memory network, and perform the first time feature extraction according to formulas (2)-(7);
[0082] f t = σ(W xf (S⊙F s ) t +W hf h t-1 +b f ) (2)
[0083] i t= σ(W xi (S⊙F s ) t +W hi h t-1 +b i ) (3)
[0084] o t = σ(W xo (S⊙F s ) t +W ho h t-1 +b o ) (4)
[0085]
[0086]
[0087]
[0088] In the formula, σ is a sigmoid activation function, f t is an output of an LSTM memory gate, S is a convolution kernel, F s is an output of a spatial feature extractor, (S⊙F s ) t is an input of a time feature extractor at t moment, W xf and W hf are weights of an input quantity and a previous moment output quantity of a forget gate layer, b f is a bias quantity of the forget gate, i t is an output value of an LSTM input gate layer, W xi and W hi are weights of an input quantity and a previous moment output quantity of the input gate layer, b i is a bias quantity of the forget gate layer, is a new candidate value vector of the input gate layer, W xC and W hC are weights of an input quantity and a previous moment output quantity of the input gate candidate value vector, b C is a bias quantity of the input gate candidate value vector, o t is an output value of an output gate, W xo and W ho are weights of an input quantity and a previous moment output quantity of the output gate layer, b o is a bias quantity of the output gate, is a multiplication operation, C t is an updated state variable, h t and F t are output time feature vectors.
[0089] Step 4.3: The extracted spatial features are input into the second layer of the convolutional layer of the autoencoder for a second time to extract spatial features, and then the extracted spatial features are input into the second layer of the long short-term memory network for a second time to extract time features, thereby completing the extraction of spatio-temporal features.
[0090] Step 4.4: Similarly, the spatial features and time features are extracted p times.
[0091] Step 4.5: The spatio-temporal features extracted p times are input into the p layer of the deconvolutional layer of the autoencoder for signal recovery.
[0092] Step 4.6: The loss function in formula (8) is used for back propagation, and the random gradient descent method is used to update the parameters in the multi-layer long short-term memory and autoencoder corrosion detection network model, thereby completing the training of the multi-layer long short-term memory and autoencoder corrosion detection network model.
[0093]
[0094] wherein, is the output matrix of the model, and d is the input matrix.
[0095] Further comprising: re-inputting all training samples into the trained multi-layer long short-term memory and autoencoder corrosion detection network model, calculating the error between the input and the output, and setting the average value of all errors as the threshold value ε of corrosion detection, as shown in formula (9):
[0096]
[0097] In the formula, i is the subscript, is the i-th output matrix of the model, di is the i-th input matrix of the model, ε is the calculated threshold value, and n is the number of training samples.
[0098] Step 5: Input the magnetic flux leakage signal of the tank wall of the oil tank to be detected into the trained multi-layer long short-term memory and autoencoder corrosion detection network model to output an abnormal signal, as follows:
[0099] Step 5.1: Input the magnetic flux leakage signal of the tank wall of the oil tank to be detected into the trained multi-layer long short-term memory and autoencoder corrosion detection network model, and the output matrix is
[0100] Step 5.2: Calculate the error E between the output and the input by formula (10):
[0101]
[0102] Step 5.3: Determine whether the current data corresponds to the corrosion of the tank wall according to the threshold value, such as formula (11);
[0103]
[0104] Step 6: According to the position of the abnormal signal, the position of the tank wall corrosion to be detected is determined.
[0105] The present application provides a kind of tank wall corrosion detection device of oil storage tank, for realizing tank wall corrosion detection method of oil storage tank, specifically including:
[0106] The acquisition module is used to collect the magnetic flux leakage signal of the healthy oil storage tank wall as training data, and collect the magnetic flux leakage signal of the oil storage tank wall to be detected as test data;
[0107] The preprocessing module is used to preprocess the magnetic flux leakage signal of the healthy oil storage tank wall and the magnetic flux leakage signal of the oil storage tank wall to be detected, and the preprocessing includes signal baseline correction and abnormal signal recovery;
[0108] The sample segmentation module is used to segment the magnetic flux leakage signal of the healthy oil storage tank wall after preprocessing to obtain training samples and test samples;
[0109] The training module is used to construct a corrosion detection network model of multi-layer long short-term memory and autoencoder, and train the corrosion detection network model of multi-layer long short-term memory and autoencoder using training samples and test samples, to obtain the trained corrosion detection network model of multi-layer long short-term memory and autoencoder;
[0110] The output module is used to input the magnetic flux leakage signal of the oil storage tank wall to be detected into the trained corrosion detection network model of multi-layer long short-term memory and autoencoder, and output abnormal signal;
[0111] The corrosion position determination module is used to determine the position of the tank wall corrosion to be detected according to the position of the abnormal signal.
[0112] The application provides a computer device in an embodiment, the computer device includes a processor and a memory, the memory is used for storing a computer program, the computer program includes program instructions, and the processor is used for executing the program instructions stored by the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and the like, which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement a corresponding method flow or corresponding function; the processor in the embodiment of the application can be used for the operation of the oil tank wall corrosion detection method.
[0113] The application provides a computer device in an embodiment, the computer device includes a processor and a memory, the memory is used for storing a computer program, the computer program includes program instructions, and the processor is used for executing the program instructions stored by the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and the like, which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement a corresponding method flow or corresponding function; the processor in the embodiment of the application can be used for the operation of the oil tank wall corrosion detection method.
[0114] The computer storage medium can be any available medium or data storage device that can be accessed by the computer, including but not limited to a magnetic storage (such as a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO) and the like), an optical storage (such as a CD, a DVD, a BD, a HVD and the like), and a semiconductor storage (such as a ROM, an EPROM, an EEPROM, a non-volatile memory (NAND FLASH), a solid state disk (SSD)) and the like.
[0115] Those skilled in the art will appreciate that embodiments of the application can be readily used as a method, a system or a computer program product. Accordingly, the application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code.
[0116] The application is described in relation to flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It is understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks.
[0117] The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks.
[0118] The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. The flow diagrams and / or block diagrams in the various figures present methods, apparatus (systems) and computer program products according to the application. Each block in the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks.
[0119] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any person skilled in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of detecting corrosion in a tank wall of an oil storage tank, characterized by, The method comprises the steps of: Collecting the magnetic flux leakage signals of the healthy oil storage tank wall as training data and collecting the magnetic flux leakage signals of the oil storage tank wall to be detected as test data; Pretreating the magnetic flux leakage signals of the healthy oil storage tank wall and the magnetic flux leakage signals of the oil storage tank wall to be detected, which comprises signal baseline correction and abnormal signal recovery; The pretreatment of the magnetic flux leakage signals of the healthy oil storage tank wall and the magnetic flux leakage signals of the oil storage tank wall to be detected comprises: According to formula (1), the signal baseline correction is performed on all the magnetic flux leakage signals; (1) in: The number of signal channels; This represents the number of signal counting points. For the first The channel is in The original values of each counting point position; For the first The channel is in Correction values for each counting point position; As the base value; The magnetic flux leakage signals are detected by using the 3s criterion abnormal signal detection method, and the abnormal signals in the magnetic flux leakage signals are recovered by using the cubic spline data recovery method; The pretreated magnetic flux leakage signals of the healthy oil storage tank wall are segmented to obtain training samples and test samples; A corrosion detection network model of multi-layer long short-term memory and autoencoder is constructed, and the training samples and test samples are used to train the corrosion detection network model of multi-layer long short-term memory and autoencoder to obtain a trained corrosion detection network model of multi-layer long short-term memory and autoencoder, which comprises: The training samples are input into the first layer convolutional layer of the autoencoder for the first time to extract spatial features; The extracted spatial features are input into the first layer long short-term memory network, and the first layer time feature is extracted according to formulas (2)-(7); (2) (3) (4) (5) (6) (7) in the formula, sigmoid is a sigmoid activation function, is an output of an LSTM memory gate, is a convolution kernel, is an output of a spatial feature extractor, is t is an input of a time feature extractor at the moment, and is a weight of an input quantity and a previous moment output quantity of a forget gate layer, is a bias quantity of the forget gate, is an output value of an LSTM input gate layer, and is a weight of an input quantity and a previous moment output quantity of the input gate layer, is a bias quantity of the forget gate layer, is a new candidate value vector of the input gate layer, and is a weight of an input quantity and a previous moment output quantity of the input gate candidate value vector, is a bias quantity of the input gate candidate value vector, is an output value of an output gate, and is a weight of an input quantity and a previous moment output quantity of the output gate layer, is a bias quantity of the output gate, is a product operation, is an updated state variable, and is an output time feature vector; The extracted spatial features are input into the second layer convolutional layer of the autoencoder for the second time to extract spatial features, and then the extracted spatial features are input into the second layer long short-term memory network for the second time to extract time features, thereby completing the extraction of spatial and time features; In this way, the spatial and time features are extracted p times; The spatial and time features extracted p times are input into the pth layer deconvolutional layer of the autoencoder for signal recovery; According to the loss function in formula (8), the parameters in the corrosion detection network model of multi-layer long short-term memory and autoencoder are updated by using the stochastic gradient descent method to complete the training of the corrosion detection network model of multi-layer long short-term memory and autoencoder; (8) wherein, is an output matrix of the model, is an input matrix of the model; All training samples are re-input into the trained multi-layer long short-term time memory and auto-encoder corrosion detection network model, the error between input and output is calculated, and the average value of all errors is set as the threshold of corrosion detection , as formula (9); (9) In the formula, is a subscript, is the first output matrix of the model, is the first input matrix of the model, is a threshold value of the calculation, is the number of training samples; The magnetic flux leakage signals of the oil storage tank wall to be detected are input into the trained corrosion detection network model of multi-layer long short-term memory and autoencoder to output abnormal signals, which comprises: The magnetic flux leakage signal of the oil tank wall to be detected is input into the corrosion detection network model of the trained multi-layer long short-term time memory and autoencoder, and the output matrix is ; The error between the output and the input is calculated by equation (10) ; (10) According to formula (11), it is determined whether the current data corresponds to a tank wall with corrosion according to a threshold value; (11); According to the position of the abnormal signal, the position of the corrosion of the oil storage tank wall to be detected is determined.
2. The method of claim 1, wherein The pretreated magnetic flux leakage signals of the healthy oil storage tank wall are segmented to obtain training samples and test samples, which comprises: The magnetic flux leakage signals of the health oil storage tank wall after preprocessing are segmented using a sliding window with a size of The data set after signal segmentation is ; wherein, and are the length and width of the sliding window respectively, is each sample in the training set, is the number of training samples; The magnetic flux leakage signals of the health oil storage tank wall after preprocessing are segmented using a sliding window with a size of The data set of the segmented signals is ; wherein, is the number of test samples, is the number of test samples.
3. An oil tank wall corrosion detection device characterized by comprising: The method comprises the steps of: The method comprises the steps of: A collecting module is configured to collect the magnetic flux leakage signals of the healthy oil storage tank wall as training data and collect the magnetic flux leakage signals of the oil storage tank wall to be detected as test data; A pretreatment module is configured to pretreat the magnetic flux leakage signals of the healthy oil storage tank wall and the magnetic flux leakage signals of the oil storage tank wall to be detected, which comprises signal baseline correction and abnormal signal recovery; The sample segmentation module is configured to segment the magnetic flux leakage signal of the preprocessed health oil storage tank wall to obtain training samples and test samples. The training module is configured to construct a multi-layer long short-term memory and autoencoder corrosion detection network model, train the multi-layer long short-term memory and autoencoder corrosion detection network model using the training samples and test samples, and obtain a trained multi-layer long short-term memory and autoencoder corrosion detection network model. The output module is configured to input the magnetic flux leakage signal of the to-be-detected oil storage tank wall into the trained multi-layer long short-term memory and autoencoder corrosion detection network model and output an abnormal signal. The corrosion position determination module is configured to determine the position of the corrosion of the to-be-detected oil storage tank wall according to the position of the abnormal signal.
4. An apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, The processor executes the computer program to implement the steps of the oil storage tank wall corrosion detection method of claim 1 or 2.
5. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 4. The computer program is executed by the processor to implement the steps of the oil storage tank wall corrosion detection method of claim 1 or 2.
Citation Information
Patent Citations
Pipeline defect and pipeline assembly detection method based on depth space-time characteristics
CN111815561A
Fault detection method, system and device based on long short-term memory network and medium
CN113609932A