A transformer oil leakage detection method, device, equipment and medium

By collecting video data around the transformer and using LSTM model and improved genetic algorithm to train the oil leakage detection model, combining image segmentation method and fast discrimination algorithm, early detection and alarm of oil leakage in the transformer is achieved, solving the early stage of oil leakage The difficult-to-discover problems improve the safety of transformer monitoring.

CN114155468BActive Publication Date: 2025-02-07STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111471149.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-02-07
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

Oil leakage in the transformer is difficult to detect in the early stages, resulting in transformer damage and power supply interruption.

Method used

A transformer oil leakage detection method is adopted to collect video data around the transformer, and use LSTM model and improved genetic algorithm to train the oil leakage detection model. Combined with image segmentation method and fast discrimination algorithm, early detection of oil leakage is achieved. and call the police.

Benefits of technology

It effectively shortens the cycle of oil leakage detection, improves the safety of transformer monitoring, and reduces the risk of transformer damage and power supply interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114155468B_ABST
    Figure CN114155468B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of transformers, and specifically relates to a transformer oil leakage detection method, device, equipment and medium. The method comprises the following steps: S1, collecting video data around the transformer through a number of cameras, and uploading it to an AI training server through an edge AI inference server; S2, dividing the video data into normal samples and abnormal samples; obtaining normal and abnormal model contours; and then fusing the two to obtain a transformer oil leakage detection model; S3, publishing the transformer oil leakage detection model to an edge AI inference server; S4, preprocessing the video data collected by the camera; S5, establishing a fast discrimination algorithm according to the transformer oil leakage detection model, and judging whether the video data is abnormal according to the fast discrimination algorithm; S6-7, judging whether oil leakage occurs by image segmentation method and transformer oil leakage detection model. The present invention collects video data around the transformer, automatically detects transformer oil leakage, and solves the problem that oil leakage is difficult to find in the early stage, resulting in transformer damage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of transformers, and in particular relates to a transformer oil leakage detection method, device, equipment and medium. Background Art

[0002] The existing oil leakage detection mostly relies on manual inspections, and the effect depends on manual experience, which inevitably leads to omissions. Moreover, one team is often responsible for the inspection of multiple substations, and the inspection cycle is long, making it difficult to find early problems in time. In order to shorten the production safety inspection cycle, a large number of video surveillance systems have been widely deployed, but relying on human inspection of cameras still has too many video channels to be checked, making it difficult to find and deal with problems in time.

[0003] The development of production safety assurance is undergoing a transformation from "safety monitoring" to "intelligent monitoring". With the help of artificial intelligence to analyze monitoring videos, a large amount of data can be quickly analyzed, greatly shortening the inspection cycle. However, most current methods directly process images or videos of oil leakage, while the substation shrinkage environment is relatively complex, and oil leakage is not obvious in the background. It often takes a long time and a large area for oil leakage to be discovered, making it difficult to achieve early detection; in order to make oil leakage more obvious, some methods use fluorescence detection methods, but it requires the additional deployment of ultraviolet fluorescent lamps and cameras that can shoot fluorescence, which has a high deployment cost.

[0004] At present, a large number of computer vision solutions based on detection or classification need to accumulate a large number of abnormal oil leakage pictures and videos as samples for model training. After the model is trained, the monitoring video is classified and identified to complete the transformer monitoring. However, the actual situation is that the number of oil leakage incidents is small, and the accumulated sample size of pictures and videos is extremely small. In addition, the lighting, shooting angle, and clarity of the samples are retained for evidence collection afterwards, which is inconsistent with the deployment of monitoring cameras. Therefore, the algorithm based on detection and classification can be realized in theory, but in practice, the lack of training samples leads to the cold start dilemma of model training, which is difficult to promote and apply.

[0005] The core problem of early detection of oil leakage is that oil leakage in a small area is not obvious. The leaked oil is not very different from the surrounding environment and is difficult to detect.

[0006] Among the equipment used in power grid production, transformers are widely used. Transformer accidents not only cause damage to the equipment itself, but also interrupt power supply, causing huge economic losses. Statistics on previous transformer abnormalities show that most of them are transformer oil leakage. If there is a fast and convenient deployment method, it can be discovered and handled as early as possible in the early stage when the oil leakage area is small, which will effectively reduce the accident rate, better ensure the safe operation of the power grid, and prevent accidents as much as possible. Summary of the invention

[0007] The purpose of the present invention is to provide a transformer oil leakage detection method, device, equipment and medium to solve the technical problem that transformer oil leakage is difficult to detect at an early stage, resulting in transformer damage.

[0008] To achieve the above object, the present invention adopts the following technical solution:

[0009] In a first aspect, a transformer oil leakage detection method comprises the following steps:

[0010] S1, collect video data around the transformer, and upload the collected video data to the AI ​​training server through the edge AI inference server;

[0011] S2. In the AI ​​training server, the video data is divided into normal samples and abnormal samples;

[0012] Train the LSTM model on normal samples to obtain the normal model profile;

[0013] The abnormal samples are processed by improved genetic algorithm to obtain the abnormal model profile;

[0014] The normal model contour and the abnormal model contour are merged to obtain the transformer oil leakage detection model;

[0015] S3. Publish the transformer oil leakage detection model established by the AI ​​training server to the edge AI inference server;

[0016] S4, preprocessing the collected video data;

[0017] S5. Establish a fast discrimination algorithm according to the transformer oil leakage detection model, and determine whether the video data is abnormal according to the fast discrimination algorithm;

[0018] If the video data is judged to be non-abnormal, the data preprocessing is returned;

[0019] If the video data is judged to be abnormal, the video data is processed by image segmentation method;

[0020] S6. Process the video data by image segmentation method to determine whether oil leakage occurs;

[0021] If oil leakage is determined after image segmentation processing, an alarm is issued;

[0022] If it is determined that there is no oil leakage, the video data is tested through the transformer oil leakage detection model;

[0023] S7, when the video data is detected by the transformer oil leakage detection model, an alarm is issued if the detection result is abnormal;

[0024] If the test result is not abnormal, the judgment ends.

[0025] A further improvement of the present invention is that obtaining abnormal samples in S2 specifically includes the following steps:

[0026] S21, using a feature selection algorithm based on information gain on the video data to select a feature subset, i.e., an oil leakage sample set D;

[0027] S22. Calculate and select the feature subset, that is, the information entropy of the oil leakage sample set D. The proportion of the k-th class of samples in the oil leakage sample set D is p k , k=1,2,…,|y|, then the information entropy ENT() of the oil leakage sample set D is defined as follows:

[0028]

[0029] S23. Calculate the information gain Gain(D, a) of the oil leakage sample set D. Assume that the discrete image feature attribute a has V possible values ​​{a1, a2, ... av}. Use a to divide the oil leakage sample set D. Then the oil leakage sample set D will generate V branch nodes, where the Vth branch node contains all samples in D with the value av on the attribute a, marked as D v , calculate D v The information entropy of , and considering that different branch nodes may contain different numbers of samples, the branch nodes are given weights | D v | / |D|, calculate the information gain Gain(D, a) obtained by dividing the oil leakage sample set D with attribute a:

[0030]

[0031] S24. Use information gain to select features, and after a preset number of iterations, obtain oil leakage simulation data that can support training samples.

[0032] A further improvement of the present invention is that the preprocessing described in S4 is to deframe the video data and convert it into picture data.

[0033] A further improvement of the present invention is that: S5 specifically includes the following steps:

[0034] S51, constructing a set of feature vectors as an abnormal feature dictionary according to the transformer oil leakage detection model;

[0035] S52. Calculate two trigger attribute sequences Seq 1 and Seq 2 The Euler distance similarity is

[0036]

[0037] In the formula, Seq 1 and Seq 2 are two trigger attribute sequences in the abnormal feature dictionary, n is the maximum dimension of the vector, p is the valid non-empty attribute dimension in the current sequence, and Attr is the attribute value of the sequence;

[0038] S53, Calculate Seq 1 and Seq 2 The cosine distance similarity of

[0039]

[0040] In the formula, the angle between Seq1 and Seq2 is γ;

[0041] S54, calculating the feature sequence F of the newly collected video data after smoothing w (i,Dic);

[0042]

[0043] In the formula, the feature vectors of the newly-inflow video acquisition stream are i and j; α is an empirical value; the normal contour dictionary is Dic, and the time window is w;

[0044] S55, according to F w (i, Dic) determines whether the newly collected video data is leaking oil.

[0045] A further improvement of the present invention is that S6 specifically includes the following steps:

[0046] S61, performing augmentation preprocessing on the collected video data;

[0047] S62, establish a convolutional network model;

[0048] S63, testing the convolutional network model through a sliding window, and using the convolutional network model to detect whether there is an oil leak after the test is correct;

[0049] S64. Use the grid detection method or the non-grid detection method to detect whether the transformer is leaking oil.

[0050] A further improvement of the present invention is that the augmentation preprocessing includes translation, rotation and random elastic deformation added by U-Net.

[0051] A further improvement of the present invention is that when S7 detects video data through a transformer oil leakage detection model, an LSTM discrimination method is used, and anomalies not found in the image segmentation method need to be verified by the transformer oil leakage detection model; frame sampling is performed at a preset frequency to perform an auxiliary discrimination on the continuous monitoring video.

[0052] In a second aspect, a transformer oil leakage detection device comprises:

[0053] Several cameras, transformers, several grid stickers, edge AI inference servers, and AI training servers;

[0054] Several cameras are arranged around the transformer, and several grid stickers are set around the transformer. The camera signal output end is connected to the edge AI inference server signal input port through the local area network in the substation. The edge AI inference server is connected to the AI ​​training server through an encryption device.

[0055] Several cameras are used to collect video data around the transformer, and the collected video data is uploaded to the AI ​​training server through the edge AI inference server;

[0056] The AI ​​training server has several modules, including:

[0057] The transformer oil leakage detection model training module is used to divide the video data into normal samples and abnormal samples; perform LSTM model training on normal samples to obtain the normal model profile; perform improved genetic algorithm processing on abnormal samples to obtain the abnormal model profile; merge the normal model profile and the abnormal model profile to obtain the transformer oil leakage detection model;

[0058] The model publishing module is used to publish the transformer oil leakage detection model established by the AI ​​training server to the edge AI inference server;

[0059] There are several modules on the edge AI inference server, including:

[0060] The video data preprocessing module is used to deframe the video data collected by the camera and convert it into images;

[0061] A fast discrimination module is used to establish a fast discrimination algorithm based on a transformer oil leakage detection model, and to determine whether the video data is abnormal based on the fast discrimination algorithm;

[0062] An image segmentation module is used to process the video data judged as abnormal by the rapid discrimination module using an image segmentation method to determine whether the transformer is leaking oil;

[0063] A re-inspection module is used to perform a secondary judgment on the video data that the image segmentation module determines as no oil leakage through the transformer oil leakage detection model to confirm whether there is oil leakage;

[0064] Alarm module: used to sound an alarm when the image segmentation module and re-inspection module determine that there is an oil leak.

[0065] In a third aspect, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned transformer oil leakage detection method when executing the computer program.

[0066] In a fourth aspect, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned transformer oil leakage detection method is implemented.

[0067] Compared with the prior art, the present invention has at least the following beneficial effects:

[0068] 1. The present invention collects video data around the transformer and trains an oil leakage detection model to automatically detect transformer oil leakage, thereby solving the problem that transformer oil leakage is difficult to detect in the early stage, resulting in transformer damage.

[0069] 2. The present invention uses information gain to select features and, after a suitable number of iterations, obtains oil leakage simulation data that can support training samples, thereby solving the problem of inaccurate model training due to insufficient oil leakage video data.

[0070] 3. The present invention uses a transformer oil leakage detection model to perform frame sampling at a preset frequency to perform auxiliary judgment on the continuous monitoring video, which can effectively capture the situation of slow leakage and effectively improve the safety of transformer monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0072] Figure 1 A flow chart of a transformer oil leakage detection method according to the present invention;

[0073] Figure 2 It is a structural schematic diagram of a transformer oil leakage detection device of the present invention;

[0074] Figure 3 A network architecture diagram of a transformer oil leakage detection method according to the present invention;

[0075] Figure 4 A flowchart of a transformer oil leakage detection method according to the present invention;

[0076] Figure 5 This is a schematic diagram of a convolutional network model of a transformer oil leakage detection method according to the present invention. DETAILED DESCRIPTION

[0077] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.

[0078] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.

[0079] Example 1

[0080] As shown in Figure 1, a transformer oil leakage detection method includes the following steps:

[0081] S1. Collect video data around the transformer through several cameras, and upload the collected video data to the AI ​​training server through the edge AI inference server;

[0082] S2, dividing the video data into normal samples and abnormal samples;

[0083] Train the LSTM model on normal samples to obtain the normal model profile;

[0084] The abnormal samples are processed by improved genetic algorithm to obtain the abnormal model profile;

[0085] The normal model contour and the abnormal model contour are merged to obtain the transformer oil leakage detection model;

[0086] S3. Publish the transformer oil leakage detection model established by the AI ​​training server to the edge AI inference server;

[0087] S4, preprocessing the video data collected by the camera;

[0088] S5. Establish a fast discrimination algorithm according to the transformer oil leakage detection model, and determine whether the video data is abnormal according to the fast discrimination algorithm;

[0089] If the video data is judged to be non-abnormal, the data preprocessing is returned;

[0090] If the video data is judged to be abnormal, the video data is processed by image segmentation method;

[0091] S6. Process the video data by image segmentation method to determine whether oil leakage occurs;

[0092] If oil leakage is determined after image segmentation processing, an alarm is issued;

[0093] If it is determined that there is no oil leakage, the video data is tested through the transformer oil leakage detection model;

[0094] S7, when the video data is detected by the transformer oil leakage detection model, an alarm is issued if the detection result is abnormal;

[0095] If the test result is not abnormal, the judgment ends.

[0096] like Figure 2 As shown, in S2, the number of normal samples is sufficient, and the LSTM model is used for training. Due to factors such as light, weather, and seasonal changes, the results obtained from each sampling will have slight changes. It is necessary to establish a long-term and short-term memory model for the normal working state of the transformer, so as to better adapt to various environments and monitor small-scale changes in gradual leakage.

[0097] Since the transformer monitoring camera is in a fixed position, and multiple preset positions for monitoring tasks are basically unchanged, most of the collected image information is continuous and does not change much, which varies according to factors such as lighting and weather. If these factors are not considered to train the model using traditional computer vision methods, it is easy to cause misjudgment or underreporting of results when rain and snow occur. The use of LSTM models can effectively establish long-term / short-term memory models, thereby identifying non-significant scenes such as small-scale continuous oil leakage and shielding environmental interference such as weather light.

[0098] The LSTM model is a modified LSTM model using the DCCN network to adapt to transformer monitoring video. The network and parameters are adjusted and optimized. The network architecture is as follows: Figure 3 shown.

[0099] Acquiring abnormal samples in S2 specifically includes the following steps:

[0100] S21, using a feature selection algorithm based on information gain on the video data to select a feature subset, i.e., a set of oil leakage samples D, to reduce the complexity of calculation while improving detection and recognition efficiency and accuracy;

[0101] S22. Calculate and select the feature subset, that is, the information entropy of the oil spill sample set D. Use the concept of information entropy to measure the purity of the sample set. The proportion of the k-th class of samples in the oil spill sample set D is p. k (k=1,2,…,|y|), then the information entropy ENT() of the sample set D is defined as follows:

[0102]

[0103] The larger the value of information entropy Ent(D), the lower the purity of sample D;

[0104] S23. Calculate the information gain Gain(D, a) of the oil leakage sample set D. Assume that the discrete image feature attribute a has V possible values ​​{a1, a2, ... av}. If a is used to divide the oil leakage sample set D, the oil leakage sample set D will generate V branch nodes, where the Vth branch node contains all samples in D with the value av on the attribute a. We mark it as D v , calculate D v The information entropy of , considering that different branch nodes may contain different numbers of samples, gives the branch nodes a weight |D v | / |D|, that is, the more samples a branch node has, the greater its influence. The information gain Gain(D, a) obtained by dividing the oil leakage sample set D by attribute a is calculated according to the following formula:

[0105]

[0106] The larger the information gain Gain(D, a), the greater the purity improvement obtained by using attribute a for partitioning.

[0107] S24, using information gain to select features; obtaining abnormal samples with purity above a preset value from the abnormal oil leakage state samples, and performing iterative calculation on the abnormal samples above the preset value;

[0108] Abnormal oil leakage state samples are scarce and need to be simulated, learned and strengthened. The improved genetic algorithm in S2 is a search algorithm inspired by biological evolution and natural selection. It starts with a group of samples called the primary population (i.e., real samples of oil leakage). By encoding the samples, the image features of each sample are represented as the "gene" of the sample. Then, crossover is used in software, that is, two samples are used as parents to form new individuals and mutations, that is, digital features are changed by one or more bits to produce a new next generation, that is, samples similar to real oil leakage samples are simulated, so that a small number of samples can be used to obtain a large number of new samples. Finally, the fitness function is used to calculate the fitness of each generated sample, and the sample with the highest fitness is selected as the new parent. After repeated iterations, a large number of training samples are obtained.

[0109] After a suitable number of iterations, oil leakage simulation data that can support training samples can be obtained. Generally, the inner loop iteration is set to 500-2000 times; the outer loop iteration is set to 128 or 1024 times. (1) Select 2 7 = 128 normal transformer working video stream features, the abnormality with similarity <1 / 128 as the threshold can be judged, and the theoretical accuracy can reach an accuracy of less than 1%; (2) Select 2 10= 1024 normal transformer working video stream features, the approximation <1 / 1024 as the threshold of abnormality can be judged, and the theoretical accuracy can find the situation that is inconsistent with the training sample with an accuracy of more than 0.1%. This inconsistency may not be caused by oil leakage but may also be other situations.

[0110] The preprocessing of the video data in S4 is to deframe and convert the video data into images.

[0111] like Figure 4 As shown in the figure, first, obtain the video data in the local area network, and after preprocessing, enter the fast discrimination algorithm for preliminary screening. If it does not belong to the suspected abnormal situation, continue to monitor. When a suspected abnormality is detected, in order to reduce false alarms, enter the image segmentation method for verification again, and obtain the leakage area, location, speed and other details. If it exceeds the specified threshold, the alarm push module can be started to notify the on-duty personnel to check and handle it. If no abnormality is found, the data is pushed to the transformer oil leakage detection model to verify again whether it is an abnormal situation of slow and gradual leakage to prevent missed reports. For video data, regular sampling and spot checks are carried out. The frequency can be determined according to the performance of the inference server. Usually, reasonable intervals can be set, such as 5 / 10 / 30 seconds, 1 / 5 / 10 minutes, etc. Since the image segmentation method and the transformer oil leakage detection model take up relatively large computing resources, it is not suitable to adopt such complex calculation methods all the time. After the fast discrimination method and sampling, only a small amount of data is discriminated and verified to reduce the false alarm rate and ensure no missed reports. It is a relatively reasonable choice.

[0112] The conventional method for calculating the feature sequence similarity between video data and transformer oil leakage detection model is as follows:

[0113]

[0114] In the formula, the feature vector of the newly collected video data is represented as Seq i , Dic is the normal working dictionary of transformer oil leakage detection model;

[0115] In S5, the fast discrimination algorithm specifically includes the following steps:

[0116] S51. According to the transformer oil leakage detection model, a set of 128 / 1024 feature vectors is constructed as an abnormal feature dictionary, and then regularization processing is performed after calculating the similarity, and the obtained feature parameter vector is evenly distributed according to a self-defined number;

[0117] S52. Calculate two trigger attribute sequences Seq 1 and Seq 2 The Euler distance similarity is

[0118]

[0119] In the formula, Seq 1 and Seq 2 are two trigger attribute sequences in the anomaly feature dictionary, n is the maximum dimension of the vector, which is 128 / 1024 at the limit, p is the valid non-empty attribute dimension in the current sequence, and Attr is the attribute value of the sequence;

[0120] S53, calculate two video stream feature vectors Seq 1 and Seq 2 The cosine distance similarity of

[0121]

[0122] Where, the angle between the two video stream feature vectors Seq1 and Seq2 is γ;

[0123] S54, smoothing is performed based on the time window, and then the Euler distance similarity and the cosine distance similarity are weighted.

[0124]

[0125] In the formula, the feature vector of the newly-flown video acquisition stream is i, j is the preset value, the normal contour dictionary is Dic, the time window is w, and the optimal effect is obtained when the α empirical value is 0.22;

[0126] S55, according to F w (i, Dic) determines whether the newly collected video data is leaking oil.

[0127] Image segmentation method: stickers or paints will have obvious color changes, making small-area oil leakage more obvious than direct oil stains. Use deep image segmentation algorithms to separate the discolored areas from other areas and estimate the area. The algorithm model can use FCN, U-Net, or U-Net-based variations such as LadderNet. By using Convlution and Deconvlution / Resize, downsampling and upsampling are combined; multi-scale feature fusion is achieved by adding features point by point or splicing feature channel dimensions; by judging the category of each pixel point, a pixel-level segmentmap is obtained, thereby achieving accurate image segmentation.

[0128] In S6, the image segmentation method for determining whether there is oil leakage specifically includes the following steps:

[0129] S61. The training of neural network model parameters requires a large number of samples, but usually there is less image data of oil leakage, and even less image data of small areas of early oil leakage. Therefore, in the training process, the video data is first preprocessed including translation, rotation, etc., and random elastic deformation is added and augmented with reference to U-Net.

[0130] S62, build a convolutional network model, such as Figure 5 As shown in the figure, the convolutional network model always has 64 convolution channels, the input data is 3*256*256, which is three-channel image data, and the output data is 1*256*256, which is consistent with the input image resolution. One channel is used to represent the pixel category to distinguish the segmented pixels; the loss function is the cross entropy function:

[0131]

[0132] Where i represents the category, P i represents the probability of the true value, Represents the probability value predicted by the model;

[0133] S63, test the convolutional network model through sliding window, the window size is fixed to 256×256, and the sliding stride is 64

[0134] S64, using two detection methods, with and without grids, to detect oil leakage;

[0135] The grid method changes color to grid lines. Through image segmentation, the grid lines can be distinguished from other parts. When calculating the area, each line is at the extreme point of the coordinate axis and all adjacent points are connected to form the area; without the grid method, image segmentation can distinguish different color blocks and directly calculate the area. Because oil leakage is a dynamic process, the oil leakage area will continue to expand over time. Therefore, through a period of continuous observation, if the area segmented by the image continues to expand and the speed exceeds the threshold, it is considered that oil leakage has occurred. At this time, the alarm push module can be activated to notify relevant personnel to check in time.

[0136] When the transformer oil leakage detection model is used to detect video data, the LSTM discrimination method is used. Anomalies not found in the image segmentation method need to be verified again by the transformer oil leakage detection model. On the other hand, in order to reduce underreporting, auxiliary discrimination is performed on the continuous monitoring video at an appropriate frequency, such as once every 1 / 5 / 10 minutes, which can effectively capture slow leakage and effectively improve the safety of transformer monitoring.

[0137] Choose a mesh oil leakage detection sticker and stick it to the possible location where oil leakage often occurs in the transformer to improve the discrimination and recognition of video acquisition data.

[0138] Three cameras are installed and aimed at three detection areas respectively. Preset positions are set and the angles and focal lengths are adjusted appropriately to obtain the best observation results. Manual labeling methods are used to mark the positions of the detection areas in the camera images. The marking type is a mesh sticker. A frame of the video stream of the area where the test paper is pasted or the paint is applied is sampled at a fixed time interval of 5 / 10 seconds and extracted into an image.

[0139] Data from different periods of time every day for one week are collected as normal data to supplement the historical data retained in the early stage. First, the images are randomly cropped to obtain Patches for training; then these Patches are flipped horizontally, flipped vertically, rotated 90°, 180°, and 270° respectively; based on this, they are randomly rotated in the range of -10° to 10°; random shift vectors are used to achieve smooth shifts on the 3x3 network. The vectors come from the Gaussian distribution with a standard deviation of 10 pixels. The value of each pixel is calculated using bicubic linear interpolation to complete the expansion of the training data set. 80% of the data is used for the training set and 20% of the data is used for the test set. The data obtained in this part is mainly sent to the LSTM model and image segmentation method for modeling, as well as related test verification links.

[0140] Collect as many pictures or videos of oil spill incidents as possible for abnormal sample training. After feature extraction from these images and videos through an improved genetic algorithm, simulate and iterate according to the algorithm to generate more approximate samples, which are marked and reserved for model testing and verification.

[0141] After the transformer oil leakage detection model is trained, it is deployed to the inference server, and the input data is connected to the image of the actual surveillance camera to further optimize and adapt the model.

[0142] The data collected by the camera is backed up by mirroring, randomly disrupting the data, and mixing with the marked abnormal samples generated by the improved genetic algorithm, and sent to the inference server for simulation testing. Through the rapid discrimination method, the initial screening accuracy is about 82%. Then the marked suspected oil leakage images are sent to the image segmentation module and the transformer oil leakage detection model for further detection.

[0143] The weights and bias parameters in the network of the image segmentation and transformer oil leakage detection model are initialized using the Xavier method; the batch size of the model training is set to 64; the Adam algorithm is used to optimize the objective function. The entire training iteration is 2000 epochs, and the learning rate of the first 100 epochs is set to 0.0005, and the learning rate of the next 100 epochs is set to 0.0001.

[0144] With a sampling period of 10 minutes, the simulated monitoring data is also mixed with the real oil leakage situation marked by the improved genetic algorithm and sent to the transformer oil leakage detection model.

[0145] The test was completed, and 1,000 pre-trained model samples were set. The accuracy of the evaluation results on the test data obtained in the actual field environment reached 96.6%, the actual false alarm rate was 3.3%, and the missed alarm rate was 0.1%. The missed alarm pictures were verified to be similar to the rain effect and difficult to distinguish with the naked eye. This method has achieved the same effect as manual monitoring.

[0146] Embodiment 2:

[0147] like Figure 2 As shown, a transformer oil leakage detection device comprises:

[0148] Several cameras, transformers, several grid stickers, edge AI inference servers, and AI training servers;

[0149] Several cameras are arranged around the transformer, and several grid stickers are set around the transformer. The camera signal output end is connected to the edge AI inference server signal input port through the local area network in the substation. The edge AI inference server is connected to the AI ​​training server through an encryption device.

[0150] Several cameras are used to collect video data around the transformer, and the collected video data is uploaded to the AI ​​training server through the edge AI inference server;

[0151] The AI ​​training server has several modules, including:

[0152] The transformer oil leakage detection model training module is used to divide the video data into normal samples and abnormal samples; perform LSTM model training on normal samples to obtain the normal model profile; perform improved genetic algorithm processing on abnormal samples to obtain the abnormal model profile; merge the normal model profile and the abnormal model profile to obtain the transformer oil leakage detection model;

[0153] The model publishing module is used to publish the transformer oil leakage detection model established by the AI ​​training server to the edge AI inference server;

[0154] There are several modules on the edge AI inference server, including:

[0155] The video data preprocessing module is used to deframe the video data collected by the camera and convert it into images;

[0156] A fast discrimination module is used to establish a fast discrimination algorithm based on a transformer oil leakage detection model, and to determine whether the video data is abnormal based on the fast discrimination algorithm;

[0157] An image segmentation module is used to process the video data judged as abnormal by the rapid discrimination module using an image segmentation method to determine whether the transformer is leaking oil;

[0158] A re-inspection module is used to perform a secondary judgment on the video data that the image segmentation module determines as no oil leakage through the transformer oil leakage detection model to confirm whether there is oil leakage;

[0159] Alarm module: used to sound an alarm when the image segmentation module and re-inspection module determine that there is an oil leak.

[0160] Example 3

[0161] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a transformer oil leakage detection method in Example 1 when executing the computer program.

[0162] Example 4

[0163] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the transformer oil leakage detection method in Example 1 is implemented.

[0164] It is known from common technical knowledge that the present invention can be implemented by other embodiments that do not deviate from its spirit or essential features. Therefore, the above disclosed embodiments are only illustrative in all respects and are not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are included in the present invention.

[0165] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.

[0166] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A transformer oil leakage detection method, characterized in that: The following steps are involved: S1, collect video data around the transformer, and upload the collected video data to the AI ​​training server through the edge AI inference server; S2. In the AI ​​training server, the video data is divided into normal samples and abnormal samples; Train the LSTM model on normal samples to obtain the normal model profile; The abnormal samples are processed by improved genetic algorithm to obtain the abnormal model profile; The normal model contour and the abnormal model contour are merged to obtain the transformer oil leakage detection model; S3. Publish the transformer oil leakage detection model established by the AI ​​training server to the edge AI inference server; S4, preprocessing the collected video data; S5. Establish a fast discrimination algorithm according to the transformer oil leakage detection model, and determine whether the pre-processed video data is abnormal according to the fast discrimination algorithm; If the video data is judged to be non-abnormal, the data preprocessing is returned; If the video data is judged to be abnormal, the video data is processed by image segmentation method; S6. Process the video data by image segmentation method to determine whether oil leakage occurs; If oil leakage is determined after image segmentation processing, an alarm is issued; If it is determined that there is no oil leakage, the video data is tested through the transformer oil leakage detection model; S7, when the video data is detected by the transformer oil leakage detection model, an alarm is issued if the detection result is abnormal; If the test result is not abnormal, the judgment ends; In S2, abnormal samples are obtained according to the following steps: S21, using a feature selection algorithm based on information gain on the video data to select a feature subset, i.e., an oil leakage sample set D; S22. Calculate and select the feature subset, that is, the information entropy of the oil leakage sample set D. The proportion of the k-th class of samples in the oil leakage sample set D is p k , k=1,2,…,|y|, then the information entropy ENT() of the oil leakage sample set D is defined as follows: ; S23. Calculate the information gain Gain(D, a) of the oil leakage sample set D. Assume that the discrete image feature attribute a has V possible values ​​{a1, a2, ... av}. Use a to divide the oil leakage sample set D. Then the oil leakage sample set D will generate V branch nodes, where the Vth branch node contains all samples in D with the value av on the attribute a. ,calculate Information entropy, giving weights to branch nodes | | / | D |, calculate the information gain Gain (D, a) obtained by dividing the oil leakage sample set D with attribute a: ; S24. Use information gain to select features, and after a preset number of iterations, obtain oil leakage simulation data that can support training samples.

2. A transformer oil leakage detection method according to claim 1, characterized in that: The preprocessing described in S4 is to deframe the video data and convert it into image data.

3. A transformer oil leakage detection method according to claim 1, characterized in that: The S5 specifically includes the following steps: S51, constructing a set of feature vectors as an abnormal feature dictionary according to the transformer oil leakage detection model; S52, calculating the Euler distance similarity between two trigger attribute sequences Seq1 and Seq2, Where Seq1 and Seq2 are two trigger attribute sequences in the abnormal feature dictionary, n is the maximum dimension of the vector, p is the valid non-empty attribute dimension in the current sequence, and Attr is the attribute value of the sequence; S53, calculate the cosine distance similarity between Seq1 and Seq2, In the formula, the angle between Seq1 and Seq2 is γ; S54, calculating the feature sequence of the newly collected video data after smoothing ; ; In the formula, the feature vectors of the newly-inflow video acquisition stream are i and j; α is an empirical value; the normal contour dictionary is Dic, and the time window is w; S55, according to Determine whether the newly collected video data is oil leaking.

4. A transformer oil leakage detection method according to claim 1, characterized in that: S6 specifically includes the following steps: S61, performing augmentation preprocessing on the collected video data; S62, establish a convolutional network model; S63, testing the convolutional network model through a sliding window, and using the convolutional network model to detect whether there is an oil leak after the test is correct; S64. Use the grid detection method or the non-grid detection method to detect whether the transformer is leaking oil.

5. A transformer oil leakage detection method according to claim 4, characterized in that: The augmentation preprocessing includes translation, rotation, and random elastic deformation added by U-Net.

6. A transformer oil leakage detection method according to claim 1, characterized in that: When S7 detects the video data through the transformer oil leakage detection model, the LSTM discrimination method is adopted, and the anomalies not found in the image segmentation method need to be verified by the transformer oil leakage detection model again; Frame sampling is performed at a preset frequency to assist in judging the continuous surveillance video.

7. A transformer oil leakage detection device, used to implement the transformer oil leakage detection method according to claim 1, characterized in that: include: Several cameras, transformers, several grid stickers, edge AI inference servers, and AI training servers; Several cameras are arranged around the transformer, and several grid stickers are set around the transformer. The camera signal output end is connected to the edge AI inference server signal input port through the local area network in the substation. The edge AI inference server is connected to the AI ​​training server through an encryption device. Several cameras are used to collect video data around the transformer, and the collected video data is uploaded to the AI ​​training server through the edge AI inference server; The AI ​​training server has several modules, including: The transformer oil leakage detection model training module is used to divide the video data into normal samples and abnormal samples; perform LSTM model training on normal samples to obtain the normal model profile; perform improved genetic algorithm processing on abnormal samples to obtain the abnormal model profile; merge the normal model profile and the abnormal model profile to obtain the transformer oil leakage detection model; The model publishing module is used to publish the transformer oil leakage detection model established by the AI ​​training server to the edge AI inference server; There are several modules on the edge AI inference server, including: The video data preprocessing module is used to deframe the video data collected by the camera and convert it into images; A fast discrimination module is used to establish a fast discrimination algorithm based on a transformer oil leakage detection model, and to determine whether the video data is abnormal based on the fast discrimination algorithm; An image segmentation module is used to process the video data judged as abnormal by the rapid discrimination module using an image segmentation method to determine whether the transformer is leaking oil; A re-inspection module is used to perform a secondary judgment on the video data that the image segmentation module determines as no oil leakage through the transformer oil leakage detection model to confirm whether there is oil leakage; Alarm module: used to sound an alarm when the image segmentation module and re-inspection module determine that there is an oil leak.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the transformer oil leakage detection method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a transformer oil leakage detection method as described in any one of claims 1 to 6 is implemented.