Unsupervised anomaly detection method, system and equipment for overhead line system fault analysis and medium

Through unsupervised encoding-decoded abnormality detection model and adversarial mechanism training, network generation and discriminative network are solved, and the problem of lack of fault samples in abnormal detection of contact network components is achieved, achieving high-precision detection effect.

CN119904666APending Publication Date: 2025-04-29CHINA RAILWAY FIRST SURVEY & DESIGN INST GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411801886.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In intelligent detection of abnormal abnormalities in contact network components, the lack of fault samples makes it difficult to train supervised deep learning models, and thus difficult to use for detection.

Method used

Unsupervised encoding-decoded anomaly detection model is used to train the generated network and discriminative network through adversarial mechanism, generate the optimal model, and use the distance measurement model to detect whether the image is abnormal.

Benefits of technology

High-precision detection in the absence of abnormal samples is realized, which reduces the labor of manually viewing images and solves the problem of difficult use of classification models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904666A_ABST
    Figure CN119904666A_ABST
Patent Text Reader

Abstract

The invention relates to the field of engineering image intelligent identification, in particular to an unsupervised anomaly detection method, system and device for overhead line system fault analysis and a medium, and the method comprises the following steps: 1, building an unsupervised anomaly detection model based on coding-decoding; 2, training a coding-decoding-based unsupervised anomaly detection model by using a normal component image in combination with a confrontation mechanism to generate an optimal model; 3, inputting a to-be-detected image into the optimal model to obtain a reconstructed image; and 4, carrying out difference comparison on the reconstructed image and the original to-be-detected image by using the distance measurement model, and detecting whether the image is abnormal or not. According to the method, a nested residual encoding and decoding network is provided as a main body structure of an anomaly detection model, an adversarial mechanism is used for training the model, and a distance measurement model is designed for fault detection, so that the anomaly detection problem that fault samples in contact network component images are deficient is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent recognition of engineering images, and in particular to an unsupervised anomaly detection method, system, equipment and medium for contact network fault analysis. Background Art

[0002] On the newly opened high-speed rail lines, since the components are newly installed, there is a lack of fault data for the corresponding models of components used in the railway line. However, the abnormality of each component will have a corresponding impact on the normal power supply of the contact network.

[0003] CN114581388A discloses a method, device, computer equipment, storage medium and computer program product for detecting defects in contact network parts, which obtains a target template image by intercepting the image data of the contact network parts, and processes the image data using a deep convolutional neural network model to obtain a feature extraction model, and then performs similarity matching between the target template image and the image of the part to be detected according to the feature extraction model, thereby outputting the detection result. However, in the abnormal intelligent detection experiment of contact network parts, if some parts fault samples are extremely scarce, then the supervised deep learning model is difficult to train, resulting in the model being difficult to use for detection. Summary of the invention

[0004] In view of the problem of anomaly detection in the prior art of lack of fault samples in images of contact network components, the present invention provides an unsupervised anomaly detection method, system, device and medium for contact network fault analysis.

[0005] The present invention is achieved through the following technical solutions: An unsupervised anomaly detection method for overhead line fault analysis comprises the following steps: Step 1: Establish an unsupervised anomaly detection model based on encoding-decoding; Step 2: Use normal component images combined with adversarial mechanisms to train an encoding-decoding unsupervised anomaly detection model to generate an optimal model; Step 3, input the image to be tested into the optimal model to obtain a reconstructed image; Step 4: Use the distance measurement model to compare the reconstructed image and the original image to be tested to detect whether there is any abnormality.

[0006] Preferably, in step 1, the encoding-decoding unsupervised anomaly detection model based on the adversarial mechanism includes a generator network and a discriminator network. The discriminator network is used to predict the category of a given input and to identify real normal samples. , generate the image reconstructed by the network And get the input image and High-dimensional semantic feature vector and .

[0007] Preferably, the generator network Generator is a self-encoding model that nests and utilizes a residual network for encoding and decoding.

[0008] Preferably, the generator network includes an encoding part and the decoding part , encoding part Used to obtain the semantic features of the original image; decoding part Reconstruct the semantic feature vector into the same Images of the same size as output.

[0009] Preferably, the decoding part performs decoding operations on two deep semantic features of different scales to generate two parallel decoding branches; specifically, the decoding branches add residual connections, the inner branch includes three residual blocks, and the outer branch includes four residual blocks, which respectively decode the semantic feature maps of two different scales; the inner branch uses skip connections to fuse the features of the outer decoding branch, and finally the last layer of the outer branch outputs the reconstructed image of the decoder .

[0010] Preferably, the anomaly detection model based on distance metric uses direct distance L1 and high-dimensional vector and The distance between To measure the test set and reconstructed image The gap between.

[0011] Preferably, the testing steps of the distance metric model are as follows: Step 41, reconstructing the image: importing the generated network into the optimal parameter model in the training phase, reading in the test image, and generating a reconstructed test image; Step 42, abnormal distance score: calculate and record the distance between the test image and the reconstructed image, input the two into the discriminant network, generate a semantic feature vector, calculate and record the distance between the vectors; add the two distances in proportion and normalize them as the abnormal distance score; Step 43, anomaly detection: set a threshold and classify the anomaly distance scores. If the score is greater than the threshold, it is anomaly, otherwise it is normal.

[0012] An unsupervised anomaly detection system for contact network fault analysis includes a data acquisition module, a data processing module and a data output module. The data acquisition module is used to acquire an image to be tested, the data processing module is used to acquire multi-scale features, select a target frame, perform pooling layer unification and acquire a feature vector, and the data output module is used to output the monitoring position of the target.

[0013] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the unsupervised anomaly detection method for contact network fault analysis when executing the computer program.

[0014] A storage medium stores a computer program, which, when executed by a processor, implements the steps of the unsupervised anomaly detection method for contact network fault analysis.

[0015] Compared with the prior art, the present invention has the following beneficial effects: In an unsupervised anomaly detection method for contact network fault analysis of the present invention, an encoding-decoding network is used, an adversarial training mechanism is used to train normal samples, reconstructed images are generated, the data distribution of normal samples is learned, and a distance metric model is used to detect whether the test image is abnormal, thereby achieving a breakthrough in accuracy, alleviating the labor of manual image viewing to a certain extent, and solving the dilemma that the classification model is difficult to use when there is a lack of abnormal samples.

[0016] Furthermore, the generative network can be viewed as two nested encoding and decoding networks. The decoding network performs decoding operations on deep semantic feature maps of two different scales, generating two parallel decoding branches. Through back propagation, the network can autonomously adapt to the appropriate network depth and size for the two-scale nested models to solve the problem of too strong or too weak network expression ability. At the same time, the skip connection between decoders enhances the transmission of image detail information and greatly reduces information loss.

[0017] Furthermore, the use of adversarial mechanisms enhances the robustness of the model, enabling it to better identify anomalies.

[0018] Furthermore, by calculating the distance between the test image and the reconstructed image and combining it with the high-dimensional feature vector distance generated by the discriminant network, an abnormal distance score is obtained. This score reflects the degree of deviation of the image to be tested from the normal sample.

[0019] Furthermore, the L1 distance can reflect the difference at the pixel level of the image, while the L2 distance can capture the difference in the high-dimensional feature space. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a model processing flow chart of the unsupervised anomaly detection method for contact network fault analysis of the present invention; Figure 2 is a schematic diagram of the encoding-decoding network anomaly detection model in the present invention; Figure 3 It is a diagram of the structure of the nested residual encoding and decoding network in the present invention; Figure 4 is a distribution diagram of abnormal scores of the method of the present invention on a contact network data set in an embodiment; Figure 5 are the real images and the reconstructed images in the overhead contact network dataset in the embodiment. DETAILED DESCRIPTION

[0021] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it.

[0022] The present invention discloses an unsupervised anomaly detection method for contact network fault analysis, referring to Figure 1 , including the following steps: Step 1: Establish an unsupervised anomaly detection model based on encoding-decoding (such as Figure 2 As shown in Figure 2, the model includes a generator network and a discriminator network. The generator network includes an encoding part. and the decoding part , encoding part Used to obtain the semantic features of the original image; decoding part Reconstruct the semantic feature vector into the same Images of the same size as output.

[0023] The generator network is an autoencoder model that uses a residual network for encoding and decoding. It can improve the feature expression and image reconstruction capabilities of the generator network in the anomaly detection model, and can also be used as a generator network in the anomaly detection model.

[0024] The generator network can be regarded as two nested encoding and decoding networks, with the encoding network being the shared part, expressed as , used to read the input image , generating deep semantic feature maps , which is expressed as follows:

[0025] The decoding network performs decoding operations on two deep semantic feature maps of different scales, generating two parallel decoding branches, which are expressed as The decoding branch adds residual connections. The inner branch consists of three residual blocks, and the outer branch consists of four residual blocks, respectively, for semantic feature maps of two different scales. and The residual structure enhances the feature expression ability of the decoding part and reduces the risk of overfitting. In addition, the internal decoding branch uses dense skip connections to fuse the features of the external decoding branch, and finally the reconstructed image of the decoder is output by the last layer of the external branch. , the formula is as follows:

[0026] The model can autonomously adapt to the appropriate network depth and size for two-scale nested models through back propagation, solving the problem of too strong or too weak network expression. At the same time, the skip connection between decoders enhances the transmission of image detail information and greatly reduces information loss.

[0027] The discriminator network is used to predict the category of a given input and identify the real normal samples. And generate the network reconstructed image The discriminant network uses the classifier in the DCGAN model. In addition to the classification function, At the same time, it acts as a feature extraction network to obtain the input image and High-dimensional semantic feature vector and , used to calculate the feature difference distance of the image as part of the anomaly score.

[0028] Step 2: Use normal component images combined with adversarial mechanisms to train an encoding-decoding unsupervised anomaly detection model to generate the optimal model. The specific steps are as follows: Step 21: Input the original image into the generated network to reconstruct the image, the size of which is the same as the original image. Figure 1 To; Step 22: Input the reconstructed image and the original image into the discriminant network for binary classification training and record the classification loss. At the same time, calculate the distance between the reconstructed image and the original image and their deep semantic features, perform gradient back propagation together with the classification loss, and update the network parameters. Step 23, fix the generated network parameters, repeat the process of step 22, and use the classification loss to update the parameters of the discriminant network; Step 24: Based on the adversarial mechanism, alternately train the generator network and the discriminator network until the loss no longer decreases. Save the optimal generator network parameter model and the discriminator network parameter model.

[0029] Step 3, input the image to be tested into the optimal model to obtain a reconstructed image; Step 4: Use the distance measurement model to compare the reconstructed image and the original image to be tested to detect whether there is any abnormality. The specific test steps are as follows: Step 41, reconstructing the image: importing the generated network into the optimal parameter model in the training phase, reading in the test image, and generating a reconstructed test image.

[0030] Step 42, abnormal distance score: calculate and record the distance between the test image and the reconstructed image, input both into the discriminant network, generate a semantic feature vector, calculate and record the distance between the vectors; add the two distances proportionally and normalize them as the abnormal distance score.

[0031] Step 43, anomaly detection: set a threshold and classify the anomaly distance scores. If the score is greater than the threshold, it is anomaly, otherwise it is normal.

[0032] In the test phase, in order to measure whether the image is abnormal, the test image abnormality score is calculated. Given the test set input is , the anomaly score is defined as The anomaly detection model based on distance metric in this invention adopts direct distance and high-dimensional vectors and The distance between To measure the test set and reconstructed image The distance between Expressed as , which describes the detail differences between the reconstructed image and the input image. Expressed as , the distance describes the difference in semantic features between the two. , and The formula is as follows:

[0033]

[0034]

[0035] here is a weight parameter used to balance the importance of the two difference scores. In this model, .

[0036] Through the above equation, the test set can be calculated The set of anomaly scores for all images in , Next, for the set Perform linear normalization to compress the anomaly score to [0,1], the formula is as follows:

[0037] right A threshold is set, and data samples greater than the threshold are considered abnormal, and samples less than the threshold are considered normal.

[0038] The training process uses three loss functions: Adversarial Loss, Contextual Loss, and Latent Loss. Adversarial Loss is proposed to maximize the ability to reconstruct normal images, which is consistent with the value function principle of conventional generative adversarial networks. This loss function ensures that the image reconstructed by the generative network is as close to the real sample as possible. At the same time, it ensures that the discriminative network can better distinguish between real samples and reconstructed images. This task is achieved by minimizing the loss of the generative network and maximizing the loss of the discriminative network. .

[0039]

[0040] Contextual Loss reconstructs the image by calculating And the input sample The SmoothL1 Loss makes the reconstructed image Fully learn the original normal samples Image detail information, fitting The data distribution of . The loss function is defined as follows:

[0041] Represents the SmoothL1 Loss equation.

[0042]

[0043] Latent Loss reconstructs the image by calculating And the input sample After the SmoothL1 Loss of the last layer of deep semantic feature vector of the discriminant network, the reconstructed image Fully learn the original normal samples The intrinsic semantic information of , The loss function is defined as follows:

[0044] The present invention adopts the same adversarial mechanism as conventional GAN ​​for training, and optimizes the discriminant network and the generator network alternately. When optimizing the discriminant network, the parameters of the generator network are fixed. The parameters are trained by inputting the images generated by the generator as negative samples and the existing positive samples into the discriminant network. The objective function is

[0045] When optimizing the generative network, the parameters of the discriminative network are fixed, and the objective function is

[0046] in, , , is the weight parameter of each loss.

[0047] In order to verify the performance improvement of the proposed method, a test was conducted on the contact network fastener dataset. U-bolts and their fault images were selected as the contact network anomaly detection dataset. The U-bolt training set contains 1572 images of normal samples, and the validation set contains 400 images, with 200 normal samples and 200 abnormal samples. In the training phase, the training set consisting of normal samples was used for training, and the test set consisting of normal samples and abnormal samples was used for testing in the test phase. The image input size is 32*32, 15 epochs are set, the initial learning rate is 0.0002, and lambda decay is used. Adam is used as the default optimizer. , . Weight parameters of each part of the loss function , , . Distance metric weight parameter .

[0048] Computing environment: CPU is Xeon E5-2664 v4 Gold, main frequency is 3.2GHz, 16 cores; GPU is NVIDIA TeslaP100, 16GB video memory, 3584 cores. Deep learning open source framework Pytorch1.1.0 is used for deep network model training and testing.

[0049] The method proposed in the present invention is compared with the effects of GANomaly and Skip-GANomaly. The test results are shown in Table 1. GANomaly achieved 88.2% and 92.1% in AUROC and AUPRC respectively, while Skip-GANomaly performed unsatisfactorily, only 83.1% and 91.7%. Compared with the above two anomaly detection models based on autoencoder networks, the method of the present invention achieved an incomparable effect, with AUROC and AUPRC of 99.4% and 99.7% respectively, which is 11.2% and 7.7% higher than the results of GANomaly.

[0050] Table 1 Experimental results of three models on the contact network fastener dataset

[0051] It can be seen that this part of the method has shown excellent performance and has great advantages in the abnormal detection task of contact network components. To further show the accuracy comparison, in the PR curve, this paper sets the threshold to 0.4 and obtains the F1-score, Recall and Precision of the three methods. As shown in Table 2, the method in this paper has reached the highest value in all three indicators, which are 91.9%, 100.0% and 90.4% respectively, which is a significant improvement in accuracy compared with the other two methods.

[0052] Table 2 Results of setting the anomaly score threshold to 0.4 in the PR curve

[0053] Figure 4 The bar graph of the test distance of the abnormal class in the fastener dataset of this method is shown in Figure 2. It can be seen that this model can distinguish the normal class from the abnormal class very well. Figure 5 The image generation effect diagram of the reconstructed image in the test phase of the fastener dataset is shown, in which the part enclosed by the red circle is an abnormal sample. In summary, the method proposed in the present invention has achieved a significant improvement in accuracy compared with the other two models, and has excellent performance in the contact network industrial image. It far exceeds other methods in application effect and achieves a breakthrough in accuracy, which shows the effectiveness of the method proposed in the present invention in the contact network industrial dataset. It basically meets the requirements for application in actual industrial scenarios, can reduce the labor of manual image viewing to a certain extent, and solves the dilemma that the classification model is difficult to use in the absence of abnormal samples. It has far-reaching industrial application value.

[0054] The present invention also discloses an unsupervised anomaly detection system for contact network fault analysis, comprising a data acquisition module, a data processing module and a data output module. The data acquisition module is used to acquire the image to be tested, the data processing module is used to acquire multi-scale features, select target frames, perform pooling layer unification and acquire feature vectors, and the data output module is used to output the monitoring position of the target.

[0055] The present invention also discloses an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the unsupervised anomaly detection method for contact network fault analysis when executing the computer program.

[0056] The present invention also discloses a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the unsupervised anomaly detection method for contact network fault analysis are implemented.

[0057] The above description is only a preferred embodiment of the present invention and is not intended to impose any limitation on the technical solution of the present invention. Those skilled in the art should understand that, without departing from the spirit and principles of the present invention, the technical solution can also be subjected to several simple modifications and substitutions, and these modifications and substitutions are also within the scope of protection covered by the claims.

Claims

1. An unsupervised anomaly detection method for overhead line fault analysis, characterized in that: The following steps are involved: Step 1: Establish an unsupervised anomaly detection model based on encoding-decoding; Step 2: Use normal component images combined with adversarial mechanisms to train an encoding-decoding unsupervised anomaly detection model to generate an optimal model; Step 3, input the image to be tested into the optimal model to obtain a reconstructed image; Step 4: Use the distance measurement model to compare the reconstructed image and the original image to be tested to detect whether there is any abnormality.

2. The unsupervised anomaly detection method for contact network fault analysis according to claim 1, characterized in that: In step 1, the encoding-decoding unsupervised anomaly detection model based on the adversarial mechanism includes a generator network and a discriminator network. The discriminator network is used to predict the category of a given input and to identify real normal samples. , generate the image reconstructed by the network And get the input image and High-dimensional semantic feature vector and .

3. The unsupervised anomaly detection method for contact network fault analysis according to claim 2, characterized in that: The generator network is a self-encoding model that uses a nested residual network for encoding and decoding.

4. The unsupervised anomaly detection method for overhead line fault analysis according to claim 3, characterized in that: Generator network includes encoding part And the decoding part , encoding part Used to obtain the semantic features of the original image; Decoding part Reconstruct the semantic feature vector into the same Images of the same size as output.

5. The unsupervised anomaly detection method for overhead line fault analysis according to claim 3, characterized in that: The decoding part performs decoding operations on two deep semantic features of different scales, generating two parallel decoding branches. Specifically, the decoding branches add residual connections, the inner branch includes three residual blocks, and the outer branch includes four residual blocks, which decode the semantic feature maps of two different scales respectively. The inner branch uses skip connections to fuse the features of the outer decoding branch, and finally the last layer of the outer branch outputs the reconstructed image of the decoder. .

6. The unsupervised anomaly detection method for contact network fault analysis according to claim 2, characterized in that: The anomaly detection model based on distance metric uses direct distance L1 and high-dimensional vector and The distance between To measure the test set and reconstructed image The gap between.

7. The unsupervised anomaly detection method for overhead line fault analysis according to claim 1, characterized in that: The testing steps of the distance metric model are as follows: Step 41, reconstructing the image: importing the generated network into the optimal parameter model in the training phase, reading in the test image, and generating a reconstructed test image; Step 42, abnormal distance score: calculate and record the distance between the test image and the reconstructed image, input the two into the discriminant network, generate a semantic feature vector, calculate and record the distance between the vectors; add the two distances in proportion and normalize them as the abnormal distance score; Step 43, anomaly detection: set a threshold and classify the anomaly distance scores. If the score is greater than the threshold, it is anomaly, otherwise it is normal.

8. An unsupervised anomaly detection system for overhead line fault analysis, characterized in that: It includes a data acquisition module, a data processing module and a data output module. The data acquisition module is used to acquire the image to be tested. The data processing module is used to acquire multi-scale features, select target frames, perform pooling layer unification and acquire feature vectors. The data output module is used to output the monitoring position of the target.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the unsupervised anomaly detection method for contact network fault analysis according to any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the unsupervised anomaly detection method for contact network fault analysis according to any one of claims 1 to 7 are implemented.