Storage tank defect detection method and device based on meta transfer learning and frequency dispersion prior
By employing meta-transfer learning and dispersion prior methods, a small-sample defect identification network is constructed, which solves the problems of strong subjectivity in manual interpretation and insufficient model generalization in electromagnetic ultrasonic tank inspection, and achieves high-precision cross-operating condition adaptive defect identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUBEI UNIV OF TECH
- Filing Date
- 2026-04-23
- Publication Date
- 2026-05-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing electromagnetic ultrasonic tank defect detection methods rely on manual interpretation, which is highly subjective and inefficient. Deep learning models have insufficient generalization performance under small sample conditions, making it difficult to adapt across working conditions. Furthermore, the dispersion and multimodal characteristics of electromagnetic ultrasonic signals lead to insufficient model stability.
A few-sample defect identification network is constructed using a method based on meta-transfer learning and dispersion prior. It combines an improved residual backbone, a multi-path deep separable residual attention module, and a spatiotemporal attenuation weighted global enhancement module. Through meta-learning training and few-sample transfer, and by using the group velocity dispersion prior for time-frequency analysis and feature compensation, adaptive defect identification across working conditions is achieved.
Achieving high-precision defect identification and adaptive updating across working conditions under extremely limited sample conditions, the model has rapid adaptability and overcomes the poor generalization ability and cross-domain transfer bottleneck of traditional methods under small sample conditions.
Smart Images

Figure CN122087547A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nondestructive testing technology, and in particular to a method and apparatus for detecting defects in storage tanks based on meta-transfer learning and dispersion prior. Background Technology
[0002] Large storage tanks are key core equipment in petroleum, chemical, and energy systems, and their service safety directly affects the stability of system operation. Under long-term harsh service environments, tank components are highly susceptible to various defects such as cracks, porosity, and corrosion pits.
[0003] Traditional methods for inspecting storage tanks mainly include manual ultrasonic testing, magnetic particle testing, penetrant testing, and magnetic flux leakage testing. Manual ultrasonic testing is inefficient and relies heavily on operator experience; magnetic particle and penetrant testing struggle to identify internal defects; and while magnetic flux leakage testing is suitable for rapid screening, its quantitative accuracy is easily affected by material properties. Electromagnetic Acoustic Transducer (EMAT) testing technology, with its advantages of being non-contact, requiring no coupling agent, and adaptable to high temperatures and rough surfaces, has become a promising direction for storage tank inspection. However, current EMAT testing still primarily relies on manual signal interpretation by technicians, resulting in issues such as high subjectivity, low efficiency, and poor consistency.
[0004] In recent years, although some studies have attempted to use deep learning models for automatic classification of electromagnetic ultrasonic signals, these methods typically rely on training with a large number of labeled samples. In real-world industrial scenarios, samples of tank defects are scarce and costly to obtain, making data-driven deep learning models prone to overfitting and lacking in generalization performance. Furthermore, differences in signal distribution caused by different tanks, materials, and detection equipment make it difficult to directly transfer models trained under a single operating condition to new conditions. In addition, the propagation of electromagnetic ultrasound in the plate-like structure of tanks exhibits dispersion and multimodal characteristics; echo arrival delays and energy distributions are prone to drift under different operating conditions, making models directly based on time-domain or time-frequency representations unstable under small sample conditions. While existing transfer learning techniques can partially alleviate the problem of insufficient samples, their performance significantly degrades when the target domain sample size is extremely small, making it difficult to meet the needs of rapid and adaptive deployment in the field. Summary of the Invention
[0005] In view of this, it is necessary to provide a method and device for detecting tank defects based on meta-transfer learning and dispersion prior enhancement, so as to achieve high-precision defect identification and adaptive updating across operating conditions under conditions with very few samples.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a method for detecting defects in storage tanks based on meta-transfer learning and dispersion prior, comprising: Based on source domain datasets and target domain datasets, a few-shot defect recognition network is constructed through meta-learning training and few-shot transfer. The source domain dataset includes electromagnetic ultrasonic experimental signals and simulation signals under various working conditions. The target domain dataset includes electromagnetic ultrasonic signals containing various defect types collected from simulated test blocks under target working conditions. The few-shot defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. The electromagnetic ultrasonic signals of the storage tank under test are preprocessed to construct a time series. Time-frequency analysis is performed on the time series, and time-distance mapping and resampling are performed in combination with group velocity dispersion prior to construct a two-dimensional dispersion compensation feature map and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map; The two-dimensional dispersion compensation feature map is input into the small sample defect identification network, and the equivalent propagation distance map is input as a physical prior into the spatiotemporal attenuation weighted global enhancement module to obtain the defect detection result.
[0007] In one possible implementation, the multi-path depth-separable residual attention module includes: Depth-separable convolutional paths, dynamic channel attention units, and inverse enhancement pathways; The depth-separable convolutional path employs three parallel 3×3 convolutional kernels, a 5×5 convolutional kernel, and a rotatable 3×3 convolutional kernel, respectively. The dynamic channel attention unit is used to perform channel-adaptive weighting on the concatenated features output by the depthwise separable convolutional path to obtain weighted features; The reverse enhancement path is used to calculate the difference between the weighted feature and the concatenated feature, and after convolution amplification of the difference, it is fused with the weighted feature to obtain the enhanced feature. The input feature and the enhanced feature are then added to obtain the output feature.
[0008] In one possible implementation, the spatiotemporal attenuation weighted global enhancement module includes: Local branches, global branches, and adaptive fusion units; The local branch includes three parallel convolutional paths, a distance-driven gain calibration unit, and a spatially enhanced attention module; The three parallel convolutional paths employ 3×3 convolution, 5×5 convolution, and 3×3 dilated convolution, respectively, to extract multi-scale features. The distance-driven gain calibration unit is used to generate gain weights based on the equivalent propagation distance map and perform gain calibration on the multi-scale features to obtain calibration features. The spatial enhancement attention module is used to perform average pooling and max pooling on the calibration features to determine the spatial weight map, and to obtain local enhancement features based on the multi-scale features and the spatial weight map. The global branch includes a migration field prediction and deformable sampling unit, a distance difference matrix construction unit, and an attenuation bias attention unit; The offset field prediction and deformable sampling unit predicts the offset field through 3×3 convolution and performs deformable sampling on query, key and value features based on the offset field; The distance difference matrix construction unit is used to construct a distance difference matrix between each feature location based on the equivalent propagation distance map; The attenuation bias attention unit is used to generate a distance attenuation bias based on the distance difference matrix, and to introduce the distance attenuation bias as an additive term into the attention weight calculation process to perform weighted aggregation on the sampled value features to obtain global enhanced features; The adaptive fusion unit is used to fuse the local enhancement features and the global enhancement features to obtain fused features, and add the fused features and the input features to obtain output features.
[0009] In one possible implementation, the construction of a few-shot defect recognition network based on the source domain dataset and the target domain dataset, through meta-learning training and few-shot transfer, includes: Based on the source domain dataset, construct multiple meta-tasks containing support sets and query sets; The initial network is trained based on the meta-task to obtain the meta-learning basic model; the initial network includes the improved residual backbone, the multi-path deep separable residual attention module, the spatiotemporal decay weighted global enhancement module, and the classifier. Using the target domain dataset, the small sample defect recognition network is obtained by updating the category prototype of the meta-learning base model and fine-tuning the network parameters of the meta-learning base model.
[0010] In one possible implementation, training the initial network based on the meta-task to obtain the meta-learning base model includes: Based on the support set, the mean of the deep features corresponding to each defect category is used as the category prototype; Based on the Euclidean distance between the feature vectors of the samples in the query set and the category prototypes, the classification probability and task loss of the samples in the query set are determined. Based on the classification probability and task loss, the initial network is trained to obtain the meta-learning base model.
[0011] In one possible implementation, the preprocessing of the electromagnetic ultrasonic signal from the tank under test to construct a time series includes: The electromagnetic ultrasonic signal of the tank under test is bandpass filtered to obtain the filtered signal; Perform Hilbert transform on the filtered signal to extract the envelope signal; The amplitude of the envelope signal is normalized to obtain a normalized envelope signal; The time series is obtained by extracting a fixed-length time window containing the defect reflection wave from the normalized envelope signal.
[0012] In one possible implementation, the step of performing time-frequency analysis on the time series and combining it with a group velocity dispersion prior for time-distance mapping and resampling to construct a two-dimensional dispersion compensation feature map, and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map, includes: The time series is subjected to time-frequency transformation to obtain a time-frequency energy characterization; Based on the group velocity dispersion prior, the time axis of the time-frequency energy characterization is mapped to the equivalent propagation distance axis and resampled to obtain the two-dimensional dispersion compensation feature map; The two-dimensional dispersion compensation feature map is subjected to size unification and normalization processing, and the equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map is output.
[0013] Secondly, the present invention also provides a storage tank defect detection device based on meta-transfer learning and dispersion prior, comprising: The first building unit is used to construct a small-sample defect recognition network based on a source domain dataset and a target domain dataset, through meta-learning training and few-shot transfer. The source domain dataset includes electromagnetic ultrasonic experimental signals and simulation signals under various working conditions. The target domain dataset includes electromagnetic ultrasonic signals containing various defect types collected from simulated test blocks under target working conditions. The small-sample defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. The preprocessing unit is used to preprocess the electromagnetic ultrasonic signals from the tank under test and construct a time series. The second construction unit is used to perform time-frequency analysis on the time series and combine the group velocity dispersion prior to perform time-distance mapping and resampling to construct a two-dimensional dispersion compensation feature map and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map. The detection unit is used to input the two-dimensional dispersion compensation feature map into the small sample defect identification network, and input the equivalent propagation distance map as a physical prior into the spatiotemporal attenuation weighted global enhancement module to obtain the defect detection result.
[0014] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the tank defect detection method based on meta-transfer learning and dispersion prior as described in any of the above implementations.
[0015] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, wherein when the program or instruction is executed by a processor, it is able to implement the steps in the tank defect detection method based on meta-transfer learning and dispersion prior described in any of the above implementations.
[0016] The beneficial effects of this invention are as follows: The tank defect detection method and device based on meta-transfer learning and dispersion prior provided by this invention collects electromagnetic ultrasonic experimental signals and simulation signals under various working conditions as source domain datasets, collects electromagnetic ultrasonic signals containing multiple defect types from simulated test blocks under target working conditions as source domain datasets, and constructs a small sample defect recognition network. This small sample defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance metric-based classifier. By combining the rapid adaptability of meta-learning with the cross-domain feature extraction capability of transfer learning, the model can achieve high-precision defect recognition and cross-working-condition adaptive updates under very few sample conditions. Through meta-training based on multi-source heterogeneous data, the model acquires the inherent ability to quickly learn new tasks from a small number of samples. In the target domain, stable recognition can be achieved through prototype updates or light fine-tuning with only a small number of samples, overcoming the bottlenecks of traditional methods in terms of poor generalization ability and difficulty in cross-domain transfer under small sample conditions. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic flowchart of an embodiment of the storage tank defect detection method based on meta-transfer learning and dispersion prior provided by the present invention. Figure 2 This is a schematic diagram illustrating typical defects and signals of storage tanks provided by the present invention; Figure 3 A schematic diagram of the preprocessing flow of electromagnetic ultrasound A-scan signals provided by the present invention; Figure 4 This is a schematic diagram illustrating the construction process of the two-dimensional dispersion compensation feature map and equivalent propagation distance map provided by the present invention; Figure 5 This is a schematic diagram of the overall structure of the small sample defect recognition network provided by the present invention; Figure 6 This is a schematic diagram of the structure of the multi-path depth-separable residual attention module provided by the present invention; Figure 7 This is a schematic diagram of the spatiotemporal attenuation weighted global enhancement module provided by the present invention; Figure 8 This is a schematic diagram of the overall process of the present invention; Figure 9 This is a schematic diagram of an embodiment of the storage tank defect detection device based on meta-transfer learning and dispersion prior provided by the present invention. Figure 10 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0023] This invention provides a method and apparatus for detecting defects in storage tanks based on meta-transfer learning and dispersion prior, which will be described below.
[0024] Figure 1 This is a schematic flowchart of an embodiment of the tank defect detection method based on meta-transfer learning and dispersion prior provided by the present invention, as shown below. Figure 1 As shown, the tank defect detection method based on meta-transfer learning and dispersion prior includes: S101. Based on the source domain dataset and the target domain dataset, a small-sample defect recognition network is constructed through meta-learning training and few-shot transfer. The source domain dataset includes electromagnetic ultrasonic experimental signals and simulation signals under various working conditions. The target domain dataset includes electromagnetic ultrasonic signals containing various defect types collected on simulated test blocks under target working conditions. The small-sample defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. S102. Preprocess the electromagnetic ultrasonic signal of the storage tank to be tested to construct a time series; S103. Perform time-frequency analysis on the time series and combine it with the group velocity dispersion prior to perform time-distance mapping and resampling to construct a two-dimensional dispersion compensation feature map and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map. S104. Input the two-dimensional dispersion compensation feature map into the small sample defect identification network, and input the equivalent propagation distance map as a physical prior into the spatiotemporal attenuation weighted global enhancement module to obtain the defect detection result.
[0025] In S101, electromagnetic ultrasonic experimental signals from different materials, thicknesses, surface conditions, and detection parameters are collected and fused with simulation signals generated by finite element simulation to form a source domain dataset covering a wide range of working conditions, providing a rich task distribution for the meta-learning stage.
[0026] On a simulated test block consistent with the actual operating conditions of a storage tank, typical defects such as cracks, pores, and corrosion pits, as well as defect-free areas, were artificially prepared. A small number of representative target domain defect signal samples were collected using an electromagnetic ultrasonic transducer as the target domain dataset.
[0027] For example, the construction of a source domain multi-condition electromagnetic ultrasound dataset includes the following steps: First, electromagnetic ultrasonic testing data collected in the early stages under various steel plate materials and thicknesses were used as source domain experimental data. This part of the data comes from A-scan signals obtained under different probe arrangements (including different incident angles, coil structures, and scanning paths) and different excitation parameters, basically covering the signal differences caused by typical operating condition changes.
[0028] To further expand the operating range of the source domain, this invention constructs a parameterized simulation model of typical defects such as cracks, pores, and corrosion pits based on the COMSOL electromagnetic-acoustic coupled finite element model, and generates multiple sets of simulated A-scan signals under constraints that are consistent with the experimental results for material parameters, plate thickness, and excitation conditions.
[0029] Finally, the measured and simulated data from different sources and under different working conditions were uniformly organized and labeled according to defect type to construct a source domain dataset with high diversity and cross-working condition feature distribution, which was used for task construction and model optimization in the subsequent meta-learning training stage.
[0030] The preparation of the target domain test block and the acquisition of small sample signals include the following steps: To closely simulate the actual service conditions of the storage tank, a 15mm thick steel plate, identical to the plate material of the target tank, was selected to prepare a simulated test block. Three types of defects—circular holes, cracks, and corrosion—were artificially machined onto its surface, while an unprocessed area was retained as a normal sample area. The defects had different sizes and depths. Defect depths varied from 10% to 60%, the radius of circular holes ranged from 1mm to 5mm, corrosion defects ranged from 2mm×2mm to 10mm×10mm, and crack defects ranged from 1mm×5mm to 3.5mm×25mm, thus covering common early and moderate damage to storage tanks.
[0031] The transducer excitation frequency was set to 1.5MHz, and sampling was performed point by point along the defect edge in small steps during acquisition. Figure 2 This is a schematic diagram of typical defects and signals in storage tanks provided by the present invention. The processing morphology of the defects and their corresponding acquired electromagnetic ultrasonic signals are shown below. Figure 2 As shown. The data obtained in this step are organized into a target domain dataset, providing foundational data for subsequent few-shot transfer learning and online adaptive updates.
[0032] It should be noted that the embodiments of this invention construct a deep network structure specifically for few-sample defect identification. This structure uses an improved lightweight residual network as the feature extraction backbone, aiming to balance the model's performance and efficiency. Based on this, two core enhancement modules are designed: one is a local enhancement module integrated within the backbone network, a multi-path deep separable residual attention module, used for refined extraction of local texture features; the other is a multi-temporal attenuation weighted global enhancement module connected to the outputs of each stage of the backbone network, used to calibrate feature gain using equivalent propagation distance priors and apply distance attenuation constraints to global associations, thereby enhancing the physical consistency of cross-regional information modeling. The network finally maps the enhanced deep features to a low-dimensional, compact feature space through a feature embedding layer, and a few-sample classifier based on a distance metric completes the final defect category determination.
[0033] It should be noted that this invention preprocesses the signals in the source and target domain datasets to obtain the corresponding time series, and then constructs a two-dimensional dispersion compensation feature map based on these. On the source domain pre-training dataset, a few-shot learning scenario is simulated, constructing a large number of N-way K-shot meta-tasks; a few-shot defect recognition network is used to calculate the category prototype on the support set and the loss on the query set, updating the network parameters in a task-level optimization manner; this enables the model to learn how to quickly learn new tasks from a small number of samples, obtaining a meta-learning foundation model with strong cross-task generalization ability.
[0034] After deploying the pre-trained meta-learning base model to the target storage tank detection scenario, small-sample transfer is performed using a small number of real target domain samples. By updating the category prototype and fine-tuning some task-related parameters, the model can quickly align with the target domain signal distribution without the need for extensive labeling or retraining. When changes in the detection environment cause signal distribution drift, incremental model updates can be performed using a small number of new samples to achieve continuous online learning and stable recognition.
[0035] In S102, the electromagnetic ultrasonic signal of the tank to be tested is preprocessed. This preprocessing includes bandpass filtering, envelope extraction, and fixed-length time window truncation to construct a time series.
[0036] In S103, to enhance the ability to distinguish different defect signals in the feature space, this invention performs time-frequency analysis on the obtained time series and constructs a time-frequency energy characterization using continuous wavelet transform; further, it combines the group velocity dispersion prior to map the time axis to the equivalent propagation distance axis and resamples it to achieve dispersion compensation, thereby obtaining a two-dimensional dispersion compensation feature map, and simultaneously outputting the equivalent propagation distance map aligned with it.
[0037] In S104, the two-dimensional dispersion compensation feature map is further input into the small sample defect recognition network, and the equivalent propagation distance map is used as a physical prior input into the spatiotemporal attenuation weighted global enhancement module for feature gain calibration and distance attenuation constraint of global association, so as to obtain the defect detection result. The defect detection result can be cracks, pores, corrosion pits or no defects, etc.
[0038] In summary, the tank defect detection method based on meta-transfer learning and dispersion prior provided by this invention collects electromagnetic ultrasonic experimental signals and simulation signals under various working conditions as source domain datasets, and collects electromagnetic ultrasonic signals containing multiple defect types from simulated test blocks under target working conditions as source domain datasets. A small-sample defect recognition network is constructed, comprising an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. By combining the rapid adaptability of meta-learning with the cross-domain feature extraction capability of transfer learning, the model can achieve high-precision defect recognition and adaptive updates across working conditions under very few sample conditions. Through meta-training based on multi-source heterogeneous data, the model acquires the inherent ability to quickly learn new tasks from a small number of samples. In the target domain, stable recognition can be achieved through prototype updates or light fine-tuning with only a small number of samples, overcoming the bottlenecks of traditional methods' poor generalization ability and difficulty in cross-domain transfer under small sample conditions.
[0039] In some embodiments of the present invention, the preprocessing of the electromagnetic ultrasonic signal from the storage tank to be tested to construct a time series includes: The electromagnetic ultrasonic signal of the tank under test is bandpass filtered to obtain the filtered signal; Perform Hilbert transform on the filtered signal to extract the envelope signal; The amplitude of the envelope signal is normalized to obtain a normalized envelope signal; The time series is obtained by extracting a fixed-length time window containing the defect reflection wave from the normalized envelope signal.
[0040] Figure 3 This is a schematic diagram of the preprocessing flow of electromagnetic ultrasound A-scan signals provided by the present invention, as shown below. Figure 3 As shown, this invention performs standardized preprocessing on all signals.
[0041] First, the acquired raw A-scan signal is bandpass filtered. The passband of the bandpass filter is set to 0.8MHz to 2.2MHz to filter out low-frequency drift and high-frequency noise.
[0042] Subsequently, the envelope of the filtered signal is extracted using the Hilbert transform, and the amplitude of the envelope signal is normalized.
[0043] Finally, a fixed-length time window containing the defect reflection wave is extracted from the normalized envelope as the network input to avoid interference from irrelevant preceding and following signals in feature extraction.
[0044] Understandably, in order to enable the electromagnetic ultrasonic A-scan signals acquired from the source domain and the target domain to be used as a unified input, this invention performs the same standardized preprocessing on all signals (including the source domain dataset, the target domain dataset, and the electromagnetic ultrasonic signals of the tank under test).
[0045] In some embodiments of the present invention, the step of performing time-frequency analysis on the time series and combining it with group velocity dispersion prior for time-distance mapping and resampling to construct a two-dimensional dispersion compensation feature map, and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map, includes: The time series is subjected to time-frequency transformation to obtain a time-frequency energy characterization; Based on the group velocity dispersion prior, the time axis of the time-frequency energy characterization is mapped to the equivalent propagation distance axis and resampled to obtain the two-dimensional dispersion compensation feature map; The two-dimensional dispersion compensation feature map is subjected to size unification and normalization processing, and the equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map is output.
[0046] Time-frequency analysis is performed on the time series to construct a time-frequency energy representation. Continuous wavelet transform is preferred for constructing the time-frequency energy matrix.
[0047] By combining the group velocity dispersion prior, the time axis of the time-frequency energy matrix is mapped to the equivalent propagation distance axis, and a two-dimensional dispersion compensation feature map is obtained through interpolation resampling.
[0048] The two-dimensional dispersion compensation feature map is subjected to size unification and normalization processing, and an equivalent propagation distance map aligned with it is output.
[0049] Figure 4 This is a schematic diagram illustrating the construction process of the two-dimensional dispersion compensation feature map and equivalent propagation distance map provided by the present invention, as shown below. Figure 4 As shown, the construction process of the two-dimensional dispersion compensation feature map and equivalent propagation distance map is as follows: First, the normalized time series obtained from the preprocessing step... For time-frequency analysis, this implementation uses continuous wavelet transform to obtain the time-frequency coefficient matrix. ,in For discrete frequency components, These are discrete-time sampling points. An initial time-frequency energy matrix is then constructed. It can be expressed by the following formula:
[0050] Subsequently, the thickness of the base plate being measured was obtained. and group velocity dispersion priors that match material parameters and with reference arrival time Using this as a reference, the time axis is mapped to an equivalent propagation distance axis. For each frequency component... Its corresponding equivalent propagation distance can be defined as:
[0051] in, It can be determined by the reference echo peak, the cross-correlation peak, or a preset gated starting point. Through the above mapping, the echo energy corresponding to the same propagation path can be aligned to similar distance positions on different frequency components, thereby achieving dispersion compensation.
[0052] Based on this, since the distance coordinates mapped from different frequency components are non-uniform grids, this invention sets a unified uniform distance grid. And interpolate and resample the energy distribution to Projecting onto a uniform distance grid yields a two-dimensional dispersion-compensated feature map. .
[0053] To accommodate the input size of subsequent networks, the two-dimensional dispersion compensation feature map is uniformly resampled to a fixed size using bilinear interpolation and then normalized. Simultaneously, this invention outputs an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map. This equivalent propagation distance map can be derived from the uniform distance grid { The frequency dimension is copied and uniformized with the same size, and then used for subsequent dispersion prior enhancement based on propagation distance.
[0054] In some embodiments of the present invention, the multi-path depth-separable residual attention module includes: Depth-separable convolutional paths, dynamic channel attention units, and inverse enhancement pathways; The depth-separable convolutional path employs three parallel 3×3 convolutional kernels, a 5×5 convolutional kernel, and a rotatable 3×3 convolutional kernel, respectively. The dynamic channel attention unit is used to perform channel-adaptive weighting on the concatenated features output by the depthwise separable convolutional path to obtain weighted features; The reverse enhancement path is used to calculate the difference between the weighted feature and the concatenated feature, and after convolution amplification of the difference, it is fused with the weighted feature to obtain the enhanced feature. The input feature and the enhanced feature are then added to obtain the output feature.
[0055] After constructing a two-dimensional dispersion compensation feature map, in order to achieve high-precision identification of small samples of tank defects, Figure 5 This is a schematic diagram of the overall structure of the small sample defect recognition network provided by the present invention. The overall framework of the small sample defect recognition network structure is as follows: Figure 5 As shown, this invention designs a deep neural network structure composed of a lightweight residual backbone, a local texture enhancement module, a spatiotemporal decay weighted global enhancement module, and a metric classifier.
[0056] The network takes a two-dimensional dispersion-compensated feature map as input and first extracts basic structural features using a lightweight residual backbone network. Unlike traditional residual structures, this invention introduces a multi-path, depth-separable residual attention module in each stage of the backbone network, which adaptively enhances local texture features through multi-path spatial convolution and channel dynamic recalibration mechanisms.
[0057] After the stage output of the backbone network, the present invention further sets up a spatiotemporal attenuation weighted global enhancement module, which is used to perform gain calibration on features using equivalent propagation distance prior and apply distance attenuation constraints to global correlation.
[0058] Subsequently, all enhanced deep features are input into the feature embedding layer, mapped into low-dimensional, compact feature vectors with good metric properties, to support subsequent few-sample classification. This invention employs a feature distance-based prototype classification method, determining the defect category by calculating the Euclidean distance between sample features and the category prototype, achieving reliable identification without requiring a large number of samples for training.
[0059] To further enhance the feature extraction capability of the backbone network under small sample conditions, this invention improves the traditional residual structure by designing a multi-path depth-separable residual attention block. While maintaining a lightweight structure, this module achieves enhanced representation of subtle electromagnetic ultrasound textures through mechanisms such as multi-path convolution, dynamic channel recalibration, and detail inverse enhancement.
[0060] Specifically, this module includes three parallel depthwise separable convolutional paths, employing 3×3 convolution, 5×5 convolution, and a rotatable 3×3 convolution with orientation sensitivity, to capture local structural features at different scales and in different directions. The outputs of the three paths are concatenated along the channel dimension and then input into a dynamic channel attention unit. Channel descriptors are constructed through joint average pooling and energy pooling, followed by lightweight convolution to generate channel weights, thereby adaptively enhancing effective features and suppressing redundant features.
[0061] To avoid the potential for channel attention to over-suppress weak but critical features, this invention further introduces a reverse enhancement path. By calculating the difference between the multi-path fused features and the channel-weighted features, the weakened detail textures are compensatorily enhanced. Finally, the enhanced features are added to the module input via residuals, ensuring the stability of the gradient flow and improving the module's sensitivity to subtle defects.
[0062] For example, to enhance the backbone network's ability to represent details of electromagnetic ultrasound defects, this invention embeds multi-path depth-separable residual attention modules in each stage of the backbone network. This module performs refined modeling and adaptive enhancement of local features through multi-path convolutional structures, dynamic channel recalibration, and a detail inverse enhancement mechanism. Figure 6 This is a schematic diagram of the structure of the multi-path depth-separable residual attention module provided by the present invention.
[0063] First, when the input feature map ( For the real number field, The number of feature map channels. For feature map height, After entering this module (where the feature map width is 1), it is simultaneously fed into three parallel depthwise separable convolution paths, including: a standard 3×3 depthwise separable convolution, a 5×5 depthwise separable convolution to expand the receptive field, and a rotational 3×3 depthwise separable convolution with orientation sensitivity.
[0064] The three paths are used to capture the directional information of fine-grained texture, mesoscale structural features, and crack-like defects, respectively. The outputs of the three paths are denoted as follows:
[0065] The outputs of the three paths are concatenated along the channel dimension to obtain multi-path fusion features:
[0066] To reduce redundancy caused by channel expansion after multipath fusion, this invention... A dynamic channel recalibration mechanism is introduced, which describes the channel energy through a combination of global average pooling and energy pooling:
[0067] in, For channel indexing, For height indexing, For width index.
[0068] The final descriptor is:
[0069] Subsequently, channel attention weights are generated using lightweight convolutions and nonlinear mappings:
[0070] in, It is Sigmoid. Activate for Swish , These are the weight matrices for the linear transformation.
[0071] The feature maps are then weighted as follows:
[0072] Considering that channel attention may over-suppress weak but defect-related detail responses, this invention introduces a reverse enhancement path after channel recalibration.
[0073] This approach first calculates the difference between the features before and after channel weighting:
[0074] Then, 1×1 convolution is used to filter and amplify the difference details, and proportionally... After fusion, the compensated features are obtained:
[0075] in, A learnable or settable balance factor used to control the intensity of detail enhancement.
[0076] Finally, this module employs a residual connection structure to integrate the input features. The enhanced features are added element-wise to obtain the module output:
[0077] In some embodiments of the present invention, the spatiotemporal attenuation weighted global enhancement module includes: Local branches, global branches, and adaptive fusion units; The local branch includes three parallel convolutional paths, a distance-driven gain calibration unit, and a spatially enhanced attention module; The three parallel convolutional paths employ 3×3 convolution, 5×5 convolution, and 3×3 dilated convolution, respectively, to extract multi-scale features. The distance-driven gain calibration unit is used to generate gain weights based on the equivalent propagation distance map and perform gain calibration on the multi-scale features to obtain calibration features. The spatial enhancement attention module is used to perform average pooling and max pooling on the calibration features to determine the spatial weight map, and to obtain local enhancement features based on the multi-scale features and the spatial weight map. The global branch includes a migration field prediction and deformable sampling unit, a distance difference matrix construction unit, and an attenuation bias attention unit; The offset field prediction and deformable sampling unit predicts the offset field through 3×3 convolution and performs deformable sampling on query, key and value features based on the offset field; The distance difference matrix construction unit is used to construct a distance difference matrix between each feature location based on the equivalent propagation distance map; The attenuation bias attention unit is used to generate a distance attenuation bias based on the distance difference matrix, and to introduce the distance attenuation bias as an additive term into the attention weight calculation process to perform weighted aggregation on the sampled value features to obtain global enhanced features; The adaptive fusion unit is used to fuse the local enhancement features and the global enhancement features to obtain fused features, and add the fused features and the input features to obtain output features.
[0078] To enhance the network's ability to represent complex features of various defects, this invention introduces a spatiotemporally attenuated weighted global enhancement module after the outputs of each stage of the backbone network. Local branches extract multi-scale local features from different receptive fields through three parallel convolutional paths: standard 3×3 convolution, 5×5 convolution, and 3×3 dilated convolution with a dilation rate of d=2. These features are then combined with an equivalent propagation distance map for distance-driven gain calibration, and spatial weight maps are generated through spatially enhanced attention to adaptively strengthen salient regions related to defects. The global branch employs a deformable multi-head attention mechanism. It predicts the attention offset field to achieve deformable sampling of the query (Q), key (K), and value (V). Simultaneously, it constructs a distance difference matrix based on the equivalent propagation distance map and generates a distance attenuation bias, which is introduced as an additive term into the attention weight calculation process. This achieves a physical constraint on global correlation, thereby suppressing spurious correlation responses caused by long-range interference when modeling long-range dependencies. Finally, the module adaptively weights and fuses the outputs of the local and global branches using fusion coefficients generated based on global pooling, and adds them to the input features through residual connections to form an enhanced feature representation that combines local detail discernibility with global structural integrity.
[0079] For example, in order to further improve the network's representation ability under different defect scenarios, the present invention introduces a spatiotemporal attenuation weighted global enhancement module after the output of each stage of the backbone network. Figure 7 This is a schematic diagram of the spatiotemporal attenuation weighted global enhancement module provided by the present invention, as shown below. Figure 7As shown, this module consists of parallel local and global branches, which are responsible for capturing fine-grained texture features and cross-regional structural dependencies, respectively. Then, the information is dynamically integrated through an adaptive fusion mechanism.
[0080] In the local branch, the input features are first processed through three parallel convolutional paths: a standard 3×3 convolutional branch, a 5×5 convolutional branch, and a 3×3 dilated convolutional branch with a dilation rate d=2. These three paths are used to extract fine-scale textures, expand the receptive field to obtain mesoscale structures, and introduce broader contextual information while maintaining low computational cost. Let the input features be... The output of the three paths can then be represented as:
[0081] The three elements are spliced together along the channel dimension to form a multi-scale feature:
[0082] To compensate for energy attenuation and near-field / far-field amplitude differences caused by propagation distance, a distance-driven gain calibration is introduced in the local branch. Let the equivalent propagation distance map aligned with the feature map be... The gain weights are generated by a monotonic function:
[0083] And it is used to calibrate multi-scale features:
[0084] Subsequently, the spatial augmentation attention module generates a spatial weight map from the calibrated multi-scale features. The module then uses average pooling... With max pooling Construct a spatial description diagram:
[0085] The two are then concatenated along the channel dimension, and a spatial weight map is generated by 7×7 convolution and Sigmoid:
[0086] The final local enhancement features are obtained:
[0087] This amplifies the response of the defective region and suppresses the background redundancy region.
[0088] The global branch primarily models long-range dependencies across regions. This invention employs a deformable multi-head attention mechanism to dynamically sample queries (Q), keys (K), and values (V) by predicting offset fields.
[0089] Specifically, the offset field is obtained through a 3×3 convolution:
[0090] Adjusting attention sampling points using offset fields:
[0091] Simultaneously, a distance difference matrix is constructed based on the equivalent propagation distance map:
[0092] And generate distance attenuation bias Exemplary desirability This is introduced as an additive term in the attention weight calculation:
[0093] This allows for the suppression of associations with large distance differences during global information aggregation, resulting in globally enhanced features:
[0094] Where H represents the number of attention heads.
[0095] After local and global feature extraction is completed, this invention combines the two through an adaptive fusion unit. The module first generates channel descriptors using global average pooling:
[0096] The fusion coefficients are generated by 1×1 convolution and sigmoid activation.
[0097] Weights used for adaptive control of local and global features.
[0098] The final fusion feature is expressed as:
[0099] And add it to the input features as a residual:
[0100] In some embodiments of the present invention, the construction of a few-shot defect recognition network based on a source domain dataset and a target domain dataset through meta-learning training and few-shot transfer includes: Based on the source domain dataset, construct multiple meta-tasks containing support sets and query sets; The initial network is trained based on the meta-task to obtain the meta-learning basic model; the initial network includes the improved residual backbone, the multi-path deep separable residual attention module, the spatiotemporal decay weighted global enhancement module, and the classifier. Using the target domain dataset, the small sample defect recognition network is obtained by updating the category prototype of the meta-learning base model and fine-tuning the network parameters of the meta-learning base model.
[0101] In some embodiments of the present invention, training the initial network based on the meta-task to obtain the meta-learning base model includes: Based on the support set, the mean of the deep features corresponding to each defect category is used as the category prototype; Based on the Euclidean distance between the feature vectors of the samples in the query set and the category prototypes, the classification probability and task loss of the samples in the query set are determined. Based on the classification probability and task loss, the initial network is trained to obtain the meta-learning base model.
[0102] After constructing the source domain dataset, this invention uses the N-way K-shot meta-learning framework to train the small sample defect recognition network, enabling the model to learn the ability to "learn quickly from a small number of samples" across different working conditions and tasks.
[0103] In the meta-training phase, this invention randomly extracts multiple work condition categories from the source domain dataset to construct a large number of task-level training samples. Each meta-task T consists of a support set S and a query set Q, where the support set is used to generate category prototypes and the query set is used to calculate task loss and update network parameters.
[0104] (1) Supports set feature extraction and category prototype calculation.
[0105] The two-dimensional dispersion compensation feature map input to the network is processed by the backbone network, the local enhancement module and the spatiotemporal attenuation weighted global enhancement module to obtain the feature vector of the embedded space; among them, the equivalent propagation distance map is used as the physical prior input for distance-driven calibration and distance attenuation constraint in the spatiotemporal attenuation weighted global enhancement module.
[0106] Suppose that the support center is the first The sample set of the class is:
[0107] in, To support the set of input samples, For the corresponding category label.
[0108] Its corresponding depth features are:
[0109] in, This represents the feature extraction network designed in this invention. These are network parameters.
[0110] Based on the concept of Prototypical Networks, this invention uses the mean feature value of each category as the category prototype:
[0111] The category prototype reflects the central position of the category in the feature space and has good stability under small sample conditions.
[0112] (2) Query set distance metric and task loss calculation.
[0113] For any sample in the query set The feature vector is:
[0114] It belongs to the category The probability is determined by the Euclidean distance between the feature vector and the prototype of each class:
[0115] Wherein, the distance function is the Euclidean distance:
[0116] The loss of the meta-task can be obtained by minimizing the negative log-likelihood of the query samples:
[0117] (3) Task-level parameter update and meta-training optimization.
[0118] This invention constructs a large number of meta-tasks in the source domain. Calculate the loss independently for each task and minimize the expected loss over the task distribution:
[0119] in, Using Adam as the optimizer for all learnable parameters of the network, and adaptively adjusting the learning rate, the network learns shared structural information across different task conditions and achieves rapid classification with few samples. After meta-training, a basic meta-model capable of rapid adaptation to the target domain task is obtained.
[0120] After completing meta-training in the source domain, this invention deploys the resulting basic meta-model to a real-world tank inspection scenario. Since there is often a distributional deviation between the target domain and the source domain, directly using the source domain model can easily lead to a decrease in recognition performance. Therefore, this invention utilizes a small number of target domain samples to perform rapid few-sample transfer during the deployment phase. Through class prototype updates and lightweight parameter fine-tuning, the model can align with the target domain conditions even with very few samples.
[0121] In the target domain, only a very small number of signals labeled with defect categories need to be collected, such as 1 to 5 signals per category, to construct an N-way K-shot target domain small sample adaptation task. These samples are then input into the meta-model feature extraction network to obtain the corresponding feature vectors. For each class of samples, the mean of the features is calculated to form the class center of the target domain. To shift the prototype towards the target domain distribution without altering the overall model structure, this invention employs an exponential moving average (EMA) method to update the original source domain category prototype. The update formula is as follows:
[0122] in, This is the initial prototype obtained from training the source domain meta-database. For smoothing coefficients, For the first The mean of the class features of the sub-batch samples. This update method can complete the target domain alignment of the prototype without a large amount of data, enabling the model to quickly adapt to field conditions under small sample conditions.
[0123] Building upon the prototype update, this invention further allows for lightweight fine-tuning of smaller parameter-scale components of the network, such as feature embedding layers, fusion coefficients or distance-driven calibration / distance-attenuation related parameters of the spatiotemporal decay-weighted global enhancement module, and calibration parameters of channel attention. These parameters directly participate in the remodeling of the target domain structure information through a query-set-based loss function:
[0124] A small number of updates can significantly improve target domain recognition performance, while avoiding overfitting and increased computational costs caused by training the entire network.
[0125] In long-term monitoring scenarios of storage tanks, factors such as equipment condition, changes in material surface, or temperature stress can cause signal distribution to gradually drift. Therefore, this invention designs an online incremental adaptive update mechanism: when the system detects a decrease in recognition confidence or a shift in feature distribution, it can automatically collect a very small number of new operating condition samples and incrementally update the category prototype according to the aforementioned EMA method.
[0126] When necessary, small-scale network parameters can be selectively fine-tuned to achieve rapid alignment with new operating conditions. This online update mechanism maintains the stability and robustness of the detection system during long-term operation without retraining the overall model or relying on large-scale labeled data.
[0127] This invention proposes a method and system for detecting defects in storage tanks based on meta-transfer learning and dispersion prior. By combining the rapid adaptability of meta-learning with the cross-domain feature extraction capability of transfer learning, the model can achieve high-precision defect identification and adaptive updates across operating conditions under conditions with very few samples. Figure 8 This is a schematic diagram of the overall process of the present invention, such as... Figure 8 As shown, the process includes the following steps: source domain data construction, target domain test block acquisition, signal preprocessing, construction of two-dimensional dispersion compensation feature map and equivalent propagation distance map, construction of improved feature extraction network, spatiotemporal attenuation weighted global enhancement, source domain meta-learning training, and target domain small sample transfer and online update.
[0128] The tank defect detection method based on meta-transfer learning and dispersion prior provided in this invention, through the deep fusion of meta-learning and transfer learning, constructs a detection system capable of rapidly achieving high-precision defect identification with minimal labeled samples and possessing cross-operating condition adaptability. The innovative network architecture of this invention achieves deep mining and enhancement of defect features through a dual-module collaborative working mechanism: on the one hand, the improved lightweight backbone network and local enhancement module enhance sensitivity to minute defect features through refined modeling of local signal texture and adaptive weighting of key feature channels; on the other hand, the spatiotemporal attenuation weighted global enhancement module uses an equivalent propagation distance prior to calibrate feature gain and introduces distance attenuation constraints in global correlation modeling to suppress spurious correlation responses caused by strong long-distance interference, thereby enhancing the physical consistency of cross-regional information aggregation. The above multi-level feature enhancement strategy, combined with the two-dimensional dispersion compensation feature map guided by dispersion prior, jointly constructs a feature representation system with extremely strong discriminative power. Building upon this foundation, through meta-training based on multi-source heterogeneous data, the model acquires the inherent ability to quickly learn new tasks from a small number of samples. In the target domain, stable identification can be achieved through prototype updates or lightweight fine-tuning with only a small number of samples, overcoming the bottlenecks of traditional methods such as poor generalization ability and difficulty in cross-domain transfer under small sample conditions. Ultimately, this results in a smart tank defect detection solution with optimized network structure, strong feature representation capabilities, high detection accuracy, and ease of application.
[0129] To better implement the tank defect detection method based on meta-transfer learning and dispersion prior in the embodiments of the present invention, based on the tank defect detection method based on meta-transfer learning and dispersion prior, the corresponding method is as follows: Figure 9 As shown, this embodiment of the invention also provides a tank defect detection device based on meta-transfer learning and dispersion prior. The tank defect detection device 900 based on meta-transfer learning and dispersion prior includes: The first construction unit 901 is used to construct a small-sample defect recognition network based on a source domain dataset and a target domain dataset, through meta-learning training and few-shot transfer. The source domain dataset includes electromagnetic ultrasonic experimental signals and simulation signals under various working conditions. The target domain dataset includes electromagnetic ultrasonic signals containing various defect types collected from simulated test blocks under target working conditions. The small-sample defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. The preprocessing unit 902 is used to preprocess the electromagnetic ultrasonic signal of the storage tank to be tested and construct a time series. The second construction unit 903 is used to perform time-frequency analysis on the time series and combine the group velocity dispersion prior to perform time-distance mapping and resampling to construct a two-dimensional dispersion compensation feature map and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map. The detection unit 904 is used to input the two-dimensional dispersion compensation feature map into the small sample defect identification network, and input the equivalent propagation distance map as a physical prior into the spatiotemporal attenuation weighted global enhancement module to obtain the defect detection result.
[0130] The storage tank defect detection device 900 based on meta-transfer learning and dispersion prior provided in the above embodiments can realize the technical solutions described in the above embodiments of the storage tank defect detection method based on meta-transfer learning and dispersion prior. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the storage tank defect detection method based on meta-transfer learning and dispersion prior, which will not be repeated here.
[0131] like Figure 10 As shown, the present invention also provides an electronic device 1000. The electronic device 1000 includes a processor 1001, a memory 1002, and a display 1003. Figure 10 Only some components of the electronic device 1000 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0132] In some embodiments, processor 1001 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 1002 or process data, such as the tank defect detection method based on meta-transfer learning and dispersion prior in this invention.
[0133] In some embodiments, processor 1001 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 1001 may be local or remote. In some embodiments, processor 1001 may be implemented on a cloud platform. In some embodiments, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, or any combination thereof.
[0134] In some embodiments, memory 1002 may be an internal storage unit of electronic device 1000, such as a hard disk or memory of electronic device 1000. In other embodiments, memory 1002 may also be an external storage device of electronic device 1000, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 1000.
[0135] Furthermore, the memory 1002 may include both internal storage units of the electronic device 1000 and external storage devices. The memory 1002 is used to store application software and various types of data installed on the electronic device 1000.
[0136] In some embodiments, display 1003 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an organic light-emitting diode (OLED) touchscreen, etc. Display 1003 is used to display information from electronic device 1000 and to display a visual user interface. Components 1001-1003 of electronic device 1000 communicate with each other via a system bus.
[0137] In some embodiments, when the processor 1001 executes the tank defect detection program based on meta-transfer learning and dispersion prior in the memory 1002, the following steps may be implemented: Based on source domain datasets and target domain datasets, a few-shot defect recognition network is constructed through meta-learning training and few-shot transfer. The source domain dataset includes electromagnetic ultrasonic experimental signals and simulation signals under various working conditions. The target domain dataset includes electromagnetic ultrasonic signals containing various defect types collected from simulated test blocks under target working conditions. The few-shot defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. The electromagnetic ultrasonic signals of the storage tank under test are preprocessed to construct a time series. Time-frequency analysis is performed on the time series, and time-distance mapping and resampling are performed in combination with group velocity dispersion prior to construct a two-dimensional dispersion compensation feature map and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map; The two-dimensional dispersion compensation feature map is input into the small sample defect identification network, and the equivalent propagation distance map is input as a physical prior into the spatiotemporal attenuation weighted global enhancement module to obtain the defect detection result.
[0138] It should be understood that when the processor 1001 executes the tank defect detection program based on meta-transfer learning and dispersion prior in the memory 1002, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.
[0139] Furthermore, the embodiments of the present invention do not specifically limit the type of the electronic device 1000 mentioned. The electronic device 1000 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1000 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0140] Accordingly, embodiments of the present invention also provide a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the tank defect detection method based on meta-transfer learning and dispersion prior provided in the above-described method embodiments.
[0141] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0142] The above provides a detailed description of the tank defect detection method, device, and medium based on meta-transfer learning and dispersion prior provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for detecting defects in storage tanks based on meta-transfer learning and dispersion prior, characterized in that, include: Based on the source domain dataset and the target domain dataset, a few-shot defect recognition network is constructed through meta-learning training and few-shot transfer. The source domain dataset includes electromagnetic ultrasonic experimental signals and simulation signals under various working conditions; the target domain dataset includes electromagnetic ultrasonic signals with various defect types collected on simulated test blocks under target working conditions; the small sample defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. The electromagnetic ultrasonic signals of the storage tank under test are preprocessed to construct a time series. Time-frequency analysis is performed on the time series, and time-distance mapping and resampling are performed in combination with group velocity dispersion prior to construct a two-dimensional dispersion compensation feature map and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map; The two-dimensional dispersion compensation feature map is input into the small sample defect identification network, and the equivalent propagation distance map is input as a physical prior into the spatiotemporal attenuation weighted global enhancement module to obtain the defect detection result.
2. The tank defect detection method based on meta-transfer learning and dispersion prior as described in claim 1, characterized in that, The multi-path depth-separable residual attention module includes: Depth-separable convolutional paths, dynamic channel attention units, and inverse enhancement pathways; The depth-separable convolutional path employs three parallel 3×3 convolutional kernels, a 5×5 convolutional kernel, and a rotatable 3×3 convolutional kernel, respectively. The dynamic channel attention unit is used to perform channel-adaptive weighting on the concatenated features output by the depthwise separable convolutional path to obtain weighted features; The reverse enhancement path is used to calculate the difference between the weighted feature and the concatenated feature, and after convolution amplification of the difference, it is fused with the weighted feature to obtain the enhanced feature. The input feature and the enhanced feature are then added to obtain the output feature.
3. The tank defect detection method based on meta-transfer learning and dispersion prior as described in claim 1, characterized in that, The spatiotemporal attenuation weighted global enhancement module includes: Local branches, global branches, and adaptive fusion units; The local branch includes three parallel convolutional paths, a distance-driven gain calibration unit, and a spatially enhanced attention module; The three parallel convolutional paths employ 3×3 convolution, 5×5 convolution, and 3×3 dilated convolution, respectively, to extract multi-scale features. The distance-driven gain calibration unit is used to generate gain weights based on the equivalent propagation distance map and perform gain calibration on the multi-scale features to obtain calibration features. The spatial enhancement attention module is used to perform average pooling and max pooling on the calibration features to determine the spatial weight map, and to obtain local enhancement features based on the multi-scale features and the spatial weight map. The global branch includes a migration field prediction and deformable sampling unit, a distance difference matrix construction unit, and an attenuation bias attention unit; The offset field prediction and deformable sampling unit predicts the offset field through 3×3 convolution and performs deformable sampling on query, key and value features based on the offset field; The distance difference matrix construction unit is used to construct a distance difference matrix between each feature location based on the equivalent propagation distance map; The attenuation bias attention unit is used to generate a distance attenuation bias based on the distance difference matrix, and to introduce the distance attenuation bias as an additive term into the attention weight calculation process to perform weighted aggregation on the sampled value features to obtain global enhanced features; The adaptive fusion unit is used to fuse the local enhancement features and the global enhancement features to obtain fused features, and add the fused features and the input features to obtain output features.
4. The tank defect detection method based on meta-transfer learning and dispersion prior as described in claim 1, characterized in that, The method for constructing a few-shot defect recognition network based on source domain datasets and target domain datasets through meta-learning training and few-shot transfer includes: Based on the source domain dataset, construct multiple meta-tasks containing support sets and query sets; The initial network is trained based on the meta-task to obtain the meta-learning basic model; the initial network includes the improved residual backbone, the multi-path deep separable residual attention module, the spatiotemporal decay weighted global enhancement module, and the classifier. Using the target domain dataset, the small sample defect recognition network is obtained by updating the category prototype of the meta-learning base model and fine-tuning the network parameters of the meta-learning base model.
5. The tank defect detection method based on meta-transfer learning and dispersion prior as described in claim 4, characterized in that, The process of training the initial network based on the meta-task to obtain the meta-learning base model includes: Based on the support set, the mean of the deep features corresponding to each defect category is used as the category prototype; Based on the Euclidean distance between the feature vectors of the samples in the query set and the category prototypes, the classification probability and task loss of the samples in the query set are determined. Based on the classification probability and task loss, the initial network is trained to obtain the meta-learning base model.
6. The tank defect detection method based on meta-transfer learning and dispersion prior as described in claim 1, characterized in that, The electromagnetic ultrasonic signal from the tank under test is preprocessed to construct a time series, including: The electromagnetic ultrasonic signal of the tank under test is bandpass filtered to obtain the filtered signal; Perform Hilbert transform on the filtered signal to extract the envelope signal; The amplitude of the envelope signal is normalized to obtain a normalized envelope signal; The time series is obtained by extracting a fixed-length time window containing the defect reflection wave from the normalized envelope signal.
7. The tank defect detection method based on meta-transfer learning and dispersion prior as described in claim 1, characterized in that, The step of performing time-frequency analysis on the time series and combining it with group velocity dispersion priors for time-distance mapping and resampling to construct a two-dimensional dispersion compensation feature map, and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map, includes: The time series is subjected to time-frequency transformation to obtain a time-frequency energy characterization; Based on the group velocity dispersion prior, the time axis of the time-frequency energy characterization is mapped to the equivalent propagation distance axis and resampled to obtain the two-dimensional dispersion compensation feature map; The two-dimensional dispersion compensation feature map is subjected to size unification and normalization processing, and the equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map is output.
8. A tank defect detection device based on meta-transfer learning and dispersion prior, characterized in that, include: The first building unit is used to construct a few-shot defect recognition network based on the source domain dataset and the target domain dataset through meta-learning training and few-shot transfer. The source domain dataset includes electromagnetic ultrasonic experimental signals and simulation signals under various working conditions; the target domain dataset includes electromagnetic ultrasonic signals with various defect types collected on simulated test blocks under target working conditions; the small sample defect recognition network includes an improved residual backbone for feature extraction, a multi-path deep separable residual attention module for local feature enhancement, a spatiotemporal attenuation weighted global enhancement module for global enhancement, and a distance-based classifier. The preprocessing unit is used to preprocess the electromagnetic ultrasonic signals from the tank under test and construct a time series. The second construction unit is used to perform time-frequency analysis on the time series and combine the group velocity dispersion prior to perform time-distance mapping and resampling to construct a two-dimensional dispersion compensation feature map and an equivalent propagation distance map aligned with the two-dimensional dispersion compensation feature map. The detection unit is used to input the two-dimensional dispersion compensation feature map into the small sample defect identification network, and input the equivalent propagation distance map as a physical prior into the spatiotemporal attenuation weighted global enhancement module to obtain the defect detection result.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the tank defect detection method based on meta-transfer learning and dispersion prior as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the tank defect detection method based on meta-transfer learning and dispersion prior as described in any one of claims 1 to 7.