Pipeline intrusion signal identification method and device based on transfer learning

By using a transfer learning-based approach, combined with the YOLOv5 model and convolutional attention module, the pipeline intrusion signal recognition algorithm was optimized, solving the problems of high false alarm rate, high false alarm rate and low positioning accuracy in the existing technology, and achieving high-precision pipeline intrusion early warning and positioning.

CN121659017APending Publication Date: 2026-03-13TIANJIN JYJC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing pipeline intrusion monitoring methods suffer from problems such as high false alarm and false alarm rates, inaccurate identification types, and low positioning accuracy.

Method used

We employ a transfer learning-based approach, combining the YOLOv5 model and convolutional attention module. Through feature extraction and pixel-level annotation, we optimize the model training process using parallel FFT and Focal Loss functions, thereby improving the model's recognition and localization accuracy.

Benefits of technology

It significantly improves the recognition accuracy and positioning precision of pipeline intrusion signals, reduces the false alarm rate, and achieves precise early warning and positioning within a meter-level range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121659017A_ABST
    Figure CN121659017A_ABST
Patent Text Reader

Abstract

The invention discloses a pipeline intrusion signal identification method and device based on transfer learning. The method comprises the following steps: collecting original data; performing feature extraction on the original data to obtain training data; pixel-level labeling is carried out on a two-dimensional image obtained after original data feature extraction; yOLOv5l is used as a basic model, a convolution attention module is introduced behind a plurality of cross-stage partial connection modules in Backbone, and a target detection model is formed; carrying out weight initialization on the target detection model in combination with transfer learning, and training the initialized model; and identifying the pipeline intrusion signal based on the trained model. The device comprises a processor and a memory. According to the invention, the problems of high algorithm missing report rate and false alarm rate, inaccurate identification type and poor positioning precision in current pipeline intrusion early warning are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline safety monitoring, and in particular to a method and apparatus for identifying pipeline intrusion signals based on transfer learning. Background Technology

[0002] Pipelines are not only the infrastructure of the energy system, but also the physical carrier of energy security. Compared with rail and road transportation, pipelines can economically meet the requirements of ultra-long distance and ultra-large capacity, and are unaffected by extreme weather, ensuring long-term stability and reliability.

[0003] Besides the aging and corrosion problems caused by pipelines over time, in recent years, there have been numerous accidents involving third-party construction damaging crude oil pipelines and water supply networks, resulting in leaks and causing huge economic losses and environmental pollution. Gas pipeline accidents are also common, even leading to explosions and causing significant loss of life and property. Therefore, real-time monitoring and early warning of pipeline intrusions are essential.

[0004] Currently, there are various methods commonly used in the field of pipeline intrusion detection. For example, point-type acoustic sensor arrays can capture abnormal sound waves in real time to identify intrusion signals, but they need to be densely deployed in long pipelines, which is costly; intelligent video surveillance uses fixed cameras or drones to capture video images, but their accuracy is greatly limited in bad weather or at night; pressure wave monitoring locates leaks by capturing the time difference between the arrival of pressure waves at different sensors, but it is only effective in situations with large pressure variations, such as oil pipelines.

[0005] In recent years, distributed fiber optic sensing technology has been increasingly used in pipeline monitoring. Using fiber optics as both the sensor and the signal transmission medium significantly reduces costs and offers unique advantages such as being passive and resistant to electromagnetic interference. However, most current judgment algorithms still suffer from problems such as high false alarm rates, significant biases in identification types, and low positioning accuracy. Summary of the Invention

[0006] This invention provides a method and apparatus for identifying pipeline intrusion signals based on transfer learning. This invention solves the problems of high false alarm and missed alarm rates, inaccurate identification types, and poor positioning accuracy in current pipeline intrusion early warning algorithms. Details are described below:

[0007] A first aspect is a pipeline intrusion signal identification method based on transfer learning, the method comprising:

[0008] Collect raw data; extract features from the raw data to obtain training data;

[0009] Pixel-level annotation is performed on the two-dimensional image obtained after feature extraction from the original data;

[0010] Based on YOLOv5l, a convolutional attention module is introduced after multiple cross-stage partial connection modules in the Backbone to form an object detection model.

[0011] The object detection model is initialized with weights using transfer learning, and the initialized model is then trained.

[0012] The trained model is used to identify pipeline intrusion signals.

[0013] The step of extracting features from the original data to obtain training data is as follows:

[0014] FFT is performed simultaneously on each column of the original data matrix to obtain the spatial distribution of the power of each discrete frequency component, represented as O = (F1, F2, ..., Fp), where Fp is the frequency amplitude curve at the p-th sampling position in the spatial domain; the power spectral amplitude at each spatial position is represented as Fj = [A1j, A2j, ..., Apj] T Apj is the intensity at frequency p at the j-th sampling position in the spatial domain; T is the determinant transpose symbol; j is the spatial domain sampling position index; the spatial distribution is displayed in the style of a planar color-coded map and saved as a two-dimensional image.

[0015] The target detection model uses four types of convolutional attention modules, ranging from the fewest to the most channels and from the largest to the smallest size.

[0016] A 128-channel, 80x80-size convolutional attention module enhances the model's ability to capture edge details; a 256-channel, 40x40-size convolutional attention module enhances the model's ability to recognize local structures; and a 512-channel, 20x20-size convolutional attention module enhances the model's ability to distinguish global contours and categories. The features at these three levels are fused and matched with PANet in the model's Neck section.

[0017] In this model, apart from the newly added convolutional attention module, the other layers of the target detection model are directly loaded with the weights of the YOLOv5l model pre-trained on the COCO dataset.

[0018] The training of the initialized model includes two stages, each of which includes: sampling preprocessing, data augmentation, model inference, loss calculation, and backpropagation optimization.

[0019] In the first stage, all layers in the backbone except the convolutional attention module, which are initialized with the weights of the pre-trained model, are frozen, while general object detection features are preserved. The initial learning rate in the first stage is 0.00005, and the training lasts for 30 epochs.

[0020] In the second stage, all layers are unfrozen, and the entire network is fine-tuned. The initial learning rate in the second stage is reduced to 0.00001, and the training lasts for 70 epochs.

[0021] The sampling preprocessing is as follows:

[0022] Traverse the entire training set and count the number of samples Ck for each category of event; initialize the sampling weights ω(i) = 0, i ∈ {1,…, N}, where N is the total number of samples in the training set;

[0023] The sampling weight of the i-th sample is equal to the sum of the reciprocals of the number of samples Ck corresponding to each event.

[0024] The calculated loss is as follows:

[0025] In classification loss, Focal Loss is used instead of the binary cross-entropy loss function, and the loss weight for each class is the square root of the reciprocal of the total number of samples in that class.

[0026] Second aspect, a pipeline intrusion signal identification device based on transfer learning, the device comprising: a processor and a memory, the memory storing program instructions, the processor calling the program instructions stored in the memory to cause the device to perform the method described in any one of claims 1-7.

[0027] Third aspect, a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described in any one of the first aspects.

[0028] The beneficial effects of the technical solution provided by this invention are:

[0029] 1. This invention uses parallel FFT (Fast Fourier Transform) as the feature extraction preprocessing. Compared with other multi-feature analysis methods and distributed parameter calculation methods, this feature extraction method has a very low computational load, which can greatly improve the real-time performance and stability of engineering application monitoring systems.

[0030] 2. This invention uses spatial frequency energy spectrum as the feature input image, which breaks through the limitation of pulse width in positioning accuracy. Combined with a pixel-level precise annotation strategy, it significantly improves positioning accuracy compared with other algorithms, reaching the meter level, and provides precise guidance for pipeline pre-warning, in-process protection and post-event positioning.

[0031] 3. This invention uses a balanced presampling strategy and a Focal Loss function to reduce the loss of model prediction accuracy caused by the imbalance of the number of samples in each class, accelerate the convergence speed during model training, and solve the dilemma of a small number of typical positive samples and the difficulty in collecting them.

[0032] 4. This invention is based on the YOLOv5 model. By introducing the CBAM (Convolutional Attention Module) module, it enhances the model's ability to identify small targets and suppress the model's ability to misidentify background noise information. Through the transfer learning strategy, it accelerates the training speed of the model, reduces the training cost, and improves the model's generalization performance and robustness. The combined effect of the two significantly improves the model's classification accuracy and intrusion event detection rate. Attached Figure Description

[0033] Figure 1 A flowchart for pipeline intrusion signal identification;

[0034] Figure 2 A schematic diagram illustrating the feature annotations for four types of intrusion events;

[0035] Among them, (a) is the spatial frequency diagram of mechanical damage signal; (b) is the spatial frequency diagram of artificial intrusion signal; (c) is the spatial frequency diagram of vehicle passing signal; and (d) is the spatial frequency diagram of minor disturbance signal.

[0036] Figure 3 This is a schematic diagram of the annotation results;

[0037] This includes information such as: original image resolution, anchor frame rotation angle, anchor frame boundary coordinates in pixels, anchor frame size, and label category.

[0038] Figure 4 A schematic diagram of the structure of the YOLOv5-L model with the CBAM module added;

[0039] Figure 5 This is a schematic diagram of the CBAM module. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below.

[0041] When an intrusion event occurs around the pipeline, the optical signal in the fiber optic cable laid along the pipeline is modulated by vibrational sound waves. The modulated optical signal is received in real time by a distributed fiber optic vibration sensing system and processed into a feature image. The feature image is then fed into a knowledge-transfer model for identification, and finally, an early warning signal is output.

[0042] Figure 1 The flowchart shown is for a pipeline intrusion signal identification method based on transfer learning. The implementation process is described in detail below:

[0043] 101: Collect raw data;

[0044] The system utilizes a distributed fiber optic vibration sensing system to collect raw vibration signals for different event types. The raw vibration signal is a two-dimensional matrix composed of multiple backscattering Rayleigh curves, which can be represented as: I = (T1, T2, ..., Tp) T , where p is the pulse repetition frequency, the horizontal axis represents the sampling points, and the vertical axis represents the number of pulses; Ti = [Ri1,Ri2,...,Rim] represents the backscattering Rayleigh curve of the i-th acquisition; m represents the number of sampling points in a single acquisition, m=2fnL / c, where L is the length of the optical fiber connected to the pipeline monitoring system (km), f is the sampling rate of the digital acquisition card (Hz), n is the average refractive index of the optical fiber, c is the speed of light in vacuum (km / s), and Rim is the Rayleigh scattering intensity of the m-th sampling point of the i-th acquisition per second in the time domain.

[0045] For ease of subsequent calculations, the original vibration signal can be represented as:

[0046]

[0047] 102: Extract features from the original data to obtain training data;

[0048] The feature extraction method involves simultaneously performing FFT calculations on each column of the original data matrix to obtain the spatial distribution of the power of each discrete frequency component, referred to as the spatial frequency energy spectrum, denoted as O = (F1, F2, ..., Fp), where Fp is the frequency amplitude curve at the p-th sampling position in the spatial domain. The power spectral amplitude at each spatial position is represented as Fj = [A1j, A2j, ..., Apj]. T Apj is the intensity at frequency p at the j-th sampling position in the spatial domain; T is the determinant transpose symbol; j is the spatial domain sampling position index; after obtaining the above spatial frequency energy spectrum, it is displayed in the style of a planar color-coded map and saved as a two-dimensional image for easy subsequent annotation and recognition.

[0049] 103: Training data annotation;

[0050] The two-dimensional images obtained after feature extraction from the original data are annotated at the pixel level to build a training sample library containing multiple categories and dimensions.

[0051] The application scenario of this invention is pipeline safety monitoring, which includes event types such as minor disturbances, natural noise, human intrusion, and mechanical damage. The number of samples of different types in the training sample library is shown in Table 1. The labeled samples are divided into dataset, validation set, and test set in a ratio of 7:2:1 for subsequent model training.

[0052] Table 1. Statistics on the number of samples in each category of the training set

[0053]

[0054] Annotation method as follows Figure 2 As shown, draw anchor boxes and select categories in the enlarged image. When labeling, strive for accurate anchor box boundaries. The standard labeling format used for YOLOv5 model training is a four-tuple format with one target instance per row, specifically including: category index, normalized x-coordinate of the bounding box center point, normalized y-coordinate, normalized width, and normalized height. All coordinates are normalized based on the image's width and height (values ​​range from 0 to 1). Figure 3 The JSON file shown is structured data exported by the annotation tool, where each result object under the annotations field represents an annotation instance. The mapping relationship between its key fields and the YOLOv5 annotation format is as follows:

[0055] Category Index: The label name (e.g., "Artificial invasion") in the rectanglelabels field is converted into the corresponding integer index through a predefined category mapping table, i.e., the label index in Table 1;

[0056] Normalized x-coordinate = (x + width / 2) / original_width;

[0057] Normalized y-coordinate = (y + height / 2) / original_height;

[0058] Normalized width = width / original_width;

[0059] Normalized height = height / original_height.

[0060] Here, x, y, width, and height come from the value field and are in pixels; original_width and original_height are the original dimensions of the image, used for normalization calculations.

[0061] Finally, the annotation results for each image need to be converted into the .txt text file format required by YOLOv5, with each line representing a bounding box, in the format of <category index> <normalized x-coordinate> <normalized y-coordinate> <normalized width> <normalized height>.

[0062] 104: Building the model;

[0063] Based on YOLOv5l, a CBAM (Convolutional Block Attention Module) is introduced after multiple CSP (Cross-Stage Partial-connections) modules in the Backbone. The model structure is as follows: Figure 4 As shown, the overall model structure is similar to YOLOv5, mainly consisting of three parts: Backbone, Neck, and Head. The Backbone network is primarily used to extract multi-scale features from the input image layer by layer. First, the input image is downsampled through an initial convolutional layer (Conv-1), and then sequentially passes through four sets of composite structures consisting of standard convolutional layers (Conv-2~Conv-5), a C3 (cross-stage partial connectivity) module, and a CBAM convolutional attention module to progressively extract features of different sizes. At the end of the Backbone, the SPPF (Fast Spatial Pyramid Pooling) module aggregates multi-scale contextual information and increases the receptive field. The Neck network is responsible for fusing multi-level features from the Backbone output. High-level feature maps are sequentially processed through two sets of Conv convolutions (Conv-6, Conv-7), followed by unsampling and upsampling, and then concatenated with low-level features of the corresponding size (Concat) to improve the accuracy of small object classification. Subsequently, they undergo two sets of convolutional downsampling (Conv-8, Conv-9) and are concatted with the high-level features to improve the accuracy of large object bounding box regression. The Head detection head receives feature maps of three scales from the Neck output. Each feature map is processed through a 1x1 convolutional layer, mapping the number of channels to the number of object classes, bounding box coordinates, and confidence scores, outputting the final object detection result.

[0064] The model uses four CBAM modules in descending order of channel count and size. The 128-channel, 80x80-size CBAM module enhances the model's edge detail capture capability, the 256-channel, 40x40-size CBAM module enhances the model's local structure recognition capability, and the 512-channel, 20x20-size CBAM model enhances the model's global contour and category discrimination capabilities. The features from these three levels are fused and matched with the PANet (Path Aggregation Network) in the model's neck region, ultimately improving the model's multi-scale object detection and classification accuracy.

[0065] The structure of the CBAM convolutional attention module is shown in Figure 5. It sequentially combines the CAM (Channel Attention Module) and SAM (Spatial Attention Module) modules. The CAM module learns the important weights of features across different channels, enabling the model to understand which channel features are crucial. Specifically, the channel attention module performs global average pooling and global max pooling on the input features, compresses the features of each channel, passes them through a shared multilayer perceptron, sums the results element-wise, and then activates the output features using a sigmoid function. The SAM module learns the important weights of different spatial locations, enabling the model to understand which pixels are crucial. Specifically, the SAM module performs global average pooling and global max pooling on the output of the CAM module, concatenates the two pooling results, passes them through a convolutional layer, and then activates the output features using a sigmoid function.

[0066] 105: Model weight initialization;

[0067] Appropriate transfer learning can improve the model's object detection performance. In the model weight initialization of this method, except for the newly added CBAM module, the other layers of the model's backbone are directly loaded with the YOLOv5l model weights pre-trained on the COCO dataset.

[0068] The COCO (Common Objects in Context) dataset is a large-scale, general-purpose dataset for object detection, widely used in object detection and semantic segmentation. It contains 330,000 images across 80 object categories, essentially covering the most common objects in daily life. Each image in the dataset contains multiple objects with fine-grained annotations. Furthermore, it includes detailed image annotations for five categories: object detection, image segmentation, panoptic segmentation, dense pose mapping, and keypoint mapping. A YOLO model pre-trained on the COCO dataset has learned the core logic for multi-object detection. Through transfer learning, the model can reuse the common visual features contained in the pre-trained weights. The diversity of scenes in the COCO dataset also enhances the model's generalization ability.

[0069] Due to the significant differences in the sub-domains of object detection tasks, the Neck and Head parts of the model do not use pre-trained weights. Specifically, the weights of the convolutional layers and C3 module in the Neck part are initialized using He (as is known to those skilled in the art), and their weights follow a mean of 0 and a variance of 1 / 2. (Where, n is the number of input channels of the convolutional layer); the weights of the convolutional layers in the Head part of the model are initialized in the same way as above, but the bias term is initialized to 0; the CBAM module of the Backbone part of the model contains CAM and SAM parts. The weights of the convolutional layers in CAM are initialized in the same way as those in the Head part, while the convolutional layers in SAM have 2 channels because the input is the concatenation result of average pooling and max pooling. Therefore, the weights follow a normal distribution with a mean of 0 and a variance of 1, and the bias term is initialized to 0.

[0070] 106: Model training.

[0071] A phased training strategy is adopted to better accommodate transfer learning and the adaptation of the CBAM module. The training is divided into two phases. In the first phase, all layers in the Backbone, except for the CBAM module, are frozen with pre-trained model weights to fully preserve the model's general object detection features. The initial learning rate for the first phase is 0.00005, and the training lasts for 30 epochs. In the second phase, all layers are unfrozen, and full-network fine-tuning training is performed to further improve the model's detection performance for specific tasks. The initial learning rate for the second phase is reduced to 0.00001 to avoid destroying learned features with a large learning rate, and the training lasts for 70 epochs.

[0072] The single-stage model training process includes: sampling preprocessing, data augmentation, model inference, loss calculation, and backpropagation optimization.

[0073] S6.1) Sampling preprocessing;

[0074] The difficulty of collecting samples varies greatly depending on the type of intrusion event. For example, mechanical damage events have a lower probability of occurrence than minor disturbances, resulting in a significant difference in sample size. Therefore, sampling preprocessing is used to mitigate the impact of sample imbalance. The specific method for sampling preprocessing is a balanced sampling strategy. Before sampling, a sampling weight is generated for each sample based on an algorithm, assigning higher weights to events with fewer samples. During training, while keeping the total number of samples constant, instead of traversing the entire dataset and randomly shuffling it, samples are drawn from the dataset with replacement. The probability of each sample being drawn is the calculated sampling weight. The entire sampling process follows a multinomial distribution with the sample weight as a parameter, ensuring that rare types of samples are frequently selected while abundant sample types are not completely discarded. This sampling method makes it easier for the model to learn features and wastes fewer samples than downsampling.

[0075] The specific steps of the sampling weight algorithm are as follows:

[0076] Ⅰ) Traverse the entire training set and count the number of samples Ck for each category of events;

[0077] Ⅱ) Initialize the sampling weights ω(i) = 0, i ∈ {1,…, N}, where N is the total number of samples in the training set;

[0078] Ⅲ) The sampling weight of the i-th sample is equal to the sum of the reciprocals of the number of samples Ck corresponding to each event.

[0079] S6.2) Data augmentation;

[0080] The data augmentation methods include random scaling padding and small perturbation augmentation. The probability of random scaling padding occurring is 0.5, and the probability of small perturbation augmentation occurring is 0.3.

[0081] Let the original image size be (w, h). When random scaling and padding occur, a scaling factor s is randomly and uniformly sampled in the interval [0.5, 1.5]. Then, the size of the longer side after scaling is obtained as new_w = s * w. Based on the size of the longer side while keeping the aspect ratio unchanged, the size of the shorter side is calculated as new_h = new_w * (h / w). The original feature image is accurately scaled to the new size using a bilinear interpolation algorithm.

[0082] Initialize a 640*640 matrix with a blue background (60,3,255) to avoid extreme values ​​such as pure black (0) or pure white (255) affecting subsequent training. Copy the interpolated data into the initialized matrix, starting at (dx,dy). Randomly and uniformly sample dx at (0, 640 - new_w) and randomly and uniformly sample dy at (0, 640 - new_h) to avoid the model memorizing fixed target positions.

[0083] The bounding box coordinates are transformed. Before scaling, the top left coordinates are (w0, h0). After scaling and offsetting, the final top left coordinates are new_w0 = w0 * (new_w / w) + dx, new_h0 = h0 * (new_h / h) + dy, and the bottom right coordinates are new_wf = new_w0 + new_w, new_hf = new_h0 + new_h.

[0084] In summary, random scaling and filling enhancement avoids the reduction in bounding box accuracy caused by forced stretching. At the same time, random offset makes the target appear in different positions, avoiding the model's dependence on the center position. When the scaling factor is greater than 1, the image itself is enlarged, increasing the ability to recognize small targets.

[0085] The small perturbation enhancements specifically include: copy-paste enhancement and random erase enhancement.

[0086] When copy-paste enhancement occurs, m target instances are randomly selected from other images in the same training subset. m follows a Poisson distribution with λ = 2.5. The bounding box of the target instance, along with its internal pixels, is copied to the same position in the current image. Its true label is added to the label list of the current image, and finally, the mixed sample is obtained.

[0087] When random erasure enhancement occurs, n rectangular regions are randomly generated, where n follows a uniform distribution in the range [1, 3]. The size of these regions is (0.02-0.1) times the image size, and their aspect ratio follows a beta distribution with α=β=10. Their positions are randomly and uniformly sampled at (0, 448). A pre-set blue color (60, 3, 255) is used as the fill color to cover all pixels within the rectangular region. If a label exists within the region, the label information is completely preserved without modification.

[0088] S6.3) Model reasoning;

[0089] Model inference is the process of inputting the preprocessed feature image into the model network for a forward computation and finally outputting the prediction result, which will not be elaborated here.

[0090] S6.4) Calculate the loss;

[0091] In the classification loss, Focal Loss is used instead of the BCE (Binary Cross Entropy) loss function. Positive samples with a lower proportion are given a larger weight, while negative samples with a higher proportion are given a smaller weight. Specifically, the loss weight for each category is the square root of the inverse of the total number of samples in that category. This weighted classification loss can comprehensively improve the robustness of the model.

[0092] S6.5) Backpropagation optimization;

[0093] The optimization process uses the Adam (Adaptive Moment Estimation) optimizer to better adapt to the transfer learning strategy and protect the general features of the pre-trained model. It also incorporates cosine annealing learning rate modulation to avoid model performance fluctuations.

[0094] S7) The optimal model is trained and deployed to a real-time detection system to classify and locate images generated in real time by the distributed fiber optic vibration sensing system, and upload and display the identification type, location, and confidence probability.

[0095] The distributed fiber optic vibration sensing system collects vibration signals in real time and processes them into feature images. After being fed into the model for prediction, the output results include the boundary pixel positions of the prediction box, their categories, and confidence probabilities.

[0096] The actual method for calculating the fiber optic alarm location is as follows: X1 represents the absolute value of the left boundary pixel position of the predicted bounding box. Experimental analysis shows that this pipeline intrusion signal recognition system can perform real-time signal analysis and recognition, with a false negative rate of less than 0.8% and an average classification accuracy of over 97%. Table 2 shows a comparison of the recognition results using the YOLOv5 model optimized through transfer learning with the traditional YOLOv5 model.

[0097] Table 2 Comparison of Recognition Results

[0098]

[0099] Unless otherwise specified, the model numbers of the various devices in this embodiment of the invention are not limited, and any device that can perform the above functions is acceptable.

[0100] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A pipeline intrusion signal identification method based on transfer learning, characterized in that, The method includes: Collect raw data; extract features from the raw data to obtain training data; Pixel-level annotation is performed on the two-dimensional image obtained after feature extraction from the original data; Based on YOLOv5l, a convolutional attention module is introduced after multiple cross-stage partial connection modules in the Backbone to form an object detection model. The object detection model is initialized with weights using transfer learning, and the initialized model is then trained. The trained model is used to identify pipeline intrusion signals.

2. The pipeline intrusion signal identification method based on transfer learning according to claim 1, characterized in that, The process of extracting features from the original data to obtain training data is as follows: FFT is performed simultaneously on each column of the original data matrix to obtain the spatial distribution of the power of each discrete frequency component, represented as O = (F1, F2, ..., Fp), where Fp is the frequency amplitude curve at the p-th sampling position in the spatial domain; the power spectral amplitude at each spatial position is represented as Fj = [A1j, A2j, ..., Apj] T Apj is the intensity at frequency p at the j-th sampling position in the spatial domain; T is the determinant transpose symbol; j is the spatial domain sampling position index; the spatial distribution is displayed in the style of a planar color-coded map and saved as a two-dimensional image.

3. The pipeline intrusion signal identification method based on transfer learning according to claim 1, characterized in that, The object detection model uses four types of convolutional attention modules in order of increasing channel count and decreasing size. A 128-channel, 80x80-size convolutional attention module enhances the model's ability to capture edge details; a 256-channel, 40x40-size convolutional attention module enhances the model's ability to recognize local structures; and a 512-channel, 20x20-size convolutional attention module enhances the model's ability to distinguish global contours and categories. The features at these three levels are fused and matched with PANet in the model's Neck section.

4. The pipeline intrusion signal identification method based on transfer learning according to claim 1, characterized in that, Except for the newly added convolutional attention module, the backbone of the object detection model is directly loaded with the weights of the YOLOv5l model pre-trained on the COCO dataset.

5. The pipeline intrusion signal identification method based on transfer learning according to claim 1, characterized in that, The training of the initialized model includes two stages, each of which includes: sampling preprocessing, data augmentation, model inference, loss calculation, and backpropagation optimization. In the first stage, all layers in the backbone except the convolutional attention module, which are initialized with the weights of the pre-trained model, are frozen, while general object detection features are preserved. The initial learning rate in the first stage is 0.00005, and the training lasts for 30 epochs. In the second stage, all layers are unfrozen, and the entire network is fine-tuned. The initial learning rate in the second stage is reduced to 0.00001, and the training lasts for 70 epochs.

6. The pipeline intrusion signal identification method based on transfer learning according to claim 5, characterized in that, The sampling preprocessing is as follows: Traverse the entire training set and count the number of samples Ck for each category of event; initialize the sampling weights ω(i) = 0, i∈ {1,…, N}, where N is the total number of samples in the training set; The sampling weight of the i-th sample is equal to the sum of the reciprocals of the number of samples Ck corresponding to each event.

7. The pipeline intrusion signal identification method based on transfer learning according to claim 5, characterized in that, The calculated loss is: In classification loss, Focal Loss is used instead of the binary cross-entropy loss function, and the loss weight for each class is the square root of the reciprocal of the total number of samples in that class.

8. A pipeline intrusion signal identification device based on transfer learning, characterized in that, The device includes a processor and a memory, the memory storing program instructions, the processor calling the program instructions stored in the memory to cause the device to perform the method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described in any one of claims 1-7.