Relay protection device detection method and system based on spatiotemporal attention mechanism CNN
By automatically detecting relay protection devices using a CNN network model based on the spatiotemporal attention mechanism, the tedious problems of annual and scheduled inspections of relay protection in smart substations are solved, efficient and accurate automatic detection is achieved, and computing resource costs are reduced.
Patent Information
- Application Number
- CN202211556746.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-12-06
AI Technical Summary
In the existing technology, the annual inspection and regular inspection of relay protection in smart substations mainly rely on manual testing, which has the problems of cumbersome operation, prone to errors, and time-consuming, which brings burdens to maintenance personnel and is inconvenient for outdoor work.
A CNN network model based on the spatiotemporal attention mechanism is adopted to convert the Wi-Fi signal from a one-dimensional matrix to a two-dimensional matrix through a stream-image conversion structure. The convolution layer, the spatiotemporal attention mechanism network layer, the activation layer and the Softmax layer are constructed to extract features and perform classification and recognition to achieve automatic detection.
It reduces manual intervention, improves detection accuracy and efficiency, reduces computing resource costs, simplifies the detection process, and reduces the burden on maintenance personnel.
Smart Images

Figure CN116363474B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric power and energy, and specifically relates to a relay protection device detection method and system based on a spatiotemporal attention mechanism CNN (Convolutional Neural Network). Background Art
[0002] Currently, China's power grid construction is rapidly developing, and the technical level and complexity of grid operation are increasing. As a key component of the smart grid, smart substations are playing an increasingly important role in supporting the optimization of grid management models. Annual inspection and regular maintenance of relay protection in smart substations are primarily performed manually. During testing, the optical fiber connection between the tester and protection device and the operating computer requires a high test site and also poses problems in the outdoor working environment, which brings inconvenience to maintenance personnel. Furthermore, the test wiring needs to be adjusted and various functional test templates need to be replaced according to different test items. This process is not only cumbersome and prone to errors, but also tests the experience and meticulousness of field personnel. Furthermore, filling out the test results report after the test is time-consuming, placing a heavy burden on frontline maintenance personnel. Therefore, it is increasingly important to develop a smart substation relay protection method that can reduce the workload while ensuring the safe and stable operation of the grid and the reliability of power supply. Summary of the Invention
[0003] In order to address the deficiencies in the prior art, the present invention provides a detection method and system for relay protection devices based on a spatiotemporal attention mechanism CNN, which solves the tedious and inconvenient process of annual and regular inspections of intelligent transformer protection, which need to be mainly completed manually.
[0004] The present invention adopts the following technical solutions.
[0005] The relay protection device detection method based on the spatiotemporal attention mechanism CNN includes the following steps:
[0006] Step 1: Construct a stream-image conversion structure, and use the stream-image conversion structure to convert the acquired WIFI signal from a one-dimensional matrix form into a two-dimensional matrix form;
[0007] Step 2: Construct a CNN network model based on the spatiotemporal attention mechanism. The network model includes: convolution layer, temporal attention mechanism network layer, spatial attention mechanism network layer, activation layer, fully connected layer and Softmax layer. Input the 2D matrix WIFI signal through a layer of convolution to obtain the feature R. The feature R is input into the temporal attention mechanism network layer, the spatial attention mechanism network layer and the activation layer respectively to obtain the temporal feature R. t , spatial feature R s and nonlinear characteristics R l , then Rt , R s and R l are fused by equal weight to obtain the spatio-temporal depth feature R d ;
[0008] Step 3, the obtained spatio-temporal depth feature R d is input into a convolution layer, an activation layer and a fully connected layer for further training to extract features, and a final classification feature R f is obtained, and the classification feature R f is recognized by using Softmax to obtain a final classification result.
[0009] Step 4, according to the classification result in step 3, it is determined whether the working state is normal. If the classification result is 1, it indicates that the relay protection device is still in a normal working state, and if the classification result is 0, it indicates that the relay protection device has a problem.
[0010] Preferably, in step 1, the flow-image conversion structure is a coding-decoding network, and the WIFI signal includes: collecting the state, setting value, event and recording wave of the measured relay protection device.
[0011] Preferably, in step 1, the state information of the measured relay protection device is collected to form a one-dimensional matrix D, and different states are assigned corresponding values to obtain a one-dimensional WIFI signal. The WIFI signal D in the form of a one-dimensional matrix is converted into a WIFI signal M in the form of a two-dimensional matrix by constructing a coding-decoding network.
[0012] D = [d1, d2, d3, …, d n ]
[0013]
[0014] M = ρ(D)
[0015]
[0016] In the formula,
[0017] d n represents the state of the received WIFI signal,
[0018] ρ(.) represents a coding-decoding network operation,
[0019] a represents the input data of the coding-decoding network,
[0020] a' represents the output data of the coding-decoding network.
[0021] Preferably, in step 2, in the time attention mechanism, the convolution size is 1*3, and the correlation between adjacent signals in each row is observed from a one-dimensional perspective. By 1*3 convolution, a time feature R t, the specific process is as follows:
[0022]
[0023] Where,
[0024] R (i,j) Represents the specific row parameters in the two-dimensional matrix, i represents the number of rows, j represents the number of columns, t n represents the time feature training weight, represents the temporal feature training bias, Represents a matrix multiplication operation.
[0025] Preferably, in step 2, in the spatial attention mechanism network, the convolution size is 3*1. By limiting the convolution kernel, the backbone network pays more attention to the periodic transformation and extracts the spatial feature R s ;
[0026]
[0027] Where s n represents the spatial feature training weight, represents the spatial feature training bias, Represents a matrix multiplication operation.
[0028] Preferably, in step 2, R t , R s and R l Perform equal weight fusion to obtain the spatiotemporal depth feature R d , the specific formula is as follows:
[0029] R = CONV(M) = W(M) + B
[0030] R t =T(R)
[0031] R S =S(R)
[0032] R l =ReLU(R)
[0033]
[0034] Where,
[0035] W(.) represents the weight parameter of the network model,
[0036] B represents the learning bias parameter,
[0037] R represents the features after M convolution,
[0038] CON(.) represents the convolution operation,
[0039] T(.) represents a time attention mechanism,
[0040] S(.) represents a space attention mechanism,
[0041] ReLU(.) represents an activation function.
[0042] Preferably, in step 3, the obtained spatio-temporal depth feature R d The input is continued to be trained in a subsequent network composed of three convolutional layers, three ReLU activation layers and a fully connected layer to extract features, and a final classification feature R f is obtained, and the classification feature R f is recognized by using Softmax to obtain the final classification result ANS, which is expressed as follows:
[0043] R f = N(R d )
[0044] ANS = Softmax(R f )
[0045] In the formula,
[0046] N(.) represents a feature extraction operation of a subsequent network,
[0047] Softmax(.) represents a classification operation.
[0048] The relay protection device detection system based on the spatio-temporal attention mechanism CNN comprises a collection and preprocessing module, a modeling module, a classification module and a judgment module, wherein:
[0049] The collection and preprocessing module is used to construct a flow-image conversion structure, and the flow-image conversion structure is used to convert the acquired WIFI signal from a 1-dimensional matrix form into a 2-dimensional matrix form;
[0050] The modeling module is used to construct a CNN network model based on the spatio-temporal attention mechanism, and the network model comprises a convolutional layer, a time attention mechanism network layer, a space attention mechanism network layer, an activation layer, a fully connected layer and a Softmax layer. The input 2-dimensional matrix WIFI signal is subjected to one layer of convolution to obtain a feature R, the feature R is input into the time attention mechanism network layer, the space attention mechanism network layer and the activation layer respectively to obtain a time feature R t , a space feature R s and a nonlinear feature R l respectively, then R t , R s and R l are fused with equal weights to obtain a spatio-temporal depth feature R d ;
[0051] The classification module is used to obtain the spatiotemporal depth feature R d The input convolution layer, activation layer and fully connected layer continue to train to extract features and obtain the final classification feature R f , using Softmax to classify features R f Perform identification to obtain the final classification result;
[0052] The judgment module is used to determine whether the working state is normal according to the classification result. If the classification result is 1, it means that the relay protection device is still in a normal working state. If the classification result is 0, it means that there is a problem with the relay protection device.
[0053] A terminal includes a processor and a storage medium; wherein:
[0054] The storage medium is used to store instructions;
[0055] The processor is used to operate according to the instructions to execute the steps of the relay protection device detection method based on the spatiotemporal attention mechanism CNN.
[0056] A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of a relay protection device detection method based on a spatiotemporal attention mechanism CNN are implemented.
[0057] The beneficial effect of the present invention is that, compared with the prior art,
[0058] 1. The stream-image conversion structure enables the network to better learn deep features, prevent overfitting, and improve model robustness;
[0059] 2. The proposed attention mechanism proves its effectiveness at a low computational resource cost;
[0060] 3. By building a temporal attention mechanism, we can compensate for the one-dimensional spatiotemporal information loss caused by the stream-image conversion structure;
[0061] 4. Construct a spatial attention mechanism to match the 1-dimensional Wi-Fi signal grouping characteristics brought by the stream-image conversion structure, obtain additional feature characteristics, and thus improve performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 This is a flow chart of the detection method for substation relay protection device based on spatiotemporal attention mechanism CNN of the present invention;
[0063] Figure 2 The stream-to-image conversion structure of the present invention;
[0064] Figure 3 It is the CNN network structure based on the spatiotemporal attention mechanism of the present invention;
[0065] Figure 4 This is the structure diagram of the temporal attention mechanism of the present invention;
[0066] Figure 5 It is a structural diagram of the spatial attention mechanism of the present invention. DETAILED DESCRIPTION
[0067] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without making creative efforts are all within the scope of protection of the present invention.
[0068] Example 1.
[0069] Relay protection device detection method based on spatiotemporal attention mechanism CNN, such as Figure 1 As shown, the following steps are included:
[0070] Step 1: Construct a stream-image conversion structure to convert the acquired WIFI signal from a 1-dimensional matrix form to a 2-dimensional matrix form.
[0071] The stream-to-image conversion structure is implemented by building a codec network. First, the station control layer optical fiber is connected to the communication conversion module, converting the signal from the smart transformer into a Wi-Fi signal. This Wi-Fi signal can then be connected to a corresponding smart device, such as a mobile phone or tablet. This Wi-Fi connection collects information such as the status, settings, events, and waveform recordings of the relay protection device under test. This information is a one-dimensional Wi-Fi signal. By building a codec, the one-dimensional matrix Wi-Fi signal w is converted into a two-dimensional matrix Wi-Fi signal W.
[0072] The stream-to-graph conversion structure refers to a deep codec network. Deep codec networks can play different roles depending on their purpose. In this paper, it converts one dimension into two dimensions. However, this module also exists in image tasks to re-encode images. Therefore, we named it the stream-to-graph conversion structure to highlight its role.
[0073] In this embodiment, the 1D data flow is large and cannot be written out in full. In addition, the encoding and decoding results of deep learning are adjusted according to the results of training. Therefore, it is difficult to give an accurate transformation form from 1D to 2D. This is related to the original 1D signal and the final result. Therefore, only a simple example can be written:
[0074] The state information of the relay protection device under test is collected to form a one-dimensional matrix D, and different states are assigned corresponding values to obtain a one-dimensional Wi-Fi signal. The one-dimensional matrix Wi-Fi signal D is converted into a two-dimensional matrix Wi-Fi signal M by constructing a codec.
[0075] D=[d1,d2,d3,…,d n ]
[0076]
[0077] M=ρ(D)
[0078]
[0079] Where,
[0080] d n Indicates the status of receiving WIFI signal.
[0081] ρ(.) represents the encoding and decoding network operation,
[0082] a represents the input data of the codec network, and a′ represents the output data of the codec network.
[0083] Construct a stream-image conversion structure and transform the WIFI signal in the form of a 1D matrix into a WIFI signal in the form of a 2D matrix by building a codec deep network, such as Figure 2 As shown in FIG, by adaptively learning the transformation form through the network, the correlation between information is increased during the 2D transformation and the information loss caused by the transformation from a 1D matrix form to a 2D matrix form may be reduced.
[0084] A 100*100 two-dimensional matrix is obtained through the stream-graph conversion structure.
[0085] Step 2: Construct a CNN network model based on the spatiotemporal attention mechanism. The network model includes: convolution layer, temporal attention mechanism network layer, spatial attention mechanism network layer, activation layer, fully connected layer and Softmax layer. Input the 2D matrix WIFI signal through a layer of convolution to obtain the feature R. The feature R is input into the temporal attention mechanism network layer, the spatial attention mechanism network layer and the activation layer respectively to obtain the temporal feature R. t , spatial feature R s and nonlinear characteristics R l , then R t , R s and R l Perform equal weight fusion to obtain the spatiotemporal depth feature R d .
[0086] In the temporal attention mechanism, such as Figure 4As shown, the convolution size is 1*3. From a 1-dimensional perspective, there is a correlation between adjacent signals in each row. Through the 1*3 convolution, the time feature R is extracted. t , the specific process is as follows:
[0087]
[0088] Where,
[0089] R (i,j) Represents the specific row parameters in the two-dimensional matrix, i represents the number of rows, j represents the number of columns, t n represents the time feature training weight, represents the temporal feature training bias, Represents a matrix multiplication operation.
[0090] In the spatial attention mechanism network, such as Figure 5 As shown, the convolution size is 3*1. By limiting the convolution kernel, the backbone network pays more attention to periodic transformations and extracts spatial features R s ;
[0091]
[0092] Where s n represents the spatial feature training weight, represents the spatial feature training bias, Represents a matrix multiplication operation.
[0093] The two-dimensional matrix we obtain is in the form of 100*100. After the first layer of convolution, the feature map obtained is 49*49*10 (the number of convolution kernels in each layer of the backbone network is 10). The 49*49*10 feature map is fed into the temporal attention mechanism, and the output feature map after the temporal attention mechanism is 46*49*10. At this point, there will be corresponding correlations between each row of the feature map.
[0094] R t , R s and R l Perform equal weight fusion to obtain the spatiotemporal depth feature R d , the specific formula is as follows:
[0095] R=CONV(M)=W(M)+B
[0096] R t =T(R)
[0097] R S =S(R)
[0098] R l =ReLU(R)
[0099]
[0100] Where,
[0101] W(.) represents the weight parameter of the network model,
[0102] B represents the learning bias parameter,
[0103] R represents the features after M convolution,
[0104] CON(.) represents the convolution operation,
[0105] T(.) represents the temporal attention mechanism,
[0106] S(.) represents the spatial attention mechanism,
[0107] ReLU(.) represents the activation function.
[0108] The specific CNN structure is as follows Figure 3 As shown in the figure, it is implemented by a 4-layer network. Each layer consists of a convolution followed by a ReLU activation. The reason for not using pooling is that compared with the image tasks commonly used by CNN, the flow task contains less information. If pooling is used, the amount of information will be reduced, resulting in overfitting and the inability to obtain an effective model.
[0109] The CNN training process involves fixing the convolution parameters. Continuous training optimizes the convolution and fully connected parameters, and then uses Softmax for classification, continuously optimizing based on the classification structure. Once the model is trained, the parameters of each convolution are no longer fixed. The entire network can now be viewed as a feature extractor, with the Softmax classifier serving as the classifier. The term "CNN downsampling feature" stems from the fact that the entire CNN process can be viewed as a downsampling process.
[0110] Through the stream-to-image conversion structure, abnormal Wi-Fi signals are transformed into noise in a two-dimensional matrix, transforming the original anomaly detection problem into an image noise detection problem. However, deeper networks are more likely to extract semantic information from images, while the two-dimensional matrix representation of the stream-to-image conversion structure lacks any semantic information. Therefore, building a shallower network is more effective for this problem. Furthermore, given the divergent nature of noise in abnormal Wi-Fi signals, a convolutional neural network is required to downsample them and extract the corresponding downsampled features.
[0111] Step 3: The obtained spatiotemporal depth feature R dThe input convolution layer, ReLU activation layer and fully connected layer continue to train to extract features and obtain the final classification feature R f , using Softmax to classify features R f Perform identification to obtain the final classification result;
[0112] R f =N(R d )
[0113] ANS=Softmax(R f )
[0114] Where,
[0115] N(.) represents the feature extraction operation of the subsequent network,
[0116] Softmax(.) represents a classification operation.
[0117] Step 4: Determine whether it is necessary based on the classification result in step 3. If the classification result is 1, it means that the relay protection device is still in normal working condition. If the classification result is 0, it means that there is a problem with the relay protection device.
[0118] Example 2.
[0119] The CNN relay protection device detection system based on the spatiotemporal attention mechanism includes: an acquisition and preprocessing module, a modeling module, a classification module, and a judgment module, among which:
[0120] The acquisition and preprocessing module is used to construct a stream-image conversion structure, which converts the acquired WIFI signal from a one-dimensional matrix form to a two-dimensional matrix form;
[0121] The modeling module is used to build a CNN network model based on the spatiotemporal attention mechanism. The network model includes: convolution layer, temporal attention mechanism network layer, spatial attention mechanism network layer, activation layer, fully connected layer and Softmax layer. The input 2D matrix WIFI signal passes through a layer of convolution to obtain the feature R. The feature R is input into the temporal attention mechanism network layer, the spatial attention mechanism network layer and the activation layer respectively to obtain the temporal feature R. t , spatial feature R s and nonlinear characteristics R l , then R t , R s and R l Perform equal weight fusion to obtain the spatiotemporal depth feature R d ;
[0122] The classification module is used to obtain the spatiotemporal depth feature R dThe input convolutional layer, the activation layer and the full connection layer are continuously trained to extract features, and a final classification feature R is obtained f The classification feature R is recognized by using Softmax to obtain a final classification result. f
[0123] The judgment module is used for judging whether the working state is normal according to the classification result.
[0124] Embodiment 3.
[0125] The embodiment 3 of the present application provides a computer readable storage medium.
[0126] A computer readable storage medium, which stores a program, the program is executed by a processor to realize the steps in the relay protection device detection method based on the spatio-temporal attention mechanism CNN.
[0127] The detailed steps are the same as the relay protection device detection method based on the spatio-temporal attention mechanism CNN provided in the embodiment 1, and will not be repeated here.
[0128] Embodiment 4.
[0129] The embodiment 4 of the present application provides an electronic device.
[0130] An electronic device, comprising a memory, a processor and a program stored in the memory and executable on the processor, wherein the processor executes the program to realize the steps in the method.
[0131] The detailed steps are the same as the relay protection device detection method based on the spatio-temporal attention mechanism CNN provided in the embodiment 1, and will not be repeated here.
[0132] The present application has the advantages that, compared with the prior art, the present application constructs an intelligent protection mechanism for substation relay protection based on a spatio-temporal attention mechanism CNN structure.
[0133] The present disclosure can be a system, a method, and / or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present disclosure.
[0134] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or punched tape, a
[0135] The computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0136] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0137] 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 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 by the scope of protection of the claims of the present invention.
Claims
1. A relay protection device detection method based on spatiotemporal attention mechanism CNN, characterized by: The following steps are involved: Step 1: Construct a stream-to-image conversion structure, and use the stream-to-image conversion structure to convert the acquired Wi-Fi signal from a one-dimensional matrix form to a two-dimensional matrix form, wherein the Wi-Fi signal includes the collected status, setting value, event, and recorded information of the relay protection device under test, and the one-dimensional signal is mapped into a two-dimensional matrix with spatial grouping characteristics through a codec network; Step 2: Build a CNN network model based on the spatiotemporal attention mechanism. The network model includes: convolution layer, temporal attention mechanism network layer, spatial attention mechanism network layer, activation layer, fully connected layer and Softmax layer. Input the 2D matrix WIFI signal through a layer of convolution to obtain the feature R. The feature R is input into the temporal attention mechanism network layer, spatial attention mechanism network layer and activation layer respectively, where: In the temporal attention mechanism, the convolution size is 1*3. From a 1-dimensional perspective, we observe the correlation between adjacent signals in each row. Through the 1*3 convolution, we extract the temporal feature R t , the specific process is as follows: Where, R (i,j) Represents the specific row parameters in the two-dimensional matrix, i represents the number of rows, j represents the number of columns, t n represents the time feature training weight, represents the temporal feature training bias, Represents matrix multiplication operation; In the spatial attention mechanism network, the convolution size is 3*1. By limiting the convolution kernel, the backbone network pays more attention to the periodic transformation and extracts the spatial feature R s ; Where s n represents the spatial feature training weight, represents the spatial feature training bias, Represents matrix multiplication operation; Get the time features R t , spatial feature R s and nonlinear characteristics R l , then R t , R s and R l Perform equal weight fusion to obtain the spatiotemporal depth feature R d ; Step 3: The obtained spatiotemporal depth feature R d The input convolution layer, activation layer and fully connected layer continue to train to extract features and obtain the final classification feature R f , using Softmax to classify features R f Perform identification to obtain the final classification result; Step 4: Determine whether the working state is normal based on the classification result in step 3. If the classification result is 1, it indicates that the relay protection device is still in a normal working state. If the classification result is 0, it indicates that there is a problem with the relay protection device.
2. The relay protection device detection method based on the spatiotemporal attention mechanism CNN according to claim 1 is characterized in that: In step 1, the stream-image conversion structure is a codec network, and the WIFI signal includes: collecting the status, setting value, event, and recording of the relay protection device under test.
3. The relay protection device detection method based on the spatiotemporal attention mechanism CNN according to claim 2 is characterized in that: In step 1, the state information of the relay protection device under test is collected to form a one-dimensional matrix D, and different states are assigned corresponding values to obtain a one-dimensional WiFi signal. The WiFi signal D in the form of a one-dimensional matrix is converted into a WiFi signal M in the form of a two-dimensional matrix by constructing a codec; D=[d1,d2,d3,…,d n ] M=ρ(D) Where, d n Indicates the status of receiving WIFI signal. ρ(.) represents the encoding and decoding network operation, a represents the codec network input data, a′ represents the output data of the codec network.
4. The relay protection device detection method based on the spatiotemporal attention mechanism CNN according to claim 1 is characterized in that: In step 2, R t , R s and R l Perform equal weight fusion to obtain the spatiotemporal depth feature R d , the specific formula is as follows: R = CONV(M) = W(M) + B R t =T(R) R s =S(R) R l =ReLU(R) Where, W(.) represents the weight parameter of the network model, B represents the learning bias parameter, R represents the features after M convolution, CON(.) represents the convolution operation, T(.) represents the temporal attention mechanism, S(.) represents the spatial attention mechanism, ReLU(.) represents the activation function.
5. The relay protection device detection method based on the spatiotemporal attention mechanism CNN according to claim 4 is characterized in that: In step 3, the obtained spatiotemporal depth feature R d The input is continued into the subsequent network consisting of three convolutional layers, three ReLU activation layers and a fully connected layer to extract features and obtain the final classification feature R f , using Softmax to classify features R f Identify and obtain the final classification result ANS, the formula is as follows: R f =N(R d ) ANS=Softmax(R f ) Where, N(.) represents the feature extraction operation of the subsequent network, Softmax(.) represents a classification operation.
6. A relay protection device detection system based on a spatiotemporal attention mechanism CNN using the method of any one of claims 1 to 5, comprising: The acquisition and preprocessing module, modeling module, classification module, and judgment module are characterized by: The acquisition and preprocessing module is used to construct a stream-image conversion structure, which converts the acquired WIFI signal from a one-dimensional matrix form to a two-dimensional matrix form; The modeling module is used to build a CNN network model based on the spatiotemporal attention mechanism. The network model includes: convolution layer, temporal attention mechanism network layer, spatial attention mechanism network layer, activation layer, fully connected layer and Softmax layer. The input 2D matrix WIFI signal passes through a layer of convolution to obtain the feature R. The feature R is input into the temporal attention mechanism network layer, the spatial attention mechanism network layer and the activation layer respectively to obtain the temporal feature R. t , spatial feature R s and nonlinear characteristics R l , then R t , R s and R l Perform equal weight fusion to obtain the spatiotemporal depth feature R d ; The classification module is used to obtain the spatiotemporal depth feature R d The input convolution layer, activation layer and fully connected layer continue to train to extract features and obtain the final classification feature R f , using Softmax to classify features R f Perform identification to obtain the final classification result; The judgment module is used to determine whether the working state is normal according to the classification result. If the classification result is 1, it means that the relay protection device is still in a normal working state. If the classification result is 0, it means that there is a problem with the relay protection device.
7. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the relay protection device detection method based on the spatiotemporal attention mechanism CNN according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the relay protection device detection method based on the spatiotemporal attention mechanism CNN described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Action recognition method based on double-flow space-time attention mechanism
CN111627052A
CNN rolling bearing fault diagnosis method based on improved GAF and SA
CN115221916A