Urban power distribution network failure prediction method and system under extreme weather
Patent Information
- Application Number
- CN202311185067.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-09-13
AI Technical Summary
[0004]然而,针对极端天气建立的故障模型主观性较强,仅考虑单一或较少致灾因子,忽视了微地形对气象参数的影响、没有考虑输电设备自身的老化状况等,对于致灾因素的分析不够全面,如何分析复合灾害对电网的影响是一个难题
[0053]本发明提供了一种极端天气下的城市配电网故障预测方法、系统、存储介质和电子设备。与现有技术相比,具备以下有益效果:
Smart Images

Figure CN117057480B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution network fault prediction technology, specifically to a method, system, storage medium, and electronic device for predicting urban power distribution network faults under extreme weather conditions. Background Technology
[0002] Urban power distribution networks account for the vast majority of the power system load, characterized by their wide distribution and complex topology. Most urban distribution networks use radial wiring, making them highly sensitive to single faults and resulting in a high failure rate. As a network directly facing users, the safe and stable operation of urban distribution networks is crucial for improving power supply reliability. Historical data shows that distribution network failures are more likely to occur under severe weather conditions. In recent years, extreme natural disasters such as typhoons, torrential rains, and lightning strikes have occurred frequently, inevitably posing a significant threat to the massive power system. Therefore, accurately predicting potential urban distribution network failures under extreme weather conditions has become a challenging problem.
[0003] Regarding fault prediction for urban power distribution networks under extreme weather conditions, current technologies have evolved from offline early warning systems primarily based on statistical models to online early warning systems primarily based on physical models. While statistical models have certain applicability, they cannot fully reflect environmental relevance and cannot reliably predict impending severe weather. Online early warning systems primarily focus on the pathways and mechanisms by which disasters affect the power grid, tracking external environmental information and dynamically assessing the power grid fault status. Existing technological solutions can be broadly categorized into three research and development stages: traditional statistical regression models, traditional machine learning models, and deep neural network prediction models. Currently, many technological solutions utilize long-term historical data as the basis for prediction, analyzing the time series data.
[0004] However, fault models developed for extreme weather are highly subjective, considering only a single or few disaster-causing factors, ignoring the impact of micro-topography on meteorological parameters, and failing to consider the aging condition of the power transmission equipment itself. The analysis of disaster-causing factors is not comprehensive enough, and how to analyze the impact of compound disasters on the power grid is a difficult problem. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides a method, system, storage medium, and electronic device for predicting urban power distribution network faults under extreme weather conditions, thus solving the technical problem of ignoring the impact of complex disasters on the power grid.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] A method for predicting urban power distribution network faults under extreme weather conditions introduces a probabilistic model of urban power distribution network faults based on Informer neural networks and multi-task learning. The probabilistic model includes an encoder and a decoder. The method includes:
[0010] S1. Grid-based designation of urban power distribution network areas; using historical fault influencing factors data of each grid as independent variables and corresponding historical power distribution network fault data as dependent variables, causal analysis methods are used to screen out the power distribution network fault factor types of each grid.
[0011] S2. The distribution network fault factor time series of each grid is used as the input of the encoder's main stack, and the distribution network fault factor time series that has been halved at least once is used as the input of the encoder's sub-stack. The outputs of all stacks are concatenated to obtain the final hidden representation of each task. The main stack and the sub-stack are both stacked by a multi-head probabilistic sparse self-attention mechanism and a distillation operation.
[0012] S3. Take the historical distribution network fault data sequence after using 0 placeholders for each grid as the input of the masked multi-head self-attention mechanism of the decoder, and take the output of the masked multi-head self-attention mechanism and the corresponding hidden layer representation as the input of the multi-head attention mechanism of the decoder to obtain the distribution network fault probability prediction data for each grid.
[0013] S4. Based on the historical distribution network fault data and the distribution network fault probability prediction data, construct a loss function and train the probability model until convergence;
[0014] S5. Use the current time series of distribution network fault factors for each grid in the specified urban distribution network area as the input to the converged probability model to obtain the current distribution network fault prediction result for each grid.
[0015] Preferred, including:
[0016] S6. Based on the current distribution network fault prediction results for each grid, obtain the corresponding grid disaster index;
[0017] S7. Obtain the corresponding graded early warning results based on the grid disaster index of each grid.
[0018] Preferably, in S1, the Granger causality test method is used to screen out the distribution network fault factor type for each grid.
[0019] Preferably, S2 includes:
[0020] S21. Standardize the time series of distribution network fault factors for each grid.
[0021]
[0022] Among them, Z ijt Z' ijt These represent the data of the i-th grid and the j-th type of fault factor at time t before and after normalization, respectively; min and max represent taking the minimum and maximum values, respectively; t0 represents the initial time of the sample, and T is the final time of the sample; i = 1, 2, ..., n represents the grid index, and n represents the total number of grids; j = 1, 2, ..., J i J represents the fault factor type index. i This represents the total number of fault factor types in the i-th grid.
[0023] S22. Use location encoding to add contextual information to the normalized distribution network fault factor time series, and use learnable stamp embedding to represent global timestamps to obtain the model's input vector;
[0024]
[0025]
[0026]
[0027] in, The input vector of the model; u' ijt This indicates that a one-dimensional convolution filter is used to convert Z' ijt Mapping to d model A dimensional vector; PE represents positional encoding; SE represents learnable stamp embedding; p represents the number of global timestamp types;
[0028] `pos` is the location index, representing the time step position of the distribution network fault factor time series; `h` is the dimension index, representing the dimension of the distribution network fault factor time series in the input sequence; `d` model Represents the dimension of the input; sin is sine, cos is cosine;
[0029] S23. Using the model's input representation vector as the encoder input, including:
[0030] In the main stack, the complexity of the input representation vector is reduced by a stacked multi-head probabilistic sparse self-attention mechanism distillation operation to obtain the corresponding output vector;
[0031] In at least one of the sub-stacks, the input representation vector of the previous stack is halved and used as input. The complexity of the input representation vector is reduced by distillation operation through the stacked multi-head probabilistic sparse self-attention mechanism to obtain the corresponding output vector.
[0032] Concatenate the outputs of all stacks to obtain the final hidden representation H for each task.i .
[0033] Preferably, in S3:
[0034] In the masked multi-head self-attention mechanism, the corresponding output vector is obtained based on the masking matrix; in the multi-head attention mechanism, the output of the masked multi-head self-attention mechanism and the final hidden representation are fused, and the corresponding fully connected layers are connected to independently obtain the distribution network fault probability prediction data for each grid.
[0035] Preferably, the loss function F in S4 is expressed as:
[0036]
[0037] Among them, t de The prediction time length is determined by the length of the zero placeholder used in the decoder input; y it Let y represent the historical distribution network fault data of the i-th grid. it = 0 or 1, where 0 indicates that no distribution network fault occurred in the i-th network at time t, and 1 indicates that a distribution network fault occurred; y' it This represents the distribution network fault probability prediction data, y' it ∈[0,1].
[0038] Preferably, in step S6, the weights of each post-disaster assessment factor are calculated using the analytic hierarchy process (AHP), and the corresponding grid disaster index is obtained by combining the current distribution network fault prediction results of each grid. The post-disaster assessment factors include at least fault recovery time, user level, and impact range.
[0039] Preferably, in step S7, tiered thresholds P1, P2, and P3 are set to compare the grid disaster index of each grid with the threshold for tiered early warning, wherein P1 <P2<P3。
[0040] A fault prediction system for urban power distribution networks under extreme weather conditions introduces a probabilistic model of urban power distribution network faults based on Informer neural networks and multi-task learning. The probabilistic model includes an encoder and a decoder. The system comprises:
[0041] The filtering module is used to grid the specified urban power distribution network area; it uses the historical fault influencing factors data of each grid as independent variables and the corresponding historical power distribution network fault data as dependent variables, and uses causal analysis to filter out the power distribution network fault factor types of each grid.
[0042] The encoding module is used to take the distribution network fault factor time series of each grid as the input of the main stack of the encoder, and take the distribution network fault factor time series that has been halved at least once as the input of the sub-stack of the encoder, and concatenate the outputs of all stacks to obtain the final hidden representation of each task; wherein, the main stack and the sub-stack are both stacked by a multi-head probabilistic sparse self-attention mechanism and distillation operation.
[0043] The decoding module is used to take the historical distribution network fault data sequence after using 0 placeholders for each grid as the input of the masked multi-head self-attention mechanism of the decoder, and take the output of the masked multi-head self-attention mechanism and the corresponding hidden layer representation as the input of the multi-head attention mechanism of the decoder to obtain the distribution network fault probability prediction data for each grid.
[0044] The training module is used to construct a loss function and train the probability model until convergence based on the historical distribution network fault data and the distribution network fault probability prediction data.
[0045] The prediction module is used to take the current time series of distribution network fault factors of each grid in the specified urban distribution network area as the input of the converged probability model to obtain the current distribution network fault prediction result of each grid.
[0046] Preferably, the urban power distribution network fault prediction system includes:
[0047] The calculation module is used to obtain the corresponding grid disaster index based on the current distribution network fault prediction results of each grid.
[0048] The early warning module is used to obtain corresponding graded early warning results based on the grid disaster index of each grid.
[0049] A storage medium storing a computer program for predicting urban power distribution network faults under extreme weather conditions, wherein the computer program causes a computer to execute the urban power distribution network fault prediction method as described above.
[0050] An electronic device, comprising:
[0051] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing urban power distribution network fault prediction as described above.
[0052] (III) Beneficial Effects
[0053] This invention provides a method, system, storage medium, and electronic device for predicting urban power distribution network faults under extreme weather conditions. Compared with existing technologies, it has the following advantages:
[0054] In this invention, for a specified urban power distribution network area, a causal analysis method is used to screen out the types of power distribution network fault factors in each regional grid, and the complexity of the disaster-causing factors is objectively analyzed. Furthermore, a probabilistic model of urban power distribution network faults based on Informer neural networks and multi-task learning is introduced. The multi-head probabilistic sparse self-attention mechanism reduces the time complexity, the serial output of the encoder's master and slave stacks enhances the robustness of the distillation operation, and the generative decoder achieves one-time output, improving the prediction speed and avoiding the accumulation of errors in stepwise predictions. This solves the problem of long-term dependence of time series data. Moreover, the multi-task learning method enables the parallel execution of multi-grid prediction tasks and outputs multi-grid fault probabilities. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This invention provides an urban power distribution network fault probability prediction model based on Informer neural network and multi-task learning.
[0057] Figure 2 A block diagram illustrating a method for predicting urban power distribution network faults under extreme weather conditions, provided in an embodiment of the present invention.
[0058] Figure 3 A block diagram illustrating another method for predicting urban power distribution network faults under extreme weather conditions, provided by an embodiment of the present invention.
[0059] Figure 4 A structural diagram of an urban power distribution network fault prediction system under extreme weather conditions provided in an embodiment of the present invention;
[0060] Figure 5 This is a structural diagram of another urban power distribution network fault prediction system under extreme weather conditions provided by an embodiment of the present invention. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] This application provides a method, system, storage medium, and electronic device for predicting urban power distribution network faults under extreme weather conditions, thus solving the technical problem of ignoring the impact of complex disasters on the power grid.
[0063] The technical solution in this application is to solve the above-mentioned technical problems, and the general idea is as follows:
[0064] First, the urban power distribution network area is divided into grids. Considering the impact of various disaster-causing factors on the power distribution network, Granger causality tests are performed on the fault influencing factor data of each grid to find fault factors related to power distribution network faults.
[0065] Secondly, using, such as Figure 1 The Informer neural network and multi-task learning method shown are used to construct a distribution network fault probability prediction model. Training data for each task are input into the encoder. A shared multi-head probabilistic sparse self-attention mechanism is used, where the key in the attention mechanism only focuses on the primary query and ignores secondary queries, reducing computational complexity. Then, a distillation operation is performed to privilege dominant features, and a secondary stack is constructed by halving the input. The sequences output from the primary and secondary stacks are concatenated to output the feature maps for each task, thus enhancing the robustness of the distillation operation. The decoder uses a zero-placeholder sequence as input and constructs multiple decoder structures to achieve parallel multi-task processing. The encoder output uses a masking-based multi-head probabilistic sparse self-attention mechanism to avoid autoregression. Finally, multiple fully connected layers generate multiple grids of subsequent prediction data at once, avoiding error accumulation and improving prediction accuracy.
[0066] Finally, the weights of post-disaster assessment factors are calculated using the analytic hierarchy process (AHP), and the degree of disaster impact after a failure in each grid is assessed, thereby achieving tiered early warning.
[0067] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0068] Example:
[0069] like Figure 2 As shown, this embodiment of the invention provides a method for predicting urban power distribution network faults under extreme weather conditions. It introduces a probabilistic model of urban power distribution network faults based on Informer neural networks and multi-task learning, wherein the probabilistic model includes an encoder and a decoder; the method includes:
[0070] S1. Grid-based designation of urban power distribution network areas; using historical fault influencing factors data of each grid as independent variables and corresponding historical power distribution network fault data as dependent variables, causal analysis methods are used to screen out the power distribution network fault factor types of each grid.
[0071] S2. The distribution network fault factor time series of each grid is used as the input of the encoder's main stack, and the distribution network fault factor time series that has been halved at least once is used as the input of the encoder's sub-stack. The outputs of all stacks are concatenated to obtain the final hidden representation of each task. The main stack and the sub-stack are both stacked by a multi-head probabilistic sparse self-attention mechanism and a distillation operation.
[0072] S3. Take the historical distribution network fault data sequence after using 0 placeholders for each grid as the input of the masked multi-head self-attention mechanism of the decoder, and take the output of the masked multi-head self-attention mechanism and the corresponding hidden layer representation as the input of the multi-head attention mechanism of the decoder to obtain the distribution network fault probability prediction data for each grid.
[0073] S4. Based on the historical distribution network fault data and the distribution network fault probability prediction data, construct a loss function and train the probability model until convergence;
[0074] S5. Use the current time series of distribution network fault factors for each grid in the specified urban distribution network area as the input to the converged probability model to obtain the current distribution network fault prediction result for each grid.
[0075] In this embodiment of the invention, for a specified urban power distribution network area, a causal analysis method is used to screen out the types of power distribution network fault factors in each regional grid, and the complexity of the disaster-causing factors is objectively analyzed. A probabilistic model of urban power distribution network faults based on Informer neural network and multi-task learning is introduced, in which a multi-head probabilistic sparse self-attention mechanism reduces time complexity, the serial output of the encoder's master and slave stacks enhances the robustness of the distillation operation, and the generative decoder achieves one-time output, improving prediction speed and avoiding the accumulation of errors in stepwise prediction, thus solving the long-term dependency problem of time series data. Moreover, the multi-task learning method enables the parallel execution of multi-grid prediction tasks and outputs multi-grid fault probabilities.
[0076] In an alternative implementation, such as Figure 3 As shown, the urban power distribution network fault prediction method further includes:
[0077] S6. Based on the current distribution network fault prediction results for each grid, obtain the corresponding grid disaster index;
[0078] S7. Obtain the corresponding graded early warning results based on the grid disaster index of each grid.
[0079] The embodiments of the present invention consider various post-disaster assessment factors, such as fault recovery time, user level, and impact range, to assess the post-disaster grid distribution network operation status, so as to achieve graded early warning, facilitate the rational allocation of resources to cope with the occurrence of extreme weather, and maintain the normal operation of the urban distribution network.
[0080] The following will detail each step of the above solution:
[0081] In step S1, the specified urban power distribution network area is gridded; the historical fault influencing factors of each grid are used as independent variables, and the corresponding historical power distribution network fault data are used as dependent variables. The causal analysis method is used to screen out the power distribution network fault factor types of each grid.
[0082] Under extreme weather conditions, urban meteorological data often becomes abnormal, which can also adversely affect power distribution network equipment. Considering various influencing factors, causal relationship analysis is used to eliminate factors irrelevant to the occurrence of faults. To screen for fault factor types in urban power distribution networks under extreme weather conditions, this exemplary step uses the Granger causality test to screen for the power distribution network fault factor types in each grid. Specifically, this includes:
[0083] For a fixed area to be predicted, considering that gridding can more purposefully manage and refine disaster data, the area to be predicted is divided into n grids to quickly locate the fault coverage area and the disaster coverage area.
[0084] Each grid selects r-type fault influencing factors, such as average rainfall, wind speed, temperature, geology, equipment aging, and equipment load, and sets their time series as {x}. ijt}(i=1,2,...,n,j=1,2,...,r), represents the time series of the influencing factors of the j-th type of fault in the i-th grid, and the time series of faults occurring in the distribution network within the grid is set as {y it Let} represent the time series of distribution network faults occurring in the i-th grid (represented by 0 or 1). For each grid, the fault influencing factors are used as independent variables, and the distribution network faults within the grid are used as dependent variables to examine the relationship between distribution network faults and each fault influencing factor.
[0085] In Granger causality tests, to avoid spurious regression, it is necessary to ensure the stationarity of the time series. Firstly, the extended Dick Fuller test is used for {x}. ijt}、{y itA stationarity test is performed. The significance level is determined by the p-value. Whether the null hypothesis can be rejected indicates whether the sequence is stationary. If it is not stationary, the sequence is differencing. If it is stationary, the lag order can be determined, satisfying the preconditions for Granger causality testing.
[0086] After passing the stationarity test, a Granger causality test is performed, and a model with x is constructed. ij The lagged terms and y i The regression equation for the lagged terms is shown below. Calculate the sum of squared residuals R0 of this regression equation. ui .
[0087]
[0088] Construct y i For all y i(t-l) The regression equation for other variables, excluding x. ij The lagged term x ij(t-k) As shown in the following formula, calculate the sum of squared residuals R of this regression equation. ri .
[0089]
[0090] In the i-th grid, x ij(t-k) For x ijt The lagged term; y i(t-l) For y it The lagged term; q is the variable y i The lag length in the regression equation; k and l are the number of lag terms; γ 1it and γ 2it White noise; α ik For x ij The coefficient estimate; β il For y i The estimated value of the coefficient.
[0091] Establish the null hypothesis, H0: α ik =0, meaning that in the i-th grid, the impact factor {x} of the j-th type of fault is 0. ijt} does not cause distribution network faults {y it The Granger causes of distribution network faults were identified. An F-test was used to test this hypothesis, and the distribution network fault factors affecting distribution network faults in each grid were selected, denoted as Z. ij (i=1,2,…,n,j=1,2,…,J i ), representing the fault factor of the j-th type of distribution network in the i-th grid, and the number of fault factors corresponding to each grid is J. i different.
[0092] In step S2, the distribution network fault factor time series of each grid is used as the input of the encoder's main stack, and the distribution network fault factor time series that has been halved at least once is used as the input of the encoder's sub-stack. The outputs of all stacks are concatenated to obtain the final hidden representation of each task. The main stack and the sub-stack are both stacked by a multi-head probabilistic sparse self-attention mechanism and a distillation operation.
[0093] Grid-based fault prediction requires predicting the fault probabilities of multiple grids, and the tasks are similar. Therefore, a multi-task learning method based on the Informer model is proposed to achieve faster and more effective fault probability prediction for urban power distribution networks. The input of this model consists of a dataset {Z} corresponding to n tasks. 1jt},…,{Z ijt},…,{Z njt}, each containing the J of the i-th grid. i Time series of each failure factor.
[0094] Specifically, S2 includes:
[0095] S21. Standardize the time series of distribution network fault factors for each grid (i.e., data normalization).
[0096] Since the input data values of each type of fault factor differ significantly in magnitude and different input data have different dimensions, data standardization is required to eliminate the dimensional influence between fault-related factors in the distribution network and to ensure the comparability of data indicators.
[0097] Here, max-min normalization is used, as shown in the following equation:
[0098] S21. Standardize the time series of distribution network fault factors for each grid.
[0099]
[0100] Among them, Z ijt Z' ijt These represent the data of the i-th grid and the j-th type of fault factor at time t before and after normalization, respectively; min and max represent taking the minimum and maximum values, respectively; t0 represents the initial time of the sample, and T is the final time of the sample; i = 1, 2, ..., n represents the grid index, and n represents the total number of grids; j = 1, 2, ..., J i J represents the fault factor type index. i This represents the total number of fault factor types in the i-th grid.
[0101] Figure 1This is a proposed multi-task learning-based urban power distribution network fault probability prediction model. Data from multiple tasks are simultaneously input into the model, and each task outputs its own feature map through operations such as a multi-head probabilistic sparse self-attention layer in the encoder and distillation, sharing knowledge and features to improve the model's generalization ability. A masked multi-head probabilistic sparse self-attention mechanism is employed. The decoder structure corresponding to each task receives the feature map input for that task and outputs the power distribution network fault probability prediction through a fully connected layer. Furthermore, S2 also includes:
[0102] S22. Use location encoding to add contextual information to the normalized distribution network fault factor time series, and use learnable stamp embedding to represent global timestamps to obtain the model's input vector;
[0103]
[0104]
[0105]
[0106] in, The input vector of the model; u' ijt This indicates that a one-dimensional convolution filter is used to convert Z' ijt Mapping to d model A dimensional vector; PE represents positional encoding; SE represents learnable stamp embedding; p represents the number of global timestamp types;
[0107] `pos` is the location index, representing the time step position of the distribution network fault factor time series; `h` is the dimension index, representing the dimension of the distribution network fault factor time series in the input sequence; `d` model Represents the dimension of the input; sin is sine, cos is cosine;
[0108] S23. Using the model's input representation vector as the encoder input, including:
[0109] In the main stack (represented by stack1), the complexity of the input representation vector is reduced by a stacked multi-head probabilistic sparse self-attention mechanism distillation operation to obtain the corresponding output vector.
[0110] The probabilistic sparse self-attention mechanism includes a query vector, a key vector, and a value vector. For each query, a portion of the key is randomly sampled, with a default value of 5lnL, where L is the query length. The sparsity score for each query is calculated using KL-divergence, as shown in the following formula:
[0111]
[0112] Where M(q) jK) represents the sparsity score of the j-th query; L K d is the length of the query vector; d is the dimension of the input fault factor sequence.
[0113] Select the N queries with the highest sparsity scores, where N is 5lnL by default. Only calculate the dot product of these N queries and the key. The calculation operation is shown in the following formula. For the other LN queries, directly take the mean of the input values as the output.
[0114]
[0115] Where Softmax() is the activation function, O s Q represents the output of the s-th attention head. s K s V s These represent the query, key, and value for the s-th attention header, respectively. For the query of the s-th attention head after sparsification, For K s transpose, d s This represents the dimension of the s-th attention head, which is generally the dimension d of the input data. model Divide this by the number of attention heads, which is determined by the scale and complexity of predicting the probability of faults in a multi-grid distribution network.
[0116] By distilling, dominant features with dominant characteristics are privileged, and then a pooling layer is added after the ELU activation function to halve the input length. The process from the f-th layer to the f+1-th layer is shown in the following equation.
[0117] z f+1 =MaxPool(ELU(Convld([z f ] AB ))
[0118] Where MaxPool is the max pooling operation; ELU() is the activation function; Conv1d represents the one-dimensional convolution operation; [·] AB This represents key operations including multi-head probabilistic sparse self-attention operations and attention blocks.
[0119] To reduce the computational complexity of the model, a copy of stack1 is constructed, the secondary stack has its input halved, and the number of self-attention distillation layers is progressively reduced. stack1 is the main stack, receiving the entire input sequence, and is composed of multi-head probabilistic sparse self-attention mechanisms and distillation operations. stack2 serves as the secondary stack, operating internally the same as stack1, but compared to the main stack, the secondary stack halves its input, receiving only half of the input slice, and the stack is repeated thereafter.
[0120] That is, in at least one of the sub-stacks, the input representation vector of the previous stack is halved as input, and the complexity of the input representation vector is reduced by distillation operation through the stacked multi-head probabilistic sparse self-attention mechanism to obtain the corresponding output vector.
[0121] Finally, the outputs of all stacks are concatenated to obtain the final hidden representation H for each task. i .
[0122] In summary, the encoder obtains the dependency relationship between the distribution network fault data and the time series of distribution network fault factors and maps it into intermediate features of distribution network fault information.
[0123] In step S3, the historical distribution network fault data sequence after using 0 placeholders for each grid is used as the input of the masked multi-head self-attention mechanism of the decoder, and the output of the masked multi-head self-attention mechanism and the corresponding hidden layer representation are used as the input of the multi-head attention mechanism of the decoder to obtain the distribution network fault probability prediction data for each grid.
[0124] When performing multi-task learning, each task corresponds to an independent decoder structure. In order to simultaneously predict the distribution network fault probability of n grids, there are n decoder structures in the decoder.
[0125] In the decoder section, each decoding structure receives fault data from the corresponding grid, but the input data sequence only selects the segment preceding the sequence to be predicted. The part of the sequence that needs to be predicted is represented using 0 as a placeholder. Input data is represented as
[0126] The input is fed into a masked multi-head self-attention mechanism, creating a masking matrix. This matrix has the shape of the length of the decoder input sequence multiplied by the length of the decoder input sequence, and each element in the matrix is a Boolean value. Positions marked as True in the masking matrix represent positions that need to be masked, i.e., positions that the model should ignore during prediction.
[0127] The decoder structure for each task receives the feature map H of the corresponding task output by the encoder. i It independently generates distribution network fault prediction results for the corresponding grid. For the prediction task of the i-th grid, the data output by the masked multi-head self-attention mechanism and the feature map H obtained by the encoder are used. i The input encoder employs a multi-head attention mechanism, which is then connected to the corresponding fully connected layer to output the distribution network fault probability prediction y' at time t of the i-th grid. it Where t = T, T+1, ..., T+t de , t deThis indicates the prediction time length, which is determined by the length of the zero placeholder used in the decoder input.
[0128] In S3: in the masked multi-head self-attention mechanism, the corresponding output vector is obtained based on the masking matrix; in the multi-head attention mechanism, the output of the masked multi-head self-attention mechanism and the final hidden representation are fused, and the corresponding fully connected layers are connected to independently obtain the distribution network fault probability prediction data for each grid.
[0129] In step S4, a loss function is constructed and the probability model is trained until convergence based on the historical distribution network fault data and the distribution network fault probability prediction data.
[0130] For example, the loss function F is expressed as:
[0131]
[0132] Among them, t de The prediction time length is determined by the length of the zero placeholder used in the decoder input; y it Let y represent the historical distribution network fault data of the i-th grid. it = 0 or 1, where 0 indicates that no distribution network fault occurred in the i-th network at time t, and 1 indicates that a distribution network fault occurred; y' it This represents the distribution network fault probability prediction data, y' it ∈[0,1].
[0133] In step S5, the current distribution network fault factor time series of each grid in the specified urban distribution network area is used as the input of the converged probability model to obtain the current distribution network fault prediction result of each grid.
[0134] In step S6, the corresponding grid disaster index is obtained based on the current distribution network fault prediction results of each grid.
[0135] In this step, the analytic hierarchy process (AHP) is used to calculate the weight of each post-disaster assessment factor. Combined with the current distribution network fault prediction results of each grid, the corresponding grid disaster index is obtained. The post-disaster assessment factors are set to m types, such as fault recovery time, user level, and impact range.
[0136] Specifically:
[0137] The weights of each post-disaster assessment factor were calculated using the analytic hierarchy process (AHP). Based on the assessment weights given by experts, the judgment matrix A was obtained. m The weight value w is calculated after normalization by column. u (u = 1, 2, ..., m) and perform consistency judgment.
[0138] For the post-disaster assessment factors S collected by each grid iu Let S' represent the u-th post-disaster assessment factor in the i-th grid. After normalizing each parameter, we obtain S'. iu The disaster index is calculated as shown in the following formula.
[0139]
[0140] Where, p it This represents the disaster index of the i-th grid at time t.
[0141] In step S7, the corresponding graded early warning results are obtained based on the grid disaster index of each grid.
[0142] In this step, tiered thresholds P1, P2, and P3 are set. The disaster index of each grid is compared with the threshold to generate tiered early warnings. Specifically, P1... <P2<P3。
[0143] Specifically, the tiered early warning system includes:
[0144] (1) When p it >P3, Level 1 warning; (2) When P3>p it >P2, Level II warning; (3) When P2>p it P1, Level 1 Warning.
[0145] like Figure 4 As shown, this embodiment of the invention also provides a fault prediction system for urban power distribution networks under extreme weather conditions. It introduces a probabilistic model for urban power distribution network faults based on Informer neural networks and multi-task learning, wherein the probabilistic model includes an encoder and a decoder; the system includes:
[0146] The filtering module is used to grid the specified urban power distribution network area; it uses the historical fault influencing factors data of each grid as independent variables and the corresponding historical power distribution network fault data as dependent variables, and uses causal analysis to filter out the power distribution network fault factor types of each grid.
[0147] The encoding module is used to take the distribution network fault factor time series of each grid as the input of the encoder's main stack, and take the distribution network fault factor time series that has been halved at least once as the input of the encoder's sub-stack, and concatenate the outputs of all stacks to obtain the final hidden representation of each task; wherein, the main stack and the sub-stack are both stacked by a multi-head probabilistic sparse self-attention mechanism and a distillation operation.
[0148] The decoding module is used to take the historical distribution network fault data sequence after using 0 placeholders for each grid as the input of the masked multi-head self-attention mechanism of the decoder, and take the output of the masked multi-head self-attention mechanism and the corresponding hidden layer representation as the input of the multi-head attention mechanism of the decoder to obtain the distribution network fault probability prediction data for each grid.
[0149] The training module is used to construct a loss function and train the probability model until convergence based on the historical distribution network fault data and the distribution network fault probability prediction data.
[0150] The prediction module is used to take the current time series of distribution network fault factors of each grid in the specified urban distribution network area as the input of the converged probability model to obtain the current distribution network fault prediction result of each grid.
[0151] In an alternative implementation, such as Figure 5 As shown, the urban power distribution network fault prediction system also includes:
[0152] The calculation module is used to obtain the corresponding grid disaster index based on the current distribution network fault prediction results of each grid.
[0153] The early warning module is used to obtain corresponding graded early warning results based on the grid disaster index of each grid.
[0154] This invention also provides a storage medium storing a computer program for predicting urban power distribution network faults under extreme weather conditions, wherein the computer program causes a computer to execute the urban power distribution network fault prediction method described above.
[0155] This invention also provides an electronic device, comprising:
[0156] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing urban power distribution network fault prediction as described above.
[0157] It is easy to understand that the urban power distribution network fault prediction system, storage medium and electronic equipment under extreme weather conditions provided in the embodiments of the present invention correspond to the urban power distribution network fault prediction method under extreme weather conditions described above. The explanation, examples and beneficial effects of the relevant contents can be referred to the corresponding contents in the urban power distribution network fault prediction method, and will not be repeated here.
[0158] In summary, compared with existing technologies, it has the following beneficial effects:
[0159] 1. In this embodiment of the invention, for a specified urban power distribution network area, the Granger causality test method is used to screen out the types of power distribution network fault factors in each regional grid, and the complexity of the disaster-causing factors is objectively analyzed. Furthermore, a probabilistic model of urban power distribution network faults based on Informer neural network and multi-task learning is introduced. The multi-head probabilistic sparse self-attention mechanism reduces the time complexity, the serial output of the encoder's master and slave stacks enhances the robustness of the distillation operation, and the generative decoder achieves one-time output, improving the prediction speed and avoiding the accumulation of errors in stepwise prediction. This solves the problem of long-term dependence of time series data. Moreover, the multi-task learning method enables the parallel execution of multi-grid prediction tasks and outputs multi-grid fault probabilities.
[0160] 2. The embodiments of the present invention take into account factors such as fault recovery time, user level, and scope of impact to assess the post-disaster grid distribution network operation status in order to achieve graded early warning, facilitate the rational allocation of resources to cope with the occurrence of extreme weather, and maintain the normal operation of the urban distribution network.
[0161] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0162] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting faults in urban power distribution networks under extreme weather conditions, characterized in that, A probabilistic model for urban power distribution network faults based on Informer neural networks and multi-task learning is introduced, the probabilistic model including an encoder and a decoder; the method includes: S1. Grid-based designation of urban power distribution network areas; using historical fault influencing factors data of each grid as independent variables and corresponding historical power distribution network fault data as dependent variables, causal analysis methods are used to screen out the power distribution network fault factor types of each grid. S2. The distribution network fault factor time series of each grid is used as the input of the encoder's main stack, and the distribution network fault factor time series that has been halved at least once is used as the input of the encoder's sub-stack. The outputs of all stacks are concatenated to obtain the final hidden representation of each task. The main stack and the sub-stack are both stacked by a multi-head probabilistic sparse self-attention mechanism and a distillation operation. S3. Take the historical distribution network fault data sequence after using 0 placeholders for each grid as the input of the masked multi-head self-attention mechanism of the decoder, and take the output of the masked multi-head self-attention mechanism and the corresponding hidden layer representation as the input of the multi-head attention mechanism of the decoder to obtain the distribution network fault probability prediction data for each grid. S4. Based on the historical distribution network fault data and the distribution network fault probability prediction data, construct a loss function and train the probability model until convergence; S5. Use the current time series of distribution network fault factors for each grid in the specified urban distribution network area as the input to the converged probability model to obtain the current distribution network fault prediction result for each grid.
2. The urban power distribution network fault prediction method as described in claim 1, characterized in that, include: S6. Based on the current distribution network fault prediction results for each grid, obtain the corresponding grid disaster index; S7. Obtain the corresponding graded early warning results based on the grid disaster index of each grid.
3. The urban power distribution network fault prediction method as described in claim 1 or 2, characterized in that, In S1, the Granger causality test method is used to screen out the distribution network fault factor types for each grid.
4. The urban power distribution network fault prediction method as described in claim 1 or 2, characterized in that, S2 includes: S21. Standardize the time series of distribution network fault factors for each grid. Among them, Z ijt Z′ ijt These represent the data of the i-th grid and the j-th type of fault factor at time t before and after normalization, respectively; min and max represent taking the minimum and maximum values, respectively; t0 represents the initial time of the sample, and T is the final time of the sample; i = 1, 2, ..., n represents the grid index, and n represents the total number of grids; j = 1, 2, ..., J i J represents the fault factor type index. i This represents the total number of fault factor types in the i-th grid. S22. Use location encoding to add contextual information to the normalized distribution network fault factor time series, and use learnable stamp embedding to represent global timestamps to obtain the model's input vector; in, The input vector of the model; u′ ijt This indicates that a one-dimensional convolution filter is used to convert Z′ ijt Mapping to d model A dimensional vector; PE represents positional encoding; SE represents learnable stamp embedding; p represents the number of global timestamp types; `pos` is the location index, representing the time step position of the distribution network fault factor time series; `h` is the dimension index, representing the dimension of the distribution network fault factor time series in the input sequence; `d` model Represents the dimension of the input; sin is sine, cos is cosine; S23. Using the model's input representation vector as the encoder input, including: In the main stack, the complexity of the input representation vector is reduced by a stacked multi-head probabilistic sparse self-attention mechanism distillation operation to obtain the corresponding output vector; In at least one of the sub-stacks, the input representation vector of the previous stack is halved and used as input. The complexity of the input representation vector is reduced by distillation operation through the stacked multi-head probabilistic sparse self-attention mechanism to obtain the corresponding output vector. Concatenate the outputs of all stacks to obtain the final hidden representation H for each task. i ; And / or in S3: In the masked multi-head self-attention mechanism, the corresponding output vector is obtained based on the masking matrix; in the multi-head attention mechanism, the output of the masked multi-head self-attention mechanism and the final hidden representation are fused, and the corresponding fully connected layers are connected to independently obtain the distribution network fault probability prediction data for each grid.
5. The urban power distribution network fault prediction method as described in claim 1 or 2, characterized in that, The loss function F in S4 is expressed as: Among them, t de The prediction time length is determined by the length of the zero placeholder used in the decoder input; y it Let y represent the historical distribution network fault data of the i-th grid. it = 0 or 1, where 0 indicates that no distribution network fault occurred in the i-th network at time t, and 1 indicates that a distribution network fault occurred; y′ it This represents the distribution network fault probability prediction data, y′ it ∈[0,1].
6. The urban power distribution network fault prediction method as described in claim 2, characterized in that, In S6, the weight of each post-disaster assessment factor is calculated using the analytic hierarchy process (AHP). Combined with the current distribution network fault prediction results of each grid, the corresponding grid disaster index is obtained. The post-disaster assessment factors include at least fault recovery time, user level, and impact range. And / or in S7, tiered thresholds P1, P2, and P3 are set to compare the grid disaster index of each grid with the threshold for tiered early warning, wherein P1 <P2<P3。 7. A fault prediction system for urban power distribution networks under extreme weather conditions, characterized in that, A probabilistic model for urban power distribution network faults based on Informer neural networks and multi-task learning is introduced, the probabilistic model including an encoder and a decoder; the system includes: The filtering module is used to grid the specified urban power distribution network area; it uses the historical fault influencing factors data of each grid as independent variables and the corresponding historical power distribution network fault data as dependent variables, and uses causal analysis to filter out the power distribution network fault factor types of each grid. The encoding module is used to take the time series of distribution network fault factors of each grid as the input of the main stack of the encoder, and take the time series of distribution network fault factors that have been halved at least once as the input of the sub-stack of the encoder, and concatenate the outputs of all stacks to obtain the final hidden representation of each task; wherein, the main stack and the sub-stack are both stacked by multi-head probabilistic sparse self-attention mechanism and distillation operation. The decoding module is used to take the historical distribution network fault data sequence after using 0 placeholders for each grid as the input of the masked multi-head self-attention mechanism of the decoder, and take the output of the masked multi-head self-attention mechanism and the corresponding hidden layer representation as the input of the multi-head attention mechanism of the decoder to obtain the distribution network fault probability prediction data for each grid. The training module is used to construct a loss function and train the probability model until convergence based on the historical distribution network fault data and the distribution network fault probability prediction data. The prediction module is used to take the current time series of distribution network fault factors of each grid in the specified urban distribution network area as the input of the converged probability model to obtain the current distribution network fault prediction result of each grid.
8. The urban power distribution network fault prediction system as described in claim 7, characterized in that, include: The calculation module is used to obtain the corresponding grid disaster index based on the current distribution network fault prediction results of each grid. The early warning module is used to obtain corresponding graded early warning results based on the grid disaster index of each grid.
9. A storage medium, characterized in that, It stores a computer program for predicting urban power distribution network faults under extreme weather conditions, wherein the computer program causes a computer to execute the urban power distribution network fault prediction method as described in any one of claims 1 to 6.
10. An electronic device, characterized in that, include: One or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing the urban power distribution network fault prediction method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Power distribution network grid fault power failure prediction method in disaster weather
CN116402208A
Transformer substation equipment fault early warning method and equipment based on double-domain sparse Transform model
CN116433223A
