Search

CN-121997146-A - Power defect detection method, device, apparatus, medium and program product

CN121997146ACN 121997146 ACN121997146 ACN 121997146ACN-121997146-A

Abstract

The application provides a power defect detection method, a device, equipment, a medium and a program product. In the method, an acquired power image to be detected and a preset defect detection prompt text are input into a fusion feature extraction model to obtain a fusion feature matrix. And performing multi-scale feature extraction processing on the fusion feature matrix through the target classification model to obtain a plurality of first feature matrices, performing fusion processing on all the first feature matrices to obtain a second feature matrix, performing discrimination feature extraction processing on the second feature matrix to obtain a third feature matrix, and performing classification processing on the third feature matrix to obtain the occurrence probability of each electric defect. According to the scheme, the fusion characteristics obtained by the fusion characteristic extraction model are processed through the target classification model, so that the matching degree of the characteristics and the electric power defects is improved, and the accuracy of the occurrence probability of the electric power defects is improved.

Inventors

  • LI RONGHUI
  • GAO YI
  • ZHOU JINDUO
  • QIU QIUHUI
  • ZHANG QIANG
  • Liu dujiang
  • XU JIAFENG
  • CHEN SHICHANG
  • ZHANG YAJIE
  • YE XIU
  • LI SHUNYAO
  • LIU XIN

Assignees

  • 广东电网有限责任公司东莞供电局

Dates

Publication Date
20260508
Application Date
20260209

Claims (11)

  1. 1. A method of detecting a power defect, comprising: Inputting the acquired power image to be detected and a preset defect detection prompt text into a fusion feature extraction model to obtain a fusion feature matrix, wherein the fusion feature extraction model is a visual language model which is trained in advance according to the image and the text to obtain the feature matrix; Performing multi-scale feature extraction processing on the fusion feature matrix through a target classification model to obtain a plurality of first feature matrices; carrying out fusion processing on all the first feature matrixes through the target classification model to obtain a second feature matrix; Performing discrimination feature extraction processing on the second feature matrix through the target classification model to obtain a third feature matrix; And classifying the third feature matrix through the target classification model to obtain the occurrence probability of each electric power defect, wherein the target classification model is a pre-trained deep neural network model for obtaining the occurrence probability of each electric power defect according to the fusion feature matrix.
  2. 2. The method of claim 1, wherein the performing, by the target classification model, the multi-scale feature extraction process on the fused feature matrix to obtain a plurality of first feature matrices includes: performing dimension reduction on the fusion feature matrix through a first linear projection layer in the target classification model to obtain a first feature matrix; carrying out average pooling and dimension reduction on the fusion feature matrix through an average pooling layer and a second linear projection layer in the target classification model to obtain a first feature matrix; And carrying out maximum pooling and dimension reduction on the fusion feature matrix through a maximum pooling layer and a third linear projection layer in the target classification model to obtain a first feature matrix.
  3. 3. The method according to claim 1, wherein the performing, by the target classification model, the discriminant feature extraction process on the second feature matrix to obtain a third feature matrix includes: Performing layer normalization and numerical clipping processing on the second feature matrix through a first normalization layer in the target classification model to obtain a fourth feature matrix; Performing dimension reduction on the fourth feature matrix through a fourth linear projection layer in the target classification model to obtain a fifth feature matrix; performing layer normalization processing on the fifth feature matrix through a second normalization layer in the target classification model to obtain a sixth feature matrix; and performing gradient smoothing on the sixth feature matrix through an activation function layer in the target classification model to obtain the third feature matrix.
  4. 4. The method according to claim 1, wherein the classifying the third feature matrix by the target classification model to obtain a defect occurrence probability of each power defect comprises: Classifying the third feature matrix through a classifier in the target classification model to obtain the score of each electric power defect; And carrying out numerical clipping and normalization processing on the score of each electric power defect through a third normalization layer in the target classification model to obtain the defect occurrence probability of each electric power defect.
  5. 5. The method according to any one of claims 1 to 4, wherein before classifying the third feature matrix by the target classification model to obtain occurrence probability of each power defect, the method further comprises: Performing self-attention enhancement processing on the third feature matrix through a self-attention layer in the target classification model to obtain a seventh feature matrix; The classifying the third feature matrix through the target classification model to obtain occurrence probability of each power defect comprises the following steps: And classifying the seventh feature matrix through the target classification model to obtain the occurrence probability of each power defect.
  6. 6. The method according to claim 5, wherein before the multi-scale feature extraction processing is performed on the fused feature matrix by the target classification model to obtain a plurality of first feature matrices, the method further comprises: performing column vector extraction processing on the fusion feature matrix through a dimension reduction layer in the target classification model to obtain an eighth feature matrix; the multi-scale feature extraction processing is carried out on the fusion feature matrix through a target classification model to obtain a plurality of first feature matrices, and the method comprises the following steps: and performing multi-scale feature extraction processing on the eighth feature matrix through the target classification model to obtain a plurality of first feature matrices.
  7. 7. The method according to claim 6, wherein before performing column vector extraction processing on the fused feature matrix by the dimension reduction layer in the target classification model to obtain an eighth feature matrix, the method further comprises: performing outlier replacement processing on the fusion feature matrix through an outlier processing layer in the target classification model to obtain a ninth feature matrix; And performing column vector extraction processing on the fusion feature matrix through a dimension reduction layer in the target classification model to obtain an eighth feature matrix, wherein the method comprises the following steps: And extracting column vectors of the ninth feature matrix through a dimension reduction layer in the target classification model to obtain an eighth feature matrix.
  8. 8. An electric power defect detecting apparatus, comprising: the first processing module is used for inputting the acquired power image to be detected and a preset defect detection prompt text into the fusion feature extraction model to obtain a fusion feature matrix, wherein the fusion feature extraction model is a visual language model which is trained in advance according to the image and the text to obtain the feature matrix; A second processing module for: Performing multi-scale feature extraction processing on the fusion feature matrix through a target classification model to obtain a plurality of first feature matrices; carrying out fusion processing on all the first feature matrixes through the target classification model to obtain a second feature matrix; Performing discrimination feature extraction processing on the second feature matrix through the target classification model to obtain a third feature matrix; And classifying the third feature matrix through the target classification model to obtain the occurrence probability of each electric power defect, wherein the target classification model is a pre-trained deep neural network model for obtaining the occurrence probability of each electric power defect according to the fusion feature matrix.
  9. 9. An electronic device, comprising: a processor, a memory, a communication interface; the memory is used for storing executable instructions of the processor; Wherein the processor is configured to perform the power defect detection method of any one of claims 1 to 7 via execution of the executable instructions.
  10. 10. A readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the power defect detection method of any of claims 1 to 7.
  11. 11. A computer program product comprising a computer program for implementing the power defect detection method of any one of claims 1 to 7 when executed by a processor.

Description

Power defect detection method, device, apparatus, medium and program product Technical Field The present application relates to the field of power grid technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for detecting an electric power defect. Background In the power grid, various power defects exist, such as bird nest on the electric wire, fire of the power equipment, oil stain on the power equipment and the like, which affect the stable operation of the power grid, so that the power defect detection is required. In the prior art, for detecting an electric power defect, an image to be detected is generally input into a visual language model to obtain a defect description text, and then a worker determines whether the electric power defect exists according to the defect description text. However, since the features obtained by processing the image by the visual language model include many features irrelevant to the defects, the obtained defect description text is inaccurate, and thus the defect detection is inaccurate. Disclosure of Invention The method, the device, the equipment, the medium and the program product for detecting the electric power defects are used for solving the problem that in the prior art, the defect detection is inaccurate due to the fact that the visual language model is used for detecting the defects. In a first aspect, an embodiment of the present application provides a method for detecting a power defect, including: Inputting the acquired power image to be detected and a preset defect detection prompt text into a fusion feature extraction model to obtain a fusion feature matrix, wherein the fusion feature extraction model is a visual language model which is trained in advance according to the image and the text to obtain the feature matrix; Performing multi-scale feature extraction processing on the fusion feature matrix through a target classification model to obtain a plurality of first feature matrices; carrying out fusion processing on all the first feature matrixes through the target classification model to obtain a second feature matrix; Performing discrimination feature extraction processing on the second feature matrix through the target classification model to obtain a third feature matrix; And classifying the third feature matrix through the target classification model to obtain the occurrence probability of each electric power defect, wherein the target classification model is a pre-trained deep neural network model for obtaining the occurrence probability of each electric power defect according to the fusion feature matrix. In a possible implementation manner, the performing, by using the target classification model, multi-scale feature extraction processing on the fused feature matrix to obtain a plurality of first feature matrices includes: performing dimension reduction on the fusion feature matrix through a first linear projection layer in the target classification model to obtain a first feature matrix; carrying out average pooling and dimension reduction on the fusion feature matrix through an average pooling layer and a second linear projection layer in the target classification model to obtain a first feature matrix; And carrying out maximum pooling and dimension reduction on the fusion feature matrix through a maximum pooling layer and a third linear projection layer in the target classification model to obtain a first feature matrix. In a possible implementation manner, the performing, by using the target classification model, a discriminating feature extraction process on the second feature matrix to obtain a third feature matrix includes: Performing layer normalization and numerical clipping processing on the second feature matrix through a first normalization layer in the target classification model to obtain a fourth feature matrix; Performing dimension reduction on the fourth feature matrix through a fourth linear projection layer in the target classification model to obtain a fifth feature matrix; performing layer normalization processing on the fifth feature matrix through a second normalization layer in the target classification model to obtain a sixth feature matrix; and performing gradient smoothing on the sixth feature matrix through an activation function layer in the target classification model to obtain the third feature matrix. In a possible implementation manner, the classifying, by using the target classification model, the third feature matrix to obtain a defect occurrence probability of each power defect includes: Classifying the third feature matrix through a classifier in the target classification model to obtain the score of each electric power defect; And carrying out numerical clipping and normalization processing on the score of each electric power defect through a third normalization layer in the target classification model to obtain the defect occurrence probability of each electric p