A method and device for detecting power grid equipment, electronic equipment and storage medium

By employing unsupervised online video equipment anomaly detection technology, and utilizing the Transformer model to encode and reconstruct the feature sequences of online video data of power grid equipment, the problems of high labor costs and inaccurate detection in power grid equipment status detection are solved. This enables rapid and accurate equipment status identification and reduces the risk of production accidents.

CN117132917BActive Publication Date: 2026-05-29GLOBAL ENERGY INTERCONNECTION RES INST CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GLOBAL ENERGY INTERCONNECTION RES INST CO LTD
Filing Date
2022-05-16
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies for power grid equipment condition monitoring suffer from high labor costs and inaccurate detection, making it difficult to effectively identify equipment anomalies and increasing the risk of safety hazards and production accidents.

Method used

An unsupervised online video device anomaly detection technology based on reconstruction is adopted. By acquiring online video data of power grid equipment, a target feature sequence is constructed, and a pre-trained detection model is used for encoding and reconstruction. The reconstruction error is calculated to determine the device status. Combined with the Transformer model, long-term information is extracted to achieve fast and accurate device status identification.

Benefits of technology

It improves the accuracy and real-time performance of power grid equipment anomaly detection, reduces the incidence of production accidents caused by equipment malfunctions, reduces labor costs, and improves the reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117132917B_ABST
    Figure CN117132917B_ABST
Patent Text Reader

Abstract

The application discloses a kind of detection method, device, electronic equipment and storage medium of power grid equipment.It includes: obtaining the real-time online video data of target power grid equipment to be detected;Utilize the visual information of each video frame in online video data to construct the target feature sequence corresponding to online video data;The target feature sequence is input into the detection model pre-trained, so that the detection model encodes target feature sequence to obtain output result, and reconstructs output result to obtain reconstruction result;Based on reconstruction error and output result, calculate reconstruction error based on the comparison result of preset error, determine the target device state corresponding to target power grid equipment.This application constructs feature sequence by extracting the space feature of each frame.It is guaranteed that long-time information between video frames is fully applied.Meanwhile, avoid the abnormality of power grid equipment to occur in the gap of video discrete sampling.Finally, the reconstruction error calculated using reconstruction result can quickly identify device state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and more particularly to a method, apparatus, electronic device, and storage medium for detecting power grid equipment. Background Technology

[0002] With the development of new power technologies, power grid construction is characterized by increasingly higher voltage levels, longer transmission distances, and larger grids. Consequently, the requirements for the safety and reliability of power grid equipment are also increasing. Due to rapid socio-economic development and the ever-growing load on the power grid, most critical power grid equipment is under heavy load and operates for extended periods. The key components of this equipment are susceptible to problems such as insulation aging and breakdown; any defect in any component can lead to significant safety hazards and production accidents.

[0003] Currently, the most common approach to power grid equipment condition monitoring is to capture equipment status through routine manual inspections or by monitoring equipment data using auxiliary sensors. However, these methods require significant manpower, and the use of sensor devices cannot accurately detect equipment status. Summary of the Invention

[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this application provides a method, apparatus, electronic device and storage medium for detecting power grid equipment.

[0005] According to one aspect of the embodiments of this application, a method for detecting power grid equipment is provided, comprising:

[0006] Acquire real-time online video data of the target power grid equipment to be tested;

[0007] The target feature sequence corresponding to the online video data is constructed using the visual information of each video frame in the online video data;

[0008] The target feature sequence is input into a pre-trained detection model, so that the detection model encodes the target feature sequence to obtain an output result, and the output result is reconstructed to obtain a reconstructed result;

[0009] The reconstruction error is calculated using the reconstruction result and the target feature sequence. Based on the comparison between the reconstruction error and the preset error, the target equipment state corresponding to the target power grid equipment is determined.

[0010] Furthermore, the step of constructing the target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data includes:

[0011] The spatial features corresponding to each video frame are extracted from the online video data, and the spatial features are used to represent the visual information of the video frame;

[0012] The target feature sequence is constructed based on the spatial features corresponding to each video frame.

[0013] Furthermore, the step of inputting the target feature sequence into a pre-trained detection model, so that the detection model encodes the target feature sequence to obtain an output result, and reconstructing the output result to obtain a reconstructed result, includes:

[0014] The target feature sequence is input into the detection model, so that the encoder in the detection model encodes the features in the target feature sequence to obtain an output result. The output result is input into the decoder in the detection model, and the decoder reconstructs the result based on the output result to obtain the reconstructed result.

[0015] Furthermore, the formula for calculating the reconstruction error is as follows:

[0016]

[0017] In the formula, It is the j-th input video frame of the i-th input batch, and N is the number of input video frames. It is the result of the reconstruction, Loss rec It is the reconstruction error, and F is the conjugate index.

[0018] Furthermore, determining the target equipment state corresponding to the target power grid equipment based on the comparison result between the reconstruction error and the preset error includes:

[0019] If the reconstruction error is less than the preset error in the comparison result, the target device is in a normal state.

[0020] If the comparison result shows that the reconstruction error is greater than or equal to the preset error, the target device is in an abnormal state.

[0021] Furthermore, the method also includes:

[0022] If the target device is in an abnormal state, obtain the device information corresponding to the target power grid device;

[0023] The device information is included in the alarm information, and the alarm information is sent.

[0024] Furthermore, the method also includes:

[0025] Acquire video data samples and extract spatial feature samples for each video frame of the video data samples, wherein the spatial feature samples are used to represent the visual information of the video frame.

[0026] Construct feature sequence samples based on the spatial feature samples;

[0027] The feature sequence sample is input into a preset neural network model to be trained, so that the encoder in the preset neural network model encodes the features in the feature sequence sample to obtain an initial output result. The initial output result is input into the decoder in the preset neural network model, and the decoder reconstructs the initial output result to obtain an initial reconstruction result.

[0028] The initial reconstruction error is calculated based on the initial reconstruction result and the initial output result. The network parameters of the preset neural network model are updated using the initial reconstruction error until the reconstruction error of the updated preset neural network model is less than a preset threshold.

[0029] According to another aspect of the embodiments of this application, a detection device for power grid equipment is also provided, comprising:

[0030] The acquisition module is used to acquire real-time online video data of the target power grid equipment to be detected;

[0031] A construction module is used to construct a target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data;

[0032] The processing module is used to input the target feature sequence into a pre-trained detection model, so that the detection model encodes the target feature sequence to obtain an output result, and reconstructs the output result to obtain a reconstructed result;

[0033] The determination module is used to calculate the reconstruction error using the reconstruction result and the target feature sequence, and to determine the target equipment state corresponding to the target power grid equipment based on the comparison result of the reconstruction error and the preset error.

[0034] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium including a stored program that executes the above steps when the program is run.

[0035] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the programs stored in the memory.

[0036] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the above-described method.

[0037] Compared with the prior art, the above-mentioned technical solutions provided in this application have the following advantages: The method provided in this application addresses the pain point of extremely small amount of abnormal data in the online video anomaly detection application of power grid equipment. It adopts a reconstruction-based method and designs an unsupervised online video equipment anomaly detection technology. This solves the problem that the traditional reconstruction-based method lacks a reliable mechanism that causes the model to obtain a large reconstruction error on abnormal data. It also takes into account real-time performance and accuracy, effectively detects power grid equipment anomalies, and reduces the incidence of production accidents caused by equipment anomalies. Attached Figure Description

[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 A flowchart illustrating a method for detecting power grid equipment provided in an embodiment of this application;

[0041] Figure 2 This is a schematic diagram of the structure of the Transformer model provided in the embodiments of this application;

[0042] Figure 3 A flowchart illustrating a method for detecting power grid equipment, as provided in another embodiment of this application;

[0043] Figure 4 A flowchart illustrating a method for detecting power grid equipment, as provided in another embodiment of this application;

[0044] Figure 5 A block diagram of a power grid equipment detection device provided in an embodiment of this application;

[0045] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0047] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another similar entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0048] This application provides a method, apparatus, electronic device, and storage medium for detecting power grid equipment. The method provided by this invention can be applied to any electronic device as needed, such as a server, terminal, or other electronic device. No specific limitation is made here, and for ease of description, it will be referred to as an electronic device below.

[0049] Example 1

[0050] According to one aspect of the embodiments of this application, a method embodiment for detecting power grid equipment is provided. Figure 1 A flowchart of a power grid equipment detection method provided in this application embodiment is shown below. Figure 1 As shown, the method includes:

[0051] Step S11: Obtain real-time online video data of the target power grid equipment to be tested.

[0052] The method provided in this application embodiment is applied to a background processing device. The processing device is communicatively connected to a video device used for real-time acquisition of target power grid equipment. The processing device can acquire real-time online video data of the target power grid equipment by sending an acquisition request to the video device. The processing device can be a smart device such as a mobile phone or computer.

[0053] Step S12: Construct the target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data.

[0054] In this embodiment, all video frames included in the online video data are first extracted, and the visual information of each video frame is extracted. The visual information may include scene features, color features, etc., in the video frame. Then, the visual information is encoded to obtain a feature image, and the spatial features corresponding to each video frame are extracted from the feature image. Finally, the target feature sequence is constructed using the spatial features.

[0055] Step S13: Input the target feature sequence into the pre-trained detection model so that the detection model encodes the target feature sequence to obtain the output result, and reconstructs the output result to obtain the reconstructed result.

[0056] In this embodiment, the target feature sequence is input into the detection model, so that the encoder in the detection model encodes the features in the target feature sequence to obtain an output result. The output result is then input into the decoder in the detection model, and the decoder reconstructs the sequence based on the output result to obtain a reconstructed result. The detection model can be a Transformer model, which includes an encoder and a decoder.

[0057] Step S14: Calculate the reconstruction error using the reconstruction results and the target feature sequence. Based on the comparison between the reconstruction error and the preset error, determine the target equipment status corresponding to the target power grid equipment.

[0058] In this embodiment of the application, the formula for calculating the reconstruction error using the reconstruction result and the target feature sequence is as follows:

[0059]

[0060] In the formula, It is the j-th spatial feature of the i-th input batch in the target feature sequence, and N is the number of video frames in the online video data. It is the result of the reconstruction, Loss rec It is the reconstruction error, and F is the conjugate index.

[0061] In this embodiment of the application, step S14, determining the target device state corresponding to the target power grid device based on the comparison result of the reconstruction error and the preset error, includes: when the comparison result shows that the reconstruction error is less than the preset error, the target device state is normal.

[0062] In this embodiment, if the comparison result shows that the reconstruction error is less than the preset error, it indicates that the reconstruction result matches the spatial features of its corresponding input to the Transformer model, and the target power grid device's corresponding target device state is normal. If the comparison result shows that the reconstruction error is greater than or equal to the preset error, it indicates that the reconstruction result does not match the spatial features of its corresponding input to the Transformer model, and the target power grid device's corresponding target device state is abnormal.

[0063] The method provided in this application extracts spatial features from each frame of online video data and constructs a target feature sequence based on these spatial features. This ensures that long-term information between video frames is fully utilized. Simultaneously, it avoids the occurrence of power grid equipment anomalies during the intervals of discrete video sampling. Furthermore, the target feature sequence is input into a detection model to obtain an output result, which is then reconstructed to obtain a reconstruction result. The reconstruction error is calculated using this reconstruction result, enabling rapid identification of equipment status.

[0064] Example 2

[0065] According to another aspect of the embodiments of this application, a method embodiment for detecting power grid equipment is also provided. The method includes:

[0066] Step S21: Obtain real-time online video data of the target power grid equipment to be tested.

[0067] Step S22: Construct the target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data.

[0068] Step S23: Input the target feature sequence into the pre-trained detection model so that the detection model encodes the target feature sequence to obtain the output result, and reconstructs the output result to obtain the reconstructed result.

[0069] Step S24: Calculate the reconstruction error using the reconstruction results and the target feature sequence. Based on the comparison between the reconstruction error and the preset error, determine the target equipment status corresponding to the target power grid equipment.

[0070] In this embodiment of the application, step S22, constructing the target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data, includes the following steps A1-A2:

[0071] Step A1: Extract the spatial features corresponding to each video frame from the online video data. The spatial features are used to represent the visual information of the video frame.

[0072] In this embodiment of the application, after obtaining online video data, the processing device will obtain the visual information of each video frame from the online video data, encode the visual information to obtain a feature image, and extract the spatial features corresponding to each video frame from the feature image.

[0073] In this embodiment of the application, the process of extracting spatial features from a feature image is as follows: the feature image is input into a feature extraction network so that the feature extraction network extracts the spatial features of the feature image. The feature extraction network includes a first convolutional network, a second convolutional network, a first deep convolutional network, and a second deep convolutional network, wherein the first convolutional network and the second deep convolutional network are connected, and the first deep convolutional network and the second convolutional network are connected.

[0074] Specifically, local and total spatial information are first extracted from each feature image. The local spatial information is input into a first convolutional network to obtain the first convolution result, while the total spatial information is input into a first depthwise convolutional network to obtain the second convolution result. Then, the first convolution result is input into a second depthwise convolutional network to obtain the third convolution result, and the second convolution result is input into a second convolutional network to obtain the fourth convolution result. The spatial features of the feature image are generated based on the third and fourth convolution results.

[0075] Step A2: Construct a target feature sequence based on the spatial features corresponding to each video frame.

[0076] In this embodiment, a target feature sequence corresponding to the online video data is constructed based on the spatial features corresponding to each video frame. It should be noted that this embodiment extracts spatial features from each video frame of the online video data while maintaining real-time performance. This ensures that long-term information between video frames is fully utilized without compromising the continuity of the input video. Furthermore, by processing each video frame of the online video data, it is possible to prevent power grid equipment anomalies from occurring during the intervals of discrete video sampling.

[0077] In this embodiment of the application, the specific implementation of step S23 is as follows: Figure 2 As shown, the target feature sequence is input into the encoder of the Transformer model. The encoder encodes the i-th spatial feature in the target feature sequence, incorporating positional information into the spatial feature during encoding. This yields the i-th output corresponding to the i-th spatial feature, which is then passed to the decoder of the Transformer model. The output represents the device status of the target power grid equipment. The decoder then reconstructs the data using the i-th output from the encoder, obtaining the i-th reconstructed result. Here, i is a positive integer greater than 0, and i belongs to N, where N is the number of video frames contained in the online video data.

[0078] In this embodiment of the application, the reconstruction results corresponding to each spatial feature are finally summarized to obtain the final reconstruction result.

[0079] It should be noted that the embodiments of this application utilize the Transformer model to extract long-term information between video frames. Compared to using an RNN model, this avoids issues such as vanishing gradients, poor parallelism, and the inability to effectively learn long-term information. Furthermore, the use of positional information encoding effectively incorporates the contextual information of long-term sequences. This addresses the problem of the model failing to obtain significant reconstruction errors on anomalous data while maintaining both real-time performance and accuracy.

[0080] Example 3

[0081] According to another aspect of the embodiments of this application, a method embodiment for detecting power grid equipment is provided. Figure 3 A flowchart of a power grid equipment detection method provided in this application embodiment is shown below. Figure 3 As shown, the method may include the following steps:

[0082] Step S31: If the target device is in an abnormal state, obtain the device information corresponding to the target power grid device.

[0083] In this embodiment of the application, when the target device is in an abnormal state, the device information corresponding to the target power grid device can be queried from the server. The device information includes: the location of the target power grid device, and the administrator information corresponding to the target power grid device, etc.

[0084] Step S32: Include the device information in the alarm information and send the alarm information.

[0085] In this embodiment, the location of the target power grid device is extracted from the device information, and the first control device closest to that location is queried. Simultaneously, the administrator information corresponding to the target power grid device is extracted from the device information, and the second control device corresponding to the administrator information is queried. The device information is included in an alarm message, which is then sent to both the first and second control devices.

[0086] The method provided in this application embodiment obtains the device information corresponding to the target power grid device when the target device is in an abnormal state, and sends alarm information in a timely manner to ensure that the power grid device can quickly return to normal operation.

[0087] Example 4

[0088] According to another aspect of the embodiments of this application, a method embodiment for detecting power grid equipment is provided. Figure 4A flowchart of a power grid equipment detection method provided in this application embodiment is shown below. Figure 4 As shown, the method may include the following steps:

[0089] Step S41: Obtain video data samples and extract spatial feature samples for each video frame of the video data samples, wherein the spatial feature samples are used to represent the visual information of the video frames.

[0090] Step S42: Construct feature sequence samples based on spatial feature samples.

[0091] Step S43: Input the feature sequence sample into the preset neural network model to be trained, so that the encoder in the preset neural network model encodes the features in the feature sequence sample to obtain the initial output result. Input the initial output result into the decoder in the preset neural network model, and reconstruct the initial output result based on the initial output result to obtain the initial reconstruction result.

[0092] Step S44: Calculate the initial reconstruction error based on the initial reconstruction result and the initial output result, and update the network parameters of the preset neural network model using the initial reconstruction error until the reconstruction error of the updated preset neural network model is less than the preset threshold.

[0093] In this embodiment of the application, the video data sample is first determined to be V = {f} t} t T=0, and extract spatial feature samples from each video frame of the video data sample. Construct feature sequence samples based on spatial feature samples, and then obtain the annotation information corresponding to the feature sequence samples. The annotation information is used to represent the state category corresponding to each spatial feature sample in the feature sequence samples.

[0094] Then, the feature sequence samples and annotation information are input into the preset neural network model so that the preset neural network model learns the relationship between spatial feature samples and state types. The spatial feature f0 is classified by the preset neural network model, and y0 represents the device state category of spatial feature f0 corresponding to a certain video frame, where y0∈{0,1,2}, 0 represents the background category, 1 represents the normal state, and 2 represents the abnormal state. The preset neural network model is the Transformer model.

[0095] Specifically, the encoder in the preset neural network model encodes the features in the feature sequence sample to obtain an initial output result. The initial output result is then input into the decoder in the preset neural network model. The decoder reconstructs the feature based on the initial output result to obtain an initial reconstruction result. The initial reconstruction error is calculated based on the initial reconstruction result and the initial output result. The network parameters of the preset neural network model are updated using the initial reconstruction error until the reconstruction error of the updated preset neural network model is less than a preset threshold.

[0096] In this embodiment, an unsupervised learning method is employed, using normal device video data for training. After training, the model generates a higher reconstruction error for abnormal inputs than for normal inputs, thus achieving device abnormality identification. This method effectively solves the problem of scarce abnormal samples.

[0097] Figure 5 This is a block diagram of a power grid equipment detection device provided in an embodiment of this application. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 5 As shown, the device includes:

[0098] The acquisition module 51 is used to acquire real-time online video data of the target power grid equipment to be detected;

[0099] Module 52 is used to construct the target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data;

[0100] The processing module 53 is used to input the target feature sequence into the pre-trained detection model so that the detection model encodes the target feature sequence to obtain the output result, and reconstructs the output result to obtain the reconstructed result;

[0101] The determination module 54 is used to calculate the reconstruction error using the reconstruction result and the target feature sequence, and to determine the target equipment status corresponding to the target power grid equipment based on the comparison result of the reconstruction error and the preset error.

[0102] In this embodiment of the application, the construction module 52 is used to extract the spatial features corresponding to each video frame from the online video data. The spatial features are used to represent the visual information of the video frame. The target feature sequence is constructed based on the spatial features corresponding to each video frame.

[0103] In this embodiment of the application, the processing module 53 is used to input the target feature sequence into the detection model so that the encoder in the detection model encodes the features in the target feature sequence to obtain the output result, and inputs the output result into the decoder in the detection model. The decoder reconstructs the result based on the output result to obtain the reconstruction result.

[0104] In this embodiment, the formula for calculating the reconstruction error is:

[0105]

[0106] In the formula, It is the j-th input video frame of the i-th input batch, and N is the number of input video frames. It is the result of the reconstruction, Loss rec It is a reconstruction error.

[0107] In this embodiment of the application, the determining module 54 is used to determine the target device state as abnormal when the comparison result shows that the reconstruction error is less than the preset error, and the target device state as normal when the comparison result shows that the reconstruction error is greater than or equal to the preset error.

[0108] In this embodiment of the application, the detection device further includes: an alarm module, used to obtain the device information corresponding to the target power grid device when the target device is in an abnormal state; to carry the device information in the alarm information and send the alarm information.

[0109] In this embodiment, the detection device further includes: a training module, configured to acquire video data samples and extract spatial feature samples of each video frame of the video data samples, wherein the spatial feature samples are used to represent the visual information of the video frames; construct feature sequence samples based on the spatial feature samples; input the feature sequence samples into a preset neural network model to be trained, so that the encoder in the preset neural network model encodes the features in the feature sequence samples to obtain an initial output result; input the initial output result into the decoder in the preset neural network model, and reconstruct the model based on the initial output result to obtain an initial reconstruction result; calculate the initial reconstruction error based on the initial reconstruction result and the initial output result; update the network parameters of the preset neural network model using the initial reconstruction error until the reconstruction error of the updated preset neural network model is less than a preset threshold.

[0110] This application also provides an electronic device, such as... Figure 6 As shown, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.

[0111] Memory 1503 is used to store computer programs;

[0112] When the processor 1501 executes the computer program stored in the memory 1503, it implements the steps of the above embodiments.

[0113] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0114] The communication interface is used for communication between the aforementioned terminal and other devices.

[0115] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0116] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0117] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform a detection method for a power grid device as described in any of the above embodiments.

[0118] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute a detection method for a power grid device as described in any of the above embodiments.

[0119] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state drive).

[0120] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

[0121] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for testing power grid equipment, characterized in that, include: Acquire real-time online video data of the target power grid equipment to be tested; The target feature sequence corresponding to the online video data is constructed using the visual information of each video frame in the online video data; The target feature sequence is input into a pre-trained detection model, so that the detection model encodes the target feature sequence to obtain an output result, and the output result is reconstructed to obtain a reconstructed result; The reconstruction error is calculated using the reconstruction result and the target feature sequence. Based on the comparison between the reconstruction error and the preset error, the target equipment state corresponding to the target power grid equipment is determined. The step of constructing a target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data includes: extracting spatial features corresponding to each video frame from the online video data, wherein the spatial features are used to represent the visual information of the video frame; and constructing the target feature sequence based on the spatial features corresponding to each video frame. The step of extracting spatial features corresponding to each video frame from the online video data includes: obtaining visual information of each video frame from the online video data, encoding the visual information to obtain a feature image; and inputting the feature image into a feature extraction network so that the feature extraction network extracts the spatial features of the feature image. The feature extraction network includes a first convolutional network, a second convolutional network, a first deep convolutional network, and a second deep convolutional network, wherein the first convolutional network and the second deep convolutional network are connected, and the first deep convolutional network and the second convolutional network are connected. The step of inputting the feature image into a feature extraction network to enable the feature extraction network to extract the spatial features of the feature image includes: extracting local spatial information and total spatial information from each feature image; inputting the local spatial information into a first convolutional network to obtain a first convolution result; simultaneously inputting the total spatial information into a first depthwise convolutional network to obtain a second convolution result; inputting the first convolution result into a second depthwise convolutional network to obtain a third convolution result; simultaneously inputting the second convolution result into a second convolutional network to obtain a fourth convolution result; and generating the spatial features of the feature image based on the third convolution result and the fourth convolution result.

2. The method according to claim 1, characterized in that, The step of inputting the target feature sequence into a pre-trained detection model, so that the detection model encodes the target feature sequence to obtain an output result, and reconstructing the output result to obtain a reconstructed result, includes: The target feature sequence is input into the detection model, so that the encoder in the detection model encodes the features in the target feature sequence to obtain an output result. The output result is input into the decoder in the detection model, and the decoder reconstructs the result based on the output result to obtain the reconstructed result.

3. The method according to claim 1, characterized in that, The formula for calculating the reconstruction error is: In the formula, It is the j-th input video frame of the i-th input batch, and N is the number of input video frames. It is the result of reconstruction. It is the reconstruction error, and F is the conjugate index.

4. The method according to claim 1, characterized in that, The step of determining the target equipment state corresponding to the target power grid equipment based on the comparison result between the reconstruction error and the preset error includes: If the reconstruction error is less than the preset error in the comparison result, the target device is in a normal state. If the comparison result shows that the reconstruction error is greater than or equal to the preset error, the target device is in an abnormal state.

5. The method according to claim 4, characterized in that, The method further includes: If the target device is in an abnormal state, obtain the device information corresponding to the target power grid device; The device information is included in the alarm information, and the alarm information is sent.

6. The method according to claim 1, characterized in that, The method further includes: Acquire video data samples and extract spatial feature samples for each video frame of the video data samples, wherein the spatial feature samples are used to represent the visual information of the video frames; Construct feature sequence samples based on the spatial feature samples; The feature sequence sample is input into a preset neural network model to be trained, so that the encoder in the preset neural network model encodes the features in the feature sequence sample to obtain an initial output result. The initial output result is input into the decoder in the preset neural network model, and the decoder reconstructs the initial output result to obtain an initial reconstruction result. The initial reconstruction error is calculated based on the initial reconstruction result and the initial output result. The network parameters of the preset neural network model are updated using the initial reconstruction error until the reconstruction error of the updated preset neural network model is less than a preset threshold.

7. A detection device for power grid equipment, characterized in that, include: The acquisition module is used to acquire real-time online video data of the target power grid equipment to be detected; A construction module is used to construct a target feature sequence corresponding to the online video data using the visual information of each video frame in the online video data; The processing module is used to input the target feature sequence into a pre-trained detection model, so that the detection model encodes the target feature sequence to obtain an output result, and reconstructs the output result to obtain a reconstructed result; The determination module is used to calculate the reconstruction error using the reconstruction result and the target feature sequence, and to determine the target equipment state corresponding to the target power grid equipment based on the comparison result of the reconstruction error and the preset error. The construction module is specifically used to extract spatial features corresponding to each video frame from the online video data, wherein the spatial features are used to represent the visual information of the video frame; and to construct the target feature sequence based on the spatial features corresponding to each video frame. The step of extracting spatial features corresponding to each video frame from the online video data includes: obtaining visual information of each video frame from the online video data, encoding the visual information to obtain a feature image; and inputting the feature image into a feature extraction network so that the feature extraction network extracts the spatial features of the feature image. The feature extraction network includes a first convolutional network, a second convolutional network, a first deep convolutional network, and a second deep convolutional network, wherein the first convolutional network and the second deep convolutional network are connected, and the first deep convolutional network and the second convolutional network are connected. The step of inputting the feature image into a feature extraction network to enable the feature extraction network to extract the spatial features of the feature image includes: extracting local spatial information and total spatial information from each feature image; inputting the local spatial information into a first convolutional network to obtain a first convolution result; simultaneously inputting the total spatial information into a first depthwise convolutional network to obtain a second convolution result; inputting the first convolution result into a second depthwise convolutional network to obtain a third convolution result; simultaneously inputting the second convolution result into a second convolutional network to obtain a fourth convolution result; and generating the spatial features of the feature image based on the third convolution result and the fourth convolution result.

8. A storage medium, characterized in that, The storage medium includes a stored program, wherein the program, when executed, performs the method steps of any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor for executing the method steps of any one of claims 1 to 6 by running a program stored in memory.