Fault detection method and device and electronic equipment
By constructing irregular graph structures and integrating timing and spatial relationship characteristics, the problem that existing fault detection methods are difficult to reflect the distribution network topology structure is solved, and the accuracy of distribution network fault detection is improved.
Patent Information
- Application Number
- CN202411151579.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-29
AI Technical Summary
The existing fault detection methods based on artificial intelligence are difficult to reflect the topological structure of the distribution network during the process of extracting fault characteristics, and the deep correlation characteristics between data cannot be identified, resulting in unsatisfactory fault detection accuracy of the distribution network.
By constructing an irregular graph structure based on time-series data sequence and topological structure sequence, multi-dimensional features are extracted using the converter model, and timing and spatial relationship features are integrated to realize training of electrical data prediction models to improve fault detection accuracy.
The physical topology of the distribution network is effectively considered, and the precise description of features in both time and space is achieved, which improves the detection accuracy of fault detection.
Smart Images

Figure CN119044671A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distribution network processing, and in particular to a fault detection method, a fault detection device, an electronic device, a machine-readable storage medium and a computer program product. Background Art
[0002] The distribution network is an important part of the power system and is responsible for delivering high-voltage electricity to users. Its operating status is directly related to the reliability and safety of power supply. Due to its wide coverage, complex environment, and changeable operating conditions, the distribution network is prone to various types of faults, such as short circuits, line breaks, and ground faults. These faults can cause power supply interruptions and affect social and economic life. By studying and applying advanced fault detection technology, the fault point can be quickly and accurately located, and the fault can be isolated and power restored in a timely manner, thereby improving the power supply reliability of the distribution network.
[0003] The existing solutions include some fault detection methods based on artificial intelligence. These fault detection methods based on artificial intelligence can greatly improve the efficiency of fault detection compared with manual inspection and fault detection methods based on traditional theories. However, due to the randomness of the location of distribution network faults and the irregular characteristics of the distribution network topology, the distribution network fault data is a typical graph structure data. The existing fault detection methods based on artificial intelligence are difficult to reflect the topological structure of the distribution network in the process of extracting fault features, and cannot identify the deep correlation characteristics between data, resulting in unsatisfactory detection accuracy of distribution network fault detection. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a fault detection method, device and electronic device to solve the defects that the existing artificial intelligence-based fault detection method is difficult to reflect the topological structure of the distribution network in the process of extracting fault features, and cannot identify the deep correlation characteristics between data, resulting in unsatisfactory detection accuracy of distribution network fault detection.
[0005] In order to achieve the above object, an embodiment of the present invention provides a fault detection method, including:
[0006] Obtaining the voltage and current to be measured of the node to be measured in the distribution network;
[0007] Inputting the voltage to be measured and the current to be measured into an electrical data prediction model to obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model;
[0008] Determining a fault detection result of the node to be tested based on the voltage prediction value and the current prediction value;
[0009] Among them, the electrical data prediction model performs model training based on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence, and the time series data sequence is constructed based on historical voltage data sets and historical current data sets collected from all nodes of the distribution network within a set time period; the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period.
[0010] Optionally, the electrical data prediction model is trained by the following steps:
[0011] Acquire the time series data sequence and the topological structure sequence;
[0012] Constructing an irregular graph structure of the distribution network based on the time series data sequence and the topological structure sequence;
[0013] Extracting features of the irregular graph structure based on a converter model to obtain multi-dimensional features corresponding to the irregular graph structure;
[0014] The electrical data prediction model is trained based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features.
[0015] Optionally, the extracting features of the irregular graph structure based on the converter model to obtain multidimensional features corresponding to the irregular graph structure includes:
[0016] Extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features;
[0017] Extracting features of the topological structure sequence in the irregular graph structure by using the decoder of the converter model to obtain spatial relationship features;
[0018] Perform feature fusion based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature;
[0019] Linear layer fusion is performed based on the temporal sequence features, the spatial relationship features and the spatiotemporal coupling features to obtain multidimensional features corresponding to the irregular graph structure.
[0020] Optionally, extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features includes:
[0021] Performing vectorization and position encoding on the time series data sequence to obtain a first original feature vector and a first position encoded feature vector;
[0022] Inputting the first original feature vector and the first position-encoded feature vector into an encoder of the converter model to obtain a first feature vector output by a multi-head attention network in the encoder;
[0023] Inputting the first feature vector and the first original feature vector into a residual connection and layer normalization network to obtain a second feature vector output by the residual connection and layer normalization network;
[0024] The second feature vector is input into the feedforward network of the converter model to obtain the time series feature output by the feedforward network.
[0025] Optionally, extracting features of the topological structure sequence in the irregular graph structure through the decoder of the converter model to obtain spatial relationship features includes:
[0026] Performing vectorization and position encoding on the topological structure sequence respectively to obtain a second original feature vector and a second position encoded feature vector;
[0027] Inputting the second original feature vector and the second position-encoded feature vector into a decoder of the converter model to obtain a third feature vector output by a multi-head attention network in the decoder;
[0028] Inputting the third eigenvector and the second original eigenvector into a residual connection and layer normalization network to obtain a fourth eigenvector output by the residual connection and layer normalization network;
[0029] The fourth eigenvector is input into the feedforward network of the converter model to obtain the spatial relationship feature of the feedforward network output.
[0030] Optionally, the position encoding of the topological structure sequence is expressed by the following formula:
[0031] The physical topology of the distribution network The position code is in Represented as edges The position embedding corresponding to the two nodes involved is specifically expressed as:
[0032]
[0033] in, represents the edge between node i and node j at time t, They represent the position encodings corresponding to nodes i and j respectively, N is the number of nodes, d is the embedding dimension, and k represents the kth position in the position encoding feature vector.
[0034] Optionally, the feature fusion is performed based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature, which is expressed by the following formula:
[0035]
[0036] in, represents the spatiotemporal coupling characteristics at time t, It represents the sample features obtained by connecting and fusing the historical voltage data and historical current data at time t through the fully connected layer. represents the time series characteristics at time t, Represents the spatial relationship characteristics at time t.
[0037] On the other hand, an embodiment of the present invention further provides a fault detection device, including:
[0038] A data acquisition module is used to obtain the voltage and current to be measured of the node to be measured in the distribution network;
[0039] A prediction module, used for inputting the voltage to be measured and the current to be measured into an electrical data prediction model to obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model;
[0040] A fault detection module, used to determine a fault detection result of the node to be tested based on the voltage prediction value and the current prediction value;
[0041] Among them, the electrical data prediction model performs model training based on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence, and the time series data sequence is constructed based on historical voltage data sets and historical current data sets collected from all nodes of the distribution network within a set time period; the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period.
[0042] Optionally, the electrical data prediction model is trained by the following steps:
[0043] Acquire the time series data sequence and the topological structure sequence;
[0044] Constructing an irregular graph structure of the distribution network based on the time series data sequence and the topological structure sequence;
[0045] Extracting features of the irregular graph structure based on a converter model to obtain multi-dimensional features corresponding to the irregular graph structure;
[0046] The electrical data prediction model is trained based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features.
[0047] Optionally, the extracting features of the irregular graph structure based on the converter model to obtain multidimensional features corresponding to the irregular graph structure includes:
[0048] Extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features;
[0049] Extracting features of the topological structure sequence in the irregular graph structure by using the decoder of the converter model to obtain spatial relationship features;
[0050] Perform feature fusion based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature;
[0051] Linear layer fusion is performed based on the temporal sequence features, the spatial relationship features and the spatiotemporal coupling features to obtain multidimensional features corresponding to the irregular graph structure.
[0052] Optionally, extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features includes:
[0053] Performing vectorization and position encoding on the time series data sequence to obtain a first original feature vector and a first position encoded feature vector;
[0054] Inputting the first original feature vector and the first position-encoded feature vector into an encoder of the converter model to obtain a first feature vector output by a multi-head attention network in the encoder;
[0055] Inputting the first feature vector and the first original feature vector into a residual connection and layer normalization network to obtain a second feature vector output by the residual connection and layer normalization network;
[0056] The second feature vector is input into the feedforward network of the converter model to obtain the time series feature output by the feedforward network.
[0057] Optionally, extracting features of the topological structure sequence in the irregular graph structure through the decoder of the converter model to obtain spatial relationship features includes:
[0058] Performing vectorization and position encoding on the topological structure sequence respectively to obtain a second original feature vector and a second position encoded feature vector;
[0059] Inputting the second original feature vector and the second position-encoded feature vector into a decoder of the converter model to obtain a third feature vector output by a multi-head attention network in the decoder;
[0060] Inputting the third eigenvector and the second original eigenvector into a residual connection and layer normalization network to obtain a fourth eigenvector output by the residual connection and layer normalization network;
[0061] The fourth eigenvector is input into the feedforward network of the converter model to obtain the spatial relationship feature of the feedforward network output.
[0062] Optionally, the position encoding of the topological structure sequence is expressed by the following formula:
[0063] The physical topology of the distribution network The position code is in Represented as edges The position embedding corresponding to the two nodes involved is specifically expressed as:
[0064]
[0065] in, represents the edge between node i and node j at time t, They represent the position encodings corresponding to nodes i and j respectively, N is the number of nodes, d is the embedding dimension, and k represents the kth position in the position encoding feature vector.
[0066] Optionally, the feature fusion is performed based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature, which is expressed by the following formula:
[0067]
[0068] in, represents the spatiotemporal coupling characteristics at time t, It represents the sample features obtained by connecting and fusing the historical voltage data and historical current data at time t through the fully connected layer. represents the time series characteristics at time t, Represents the spatial relationship characteristics at time t.
[0069] On the other hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned fault detection method when executing the program.
[0070] On the other hand, the present invention further provides a machine-readable storage medium having a computer program stored thereon, and the computer program implements the above-mentioned fault detection method when executed by a processor.
[0071] On the other hand, the present invention further provides a computer program product, comprising a computer program, wherein the computer program implements the above fault detection method when executed by a processor.
[0072] Through the above technical scheme, the electrical data prediction model of the embodiment of the present invention takes into account the time series data generated by each node in the physical topology structure of the distribution network and the physical space structure composed of the line connections, and realizes the accurate description of the distribution network characteristics in both time and space dimensions by constructing an irregular graph structure, and performs model training based on the irregular graph structure, which helps the electrical data prediction model to achieve accurate prediction, thereby improving the detection accuracy of distribution network fault detection.
[0073] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0075] Figure 1 It is a flow chart of the fault detection method provided by the present invention;
[0076] Figure 2 It is a schematic diagram of the flow of model training of the electrical data prediction model provided by the present invention;
[0077] Figure 3 It is a structural schematic diagram of a fault detection device provided by the present invention;
[0078] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0079] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0080] Method Embodiment
[0081] Please refer to Figure 1 , an embodiment of the present invention provides a fault detection method, comprising:
[0082] Step 100: Obtain the voltage and current to be measured of the node to be measured in the distribution network.
[0083] The electronic device can obtain the three-phase voltage and three-phase current data collected by the phase measurement unit (PMU) in each node to be tested in the distribution network in each time period as the voltage and current to be tested. Figure 2 , Figure 2 The physical topology of a distribution network in an embodiment is included. The nodes in the physical topology of the distribution network may include substation nodes and load nodes. A phasor measurement unit is installed in each node in the physical topology of the distribution network for real-time measurement of the phasors (including amplitude and phase) of voltage and current in the power system, which can be flexibly deployed in the connection line of the distribution network to collect the voltage and current values of each measurement point. The measurement data is usually collected tens to hundreds of times per second, thereby generating a time series data sample.
[0084] Step 200: input the voltage to be measured and the current to be measured into an electrical data prediction model to obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model.
[0085] The electronic device inputs the voltage to be measured and the current to be measured into the electrical data prediction model, and obtains the future voltage prediction value and current prediction value of the node to be measured output by the electrical data prediction model. The electrical data prediction model is based on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence for model training, and the time series data sequence is constructed based on the historical voltage data set and historical current data set collected from all nodes of the distribution network within a set time period (for example, within the past month); the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period (for example, within the past month).
[0086] In order to fully consider the time series data generated by each node in the physical topology of the distribution network and the physical space structure formed by the line connection, the electrical data prediction model is trained based on the irregular graph structure constructed by the time series data sequence and the topology sequence. The phasor measurement unit in the distribution network periodically collects the historical voltage and current data of all nodes to be measured in the distribution network, and the electronic device obtains the historical voltage and current data of all nodes to be measured. is a time series data sequence. Since the structure and position of electrical equipment such as the load of the distribution network may change over time, the physical topology of the distribution network will also change. In order to simplify the data description, the topology sequence and the time series data sequence are guaranteed to be The moments are aligned in the time dimension. Assuming that within a historical time T, the topological structure sequence of the physical topological structure of the distribution network is described as E = {E 1 ,E 2 ,...,E t ...,ET},in represents the connection status between any node i and node j at time t, where Indicates that two nodes are connected on an electrical line. Indicates that the two are not connected. Therefore, combining the time series data sequence in the time dimension and the physical topological structure of the distribution network in the space dimension, the overall description of the distribution network is an irregular graph structure G = (X, E). The embodiment of the present invention achieves an accurate description of the characteristics of the distribution network in both time and space dimensions by constructing an irregular graph structure, which helps the electrical data prediction model to achieve accurate prediction.
[0087] Step 300: Determine a fault detection result of the node to be tested based on the voltage prediction value and the current prediction value.
[0088] The electronic device compares the voltage prediction value obtained by the electrical data prediction model with the preset voltage fault threshold, and compares the current prediction value obtained by the electrical data prediction model with the preset current fault threshold. When the voltage prediction value is greater than the preset voltage fault threshold, it indicates that a line fault occurs at the node to be tested; or when the current prediction value is greater than the preset current fault threshold, it indicates that a line fault occurs at the node to be tested. The embodiment of the present invention obtains accurate voltage prediction values and current prediction values through the electrical data prediction model, which can effectively realize accurate distribution network fault detection and improve detection accuracy.
[0089] The electrical data prediction model of the embodiment of the present invention takes into account the time series data generated by each node in the physical topology structure of the distribution network and the physical space structure formed by the line connections, and realizes an accurate description of the distribution network characteristics in both time and space dimensions by constructing an irregular graph structure. Model training is performed based on the irregular graph structure, which helps the electrical data prediction model to achieve accurate prediction, thereby improving the detection accuracy of distribution network fault detection.
[0090] In other aspects of the embodiments of the present invention, the electrical data prediction model is trained by the following steps:
[0091] Step 10: Obtain the time series data sequence and the topological structure sequence.
[0092] The electronic equipment obtains the three-phase voltage data and three-phase current data in each historical time period through the phase measurement unit installed in each node to be measured in the distribution network, and generates a time series data sequence. in It means that the phasor measurement unit n device collects the three-phase voltage and three-phase current values of the nth node to be measured at the historical time t, that is:
[0093]
[0094] in, They represent the positive, negative, and zero-sequence voltage amplitudes corresponding to the nth node to be measured at historical time t, and are represented by superscripts (1), (2), and (3) respectively; similarly, Indicates the positive-sequence, negative-sequence, and zero-sequence voltage phase values corresponding to the nth node to be tested at historical time t; Indicates the positive sequence, negative sequence and zero sequence current amplitudes corresponding to the nth node to be tested at historical time t; Indicates the positive-sequence, negative-sequence, and zero-sequence current phase values corresponding to the nth node to be measured at historical time t.
[0095] In order to ensure the topological structure sequence and the time series data sequence The moments are aligned in the time dimension. Assuming that within a period of time T, the topological structure sequence of the physical topological structure of the distribution network is described as E = {E 1 ,E 2 ,...,E t ...,E T},in represents the connection status of any node i and node j at time t, Indicates that two nodes are connected on an electrical line. It means the two are not connected.
[0096] For example, in one embodiment, an undirected graph adjacency matrix describing the physical topology of a distribution network at a certain time or period is as follows:
[0097]
[0098] The topological structure sequence of the embodiment of the present invention includes an undirected graph adjacency matrix of the physical topological structure of the distribution network at each moment or time period aligned with the time series data sequence in the time dimension.
[0099] Step 20: construct an irregular graph structure of the distribution network based on the time series data sequence and the topology structure sequence.
[0100] On the basis of acquiring the time series data sequence and the topological structure sequence, the electronic device combines the time series data sequence in the time dimension with the topological structure sequence in the space dimension, and the distribution network as a whole is described as an irregular graph structure G=(X,E).
[0101] Step 30: extract features of the irregular graph structure based on the converter model to obtain multi-dimensional features corresponding to the irregular graph structure.
[0102] The electronic device extracts data features from the irregular graph structure G = (X, E) based on the converter model, deeply mines the time evolution law of voltage and current in the distribution network and the spatial evolution law of the physical topological structure from the dual dimensions of time and space, and obtains the multidimensional features corresponding to the irregular graph structure G = (X, E) (Or called high-dimensional features).
[0103] Step 40: Training the electrical data prediction model based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features.
[0104] The electronic device trains the electrical data prediction model based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features. Specifically, the training can be performed in a supervised manner based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features. The electrical data prediction model can adopt various machine learning models such as convolutional neural networks. Using the features of node n corresponding to the current time T Predict the three-phase voltage and three-phase current values of node n at the next time T+1, that is, The model can use the binary cross entropy loss function to represent the model training loss value loss, that is:
[0105]
[0106] Among them, X n T+1 is the true value of the data sample corresponding to the nth node at time T+1, and N represents the number of samples. During the model training process, the optimization goal is to minimize the loss value, and the stochastic gradient descent (SGD) is used to iteratively optimize until the loss value is minimized and the model reaches stability.
[0107] After the electrical data prediction model is trained, the trained electrical data prediction model is used to predict the three-phase voltage and current data of each node to achieve accurate fault location and facilitate subsequent timely maintenance.
[0108] The training process of the electrical data prediction model of the embodiment of the present invention includes data sample collection, model input construction, model feature extraction, model prediction and optimization, and line fault detection. Data sample collection includes: collecting relevant data of each line through the phase measurement unit to form a time series data sequence, and obtaining a topology structure sequence according to the physical topology of the distribution network. Model input construction: combining the time series data sequence of the time dimension and the topology structure sequence of the space dimension, describing it with an irregular graph structure and using it as the model input. Model feature extraction: The encoder and decoder based on the converter model respectively extract the time series sequence features and spatial relationship features, and perform time-space coupling. Model prediction and optimization: Combine the binary cross entropy loss function and use the stochastic gradient descent method to optimize the model. Line fault detection: Use the trained prediction model to realize accurate fault detection and positioning. The embodiment of the present invention can effectively realize accurate distribution network fault detection and improve detection accuracy.
[0109] In other aspects of the embodiments of the present invention, step 30, extracting features from the irregular graph structure based on the converter model to obtain multidimensional features corresponding to the irregular graph structure, includes:
[0110] Step 31: extract features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features.
[0111] For a time series data sequence, firstly, feature embedding is performed on each time series data in the time series data sequence. and position encoding The three-phase voltage and three-phase current data at each historical moment are connected through the fully connected layer and fused into the sample features of the corresponding moment. Then, they are input into the encoder Enc(·) of the relational Transformer network in turn to obtain the time series features Where [·] represents a vector connector.
[0112] Step 32: extract features of the topological structure sequence in the irregular graph structure through the decoder of the converter model to obtain spatial relationship features.
[0113] For the topological structure sequence of the distribution network E={E 1 ,E 2 ,...,E t ...,E T In order to obtain the global spatial contextual relationship formed by the nodes, the graph connection structure formed by the distribution network nodes is firstly embedded with features E = {E 1 ,E 2 ,...,E t ,...,E T} and positional encoding And as the input of the decoder Dec(·) of the relational Transformer network to obtain spatial relationship features
[0114]
[0115] Step 33: Perform feature fusion based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature.
[0116] The embodiment of the present invention converts the time series evolution characteristics output at each moment of the encoder Enc(·) of the converter model into The spatial relationship features output at the corresponding time of the decoder Dec(·) of the transformer model Perform convolution and summation to obtain the spatiotemporal coupling features.
[0117] Step 34: Perform linear layer fusion based on the temporal sequence features, the spatial relationship features and the spatiotemporal coupling features to obtain multidimensional features corresponding to the irregular graph structure.
[0118] In order to prevent the problem of feature degradation caused by the large depth of the converter model during feature extraction and to achieve accurate feature expression, the time series features extracted by the encoder Enc(·) and decoder Dec(·) of the converter model are further Spatial relationship characteristics The spatiotemporal coupling features G are fused through linear layers to obtain the high-dimensional features of the final distribution network irregular graph structure G = (X, E)
[0119]
[0120] The embodiment of the present invention introduces a converter model to deeply extract the time series features and spatial relationship features in the irregular graph structure, and effectively integrates the time series features and spatial relationship features, which helps the electrical data prediction model to achieve accurate prediction, thereby improving the detection accuracy of distribution network fault detection.
[0121] In other aspects of the embodiments of the present invention, step 31, extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features, includes:
[0122] Step 311: vectorize and position-code the time series data sequence to obtain a first original feature vector and a first position-coded feature vector.
[0123] Step 312: Input the first original feature vector and the first position-encoded feature vector into the encoder of the converter model to obtain the first feature vector output by the multi-head attention network in the encoder.
[0124] The time series data sequence is vectorized and position-coded to obtain a first original feature vector and a first position-coded feature vector. The first original feature vector X and the first position-coded feature vector X pos Each element of is input into the encoder Enc(·) of the relational Transformer network, and the global dependency of the time series is mapped through the multi-head attention mechanism MultiHead(·) of the encoder Enc(·), that is:
[0125] MultiHead(X)=Concat[head1,...,head h ,...,head H ]W O ;
[0126]
[0127] Among them, head h is the attention head, h∈[1,...,H], WO∈RD×D, They represent model weight parameters respectively, R represents a set of real numbers, D represents the embedding dimension, Q, K, V represent the learnable Query, Key and Value weight matrices maintained by each group of attention, and d / H is the scaling factor.
[0128] Step 313: Input the first feature vector and the first original feature vector into a residual connection and layer normalization network to obtain a second feature vector output by the residual connection and layer normalization network.
[0129] Step 314: input the second feature vector into the feedforward network of the converter model to obtain the time series feature output by the feedforward network.
[0130] The electronic device further obtains the output second eigenvector AN(X) by connecting the first eigenvector MultiHead(X) output by the multi-head attention network and the first original eigenvector X through residual connection and layer normalization network LayerNorm(·) to accelerate the convergence of the model and improve the stability of the effect during the training process, that is:
[0131] AN(X)=LayerNorm(X+MultiHead(X));
[0132] Then, the second eigenvector AN(X) of each output is passed through the feedforward network FFN(·) separately, which is expressed as:
[0133] FFN(X)=W2(ReLU(XW1+b1))+b2;
[0134] Among them, W1, W2 are parameter matrices, b1, b2 are biases. Thus, the encoder extracted time series features of the final converter model are obtained
[0135] The embodiment of the present invention extracts features from a time series data sequence through a converter model to obtain time series features, which facilitates mining the deep correlation between the time series features and the topological structure features of the distribution network, thereby improving the detection accuracy of distribution network fault detection.
[0136] In other aspects of the embodiments of the present invention, step 32, extracting features of the topological structure sequence in the irregular graph structure by a decoder of the converter model to obtain spatial relationship features, includes:
[0137] Step 321: vectorize and position-code the topological structure sequence to obtain a second original feature vector and a second position-coded feature vector.
[0138] To obtain the positional encoding of the graph connection structure Since its connection structure is an irregular graph structure and does not show order, the embodiment of the present invention can encode the positions of two nodes of the distribution network in an interlaced manner. In addition, the edges of the graph structure formed by the topological structure of the distribution network are undirected. The embodiment of the present invention regards the two nodes involved in the edge as the subject and object respectively. The position code is in Represented as edges The position embedding corresponding to the two nodes involved is specifically expressed as:
[0139]
[0140] in, represents the edge between node i and node j at time t, They represent the position encodings corresponding to nodes i and j respectively, N is the number of nodes, d is the embedding dimension, and k represents the kth position in the position encoding feature vector.
[0141] Step 322: Input the second original feature vector and the second position-encoded feature vector into the decoder of the converter model to obtain a third feature vector output by the multi-head attention network in the decoder.
[0142] Step 323: Input the third eigenvector and the second original eigenvector into a residual connection and layer normalization network to obtain a fourth eigenvector output by the residual connection and layer normalization network.
[0143] Step 324: input the fourth eigenvector into the feedforward network of the converter model to obtain the spatial relationship feature output by the feedforward network.
[0144] The embodiment of the present invention sequentially inputs the second original feature vector and the second position encoding feature vector into the decoder Dec(·) of the relational Transformer network in chronological order to obtain the spatial relation feature vector. Among them, the decoder Dec(·) also includes a multi-head attention network MultiHead(·), a residual connection and layer normalization network LayerNorm(·), and a feedforward network FFN(·).
[0145] The embodiment of the present invention extracts features from the topological structure sequence through the converter model to obtain spatial relationship features, which facilitates the mining of the deep correlation between the time series features and the topological structure features of the distribution network, thereby improving the detection accuracy of distribution network fault detection.
[0146] In other aspects of the embodiments of the present invention, in order to combine the time evolution characteristics between the observation nodes and the global spatial contextual relationship formed by the nodes, deeply perceive the coupling relationship between the time series evolution characteristics of each node in the distribution network and the spatial structure evolution characteristics, the time series evolution characteristics output at each moment by the encoder Enc(·) of the relational Transformer network are The spatial relational features output at the corresponding moment of the decoder Dec(·) of the relational Transformer network Perform convolution and summation, which is specifically expressed as:
[0147] The feature fusion is performed based on the time series feature and the spatial relationship feature to obtain the spatiotemporal coupling feature, which is expressed by the following formula:
[0148]
[0149] in, represents the spatiotemporal coupling characteristics at time t, It represents the sample features obtained by connecting and fusing the historical voltage data and historical current data at time t through the fully connected layer. represents the time series characteristics at time t, Represents the spatial relationship characteristics at time t.
[0150] In summary, the embodiment of the present invention fully considers the time series data generated by each node of the distribution network collected by the phasor measurement unit and the topological structure sequence formed by the line connection, and realizes the accurate description of the distribution network characteristics in both time and space dimensions by constructing an irregular graph structure, and then introduces the converter model to deeply extract the time series characteristics and spatial relationship characteristics, and effectively integrates the time series characteristics and spatial relationship characteristics. Finally, the embodiment of the present invention helps to realize accurate distribution network fault detection and improve detection accuracy.
[0151] Device Embodiment
[0152] Please refer to Figure 3 On the other hand, an embodiment of the present invention further provides a fault detection device, comprising:
[0153] The data acquisition module 301 is used to acquire the voltage and current to be measured of the node to be measured in the distribution network;
[0154] A prediction module 302, configured to input the voltage to be measured and the current to be measured into an electrical data prediction model, and obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model;
[0155] A fault detection module 303, configured to determine a fault detection result of the node to be tested based on the voltage prediction value and the current prediction value;
[0156] Among them, the electrical data prediction model performs model training based on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence, and the time series data sequence is constructed based on historical voltage data sets and historical current data sets collected from all nodes of the distribution network within a set time period; the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period.
[0157] The electrical data prediction model of the embodiment of the present invention takes into account the time series data generated by each node in the physical topology structure of the distribution network and the physical space structure formed by the line connections, and realizes an accurate description of the distribution network characteristics in both time and space dimensions by constructing an irregular graph structure. Model training is performed based on the irregular graph structure, which helps the electrical data prediction model to achieve accurate prediction, thereby improving the detection accuracy of distribution network fault detection.
[0158] Optionally, the electrical data prediction model is trained by the following steps:
[0159] Acquire the time series data sequence and the topological structure sequence;
[0160] Constructing an irregular graph structure of the distribution network based on the time series data sequence and the topological structure sequence;
[0161] Extracting features of the irregular graph structure based on a converter model to obtain multi-dimensional features corresponding to the irregular graph structure;
[0162] The electrical data prediction model is trained based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features.
[0163] Optionally, the extracting features of the irregular graph structure based on the converter model to obtain multidimensional features corresponding to the irregular graph structure includes:
[0164] Extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features;
[0165] Extracting features of the topological structure sequence in the irregular graph structure by using the decoder of the converter model to obtain spatial relationship features;
[0166] Perform feature fusion based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature;
[0167] Linear layer fusion is performed based on the temporal sequence features, the spatial relationship features and the spatiotemporal coupling features to obtain multidimensional features corresponding to the irregular graph structure.
[0168] Optionally, extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features includes:
[0169] Performing vectorization and position encoding on the time series data sequence to obtain a first original feature vector and a first position encoded feature vector;
[0170] Inputting the first original feature vector and the first position-encoded feature vector into an encoder of the converter model to obtain a first feature vector output by a multi-head attention network in the encoder;
[0171] Inputting the first feature vector and the first original feature vector into a residual connection and layer normalization network to obtain a second feature vector output by the residual connection and layer normalization network;
[0172] The second feature vector is input into the feedforward network of the converter model to obtain the time series feature output by the feedforward network.
[0173] Optionally, extracting features of the topological structure sequence in the irregular graph structure through the decoder of the converter model to obtain spatial relationship features includes:
[0174] Performing vectorization and position encoding on the topological structure sequence respectively to obtain a second original feature vector and a second position encoded feature vector;
[0175] Inputting the second original feature vector and the second position-encoded feature vector into a decoder of the converter model to obtain a third feature vector output by a multi-head attention network in the decoder;
[0176] Inputting the third eigenvector and the second original eigenvector into a residual connection and layer normalization network to obtain a fourth eigenvector output by the residual connection and layer normalization network;
[0177] The fourth eigenvector is input into the feedforward network of the converter model to obtain the spatial relationship feature of the feedforward network output.
[0178] Optionally, the position encoding of the topological structure sequence is expressed by the following formula:
[0179] The physical topology of the distribution network The position code is in Represented as edges The position embedding corresponding to the two nodes involved is specifically expressed as:
[0180]
[0181] in, represents the edge between node i and node j at time t, They represent the position encodings corresponding to nodes i and j respectively, N is the number of nodes, d is the embedding dimension, and k represents the kth position in the position encoding feature vector.
[0182] Optionally, the feature fusion is performed based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature, which is expressed by the following formula:
[0183]
[0184] in, represents the spatiotemporal coupling characteristics at time t, It represents the sample features obtained by connecting and fusing the historical voltage data and historical current data at time t through the fully connected layer. represents the time series characteristics at time t, Represents the spatial relationship characteristics at time t.
[0185] The fault detection device includes a processor and a memory. The data acquisition module 301, prediction module 302 and fault detection module 303 are stored in the memory as program units. The processor executes the program units stored in the memory to implement corresponding functions.
[0186] The processor includes a kernel, which calls the corresponding program unit from the memory. There can be one or more kernels.
[0187] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0188] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the fault detection method, which includes: obtaining the voltage to be measured and the current to be measured of the node to be measured in the distribution network; inputting the voltage to be measured and the current to be measured into the electrical data prediction model to obtain the future voltage prediction value and current prediction value of the node to be measured output by the electrical data prediction model; determining the fault detection result of the node to be measured based on the voltage prediction value and the current prediction value; wherein the electrical data prediction model is based on the irregular graph structure constructed by the time series data sequence and the topological structure sequence for model training, and the time series data sequence is constructed based on the historical voltage data set and the historical current data set collected from all nodes of the distribution network within a set time period; the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period.
[0189] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0190] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a machine-readable storage medium. When the computer program is executed by a processor, the computer can execute a fault detection method, which includes: obtaining a voltage to be measured and a current to be measured of a node to be measured in a distribution network; inputting the voltage to be measured and the current to be measured into an electrical data prediction model to obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model; determining a fault detection result of the node to be measured based on the voltage prediction value and the current prediction value; wherein the electrical data prediction model performs model training on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence, and the time series data sequence is constructed based on a historical voltage data set and a historical current data set collected from all nodes of the distribution network within a set time period; and the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period.
[0191] On the other hand, the present invention also provides a machine-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the fault detection method, the method comprising: obtaining a voltage to be measured and a current to be measured of a node to be measured in a distribution network; inputting the voltage to be measured and the current to be measured into an electrical data prediction model to obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model; determining a fault detection result of the node to be measured based on the voltage prediction value and the current prediction value; wherein the electrical data prediction model performs model training based on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence, the time series data sequence is constructed based on a historical voltage data set and a historical current data set collected from all nodes of the distribution network within a set time period; the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period. Time
[0192] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0193] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0194] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fault detection method, characterized in that: include: Obtaining the voltage and current to be measured of the node to be measured in the distribution network; Inputting the voltage to be measured and the current to be measured into an electrical data prediction model to obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model; Determining a fault detection result of the node to be tested based on the voltage prediction value and the current prediction value; Among them, the electrical data prediction model performs model training based on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence, and the time series data sequence is constructed based on historical voltage data sets and historical current data sets collected from all nodes of the distribution network within a set time period; the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period.
2. The fault detection method according to claim 1, characterized in that: The electrical data prediction model is trained by the following steps: Acquire the time series data sequence and the topological structure sequence; Constructing an irregular graph structure of the distribution network based on the time series data sequence and the topological structure sequence; Extracting features of the irregular graph structure based on a converter model to obtain multi-dimensional features corresponding to the irregular graph structure; The electrical data prediction model is trained based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features.
3. The fault detection method according to claim 2, characterized in that: The extracting features of the irregular graph structure based on the converter model to obtain multi-dimensional features corresponding to the irregular graph structure includes: Extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features; Extracting features of the topological structure sequence in the irregular graph structure by using the decoder of the converter model to obtain spatial relationship features; Perform feature fusion based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature; Linear layer fusion is performed based on the temporal sequence features, the spatial relationship features and the spatiotemporal coupling features to obtain multidimensional features corresponding to the irregular graph structure.
4. The fault detection method according to claim 3, characterized in that: The extracting features of the time series data sequence in the irregular graph structure by using the encoder of the converter model to obtain time series sequence features includes: Performing vectorization and position encoding on the time series data sequence to obtain a first original feature vector and a first position encoded feature vector; Inputting the first original feature vector and the first position-encoded feature vector into an encoder of the converter model to obtain a first feature vector output by a multi-head attention network in the encoder; Inputting the first feature vector and the first original feature vector into a residual connection and layer normalization network to obtain a second feature vector output by the residual connection and layer normalization network; The second feature vector is input into the feedforward network of the converter model to obtain the time series feature output by the feedforward network.
5. The fault detection method according to claim 3, characterized in that: The extracting features of the topological structure sequence in the irregular graph structure by the decoder of the converter model to obtain spatial relationship features includes: Performing vectorization and position encoding on the topological structure sequence respectively to obtain a second original feature vector and a second position encoded feature vector; Inputting the second original feature vector and the second position-encoded feature vector into a decoder of the converter model to obtain a third feature vector output by a multi-head attention network in the decoder; Inputting the third eigenvector and the second original eigenvector into a residual connection and layer normalization network to obtain a fourth eigenvector output by the residual connection and layer normalization network; The fourth eigenvector is input into the feedforward network of the converter model to obtain the spatial relationship feature of the feedforward network output.
6. The fault detection method according to claim 5, characterized in that: The position encoding of the topological structure sequence is expressed by the following formula: The physical topology of the distribution network The position code is in Represented as edges The position embedding corresponding to the two nodes involved is specifically expressed as: in, represents the edge between node i and node j at time t, They represent the position encodings corresponding to nodes i and j respectively, N is the number of nodes, d is the embedding dimension, and k represents the kth position in the position encoding feature vector.
7. The fault detection method according to claim 3, characterized in that: The feature fusion is performed based on the time series feature and the spatial relationship feature to obtain the spatiotemporal coupling feature, which is expressed by the following formula: in, represents the spatiotemporal coupling characteristics at time t, It represents the sample features obtained by connecting and fusing the historical voltage data and historical current data at time t through the fully connected layer. represents the time series characteristics at time t, Represents the spatial relationship characteristics at time t.
8. A fault detection device, characterized in that: include: A data acquisition module is used to obtain the voltage and current to be measured of the node to be measured in the distribution network; A prediction module, used for inputting the voltage to be measured and the current to be measured into an electrical data prediction model to obtain a future voltage prediction value and a current prediction value of the node to be measured output by the electrical data prediction model; A fault detection module, used to determine a fault detection result of the node to be tested based on the voltage prediction value and the current prediction value; Among them, the electrical data prediction model performs model training based on an irregular graph structure constructed based on a time series data sequence and a topological structure sequence, and the time series data sequence is constructed based on historical voltage data sets and historical current data sets collected from all nodes of the distribution network within a set time period; the topological structure sequence is used to characterize the physical topological structure between all nodes in the distribution network at each moment within the set time period.
9. The fault detection device according to claim 8, characterized in that: The electrical data prediction model is trained by the following steps: Acquire the time series data sequence and the topological structure sequence; Constructing an irregular graph structure of the distribution network based on the time series data sequence and the topological structure sequence; Extracting features of the irregular graph structure based on a converter model to obtain multi-dimensional features corresponding to the irregular graph structure; The electrical data prediction model is trained based on the multidimensional features and the true values of the data samples corresponding to the multidimensional features.
10. The fault detection device according to claim 9, characterized in that: The extracting features of the irregular graph structure based on the converter model to obtain multi-dimensional features corresponding to the irregular graph structure includes: Extracting features of the time series data sequence in the irregular graph structure through the encoder of the converter model to obtain time series sequence features; Extracting features of the topological structure sequence in the irregular graph structure by using the decoder of the converter model to obtain spatial relationship features; Perform feature fusion based on the time series feature and the spatial relationship feature to obtain a spatiotemporal coupling feature; Linear layer fusion is performed based on the temporal sequence features, the spatial relationship features and the spatiotemporal coupling features to obtain multidimensional features corresponding to the irregular graph structure.
11. The fault detection device according to claim 10, characterized in that: The extracting features of the time series data sequence in the irregular graph structure by using the encoder of the converter model to obtain time series sequence features includes: Performing vectorization and position encoding on the time series data sequence to obtain a first original feature vector and a first position encoded feature vector; Inputting the first original feature vector and the first position-encoded feature vector into an encoder of the converter model to obtain a first feature vector output by a multi-head attention network in the encoder; Inputting the first feature vector and the first original feature vector into a residual connection and layer normalization network to obtain a second feature vector output by the residual connection and layer normalization network; The second feature vector is input into the feedforward network of the converter model to obtain the time series feature output by the feedforward network.
12. The fault detection device according to claim 10, characterized in that: The extracting features of the topological structure sequence in the irregular graph structure by the decoder of the converter model to obtain spatial relationship features includes: Performing vectorization and position encoding on the topological structure sequence respectively to obtain a second original feature vector and a second position encoded feature vector; Inputting the second original feature vector and the second position-encoded feature vector into a decoder of the converter model to obtain a third feature vector output by a multi-head attention network in the decoder; Inputting the third eigenvector and the second original eigenvector into a residual connection and layer normalization network to obtain a fourth eigenvector output by the residual connection and layer normalization network; The fourth eigenvector is input into the feedforward network of the converter model to obtain the spatial relationship feature of the feedforward network output.
13. The fault detection device according to claim 12, characterized in that: The position encoding of the topological structure sequence is expressed by the following formula: The physical topology of the distribution network The position code is in Represented as edges The position embedding corresponding to the two nodes involved is specifically expressed as: in, represents the edge between node i and node j at time t, They represent the position encodings corresponding to nodes i and j respectively, N is the number of nodes, d is the embedding dimension, and k represents the kth position in the position encoding feature vector.
14. The fault detection device according to claim 10, characterized in that: The feature fusion is performed based on the time series feature and the spatial relationship feature to obtain the spatiotemporal coupling feature, which is expressed by the following formula: in, represents the spatiotemporal coupling characteristics at time t, It represents the sample features obtained by connecting and fusing the historical voltage data and historical current data at time t through the fully connected layer. represents the time series characteristics at time t, Represents the spatial relationship characteristics at time t.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the fault detection method according to any one of claims 1 to 7 is implemented.
16. A machine-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the fault detection method according to any one of claims 1 to 7 is implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the fault detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Mamba network-based main and distribution cooperative fault detection method, equipment and medium
CN119885083A
Master-Slave Cooperative Fault Detection Method, Device and Medium Based on Mamba Network
CN119885083B
