A cable insulation damage self-adaptive detection method based on adversarial perturbation learning

Through the DeiT model with anti-disturbance learning and adaptive detection mechanism, the problems of insufficient robustness and adaptability in cable insulation damage detection are solved, high-precision cable insulation status identification under complex working conditions is achieved, and the robustness and adaptability of detection are improved.

CN120611247BActive Publication Date: 2025-10-21HEBEI JINHE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511106284.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-10-21
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

Existing cable insulation damage detection technology has problems such as weak robustness, poor adaptability, and limited feature extraction capabilities, making it difficult to achieve high-accuracy and strong anti-interference detection under complex working conditions.

Method used

The DeiT model based on adversarial perturbation learning, knowledge distillation and adaptive parameter adjustment mechanism is adopted. By preprocessing, embedding and position encoding the electrical signals, combined with a multi-layer Transformer encoder and a convolutional neural network teacher model, a cable insulation damage detection method is constructed, and the model parameters are dynamically adjusted to adapt to complex interference environments.

Benefits of technology

It significantly improves the robustness, accuracy and generalization ability of cable insulation status detection, can maintain high-precision detection in complex interference environments, enhances the anti-interference ability and adaptability of the model, and provides efficient and accurate cable insulation status identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611247B_ABST
    Figure CN120611247B_ABST
Patent Text Reader

Abstract

The application discloses a kind of cable insulation damage self-adaptive detection methods based on adversarial perturbation learning, comprising the following steps: S1, original electrical signal in the process of cable operation is collected;S2, the electrical signal sequence is preprocessed, and is divided into several equal-length signal segments;S3, DeiT detection model is constructed, and input vector is constructed;S4, input multilayer Transform encoder, output the prediction probability of cable insulation damage;S5, construct adversarial sample sequence, train DeiT detection model;S6, establish self-adaptive detection mechanism, dynamically adjust the parameters of DeiT detection model;S7, the DeiT detection model trained is deployed in cable insulation state detection.The application fuses adversarial perturbation learning, knowledge distillation and self-adaptive mechanism, realizes cable insulation damage intelligent detection, has the advantages of strong robustness, high precision, good adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system state detection, and in particular to a cable insulation damage adaptive detection method based on anti-disturbance learning. Background Art

[0002] In the power system, cables are important carriers of energy transmission. The health of their insulation status directly affects the operational safety and power supply stability of equipment. With the continuous expansion of the power network and the increase of old equipment, cable insulation aging, moisture, breakdown and other faults are increasing year by year. Therefore, timely detection of cable insulation damage has become a key task in the field of power operation and maintenance. At present, the mainstream cable insulation detection methods mainly include dielectric loss factor method, partial discharge detection method, traveling wave reflection method and judgment method based on voltage or current characteristic analysis. These methods can reflect the insulation condition of the cable to a certain extent, but generally rely on manually set thresholds or rule judgments, lack intelligence and generalization capabilities, and are difficult to cope with diverse disturbance environments under complex working conditions.

[0003] In recent years, deep learning technology has gradually been introduced into cable status monitoring. Researchers have tried to use models such as convolutional neural networks and recurrent neural networks to learn implicit fault modes from historical data to achieve automatic identification of cable insulation damage. However, traditional deep neural network models are very sensitive to disturbances in the input data. When faced with complex on-site interference (such as high-frequency noise, electromagnetic disturbances, load fluctuations, etc.), they are prone to problems such as decreased detection accuracy and increased false alarm rates, and their robustness is insufficient. At the same time, these models generally adopt fixed structures and static parameters, and lack the ability to dynamically adjust according to actual signal characteristics, which limits their applicability in scenarios such as different types of cables and changing operating conditions. In addition, existing models mainly rely on real labels for training, which has limited improvement in the model's generalization ability and deep feature extraction capabilities, and it is difficult to fully utilize auxiliary supervision information.

[0004] In summary, existing cable insulation damage detection technologies suffer from weak robustness, poor adaptability, and limited feature extraction capabilities, and are unable to meet the power system's detection needs for high accuracy, strong interference immunity, and broad adaptability. Therefore, it is urgent to propose a detection method that integrates multiple deep learning mechanisms, possesses interference immunity, adaptability, and multi-source supervision, to improve the model's stability and accuracy in practical applications. Summary of the Invention

[0005] One purpose of the present invention is to propose an adaptive detection method for cable insulation damage based on perturbation-adverse learning. The present invention integrates perturbation-adverse learning, knowledge distillation and adaptive parameter adjustment mechanism to construct a cable insulation damage detection method based on the DeiT model. It can extract stable features in complex interference environments, accurately judge the insulation status, significantly improve the robustness, accuracy and generalization ability of detection, and has good industrial application value.

[0006] According to an embodiment of the present invention, a method for adaptively detecting cable insulation damage based on anti-disturbance learning includes the following steps:

[0007] S1. Collect the original electrical signals during the operation of the cable and continuously acquire them to form an electrical signal sequence;

[0008] S2. preprocessing the electrical signal sequence to divide the electrical signal sequence into a number of signal segments of equal length;

[0009] S3. Build a DeiT detection model. Use the embedding layer to linearly embed each signal segment to form an embedding vector sequence. Add the category identification vector and distillation identification vector before the embedding vector sequence. Use the position encoding layer to superimpose the corresponding position encoding information to form the complete input vector of the model.

[0010] S4. Input the complete input vector into the multi-layer Transformer encoder, extract the features of the signal segment through the classification output layer, and output the predicted probability of cable insulation damage;

[0011] S5. Apply a small perturbation to the embedding vector sequence to construct an adversarial sample sequence, and jointly train the DeiT detection model with the embedding vector sequence and the adversarial sample sequence. At the same time, a convolutional neural network is used as a teacher model, and the soft labels output by the teacher model are used to supervise the training of the DeiT detection model.

[0012] S6. Establish an adaptive detection mechanism to dynamically adjust the parameters of the DeiT detection model based on the statistical characteristics, frequency domain structure and background interference intensity of the electrical signal sequence;

[0013] S7. Deploy the trained DeiT detection model in cable insulation status detection and output the detection results.

[0014] Optionally, the original electrical signal includes a voltage signal, a current signal and a dielectric loss factor signal.

[0015] Optionally, the preprocessing includes denoising, normalization and sliding window segmentation.

[0016] Optionally, the S3 specifically includes:

[0017] S31. Construct a DeiT detection model. For each signal segment, linear embedding is used to perform feature space transformation through the embedding layer. The DeiT detection model includes an embedding layer, a position encoding layer, a multi-layer Transformer encoder, a classification output layer, and a distillation output layer:

[0018] ;

[0019] in, represents the embedding vector of the kth signal segment, represents the kth signal segment vector, represents the bias vector, represents the embedding weight vector;

[0020] S32. Arrange all embedding vectors in chronological order to construct an embedding vector sequence;

[0021] S33. Construct the input format required by the model, add the category identification vector and the distillation identification vector before the embedding vector sequence to form an expanded embedding vector sequence, wherein the category identification vector and the distillation identification vector are learning parameters initialized within the DeiT detection model, and the initial values ​​are random vectors obeying the standard normal distribution;

[0022] S34. To maintain the sequence order information, position encoding is added to each vector in the expanded embedding vector sequence in the position encoding layer:

[0023] ;

[0024] in, represents the positional encoding value on dimension 2j, represents the position encoding value on dimension 2j+1, i represents the position index of the current vector in the sequence, j represents the position index under the embedding dimension, d represents the dimension of the embedding vector, and 10000 represents the frequency scaling factor;

[0025] S35. Perform element-wise addition of the embedding vector and the positional encoding to form a complete input vector:

[0026] ;

[0027] in, represents the complete input vector after position encoding, represents the i-th embedding vector in the expanded embedding vector sequence, represents the corresponding position encoding vector, and K represents the number of signal segments.

[0028] Optionally, the S4 specifically includes:

[0029] S41. Input the complete input vector into the multi-layer Transformer encoder for feature extraction. In each layer of the Transformer encoder, the complete input vector is processed by the multi-head self-attention mechanism and the feedforward network, and the feature vector is obtained through residual connection and layer normalization:

[0030] ;

[0031] in, represents the feature vector of the i-th input vector in the first layer Transformer encoder, Indicates that the i-th input vector is in the The feature vector in the layer Transformer encoder, represents the multi-head self-attention mechanism, Representation layer normalization operation;

[0032] After the pooling operation, the vector finally output by S42 and Transformer encoder is input into the classification output layer for classification prediction, and the predicted probability of cable insulation damage is output:

[0033] ;

[0034] in, represents the predicted probability of cable insulation damage, represents the feature vector of the i-th input vector in the L-th layer Transformer encoder, where L represents the total number of layers of the Transformer encoder. represents the classification weight matrix, Represents classification bias.

[0035] Optionally, the S5 specifically includes:

[0036] S51, obtain the embedding vector sequence as the initial input for generating adversarial perturbations;

[0037] S52. Perform short-time Fourier transform on the preprocessed electrical signal sequence to obtain the spectrum energy of each signal segment:

[0038] ;

[0039] in, represents the spectral energy of the i-th signal segment, represents the Fourier coefficient of the i-th signal segment at the j-th frequency point, and f represents the frequency domain sampling dimension;

[0040] Set an energy threshold and construct a frequency domain mask matrix. When the spectrum energy is greater than the energy threshold, set the corresponding value of the frequency domain attention mask matrix to 1, otherwise it is set to 0. The frequency domain mask matrix is ​​used to identify the key disturbance position;

[0041] S53. Initialize the perturbation sequence to an all-zero sequence. In each iteration, use the masked projected gradient descent algorithm to guide the perturbation update process:

[0042] ;

[0043] in, represents the i-th perturbation sequence at the t+1th iteration, represents the i-th perturbation sequence at the t-th iteration, represents the step size coefficient, represents the mask vector corresponding to the i-th embedding position in the frequency domain mask matrix, Represents the Hadamard element-by-element product, sign represents the sign function, which is used to obtain the gradient direction. represents the learning parameters of the DeiT detection model, represents the cross entropy loss of the adversarial sample, represents the gradient of the cross entropy loss of the perturbation sequence with respect to the adversarial sample, represents the adversarial sample sequence, represents the cross entropy loss of the adversarial sample, Indicates that the parameter is , the adversarial sample cross entropy loss with adversarial sample sequence as input, Indicates that the disturbance sequence is projected to a maximum disturbance amplitude not exceeding Within the constraint set, Indicates the maximum value of the disturbance amplitude;

[0044] S54. Construct an adversarial sample sequence based on the embedded vector sequence and the updated perturbation sequence, and feed it into the DeiT detection model together with the embedded vector sequence, and output the original prediction probability and the adversarial prediction probability respectively;

[0045] S55. At the same time, a convolutional neural network is used to construct a teacher model. Several equal-length signal segments are combined into a signal feature matrix as the input of the teacher model. The class score vector is output. The softmax function after distillation temperature coefficient processing calculates the soft label. The teacher model is added to the DeiT detection model as an independent branch of the DeiT detection model. The soft label is output by the distillation output layer:

[0046] ;

[0047] in, represents the soft label of the teacher model for the i-th category, describing the predicted probability distribution, represents the category score vector of category i, represents the distillation temperature coefficient, exp represents the natural exponential function, and C represents the number of categories of insulation state;

[0048] S56. Use the DeiT detection model as the student model and define the original sample cross entropy loss, adversarial sample cross entropy loss, and distilled KL divergence loss. The distilled KL divergence loss aligns the distilled identity vector with the soft label of the teacher model, which not only makes the student model rely on the true label, but also obtains rich learning signals through the predicted probability of the teacher model:

[0049] ;

[0050] in, represents the original sample cross entropy loss, Represents the one-hot vector value of the true label in the i-th category, represents the original predicted probability of the i-th class under the input of the embedding vector sequence;

[0051] ;

[0052] in, represents the cross entropy loss of the adversarial sample, represents the adversarial prediction probability of the student model under the adversarial sample sequence input;

[0053] ;

[0054] in, represents the distilled KL divergence loss, represents the predicted probability of the distilled output layer of the student model in the i-th category, represents the square term of the distillation temperature coefficient, represents the soft label of the teacher model for the i-th category;

[0055] S57. Construct a joint loss function and use the error back propagation mechanism to jointly optimize the student model parameters by minimizing the joint loss function:

[0056] ;

[0057] in, represents the joint loss function, 、 、 Represents the weighting coefficient of the corresponding sub-loss item.

[0058] Optionally, the S6 specifically includes:

[0059] S61, extracting statistical characteristics of the preprocessed electrical signal sequence, calculating a mean and a standard deviation for each signal segment, and concatenating the mean and the standard deviation to form a feature vector of the signal segment, wherein the statistical characteristics include the mean and the standard deviation;

[0060] S62. Acquire spectrum energy of each signal segment of the electrical signal sequence;

[0061] S63. Define background interference intensity:

[0062] ;

[0063] in, represents the background interference intensity of the kth segment, represents the noise amplitude of the i-th frequency point in the k-th segment, represents the Fourier coefficient of the kth signal segment at the i-th frequency point, and f represents the frequency domain sampling dimension;

[0064] S64. Define an adaptive factor for adaptive adjustment of model parameters according to the characteristic vector, spectrum energy, and background interference intensity of the signal segment. The adaptive factor represents an adjustment weight of the signal segment:

[0065] ;

[0066] in, represents the adjustment weight of the k-th signal segment, represents the eigenvector of the kth signal segment, represents a set of statistical features, represents the maximum value of the statistical characteristics of all signal segments, represents the spectrum energy set, Represents the maximum value of the spectral energy of all signal segments, represents the set of background interferences for all signal segments, represents the maximum value of background interference of all signal segments;

[0067] S65, dynamically adjusting the original key parameters of the DeiT detection model through the adaptive factor, wherein the dynamic adjustment is achieved by multiplying the adaptive factor by the original key parameters;

[0068] S66. Input the dynamically adjusted original key parameters into the DeiT detection model to perform feature extraction and cable insulation damage status judgment.

[0069] Optionally, the original key parameters include attention weight, embedding dimension and classification discrimination threshold.

[0070] The beneficial effects of the present invention are:

[0071] This paper proposes an adaptive cable insulation damage detection method based on adversarial perturbation learning. This method effectively overcomes existing issues such as reduced detection accuracy in complex interference environments, poor model generalization, and a lack of dynamic adjustment capabilities, thereby improving the robustness, accuracy, and practicality of cable insulation status detection. By introducing an adversarial perturbation mechanism during the training phase, this method constructs adversarial samples during the signal embedding phase to simulate abnormal perturbations encountered in actual operating conditions. This improves the detection model's discriminative stability under non-ideal input conditions such as noise interference and signal distortion, and enhances the model's anti-interference capabilities. Furthermore, a frequency-domain attention-guided perturbation generation method is designed to make the perturbation more targeted, further enhancing the model's training effectiveness and generalization capabilities.

[0072] In addition, the present invention combines the knowledge distillation mechanism and introduces a convolutional neural network teacher model. During the training process, auxiliary supervision information is transmitted through soft labels to guide the student model, namely the DeiT detection model, to extract more discriminative deep semantic features, thereby making up for the performance bottleneck in small sample and weak supervision scenarios, and improving the learning efficiency and structural simplicity of the model. Furthermore, the present invention constructs an adaptive detection mechanism based on the statistical characteristics of electrical signals, spectral energy and background interference intensity, and dynamically adjusts the attention weight, embedding dimension and classification discrimination threshold in the Transformer structure, so that the model can flexibly adjust parameters according to the complexity of the actual input signal, thereby enhancing the model's environmental adaptability and task transfer capabilities.

[0073] Ultimately, by deploying the trained DeiT detection model at cable maintenance sites, it can efficiently and accurately identify real-time electrical signals and automatically output a graded determination of the cable insulation status. This invention not only organically integrates adversarial training, distillation supervision, and parameter adaptation in model design, but also enhances the intelligent perception of cable insulation status at the engineering application level, promising promising prospects for industrial deployment and widespread application. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0075] Figure 1 This is a flow chart of a cable insulation damage adaptive detection method based on anti-disturbance learning proposed by the present invention;

[0076] Figure 2 This is a schematic diagram of the architecture of the DeiT detection model of the cable insulation damage adaptive detection method based on anti-disturbance learning proposed in the present invention;

[0077] Figure 3This is a flowchart of the disturbance generation and projected gradient descent algorithm in the adversarial disturbance training process of the cable insulation damage adaptive detection method based on adversarial disturbance learning proposed by the present invention. DETAILED DESCRIPTION

[0078] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.

[0079] refer to Figure 1-3 , an adaptive detection method for cable insulation damage based on anti-disturbance learning, comprising the following steps:

[0080] S1. Collect the original electrical signals during the operation of the cable and continuously acquire them to form an electrical signal sequence;

[0081] S2. preprocessing the electrical signal sequence to divide the electrical signal sequence into a number of signal segments of equal length;

[0082] S3. Build a DeiT detection model. Use the embedding layer to linearly embed each signal segment to form an embedding vector sequence. Add the category identification vector and distillation identification vector before the embedding vector sequence. Use the position encoding layer to superimpose the corresponding position encoding information to form the complete input vector of the model.

[0083] S4. Input the complete input vector into the multi-layer Transformer encoder, extract the features of the signal segment through the classification output layer, and output the predicted probability of cable insulation damage;

[0084] S5. Apply a small perturbation to the embedding vector sequence to construct an adversarial sample sequence, and jointly train the DeiT detection model with the embedding vector sequence and the adversarial sample sequence. At the same time, a convolutional neural network is used as a teacher model, and the soft labels output by the teacher model are used to supervise the training of the DeiT detection model.

[0085] S6. Establish an adaptive detection mechanism to dynamically adjust the parameters of the DeiT detection model based on the statistical characteristics, frequency domain structure and background interference intensity of the electrical signal sequence;

[0086] S7. Deploy the trained DeiT detection model in cable insulation status detection and output the detection results.

[0087] The present invention introduces adversarial perturbation learning, knowledge distillation mechanism and adaptive detection strategy to construct a cable insulation damage detection framework based on the DeiT model. It can maintain good recognition accuracy when the electrical signal is affected by non-ideal factors such as environmental noise and electromagnetic interference. This method can not only improve the robustness by simultaneously utilizing original samples and adversarial samples, but also enhance the discrimination ability of the student model with the help of the soft labels of the teacher model. At the same time, through signal-driven parameter adaptive adjustment, the adaptability of the model under different cable types and operating conditions is significantly enhanced, making it suitable for on-site deployment and application.

[0088] In this embodiment, the original electrical signal includes a voltage signal, a current signal, and a dielectric loss factor signal.

[0089] The present invention constructs a high-dimensional signal sequence reflecting the insulation status of the cable by collecting multi-source original electrical signal data including voltage signals, current signals and dielectric loss factor signals. It can fully characterize the working characteristics and insulation change trends of the cable during actual operation. This signal acquisition strategy enhances the ability to capture subtle features such as early insulation degradation and partial discharge, providing high-quality original information for subsequent model training and state identification. It has the advantages of diverse data sources, strong timeliness and excellent characterization capabilities, which is conducive to improving the overall performance of the detection system.

[0090] In this embodiment, the preprocessing includes denoising, normalization and sliding window segmentation.

[0091] The present invention introduces operations such as denoising, normalization, and sliding window segmentation in the signal preprocessing stage, which effectively improves the cleanliness and modelability of the original electrical signal. The signal sequence is divided into multiple equal-length segments through the sliding window mechanism, enabling the model to learn local time period characteristics and enhancing the detection system's ability to identify local anomalies. At the same time, normalization and denoising processing suppress the interference caused by different sampling conditions or measurement errors, laying a stable foundation for subsequent embedding and modeling steps, and ensuring that the model training results have strong consistency and generalization capabilities.

[0092] In this embodiment, S3 specifically includes:

[0093] S31. Construct a DeiT detection model. For each signal segment, linear embedding is used to perform feature space transformation through the embedding layer. The DeiT detection model includes an embedding layer, a position encoding layer, a multi-layer Transformer encoder, a classification output layer, and a distillation output layer:

[0094] ;

[0095] in, represents the embedding vector of the kth signal segment, represents the kth signal segment vector, represents the bias vector, represents the embedding weight vector;

[0096] S32. Arrange all embedding vectors in chronological order to construct an embedding vector sequence;

[0097] S33. Construct the input format required by the model, add the category identification vector and the distillation identification vector before the embedding vector sequence to form an expanded embedding vector sequence, wherein the category identification vector and the distillation identification vector are learning parameters initialized within the DeiT detection model, and the initial values ​​are random vectors obeying the standard normal distribution;

[0098] S34. To maintain the sequence order information, position encoding is added to each vector in the expanded embedding vector sequence in the position encoding layer:

[0099] ;

[0100] in, represents the positional encoding value on dimension 2j, represents the position encoding value on dimension 2j+1, i represents the position index of the current vector in the sequence, j represents the position index under the embedding dimension, d represents the dimension of the embedding vector, and 10000 represents the frequency scaling factor;

[0101] S35. Perform element-wise addition of the embedding vector and the positional encoding to form a complete input vector:

[0102] ;

[0103] in, represents the complete input vector after position encoding, represents the i-th embedding vector in the expanded embedding vector sequence, represents the corresponding position encoding vector, and K represents the number of signal segments.

[0104] During the construction of the DeiT model input, the present invention innovatively introduces category identification vectors and distillation identification vectors, and superimposes position encoding in the vector sequence, so that the embedded representation not only retains the characteristics of the signal itself, but also has the ability of task guidance and knowledge transfer. The category identification vector can guide the model to focus on the discrimination target, and the distillation identification vector is linked with the output of the teacher model, which helps the student model learn deep semantic representation. The introduction of position encoding ensures that the model retains the ability to perceive sequence order, and overall improves the Transformer structure's ability to perceive and understand cable insulation status signals.

[0105] In this embodiment, the S4 specifically includes:

[0106] S41. Input the complete input vector into the multi-layer Transformer encoder for feature extraction. In each layer of the Transformer encoder, the complete input vector is processed by the multi-head self-attention mechanism and the feedforward network, and the feature vector is obtained through residual connection and layer normalization:

[0107] ;

[0108] in, represents the feature vector of the i-th input vector in the first layer Transformer encoder, Indicates that the i-th input vector is in the The feature vector in the layer Transformer encoder, represents the multi-head self-attention mechanism, Representation layer normalization operation;

[0109] After the pooling operation, the vector finally output by S42 and Transformer encoder is input into the classification output layer for classification prediction, and the predicted probability of cable insulation damage is output:

[0110] ;

[0111] in, represents the predicted probability of cable insulation damage, represents the feature vector of the i-th input vector in the L-th layer Transformer encoder, where L represents the total number of layers of the Transformer encoder. represents the classification weight matrix, Represents classification bias.

[0112] By inputting the complete input vector into a multi-layer Transformer encoder and performing discriminant processing in the classification output layer, the present invention fully leverages the advantages of the multi-head self-attention mechanism in sequence feature modeling. The model can autonomously capture the long dependencies between cable signal segments and effectively identify complex feature patterns caused by insulation aging, breakdown, etc. The final output prediction probability reflects the model's ability to accurately judge multiple categories of states, providing intelligent hierarchical diagnosis results on site, and improving the feature resolution and judgment accuracy of the detection system under complex working conditions.

[0113] In this embodiment, the S5 specifically includes:

[0114] S51, obtain the embedding vector sequence as the initial input for generating adversarial perturbations;

[0115] S52. Perform short-time Fourier transform on the preprocessed electrical signal sequence to obtain the spectrum energy of each signal segment:

[0116] ;

[0117] in, represents the spectral energy of the i-th signal segment, represents the Fourier coefficient of the i-th signal segment at the j-th frequency point, and f represents the frequency domain sampling dimension;

[0118] Set an energy threshold and construct a frequency domain mask matrix. When the spectrum energy is greater than the energy threshold, set the corresponding value of the frequency domain attention mask matrix to 1, otherwise it is set to 0. The frequency domain mask matrix is ​​used to identify the key disturbance position;

[0119] S53. Initialize the perturbation sequence to an all-zero sequence. In each iteration, use the masked projected gradient descent algorithm to guide the perturbation update process:

[0120] ;

[0121] in, represents the i-th perturbation sequence at the t+1th iteration, represents the i-th perturbation sequence at the t-th iteration, represents the step size coefficient, represents the mask vector corresponding to the i-th embedding position in the frequency domain mask matrix, Represents the Hadamard element-by-element product, sign represents the sign function, which is used to obtain the gradient direction. represents the learning parameters of the DeiT detection model, represents the cross entropy loss of the adversarial sample, represents the gradient of the cross entropy loss of the perturbation sequence with respect to the adversarial sample, represents the adversarial sample sequence, represents the cross entropy loss of the adversarial sample, Indicates that the parameter is , the adversarial sample cross entropy loss with adversarial sample sequence as input, Indicates that the disturbance sequence is projected to a maximum disturbance amplitude not exceeding Within the constraint set, Indicates the maximum value of the disturbance amplitude;

[0122] S54. Construct an adversarial sample sequence based on the embedded vector sequence and the updated perturbation sequence, and feed it into the DeiT detection model together with the embedded vector sequence, and output the original prediction probability and the adversarial prediction probability respectively;

[0123] S55. At the same time, a convolutional neural network is used to construct a teacher model. Several equal-length signal segments are combined into a signal feature matrix as the input of the teacher model. The class score vector is output. The softmax function after distillation temperature coefficient processing calculates the soft label. The teacher model is added to the DeiT detection model as an independent branch of the DeiT detection model. The soft label is output by the distillation output layer:

[0124] ;

[0125] in, represents the soft label of the teacher model for the i-th category, describing the predicted probability distribution, represents the category score vector of category i, represents the distillation temperature coefficient, exp represents the natural exponential function, and C represents the number of categories of insulation state;

[0126] S56. Use the DeiT detection model as the student model and define the original sample cross entropy loss, adversarial sample cross entropy loss, and distilled KL divergence loss. The distilled KL divergence loss aligns the distilled identity vector with the soft label of the teacher model, which not only makes the student model rely on the true label, but also obtains rich learning signals through the predicted probability of the teacher model:

[0127] ;

[0128] in, represents the original sample cross entropy loss, Represents the one-hot vector value of the true label in the i-th category, represents the original predicted probability of the i-th class under the input of the embedding vector sequence;

[0129] ;

[0130] in, represents the cross entropy loss of the adversarial sample, represents the adversarial prediction probability of the student model under the adversarial sample sequence input;

[0131] ;

[0132] in, represents the distilled KL divergence loss, represents the predicted probability of the distilled output layer of the student model in the i-th category, represents the square term of the distillation temperature coefficient, represents the soft label of the teacher model for the i-th category;

[0133] S57. Construct a joint loss function and use the error back propagation mechanism to jointly optimize the student model parameters by minimizing the joint loss function:

[0134] ;

[0135] in, represents the joint loss function, 、 、 Represents the weighting coefficient of the corresponding sub-loss item.

[0136] The present invention constructs a joint training mechanism that integrates adversarial perturbation training and knowledge distillation, which not only improves the robustness of the model on perturbation samples, but also enhances its ability to learn deep semantics from the teacher model. By guiding the perturbation generation position through frequency domain attention, the representativeness and attack efficiency of the perturbation samples are improved, and the student model's ability to discriminate non-ideal inputs is enhanced. At the same time, the soft labels of the teacher model are introduced to guide the student model to supervise the distillation identification vector, further improving the model's generalization and feature expression, and solving the problem of easy performance degradation of traditional models in complex environments.

[0137] In this embodiment, S6 specifically includes:

[0138] S61, extracting statistical characteristics of the preprocessed electrical signal sequence, calculating a mean and a standard deviation for each signal segment, and concatenating the mean and the standard deviation to form a feature vector of the signal segment, wherein the statistical characteristics include the mean and the standard deviation;

[0139] S62. Acquire spectrum energy of each signal segment of the electrical signal sequence;

[0140] S63. Define background interference intensity:

[0141] ;

[0142] in, represents the background interference intensity of the kth segment, represents the noise amplitude of the i-th frequency point in the k-th segment, represents the Fourier coefficient of the kth signal segment at the i-th frequency point, and f represents the frequency domain sampling dimension;

[0143] S64. Define an adaptive factor for adaptive adjustment of model parameters according to the characteristic vector, spectrum energy, and background interference intensity of the signal segment. The adaptive factor represents an adjustment weight of the signal segment:

[0144] ;

[0145] in, represents the adjustment weight of the k-th signal segment, represents the eigenvector of the kth signal segment, represents a set of statistical features, represents the maximum value of the statistical characteristics of all signal segments, represents the spectrum energy set, Represents the maximum value of the spectral energy of all signal segments, represents the set of background interference for all signal segments, represents the maximum value of background interference of all signal segments;

[0146] S65, dynamically adjusting the original key parameters of the DeiT detection model through the adaptive factor, wherein the dynamic adjustment is achieved by multiplying the adaptive factor by the original key parameters;

[0147] S66. Input the dynamically adjusted original key parameters into the DeiT detection model to perform feature extraction and cable insulation damage status judgment.

[0148] The present invention realizes dynamic adjustment of key parameters of Transformer by constructing an adaptive factor generation mechanism jointly driven by statistical characteristics, spectral energy and background interference intensity. The adaptive factor can reflect the structural complexity and interference intensity of the current input signal, thereby guiding the model to automatically adjust the attention weight, embedding projection and discrimination strategy. This mechanism improves the adaptability of the detection model to different working conditions and independent variable signals, avoids the problem of performance degradation of traditional models due to fixed parameters, and enhances the actual deployment value of the method in complex operating environments.

[0149] In this embodiment, the original key parameters include attention weight, embedding dimension and classification discrimination threshold.

[0150] By multiplying the adaptive factor with the key parameters of the DeiT detection model, this method dynamically adjusts the model's attention mechanism, embedding dimension, and classification threshold, enabling the model structure and decision logic to adapt in real time as the input signal characteristics change. This mechanism avoids the generalization loss that can result from manually setting uniform parameters, while also enhancing the model's sensitivity to changes in cable aging and environmental disturbances. The introduction of a dynamic discrimination threshold further optimizes the model's output stability and accuracy, enabling more targeted insulation status identification and judgment, and providing high field adaptability.

[0151] Example 1:

[0152] In order to verify the feasibility of the present invention in implementation, the present invention is applied to the monitoring and detection of the insulation status of its cables by a city power company. The company is responsible for the power supply of multiple industrial and residential areas. The cable lines are long, and most of the cables have been in use for many years. There are different degrees of insulation aging and damage problems. In order to avoid power outages caused by cable aging, the power company regularly inspects the cables and repairs or replaces them according to the insulation status of the cables. The traditional cable detection method mainly relies on manually set thresholds and judges the insulation status of the cables by analyzing the changes in current and voltage signals. However, this method is often affected by the external environment (such as electromagnetic interference, noise, etc.) and changes in cable types, resulting in a high false alarm rate. In addition, the detection accuracy is difficult to meet actual needs under complex working conditions.

[0153] To address the above issues, this paper proposes a cable insulation damage detection method based on adversarial perturbation learning and adaptive detection mechanism. It uses deep learning models, especially the DeiT-based detection framework, to automatically analyze cable signals. Through this method, power companies can improve the accuracy of cable insulation detection, reduce human interference factors, and improve the efficiency and accuracy of equipment inspections.

[0154] In this example, the method was applied to cable line inspection in an industrial area. First, raw electrical signals from the operating power equipment in the area, including voltage, current, and dielectric loss factor signals, were collected continuously to form an electrical signal sequence. These signals were then preprocessed, including denoising, normalization, and sliding window segmentation, to divide the signal sequence into several equal-length signal segments.

[0155] For each signal segment, the DeiT detection model is used for training and prediction. During the training process, the adversarial perturbation learning mechanism is used to impose small perturbations on each embedding vector sequence to generate adversarial samples. The original samples and adversarial samples are combined to train the DeiT detection model. In addition, a convolutional neural network is used as a teacher model. The soft labels of the teacher model are used to train the student model through the distillation mechanism to improve the model's discrimination ability. Finally, based on the statistical characteristics of the signal, the spectral structure and the background interference intensity, the attention weight, embedding dimension and discrimination threshold of the DeiT detection model are dynamically adjusted to improve the adaptability and accuracy of the detection model.

[0156] After training, the DeiT detection model was deployed in the field for real-time testing to monitor cable insulation status. The model not only handles complex noise in power signals but also adapts to the age of different cables and operating environments, providing more accurate detection results.

[0157] In practical applications, the detection effects of the traditional cable detection method and the method proposed in the present invention under different conditions were compared.

[0158] Table 1 Comparison of cable insulation damage detection performance based on the present invention and traditional methods

[0159] ;

[0160] According to the data in Table 1, it can be clearly seen that the cable insulation damage adaptive detection method proposed in the present invention has obvious advantages in many aspects compared with the traditional method.

[0161] A comparison of false alarm rates shows that the method of the present invention significantly reduces false alarms. In tests in Industrial Area A, the false alarm rate of the traditional method was 12.5%, while the false alarm rate of the method of the present invention was reduced to 4.3%. This difference was also confirmed in other areas, especially in Residential Area C and Commercial Area D, where the false alarm rate of the method of the present invention was less than 5%. Traditional methods often cause false alarms due to environmental noise or differences in cable types. However, the present invention, through anti-disturbance learning and adaptive mechanisms, can effectively identify and suppress these noise factors, significantly improving the reliability of detection results.

[0162] Secondly, the proposed method also demonstrated superior accuracy. Taking Industrial Area A as an example, the accuracy of the traditional method was 78.3%, while the proposed method increased to 88.7%. This improvement was evident in all test areas. By introducing adversarial perturbation training and a distillation mechanism, the proposed method enables the model to learn more profound cable damage characteristics, improving its adaptability to different cable types and complex environments, and ensuring more accurate fault detection.

[0163] The method of the present invention is also particularly efficient in terms of detection time. For example, in Industrial Zone A, the traditional method required 45 minutes for cable testing, while the method of the present invention only took 30 minutes, significantly improving work efficiency. Traditional methods typically rely on manual intervention and involve complex calculation steps, while the present method utilizes an automated detection process combined with an adaptive detection mechanism, eliminating complex manual processing steps and thus shortening detection time.

[0164] In terms of downtime, the method of the present invention can also effectively reduce downtime caused by inspection. In industrial area A, the traditional method caused downtime of 10 minutes, while the method of the present invention only caused downtime of 7 minutes. This not only reduces production interruption time but also improves equipment utilization efficiency, which has important economic value for power companies.

[0165] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A cable insulation damage adaptive detection method based on anti-disturbance learning, characterized in that: The steps include: S1. Collect the original electrical signals during the operation of the cable and continuously acquire them to form an electrical signal sequence; S2. preprocessing the electrical signal sequence to divide the electrical signal sequence into a number of signal segments of equal length; S3. Build a DeiT detection model. Use the embedding layer to linearly embed each signal segment to form an embedding vector sequence. Add the category identification vector and distillation identification vector before the embedding vector sequence. Use the position encoding layer to superimpose the corresponding position encoding information to form the complete input vector of the model. S4. Input the complete input vector into the multi-layer Transformer encoder, extract the features of the signal segment through the classification output layer, and output the predicted probability of cable insulation damage; S5. Apply a small perturbation to the embedding vector sequence to construct an adversarial sample sequence, and jointly train the DeiT detection model with the embedding vector sequence and the adversarial sample sequence. At the same time, a convolutional neural network is used as a teacher model, and the soft labels output by the teacher model are used to supervise the training of the DeiT detection model. S6. Establish an adaptive detection mechanism to dynamically adjust the parameters of the DeiT detection model based on the statistical characteristics, frequency domain structure and background interference intensity of the electrical signal sequence; S7. Deploy the trained DeiT detection model in cable insulation status detection and output the detection results; The S5 specifically includes: S51, obtain the embedding vector sequence as the initial input for generating adversarial perturbations; S52, performing short-time Fourier transform on the preprocessed electrical signal sequence to obtain spectrum energy of each signal segment; Set the energy threshold and construct the frequency domain mask matrix. When the spectrum energy is greater than the energy threshold, the corresponding value of the frequency domain attention mask matrix is ​​set to 1, otherwise it is set to 0. S53. Initialize the perturbation sequence to an all-zero sequence. In each iteration, use the masked projected gradient descent algorithm to guide the perturbation update process: ; in, Indicates the The first iteration A perturbation sequence, Indicates the The first iteration A perturbation sequence, represents the step size coefficient, Indicates the frequency domain mask matrix corresponding to The mask vector of the embedding positions, represents the Hadamard element-wise product, Represents the sign function, used to obtain the gradient direction, represents the learning parameters of the DeiT detection model, represents the cross entropy loss of the adversarial sample, represents the gradient of the cross entropy loss of the perturbation sequence with respect to the adversarial sample, represents the adversarial sample sequence, Indicates that the parameter is , the adversarial sample cross entropy loss with adversarial sample sequence as input, Indicates that the disturbance sequence is projected to a maximum disturbance amplitude not exceeding Within the constraint set, Indicates the maximum value of the disturbance amplitude; S54. Construct an adversarial sample sequence based on the embedded vector sequence and the updated perturbation sequence, and feed it into the DeiT detection model together with the embedded vector sequence, and output the original prediction probability and the adversarial prediction probability respectively; S55. At the same time, a convolutional neural network is used to construct a teacher model. Several equal-length signal segments are combined into a signal feature matrix as the input of the teacher model. The class score vector is output. The softmax function after distillation temperature coefficient processing calculates the soft label. The teacher model is added to the DeiT detection model as an independent branch of the DeiT detection model. The soft label is output by the distillation output layer: ; in, Indicates that the teacher model The soft label of the class, describing the predicted probability distribution, Indicates the The class score vector of the class, represents the distillation temperature coefficient, represents the natural exponential function, The number of categories indicating the insulation status; S56. Use the DeiT detection model as the student model and define the original sample cross entropy loss, adversarial sample cross entropy loss, and distilled KL divergence loss; S57. Construct a joint loss function and adopt the error back propagation mechanism to jointly optimize the student model parameters by minimizing the joint loss function.

2. The cable insulation damage adaptive detection method based on anti-disturbance learning according to claim 1 is characterized in that: The original electrical signal includes a voltage signal, a current signal and a dielectric loss factor signal.

3. The cable insulation damage adaptive detection method based on anti-disturbance learning according to claim 1 is characterized in that: The preprocessing includes denoising, normalization and sliding window segmentation.

4. The cable insulation damage adaptive detection method based on anti-disturbance learning according to claim 1 is characterized in that: The S3 specifically includes: S31, constructing a DeiT detection model, for each signal segment, using linear embedding to perform feature space transformation through an embedding layer, the DeiT detection model comprising an embedding layer, a position encoding layer, a multi-layer Transformer encoder, a classification output layer, and a distillation output layer; S32. Arrange all embedding vectors in chronological order to construct an embedding vector sequence; S33, constructing the input format required by the model, adding the category identification vector and the distillation identification vector before the embedding vector sequence to form an expanded embedding vector sequence; S34, in order to maintain sequence order information, adding position coding to each vector in the expanded embedded vector sequence in the position coding layer; S35. Perform element-wise addition of the embedding vector and the positional encoding to form a complete input vector.

5. The cable insulation damage adaptive detection method based on anti-disturbance learning according to claim 1 is characterized in that: The S4 specifically includes: S41. Input the complete input vector into a multi-layer Transformer encoder for feature extraction. In each layer of the Transformer encoder, the complete input vector is processed by a multi-head self-attention mechanism and a feedforward network, and a feature vector is obtained through residual connections and layer normalization. S42. The vector finally output by the Transformer encoder is pooled and input into the classification output layer for classification prediction, which outputs the predicted probability of cable insulation damage.

6. The cable insulation damage adaptive detection method based on anti-disturbance learning according to claim 1 is characterized in that: The S6 specifically includes: S61, extracting statistical characteristics of the preprocessed electrical signal sequence, calculating a mean and a standard deviation for each signal segment, and concatenating the mean and the standard deviation to form a feature vector of the signal segment, wherein the statistical characteristics include the mean and the standard deviation; S62. Acquire spectrum energy of each signal segment of the electrical signal sequence; S63. Define background interference intensity; S64. Define an adaptive factor for adaptive adjustment of model parameters according to the characteristic vector, spectrum energy, and background interference intensity of the signal segment, wherein the adaptive factor represents an adjustment weight of the signal segment; S65, dynamically adjusting the original key parameters of the DeiT detection model through the adaptive factor, wherein the dynamic adjustment is achieved by multiplying the adaptive factor by the original key parameters; S66. Input the dynamically adjusted original key parameters into the DeiT detection model to perform feature extraction and cable insulation damage status judgment.

7. The cable insulation damage adaptive detection method based on anti-disturbance learning according to claim 6 is characterized in that: The original key parameters include attention weight, embedding dimension and classification discrimination threshold.

Citation Information

Patent Citations

  • Knowledge distillation method commonly used for DETR type detector

    CN117315392A

  • Robustness evaluation method based on electrical equipment defect detection model

    CN119691551A