An intelligent diagnosis method, device and system for insulation failure of a buried pipeline and a medium
By constructing a fault diagnosis model based on multi-condition simulation data and a condition comparison feature alignment mechanism, the problem of intelligent diagnosis of insulation faults in buried pipelines under complex environments was solved, achieving efficient fault identification and location, and improving the model's generalization ability and diagnostic accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU UNIV
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies struggle to achieve efficient and intelligent diagnosis of insulation faults in buried pipelines under complex and multi-condition working conditions. In particular, the generalization performance of the model is poor under the influence of factors such as soil resistivity, humidity, temperature, and stray current interference, resulting in severe domain shift.
Multi-condition simulation data is constructed and a conditional comparison feature alignment mechanism is introduced. Through feature extraction, attention enhancement and classification prediction, a fault diagnosis model is built. Simulink simulation model is used to simulate conditions such as local insulation failure, overall insulation degradation and electrical coupling between pipelines. The fault diagnosis model is trained by introducing category conditional comparison constraints and cross-entropy loss function optimization to improve the model's fault identification capability in complex environments.
It improves the accuracy and robustness of insulation fault diagnosis for buried pipelines, can effectively generalize under unknown operating conditions, realizes intelligent diagnosis of fault type and location, and supports online monitoring and intelligent operation and maintenance.
Smart Images

Figure CN122173899A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an intelligent diagnostic method, device, system, and medium for insulation faults in buried pipelines, belonging to the field of buried pipeline fault diagnosis technology. Background Technology
[0002] Buried metal pipelines (such as oil and gas pipelines and water supply pipelines) are an important part of urban lifeline engineering. The degradation of the insulation performance of their outer anti-corrosion layer is one of the main causes of safety accidents such as pipeline corrosion, perforation, and leakage.
[0003] Traditional pipeline external corrosion insulation testing (such as PCM and CIPS) relies on manual inspections, which is inefficient, costly, and difficult to implement in real-time online monitoring. In recent years, data-driven intelligent positioning methods based on distributed fiber optic sensing (DTS / DAS) and pipe-to-soil potential (P / S potential) monitoring have become a research hotspot. However, the pipeline operating environment is extremely complex, affected by various factors such as soil resistivity, humidity, temperature, stray current interference (e.g. from nearby rail traffic), corrosion layer material aging, and nearby parallel pipelines. The data distribution of monitoring signals can change drastically depending on the "environmental domain" or "operating condition domain." This leads to severe performance degradation of fault diagnosis models trained in a certain area or under certain conditions when deployed to new areas or when conditions change, a phenomenon known as "domain shift." This results in poor generalization performance of the model under unknown operating conditions.
[0004] Therefore, how to construct an intelligent pipeline insulation fault location method that can adapt to multiple operating conditions and has good generalization ability has become an urgent technical problem to be solved. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent diagnostic method, device, system, and medium for insulation faults in buried pipelines. By constructing multi-condition simulation data and introducing a condition comparison feature alignment mechanism, the invention achieves consistent expression of fault features under different conditions, thereby improving the model's fault identification capability in complex environments.
[0006] To achieve the above objectives, the present invention is implemented using the following technical solution.
[0007] On the one hand, the present invention provides an intelligent diagnostic method for insulation faults in buried pipelines, comprising:
[0008] Acquire voltage monitoring data for the pipeline under test.
[0009] The voltage monitoring data is input into a pre-trained fault diagnosis model for diagnosis and processing to obtain the fault result corresponding to the pipeline under test.
[0010] Specifically, the diagnostic process includes:
[0011] The voltage monitoring data is processed by feature extraction to obtain pipeline voltage features. The pipeline voltage features are then processed by attention enhancement to obtain enhanced attention features. Based on the enhanced attention features, classification and prediction processing is performed to output the fault result corresponding to the pipeline under test.
[0012] Furthermore, feature extraction processing is performed on the voltage monitoring data to obtain pipeline voltage features, specifically including:
[0013] Through feature extraction network Input voltage monitoring data Feature extraction is performed using the following expression:
[0014] ;
[0015] ;
[0016] in, For feature extraction networks, This represents the learnable parameters in the feature extraction network. For voltage monitoring data, For the first Voltage values at each voltage acquisition point;
[0017] The feature extraction network The specific processing methods include:
[0018] The input voltage monitoring data is processed by one-dimensional convolutional kernels of different scales in the first layer. Parallel convolution operations are performed to obtain the first layer's convolution outputs at different scales, expressed as:
[0019] ;
[0020] in, The kernel size of the first convolutional layer is The convolution output, This indicates that the size of the first convolutional kernel is... One-dimensional convolution operation, Represents the ReLU activation function;
[0021] Pooling is performed on the convolutional outputs of the first layer at different scales to obtain the pooled output of the first layer, expressed as:
[0022] ;
[0023] in, The kernel size of the first convolutional layer is The corresponding pooling output, This indicates the first-level pooling operation;
[0024] By performing parallel convolution operations on the pooling output of the first layer using one-dimensional convolution kernels of different scales in the second layer, the convolution outputs of the second layer at different scales are obtained, as expressed in the following expression:
[0025] ;
[0026] in, The kernel size of the second convolutional layer is The convolution output, This indicates that the size of the second convolutional kernel is... One-dimensional convolution operation;
[0027] Pooling is performed on the convolutional outputs of the second layer at different scales to obtain the pooled output of the second layer, as expressed in the following expression:
[0028] ;
[0029] in, The kernel size of the second convolutional layer is The corresponding pooling output, This indicates the second-level pooling operation;
[0030] By performing parallel convolution operations on the pooling output of the second layer using one-dimensional convolution kernels of different scales in the third layer, the convolution outputs of the third layer at different scales are obtained, as expressed in the following expression:
[0031] ;
[0032] in, The kernel size of the third convolutional layer is The convolution output, This indicates that the kernel size of the third convolutional layer is... One-dimensional convolution operation;
[0033] Pooling is performed on the convolutional outputs of the third layer at different scales to obtain the pooled output of the third layer, as expressed in the following expression:
[0034] ;
[0035] in, The kernel size of the third convolutional layer is The corresponding pooling output, This indicates the third-level pooling operation;
[0036] The outputs of the third-layer pooling are concatenated along the channel dimension to form the pipeline voltage feature after feature fusion, expressed as:
[0037] ;
[0038] in, Indicates the characteristics of the pipeline voltage. This indicates a channel-dimension concatenation operation. , and These represent the kernel sizes of the third convolutional layer. The pooling outputs are for 3, 5, and 7. , , , , and All of these are intermediate feature representations within the feature extraction network.
[0039] Furthermore, the training method for the fault diagnosis model specifically includes:
[0040] Construct an equivalent circuit model of the distributed parameters of the sample buried pipeline, and obtain multi-source pipeline voltage signal data by setting different operating conditions to construct a sample pipeline insulation fault dataset.
[0041] Construct an initial fault diagnosis model;
[0042] The initial fault diagnosis model is trained using the sample pipeline insulation fault dataset. During the training process, a class conditional contrast constraint is introduced. By minimizing the overall loss function, the feature representations of samples of the same class under different working conditions are made closer to each other in the feature space, while the feature representations of samples of different classes are made farther apart, until a well-trained fault diagnosis model is obtained.
[0043] Furthermore, the method for constructing the equivalent circuit model of the sample buried pipeline distributed parameters specifically includes:
[0044] In the Simulink simulation model, the sample buried pipeline is discretized along its length as follows: Each distributed parameter unit consists of a series longitudinal resistor. resistance to ground constitute, Indicates the first Each distributed parameter unit, ;
[0045] in: This is a series longitudinal resistance used to characterize the axial resistance of the pipe's metallic conductors. It is the resistance to ground, used to characterize the leakage path formed by the anti-corrosion layer and the surrounding soil environment; Used to characterize the The ground capacitance characteristics between a distributed parameter unit and the ground.
[0046] Furthermore, the different operating conditions include:
[0047] Operating Condition 1: By reducing the local section's resistance to ground By setting specific sections as fault location sections, a local insulation failure condition is constructed.
[0048] Operating Condition 2: Based on Operating Condition 1, the ground resistance of each distributed parameter unit is reduced as a whole. Construct an overall insulation degradation process;
[0049] Operating Condition 3: Based on Operating Condition 1, a coupling resistance branch is introduced between the target pipeline and the parallel pipeline. Construct parallel pipeline interference fault conditions;
[0050] Operating Condition 4: By measuring the ground resistance of a specific local section Set to low-resistance limiting state and construct a metal-directly grounded operating condition.
[0051] Furthermore, the method for obtaining the sample pipeline insulation fault dataset specifically includes:
[0052] The Simulink simulation model was run under preset fault location sections, different fault degrees, and different operating conditions.
[0053] A preset current excitation signal is applied to the equivalent circuit model of the sample buried pipeline distributed parameters. This allows the current to be transmitted along each distributed parameter unit and a leakage current to be formed through the ground resistance. The ground voltage signal at each distributed parameter unit node is collected to obtain the original sample.
[0054] Assign a corresponding fault diagnosis label to the original sample. If the segment where the original sample is located is a preset fault location segment, the fault diagnosis label is 1, otherwise it is 0.
[0055] A sample pipeline insulation fault dataset is constructed based on the original samples and fault diagnosis labels, expressed as follows:
[0056] ;
[0057] in: For the first Datasets under various working conditions For the first The first working condition data One original sample, for The corresponding actual fault category label, The total number of samples.
[0058] Furthermore, the expression for minimizing the overall loss function is:
[0059] ;
[0060] in, For the overall loss function, The weighting system between the category-conditional contrast loss and the cross-entropy loss. For the category-conditional contrastive loss function, Let cross-entropy be the loss function. To represent the feature extraction network, it is used to extract features from the input pipeline voltage signal to obtain feature vectors representing fault information; This represents a classification prediction network, used to output the corresponding fault category prediction result based on the feature vector; This represents the learnable parameters in the model.
[0061] Furthermore, the category-conditional contrastive loss function is expressed as follows:
[0062] ;
[0063] in: Class conditional contrastive loss function For anchor samples Corresponding category conditional contrast loss, The total number of operating conditions. For the first Number of samples in the current batch for each working condition For operating condition number,
[0064] The anchor sample In a single training iteration, from the th The current batch corresponding to each working condition The first one selected One sample of pipeline voltage;
[0065] The anchor sample The corresponding class-conditional contrastive loss is expressed as follows:
[0066] ;
[0067] in: For anchor samples The set of positive samples, For the positive sample set The number of samples in Represents anchor sample The negative sample set, For the model to anchor samples The output classification prediction layer vector, For the model to positive samples The output classification prediction layer vector, For the model to negative samples The output classification prediction layer vector, For temperature parameters, For the first The anchor sample number in the current batch for each working condition. Let be the index of any positive sample in the set of positive samples. is the index of any negative sample in the negative sample set; for and A similarity scoring function between them; for and A similarity scoring function between them;
[0068] The set of positive samples is composed of... Batch set of each working condition Middle and anchor samples The sample consists of samples with the same fault category label but from different operating conditions.
[0069] The negative sample set is composed of... Batch set of each working condition Middle and anchor samples The sample composition has different fault category labels;
[0070] For from A batch set of each working condition For the first The current batch corresponding to each working condition;
[0071] The cross-entropy loss function Represented as:
[0072] ;
[0073] ;
[0074] in, Original sample Predicted fault category labels, For predictive processing, The single-sample cross-entropy loss function;
[0075] The calculation expression for the single-sample cross-entropy loss function is as follows:
[0076] ;
[0077] ;
[0078] in: Number of fault categories For the first Original samples Predicted fault category labels, For the first Original samples The actual fault category label.
[0079] Secondly, the present invention provides an intelligent diagnostic device for insulation faults in buried pipelines, comprising:
[0080] The acquisition module is used to acquire voltage monitoring data of the pipeline under test;
[0081] The diagnostic processing module is used to input the voltage monitoring data into a pre-trained fault diagnosis model, perform diagnostic processing, and obtain the fault result corresponding to the pipeline under test.
[0082] Specifically, the diagnostic process includes:
[0083] The voltage monitoring data is processed by feature extraction to obtain pipeline voltage features. The pipeline voltage features are then processed by attention enhancement to obtain enhanced attention features. Based on the enhanced attention features, classification and prediction processing is performed to output the fault result corresponding to the pipeline under test.
[0084] Thirdly, the present invention provides an intelligent diagnostic system for insulation faults in buried pipelines, comprising:
[0085] Memory, used to store computer programs / instructions;
[0086] A processor is used to execute the computer program / instructions to implement the steps of the above-described intelligent diagnostic method for insulation faults in buried pipelines.
[0087] Fourthly, the present invention provides a computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, when the computer program / instructions are executed by a processor, they implement the steps of the above-described intelligent diagnosis method for insulation faults in buried pipelines.
[0088] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: By constructing a fault diagnosis model that includes feature extraction, attention enhancement and classification prediction, the present invention can effectively extract local abnormal features and global distribution features from buried pipeline voltage monitoring data, and highlight key feature information related to insulation faults, thereby improving the accuracy and robustness of fault diagnosis.
[0089] This invention introduces class conditional contrast constraints during model training. By jointly optimizing the class conditional contrast loss function and the cross-entropy loss function, the sample representations of the same fault category under different operating conditions are made closer, while the sample representations of different fault categories are further apart. This effectively weakens the domain shift caused by changes in operating conditions and improves the model's generalization ability under unknown operating conditions.
[0090] In the training phase, this invention constructs an equivalent circuit model of the distributed parameters of the buried pipeline sample using Simulink. This model can flexibly simulate various typical operating conditions such as local insulation failure, overall insulation degradation, electrical coupling between pipelines, and direct grounding of metal, providing multi-condition and diverse training samples for the fault diagnosis model and improving the model's adaptability to complex environments.
[0091] This invention can output the fault category of buried pipelines and realize intelligent diagnosis of fault location sections. Therefore, it has strong engineering practical value and can provide technical support for online monitoring and intelligent operation and maintenance of the insulation status of buried pipelines. Attached Figure Description
[0092] Figure 1 This is a schematic diagram of the overall process of an intelligent diagnostic method for insulation faults in buried pipelines.
[0093] Figure 2 The diagram shows a schematic of the equivalent circuit model of distributed parameters for buried pipelines.
[0094] Figure 3 The diagram shown is a schematic of the parallel pipe coupling model structure. Detailed Implementation
[0095] It should be noted that:
[0096] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0097] Example 1
[0098] like Figure 1 The embodiment shown provides an intelligent diagnostic method for insulation faults in buried pipelines. The method generally includes three steps: step one, training a fault diagnosis model; step two, acquiring voltage monitoring data of the pipeline under test; and step three, performing fault diagnosis. Step one corresponds to… Figure 1 In the model training process, step two corresponds to... Figure 1 In the process of acquiring the data to be tested, step three corresponds to... Figure 1The fault diagnosis process, consisting of three interconnected steps, forms the overall technical process for intelligent diagnosis of insulation faults in buried pipelines. Specifically, it includes:
[0099] Step 1: Training the fault diagnosis model
[0100] Step S1: Construct an equivalent circuit model of the distributed parameters of the sample buried pipeline, set different operating conditions, obtain original samples under multiple operating conditions, and construct a sample pipeline insulation fault dataset, specifically including:
[0101] Step S1.1: As Figure 2 As shown, an equivalent circuit model of the distributed parameters of the sample buried pipeline is constructed, specifically including:
[0102] In this embodiment, for ease of explanation, the sample buried pipeline is discretized along its length into 6 distributed parameter units, denoted as the 1st distributed parameter unit to the 6th distributed parameter unit; correspondingly, each distributed parameter unit consists of a series longitudinal resistor. With resistance to ground Composition, among which, .
[0103] Specifically, the series longitudinal resistances of the 1st to 6th distributed parameter units are respectively denoted as... , , , , and The ground resistance of the 1st to 6th distributed parameter units are respectively denoted as... , , , , and The ground connection branches of the first to sixth distributed parameter units are respectively denoted as... , , , , and ,in, Used to characterize the axial resistance of the metallic conductors in a pipe. Used to characterize the ground leakage resistance characteristics formed by the anti-corrosion layer and the surrounding soil environment. Used to characterize the ground capacitance characteristics between the m-th distributed parameter unit and the ground, and used to construct the m-th distributed parameter unit. Earth-to-ground leakage pathways for each distributed parameter unit. For example... Figure 2 As shown, each pair of ground capacitors to Each end is connected to a node of the corresponding distributed parameter unit, and the other end is grounded, thus connecting to the corresponding ground resistance. to Together they constitute the ground-to-ground branches of each distributed parameter unit.
[0104] In this embodiment, as an example set of parameters, the series longitudinal resistance of each distributed parameter unit is taken as follows:
[0105] ;
[0106] The ground resistance of each distributed parameter unit is taken as follows under normal operating conditions:
[0107] ;
[0108] The capacitance to ground for each distributed parameter unit is as follows:
[0109] .
[0110] Step S1.2: Set different operating conditions, obtain original samples for multiple operating conditions, and construct a sample pipeline insulation fault dataset, specifically including:
[0111] The Simulink simulation model was run under preset fault location sections, different fault degrees, and different operating conditions.
[0112] A preset current excitation signal is applied to the equivalent circuit model of the sample buried pipeline distributed parameters. This allows the current to be transmitted along each distributed parameter unit and a leakage current to be formed through the ground resistance. The ground voltage signal at each distributed parameter unit node is collected to obtain the original sample.
[0113] Assign a corresponding fault diagnosis label to the original sample. If the segment to which the original sample belongs is the fault location segment, the fault diagnosis label is 1, otherwise it is 0.
[0114] A sample pipeline insulation fault dataset is constructed based on the original samples and fault diagnosis labels, expressed as follows:
[0115] ;
[0116] in: For the first Datasets under various working conditions For the first The first working condition data One original sample, for The corresponding actual fault category label, The total number of samples.
[0117] Among them, such as Figure 3 As shown, the different operating conditions specifically include:
[0118] Operating Condition 1: By reducing the local section's resistance to ground By setting a specific section as the fault location section and constructing a local insulation failure condition, the ground resistance corresponding to the 3rd and 4th distributed parameter units is reduced to:
[0119] ;
[0120] The ground resistance of the remaining distributed parameter units remains at the normal value of 2000. .
[0121] Operating Condition 2: Based on Operating Condition 1, the ground resistance of each distributed parameter unit is reduced as a whole. To construct an overall insulation degradation condition, the resistance to ground of all components will be uniformly reduced to:
[0122] ;
[0123] Operating Condition 3: (e.g.) Figure 2 As shown, based on operating condition one, a coupling resistor branch is introduced between the target pipeline and the parallel pipeline. To construct a parallel pipeline interference fault condition, specifically, coupling resistors are set between the corresponding distributed parameter units. , , , , and ,in, Indicates the first The coupling resistance between each distributed parameter unit and the corresponding position of the parallel pipe is, in this embodiment, used as an example set of parameters, and the values of each coupling resistance are:
[0124] ;
[0125] Operating Condition 4: By measuring the ground resistance of a specific local section Setting the low-resistance limiting state, constructing a metal-directly grounded operating condition, and setting the ground resistance of the fourth distributed parameter element to simulate the metal-directly grounded state as follows:
[0126] .
[0127] Step S2: Construct the initial fault diagnosis model, specifically including:
[0128] The fault diagnosis model includes: an input layer, a feature extraction network including a feature extraction module and a feature fusion module, an attention enhancement module, a classification prediction module (classification prediction network), and a loss function optimization module used in the training phase;
[0129] During the training phase, the sample data input to the input layer consists of original samples corresponding to partial insulation failure, overall insulation degradation, and parallel pipeline interference fault conditions. The remaining operating condition samples (metal direct grounding condition) that were not input into the input layer for training are used to check the fault diagnosis model after training, in order to verify the fault diagnosis capability and generalization capability of the fault diagnosis model under operating conditions that were not involved in training; the feature extraction module includes three one-dimensional convolutional layers of different scales and corresponding pooling layers, used to extract local anomaly features and global distribution features from the voltage monitoring data layer by layer; the feature fusion module is used to concatenate the output of the third pooling layer in the channel dimension to obtain the pipeline voltage features. The attention enhancement module is used to analyze the pipeline voltage characteristics. Weighted reinforcement is applied to obtain enhanced attention features. The classification prediction module includes a flattening layer, a fully connected layer, and a classification output layer, which outputs a fault category probability vector. The loss function optimization module includes a category conditional comparison loss function. and cross-entropy loss function This is used to jointly optimize the parameters of the fault diagnosis model during the training phase. The parameter architecture of each module is shown in Table 1 below.
[0130] Table 1 Parameter Architecture Diagram
[0131]
[0132] Step S3: Train the initial fault diagnosis model using the sample pipeline insulation fault dataset. During training, class conditional contrast constraints are introduced. By minimizing the overall loss function, the feature representations of samples of the same class under different operating conditions are made closer to each other in the feature space, while the feature representations of samples of different classes are made farther apart, until a well-trained fault diagnosis model is obtained. Specifically, this includes:
[0133] The expression for minimizing the overall loss function is:
[0134] ;
[0135] in, For the overall loss function, The weighting system between the category-conditional contrast loss and the cross-entropy loss. For the category-conditional contrastive loss function, Let cross-entropy be the loss function. To represent the feature extraction network, it is used to extract features from the input pipeline voltage signal to obtain feature vectors representing fault information; This represents a classification prediction network, used to output the corresponding fault category prediction result based on the feature vector; This represents the learnable parameters in the model.
[0136] The category conditional contrast loss function The expression is:
[0137] ;
[0138] in: For anchor samples Corresponding category conditional contrast loss, The total number of operating conditions. For the first Number of samples in the current batch for each working condition For operating condition number,
[0139] The anchor sample In a single training iteration, from the th The current batch corresponding to each working condition The first one selected One sample of pipeline voltage;
[0140] The anchor sample The corresponding class-conditional contrastive loss is expressed as follows:
[0141] ;
[0142] in: For anchor samples The set of positive samples, For the positive sample set The number of samples in Represents anchor sample The negative sample set, For the model to anchor samples The output classification prediction layer vector, For the model to positive samples The output classification prediction layer vector, For the model to negative samples The output classification prediction layer vector, For temperature parameters, For the first The anchor sample number in the current batch for each working condition. Let be the index of any positive sample in the set of positive samples. is the index of any negative sample in the negative sample set; for and A similarity scoring function between them; for and A similarity scoring function between them; the positive sample set is composed of self- Batch set of each working condition Middle and anchor samples The sample consists of samples with the same fault category label but from different operating conditions.
[0143] The negative sample set is composed of... Batch set of each working condition Middle and anchor samples The sample composition has different fault category labels;
[0144] For from A batch set of each working condition For the first The current batch corresponding to each working condition;
[0145] The cross-entropy loss function Represented as:
[0146] ;
[0147] ;
[0148] in, Original sample Predicted fault category labels, For predictive processing,
[0149] The single-sample cross-entropy loss function;
[0150] The calculation expression for the single-sample cross-entropy loss function is as follows:
[0151] ;
[0152] ;
[0153] in: Number of fault categories For the first Each predicted fault category label for No. A real fault category label.
[0154] Step 2: Obtain voltage monitoring data for the pipeline under test.
[0155] Collect pipeline-to-ground voltage signals to construct voltage monitoring data for the pipeline under test. Specifically:
[0156] Several voltage acquisition points are set at preset intervals along the length of the buried pipeline to be tested. The corresponding pipeline-to-ground voltage signal is collected at each voltage acquisition point using real-time sampling or periodic sampling to construct the voltage monitoring data of the pipeline to be tested. :
[0157] ;
[0158] in, For the first Voltage values at each voltage acquisition point;
[0159] Step 3: Fault Diagnosis
[0160] Step 3.1 Input the voltage monitoring data into the pre-trained fault diagnosis model, and extract features from the input voltage monitoring data through a feature extraction network to obtain the pipeline voltage features, specifically including:
[0161] ;
[0162] in, For feature extraction networks, This represents the learnable parameters in the feature extraction network.
[0163] Step 3.11: Process the input voltage monitoring data using one-dimensional convolutional kernels of different scales in the first layer. Parallel convolution operations are performed to obtain the first layer's convolution outputs at different scales, expressed as:
[0164] ;
[0165] Step 3.12: Perform pooling processing on the convolutional outputs of the first layer at different scales to obtain the pooled output of the first layer, expressed as:
[0166] ;
[0167] Step 3.13: Perform parallel convolution operations on the pooling output of the first layer using one-dimensional convolution kernels of different scales in the second layer to obtain the convolution outputs of the second layer at different scales:
[0168] ;
[0169] Step 3.14: Perform pooling processing on the convolutional outputs of the second layer at different scales to obtain the pooled output of the second layer:
[0170] ;
[0171] Step 3.15: Perform parallel convolution operations on the pooling output of the second layer using one-dimensional convolution kernels of different scales in the third layer to obtain the convolution outputs of the third layer at different scales:
[0172] ;
[0173] Step 3.16: Perform pooling processing on the convolutional outputs of the third layer at different scales to obtain the pooled output of the third layer:
[0174] ;
[0175] Step 3.17: Concatenate the outputs of the third-layer pooling along the channel dimension to form the pipeline voltage feature after feature fusion:
[0176] ;
[0177] in, , , , , and All of these are intermediate feature representations within the feature extraction network.
[0178] Step 3.18: Characterize the pipeline voltage Perform a linear mapping to obtain the query matrix. Key matrix and value matrix The expression is:
[0179] ;
[0180] ;
[0181] ;
[0182] in: These are the query matrix, key matrix, and value matrix, respectively. These are the learnable mapping parameter matrices;
[0183] Step 3.19: Based on the query matrix and key matrix, calculate the attention weight matrix:
[0184] ;
[0185] in, This is the attention weight matrix. Let be the dimension of the key vector. This is a function that performs row-wise exponential normalization on the input matrix, where T is the transpose operator;
[0186] Step 3.2: Attention Enhancement
[0187] The enhanced attention features are obtained by weighting the value matrix (attention enhancement module) using the attention weight matrix, and the expression is as follows:
[0188] ;
[0189] in, To enhance attention features, It is a value matrix;
[0190] Step 3.3: Classification Prediction
[0191] The enhanced attention feature Flatten the image and input it into the classification prediction layer to obtain a fault category probability vector. Determine the fault diagnosis result based on the fault category probability vector, expressed as:
[0192] ;
[0193] in, This is a probability vector for the fault category. and These are the classification layer weight parameters and bias parameters, respectively. This indicates the flattening operation;
[0194] Step 3.4: Output fault diagnosis results
[0195] Based on the fault category probability vector, the fault diagnosis result corresponding to the pipeline under test is determined, thereby realizing intelligent diagnosis of the insulation fault category and / or fault location section of the buried pipeline under test, and outputting the fault diagnosis result.
[0196] Example 2
[0197] This embodiment provides an intelligent diagnostic device for insulation faults in buried pipelines, including:
[0198] The acquisition module is used to acquire voltage monitoring data of the pipeline under test;
[0199] The diagnostic processing module is used to input the voltage monitoring data into a pre-trained fault diagnosis model, perform diagnostic processing, and obtain the fault result corresponding to the pipeline under test.
[0200] Specifically, the diagnostic process includes:
[0201] The voltage monitoring data is processed by feature extraction to obtain pipeline voltage features. The pipeline voltage features are then processed by attention enhancement to obtain enhanced attention features. Based on the enhanced attention features, classification and prediction processing is performed to output the fault result corresponding to the pipeline under test.
[0202] Example 3
[0203] This embodiment provides an intelligent diagnostic system for insulation faults in buried pipelines, including:
[0204] Memory, used to store computer programs / instructions;
[0205] A processor is used to execute the computer program / instructions to implement the steps of the intelligent diagnosis method for insulation faults in buried pipelines in Embodiment 1.
[0206] Example 4
[0207] This embodiment provides a computer-readable storage medium storing a computer program / instruction thereon, characterized in that, when the computer program / instruction is executed by a processor, it implements the steps of the intelligent diagnosis method for insulation faults in buried pipelines of Embodiment 1.
[0208] This embodiment calculates the task-related cross-entropy loss between the predicted fault category label and the actual fault category label. A novel category-conditional contrastive loss function is proposed. This is used to maximize the mutual information (mutual information is used to measure the dependence between two variables) between samples of the same category from different domains, while minimizing the mutual information between samples of different categories; finally, this is achieved through a joint cross-entropy loss function. Comparison of loss functions with category conditions Training the feature extraction network and classification prediction network By introducing category condition constraints and contrastive learning mechanisms during the model training phase, the model can learn discriminative features that are independent of environmental conditions but highly correlated with insulation fault types, thereby improving the model's generalization and localization capabilities under unknown operating conditions.
[0209] This embodiment organically combines on-site monitoring data acquisition of pipeline voltage under test, fault diagnosis model reasoning, model training, and simulation construction of training samples. It can achieve intelligent diagnosis of insulation fault categories and / or fault location sections of buried pipelines and effectively improve the model's generalization ability under unknown working conditions.
[0210] This invention organically combines on-site monitoring data acquisition of the pipeline under test, fault diagnosis model inference, model training, and simulation construction of training samples to form a complete intelligent diagnostic technology solution for insulation faults in buried pipelines. Therefore, this invention not only enables intelligent diagnosis of the location of insulation faults in buried pipelines, but also effectively reduces the domain offset effect caused by changes in operating conditions, improving the diagnostic accuracy and robustness of the model in complex environments and unknown operating conditions, thus possessing significant engineering application value.
[0211] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0212] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0213] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0214] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0215] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A buried pipeline insulation fault intelligent diagnosis method, characterized in that, include: Acquire voltage monitoring data for the pipeline under test; The voltage monitoring data is input into a pre-trained fault diagnosis model for diagnosis and processing to obtain the fault result corresponding to the pipeline under test. Specifically, the diagnostic process includes: The voltage monitoring data is processed by feature extraction to obtain pipeline voltage features. The pipeline voltage features are then processed by attention enhancement to obtain enhanced attention features. Based on the enhanced attention features, classification and prediction processing is performed to output the fault result corresponding to the pipeline under test.
2. The buried pipeline insulation fault intelligent diagnosis method according to claim 1, characterized in that, The voltage monitoring data is processed to extract features to obtain pipeline voltage features, specifically including: By the feature extraction network To the input voltage monitoring data Perform feature extraction, the expression is: ; ; in, For feature extraction networks, This represents the learnable parameters in the feature extraction network. For voltage monitoring data, For the first Voltage values at each voltage acquisition point; The feature extraction network The specific processing methods include: The input voltage monitoring data is processed by one-dimensional convolutional kernels of different scales in the first layer. Parallel convolution operations are performed to obtain the first layer's convolution outputs at different scales, expressed as: ; in, The kernel size of the first convolutional layer is The convolution output, This indicates that the size of the first convolutional kernel is... One-dimensional convolution operation, Represents the ReLU activation function; Pooling is performed on the convolutional outputs of the first layer at different scales to obtain the pooled output of the first layer, expressed as: ; in, The kernel size of the first convolutional layer is The corresponding pooling output, This indicates the first-level pooling operation; By performing parallel convolution operations on the pooling output of the first layer using one-dimensional convolution kernels of different scales in the second layer, the convolution outputs of the second layer at different scales are obtained, as expressed in the following expression: ; in, The kernel size of the second convolutional layer is The convolution output, This indicates that the size of the second convolutional kernel is... One-dimensional convolution operation; Pooling is performed on the convolutional outputs of the second layer at different scales to obtain the pooled output of the second layer, as expressed in the following expression: ; in, The kernel size of the second convolutional layer is The corresponding pooling output, This indicates the second-level pooling operation; By performing parallel convolution operations on the pooling output of the second layer using one-dimensional convolution kernels of different scales in the third layer, the convolution outputs of the third layer at different scales are obtained, as expressed in the following expression: ; in, The kernel size of the third convolutional layer is The convolution output, This indicates that the kernel size of the third convolutional layer is... One-dimensional convolution operation; Pooling is performed on the convolutional outputs of the third layer at different scales to obtain the pooled output of the third layer, as expressed in the following expression: ; in, The kernel size of the third convolutional layer is The corresponding pooling output, This indicates the third-level pooling operation; The outputs of the third-layer pooling are concatenated along the channel dimension to form the pipeline voltage feature after feature fusion, expressed as: ; in, Indicates the characteristics of the pipeline voltage. This indicates a channel-dimension concatenation operation. , and These represent the kernel sizes of the third convolutional layer. The pooling outputs are for 3, 5, and 7.
3. The intelligent diagnostic method for insulation faults in buried pipelines according to claim 1, characterized in that, The training method for the fault diagnosis model specifically includes: Construct an equivalent circuit model of the distributed parameters of the sample buried pipeline, and obtain multi-source pipeline voltage signal data by setting different operating conditions to construct a sample pipeline insulation fault dataset. Construct an initial fault diagnosis model; The initial fault diagnosis model is trained using the sample pipeline insulation fault dataset. During the training process, a class conditional contrast constraint is introduced, and the overall loss function is minimized until a well-trained fault diagnosis model is obtained.
4. The intelligent diagnostic method for insulation faults in buried pipelines according to claim 3, characterized in that, The method for constructing the equivalent circuit model of the distributed parameters of the sample buried pipeline specifically includes: In the Simulink simulation model, the sample buried pipeline is discretized along its length as follows: Each distributed parameter unit consists of a series longitudinal resistor. resistance to ground constitute, Indicates the first Each distributed parameter unit, .
5. The intelligent diagnostic method for insulation faults in buried pipelines according to claim 3, characterized in that, The different operating conditions include: Operating Condition 1: By reducing the local section's resistance to ground By setting specific sections as fault location sections, a local insulation failure condition is constructed. Operating Condition 2: Based on Operating Condition 1, the ground resistance of each distributed parameter unit is reduced as a whole. Construct an overall insulation degradation process; Operating Condition 3: Based on Operating Condition 1, a coupling resistance branch is introduced between the target pipeline and the parallel pipeline. Construct parallel pipeline interference fault conditions; Operating Condition 4: By measuring the ground resistance of a specific local section Set to low-resistance limiting state and construct a metal-directly grounded operating condition.
6. The intelligent diagnostic method for insulation faults in buried pipelines according to claim 5, characterized in that, The method for obtaining the sample pipeline insulation fault dataset specifically includes: The Simulink simulation model was run under preset fault location sections, different fault degrees, and different operating conditions. A preset current excitation signal is applied to the equivalent circuit model of the sample buried pipeline distributed parameters, so that the current is transmitted along each distributed parameter unit and a leakage current is formed through the ground resistance. The ground voltage signal at each distributed parameter unit node is collected to obtain the original sample. Assign a corresponding fault diagnosis label to the original sample. If the segment where the original sample is located is a preset fault location segment, the fault diagnosis label is 1, otherwise it is 0. A sample pipeline insulation fault dataset is constructed based on the original samples and fault diagnosis labels, expressed as follows: ; in: For the first Datasets under various working conditions For the first The first working condition data One original sample, for The corresponding actual fault category label, The total number of samples.
7. The intelligent diagnostic method for insulation faults in buried pipelines according to claim 3, characterized in that, The expression for minimizing the overall loss function is: ; in, For the overall loss function, The weighting system between the category-conditional contrast loss and the cross-entropy loss. For the category-conditional contrastive loss function, Let cross-entropy be the loss function. For feature extraction networks, For classification prediction networks, These are learnable parameters; The category conditional contrast loss function The expression is: ; in: For anchor samples Corresponding category conditional contrast loss, The total number of operating conditions. For the first Number of samples in the current batch for each working condition For operating conditions; The anchor sample In a single training iteration, from the th The current batch corresponding to each working condition The first one selected One sample of pipeline voltage; The anchor sample Corresponding category conditional comparison loss The calculation expression is: ; in: For anchor samples The set of positive samples, For the positive sample set The number of samples in Represents anchor sample The negative sample set, for and Similarity scoring function between them for and A similarity scoring function between them; For the model to anchor samples The output classification prediction layer vector, For the model to positive samples The output classification prediction layer vector, For the model to negative samples The output classification prediction layer vector, For temperature parameters, For the first The anchor sample number in the current batch for each working condition. Let be the index of any positive sample in the set of positive samples. Let be the index of any negative sample in the negative sample set; the positive sample set is composed of... Batch set of each working condition Middle and anchor samples The negative sample set consists of samples with the same fault category label but from different operating conditions. Batch set of each working condition Middle and anchor samples The sample composition has different fault category labels; in: For from A batch set of each working condition For the first The current batch corresponding to each working condition; The cross-entropy loss function The expression is: ; ; in, Original sample Predicted fault category labels, For predictive processing, The single-sample cross-entropy loss function; The calculation expression for the single-sample cross-entropy loss function is as follows: ; ; in: Number of fault categories For the first Original samples Predicted fault category labels, For the first Original samples The actual fault category label.
8. An intelligent diagnostic device for insulation faults in buried pipelines, characterized in that, include: The acquisition module is used to acquire voltage monitoring data of the pipeline under test; The diagnostic processing module is used to input the voltage monitoring data into a pre-trained fault diagnosis model, perform diagnostic processing, and obtain the fault result corresponding to the pipeline under test. Specifically, the diagnostic process includes: The voltage monitoring data is processed by feature extraction to obtain pipeline voltage features. The pipeline voltage features are then processed by attention enhancement to obtain enhanced attention features. Based on the enhanced attention features, classification and prediction processing is performed to output the fault result corresponding to the pipeline under test.
9. An intelligent diagnostic system for insulation faults in buried pipelines, characterized in that, include: Memory, used to store computer programs / instructions; A processor is configured to execute the computer program / instructions to implement the steps of the intelligent diagnostic method for insulation faults in buried pipelines as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the intelligent diagnosis method for insulation faults in buried pipelines as described in any one of claims 1-7.