AI power transmission network fault prediction and positioning method and system for space-time anomaly detection

By combining undirected graph models and adaptive mask preprocessing, spatial graph capsule modules, time-coded gating modules, and the gray wolf optimization algorithm with the optimal power flow model, the problems of spatiotemporal feature fragmentation and insufficient positioning accuracy in traditional power transmission network fault detection are solved, and accurate prediction and positioning of power transmission network faults are achieved.

CN121920588APending Publication Date: 2026-04-24国网河南省电力公司中牟县供电公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
国网河南省电力公司中牟县供电公司
Filing Date
2025-12-16
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Traditional fault detection methods for power transmission networks suffer from problems such as fragmented spatiotemporal characteristics, low optimization efficiency, and insufficient positioning accuracy, making it difficult to meet the requirements of safe and stable operation of smart grids.

Method used

An AI-based fault prediction and localization method for power transmission networks, oriented towards spatiotemporal anomaly detection, is adopted. A spatiotemporal data tensor is constructed by an undirected graph model and an adaptive mask preprocessing strategy. Features are extracted by combining a spatial graph capsule module and a time-coded gating module. The Grey Wolf optimization algorithm and the optimal power flow model are fused for fault localization.

Benefits of technology

It enables accurate prediction and location of faults, improves the pertinence and response speed of fault handling, and meets the requirements for safe and stable operation of smart grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121920588A_ABST
    Figure CN121920588A_ABST
Patent Text Reader

Abstract

The invention discloses an AI power transmission network fault prediction and positioning method and system for space-time anomaly detection, and relates to the field of power transmission network fault detection and intelligent optimization. The method comprises the following steps: representing a target power transmission network as an undirected graph model, and constructing a spatio-temporal data tensor based on multi-dimensional monitoring data in the power transmission network; preprocessing the spatio-temporal data tensor according to an adaptive mask preprocessing strategy; inputting the undirected graph model and the preprocessed spatio-temporal data into a spatio-temporal feature extraction network to extract spatial features and time features, and fusing the spatial features and the time features to obtain spatio-temporal joint features; inputting the space-time joint features into a double-layer multi-layer perceptron prediction model, and outputting the fault occurrence probability of each line; and when the fault occurrence probability exceeds a preset threshold value, triggering a positioning optimization model based on fusion of a grey wolf optimization algorithm and an optimal power flow model, performing search by taking fault positioning error minimization as a target, and outputting an optimal fault position. Therefore, fault prediction, accurate positioning and type judgment are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of power transmission network fault detection and intelligent optimization technology, and in particular to an AI-based power transmission network fault prediction and location method and system for spatiotemporal anomaly detection. Background Technology

[0002] As the penetration rate of renewable energy (RES) in transmission networks continues to increase, the complexity of power grid topology and operational uncertainty have increased significantly, posing numerous challenges to traditional fault detection methods: First, the spatiotemporal characteristics of transmission networks are strongly coupled, and traditional methods often process spatial or temporal information separately, resulting in fragmented features and difficulty in capturing cross-regional, long-term fault correlation patterns. Second, data acquisition is prone to missing data and noise interference, and existing preprocessing methods lack specificity and cannot effectively enhance the anomaly sensitivity of key areas (such as densely loaded areas). Third, the optimal power flow (OPF) problem, on which fault location depends, is a highly non-convex, nonlinear optimization problem. Traditional optimization algorithms (such as genetic algorithms and particle swarm optimization) are prone to getting trapped in local optima and do not fully consider the reserve costs, penalty costs, and network losses caused by the randomness of renewable energy output, making it difficult to balance location accuracy and economy. Fourth, existing feature extraction modules (such as traditional GCN and RNN) have limitations. GCN can only capture local spatial dependencies, and RNN is prone to gradient vanishing, failing to meet the needs of deep feature mining in complex power grids. These problems result in traditional methods having low accuracy in fault prediction, large location deviations, and slow response speeds, making them difficult to meet the requirements of safe and stable operation of smart grids. Summary of the Invention

[0003] To address the problems of fragmented spatiotemporal features, low optimization efficiency, and insufficient positioning accuracy in traditional power transmission network fault detection, this invention provides an AI-based method and system for predicting and locating power transmission network faults based on spatiotemporal anomaly detection. This system enables early fault prediction, accurate location, and type identification, providing decision support for power grid operation and maintenance.

[0004] In a first aspect, embodiments of the present invention provide an AI-based method for predicting and locating faults in power transmission networks based on spatiotemporal anomaly detection, comprising:

[0005] The target power transmission network is represented as an undirected graph model, and a spatiotemporal data tensor is constructed based on the multi-dimensional monitoring data in the target power transmission network.

[0006] The spatiotemporal data tensor is preprocessed according to an adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data.

[0007] The undirected graph model and preprocessed spatiotemporal data are input into a spatiotemporal feature extraction network to extract spatial and temporal features, and the spatial and temporal features are fused to obtain spatiotemporal joint features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a temporal coding gating module.

[0008] The spatiotemporal joint features are input into a pre-trained dual-layer multilayer perceptron prediction model, which outputs the probability of fault occurrence of each line in the target power transmission network at a future set time.

[0009] When the probability of the fault occurrence exceeds a preset threshold, a location optimization model based on the fusion of the Grey Wolf optimization algorithm and the optimal power flow model is triggered. With the goal of minimizing the fault location error, the target power transmission network is searched and the optimal fault location is output.

[0010] In a preferred embodiment, after searching the power transmission network and outputting the optimal fault location, the method further includes:

[0011] Extract multi-dimensional fault features from the spatiotemporal joint features;

[0012] The multi-dimensional fault features are input into a pre-trained fault classification model, which outputs the corresponding fault type.

[0013] In a preferred embodiment, the step of preprocessing the spatiotemporal data tensor according to an adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data includes:

[0014] The spatiotemporal data tensor is randomly masked using a fixed mask ratio;

[0015] Based on the power transmission network topology, critical areas and remote areas are determined, and a first dynamic mask ratio is applied to the critical areas and a second dynamic mask ratio is applied to the remote areas, wherein the first dynamic mask ratio is greater than the second dynamic mask ratio.

[0016] The masked data is normalized to unify the data distribution, resulting in preprocessed spatiotemporal data.

[0017] In a preferred embodiment, the undirected graph model and preprocessed spatiotemporal data are input into a spatiotemporal feature extraction network to extract spatial and temporal features, and the spatial and temporal features are fused to obtain spatiotemporal joint features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a time-coding gating module, comprising:

[0018] Spatial features are extracted from the preprocessed spatiotemporal data using the spatial map capsule module to obtain a spatial feature matrix;

[0019] The time feature matrix is ​​obtained by extracting time features from the preprocessed spatiotemporal data through the time coding gating module.

[0020] The spatial feature matrix and the temporal feature matrix are mapped to the same dimension by a learnable weight matrix, and then the associated features are strengthened by element-wise multiplication and spliced ​​along the channel dimension to obtain the spatiotemporal joint features.

[0021] In a preferred embodiment, spatial features are extracted from the preprocessed spatiotemporal data using a spatial map capsule module to obtain a spatial feature matrix, including:

[0022] Based on the adjacency matrix of the undirected graph model, a normalized Laplacian matrix and its corresponding forward transition matrix and reverse transition matrix are constructed. Multi-step signal diffusion is performed based on the forward transition matrix and reverse transition matrix to obtain the spatial correlation features after preliminary fusion.

[0023] Multiple cluster centers are set up based on the functional partitions of the target power transmission network, and the spatial correlation features after initial fusion are iteratively optimized through the capsule dynamic routing mechanism to obtain the iteratively updated capsule embedding features.

[0024] A multi-scale matrix containing the Laplacian matrix, forward transition matrix, and backward transition matrix is ​​constructed. The multi-scale matrix is ​​then combined with the iteratively updated capsule embedding features and convolutional operation is performed to output a spatial feature matrix.

[0025] In a preferred embodiment, the step of iteratively optimizing the initially fused spatial association features through a capsule dynamic routing mechanism to obtain iteratively updated capsule embedding features includes:

[0026] The nonlinear expressive power of the spatial correlation features after preliminary fusion is enhanced by an activation function, and the correlation weights between the cluster center and each capsule are determined by normalization.

[0027] The embedding vector of the capsule is iteratively updated based on the association weight. When the embedding vector of the capsule converges, the iteratively updated capsule embedding feature is output.

[0028] In a preferred embodiment, a time feature matrix is ​​obtained by extracting time features from the preprocessed spatiotemporal data using a time-coding gating module, including:

[0029] Short-term fluctuation features and long-term trend features are extracted from the preprocessed spatiotemporal data through a dual-branch embedding design.

[0030] The short-term fluctuation characteristics and long-term trend characteristics are input into the gating adjustment mechanism for dynamic screening and enhancement of effective time characteristics;

[0031] The effective time features are superimposed with the original input features passed through residuals to obtain the optimized time series features;

[0032] Multiple time-encoding gating blocks are superimposed to perform batch normalization and regularization on the optimized time-series features, and the time feature matrix is ​​output.

[0033] In a preferred embodiment, the step of inputting the spatiotemporal joint features into a pre-trained dual-layer multilayer perceptron prediction model and outputting the probability of fault occurrence of each line in the target power transmission network at a future set time includes:

[0034] The spatiotemporal joint features are input into the first fully connected layer of the dual-layer multilayer perceptron prediction model, and nonlinear transformation is performed through the Leaky ReLU activation function to map the spatiotemporal joint features to a high-dimensional feature space.

[0035] The high-dimensional features transformed by the first fully connected layer are input into the second fully connected layer of the dual-layer multilayer perceptron prediction model, and the probability of fault occurrence is output.

[0036] In a preferred embodiment, when the probability of the fault occurrence exceeds a preset threshold, a location optimization model based on the fusion of the Grey Wolf optimization algorithm and the optimal power flow model is triggered. With the goal of minimizing the fault location error, the model searches the transmission network and outputs the optimal fault location, including:

[0037] Initialize a gray wolf population, wherein each individual in the population is encoded to represent a possible fault location in the target power transmission network;

[0038] The gray wolf population is driven to perform iterative search under the condition of satisfying the operation constraints of the power transmission network, with the goal of minimizing the fault location error.

[0039] When the iteration meets the termination condition, the position encoded by the best individual in the population is output and used as the optimal fault position.

[0040] Secondly, embodiments of the present invention also provide an AI-based power transmission network fault prediction and location system for spatiotemporal anomaly detection, comprising:

[0041] The data processing and modeling module is used to represent the target power transmission network as an undirected graph model and to construct a spatiotemporal data tensor based on the multi-dimensional monitoring data in the target power transmission network.

[0042] The data preprocessing module is used to preprocess the spatiotemporal data tensor according to the adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data.

[0043] The spatiotemporal feature extraction and fusion module is used to input the undirected graph model and the preprocessed spatiotemporal data into the spatiotemporal feature extraction network to extract spatial and temporal features, and to fuse the spatial and temporal features to obtain spatiotemporal joint features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a time-encoding gating module.

[0044] The line fault prediction module is used to input the spatiotemporal joint features into a pre-trained dual-layer multilayer perceptron prediction model and output the probability of fault occurrence of each line in the target power transmission network at a future set time.

[0045] The line fault location module is used to trigger a location optimization model based on the fusion of the gray wolf optimization algorithm and the optimal power flow model when the probability of the fault occurrence exceeds a preset threshold. The model searches the target transmission network with the goal of minimizing the fault location error and outputs the optimal fault location.

[0046] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0047] One or more processors;

[0048] Storage device for storing one or more programs;

[0049] When the one or more programs are executed by the one or more processors, the one or more processors implement the AI-based power transmission network fault prediction and location method for spatiotemporal anomaly detection as described in any embodiment of the present invention.

[0050] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the AI-based power transmission network fault prediction and location method for spatiotemporal anomaly detection as described in any embodiment of the present invention.

[0051] Compared with existing technologies, the present invention achieves the following beneficial effects:

[0052] (1) This invention proposes an adaptive mask preprocessing strategy, which combines a fixed-ratio random mask with a topological adaptive dynamic mask to enhance the model’s ability to perceive anomalies in key areas and provides a high-quality data foundation for subsequent feature extraction.

[0053] (2) The spatial graph capsule module designed in this invention breaks through the limitations of traditional GCN local dependency capture. Through global signal propagation modeling and capsule dynamic routing mechanism, it realizes the deep extraction of cross-regional electrical correlation features and accurately depicts the global and local spatial dependencies between nodes.

[0054] (3) The present invention designs a time-coded gating module to solve the problems of gradient vanishing in traditional RNN and limited receptive field in TCN. Through dual-branch embedding (local short-term fluctuations + global long-term trends) and gating adjustment mechanism, it can efficiently capture the temporal variation law of electrical quantities.

[0055] (4) This invention proposes a fault location scheme that combines the Grey Wolf Optimization (GWO) algorithm with the Optimal Power Flow (OPF) model. The OPF constraint cost (including thermal power operation cost, renewable energy direct / reserve / penalty cost and network loss) is incorporated into the objective function. By utilizing the global optimization capability and exploration-utilization balance characteristics of the GWO algorithm, the accurate fault location and the coordinated optimization of operation economy are achieved.

[0056] (5) The present invention constructs a complete fault type judgment process, based on multi-dimensional fault features and a lightweight classification model, to achieve accurate identification of common faults such as short circuit, open circuit, and equipment overheating, thereby improving the pertinence of fault handling. Attached Figure Description

[0057] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0058] Figure 1 This is a flowchart of an AI-based power transmission network fault prediction and localization method for spatiotemporal anomaly detection provided in an embodiment of the present invention;

[0059] Figure 2 This is a framework diagram of the AI-based power transmission network fault prediction and location method for spatiotemporal anomaly detection provided in this embodiment of the invention.

[0060] Figure 3 This is a flowchart of the fault location optimization based on the GWO algorithm provided in an embodiment of the present invention;

[0061] Figure 4 This is a graph showing the performance comparison results of different algorithms provided in the embodiments of the present invention;

[0062] Figure 5 This is a schematic diagram of the structure of the AI-based power transmission network fault prediction and location system for spatiotemporal anomaly detection provided in an embodiment of the present invention;

[0063] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0064] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0065] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as being processed sequentially, many of these operations (or steps) may be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operation is completed, but may also have additional steps not included in the figures. The process may correspond to a method, function, procedure, subroutine, subroutine, etc.

[0066] Example 1

[0067] like Figure 1 The diagram shows a flowchart of an AI-based power transmission network fault prediction and location method 100 for spatiotemporal anomaly detection provided in Embodiment 1 of the present invention. The method 100 specifically includes the following steps:

[0068] S110. Represent the target power transmission network as an undirected graph model, and construct a spatiotemporal data tensor based on the multi-dimensional monitoring data in the target power transmission network.

[0069] Preferably, the target power transmission network is represented as an undirected graph. .

[0070] in: Let be a set of nodes, encompassing core equipment such as transmission line sensors, busbars, and transformers, and denote the total number of nodes as . ; This is a set of edges, corresponding to transmission line segments, reflecting the physical connection relationships between equipment; The adjacency matrix is ​​constructed based on the electrical distance between devices (combined with impedance and admittance parameters) or physical distance, specifically generated using a Gaussian kernel thresholding algorithm: when the distance between devices... Distance threshold hour, ,otherwise ; Distance threshold: Used to determine whether there is a valid association between devices. When the distance between devices... At that time, it is assumed that the two are related and the strength of the relationship is calculated; : Adjacency matrix Line number The elements of the column represent the first element. The node and the first The association strength value of each node; : No. The node (device) and the first The actual distance between nodes (devices); : Distance standard deviation, used to adjust the smoothness of the Gaussian kernel function, affecting the calculation weight of the correlation strength between nodes.

[0071] Simultaneously, a spatiotemporal data tensor is constructed based on multi-dimensional monitoring data in the target power transmission network. Multi-dimensional monitoring data includes core electrical parameter data (such as current data, voltage data, and power data), equipment status monitoring data (such as equipment temperature data), and environmental correlation data.

[0072] in, Number of training samples; Time series length, i.e., the number of time steps contained in a single sample (e.g., when collecting 24 hours of data at 5-minute intervals). ); Feature dimension, which refers to the types of monitoring parameters (such as current, voltage, power, equipment temperature, ambient humidity, etc.) contained in a single node at each time step. Spatial receptive field range, i.e., the number of surrounding related nodes covered during the feature extraction process of a single node (usually 10 ... indivual).

[0073] S120. The spatiotemporal data tensor is preprocessed according to the adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data.

[0074] Preferably, for the aforementioned spatiotemporal data tensor To address the missing data and noise, this embodiment performs random masking on the spatiotemporal data tensor using a fixed mask ratio. For example, the mask ratio is adjusted accordingly. The value is fixed at 0.25 to mask out-of-data and noisy regions, forcing the model to learn the semantic associations of missing information.

[0075] Dynamically Adjust Adaptive Mask Ratio Based on Transmission Network Topology A first dynamic mask ratio is applied to critical areas (such as high-load areas), and a second dynamic mask ratio is applied to remote areas (such as suburban lines) to improve the model's sensitivity to anomalies in critical areas. It is important to note that the first dynamic mask ratio must be greater than the second dynamic mask ratio. For example, the first dynamic mask ratio is applied to high-load areas (such as urban central bus lines). (Full mask cluster level learning) Apply a second dynamic mask ratio to suburban lines. =0.5 (partial mask).

[0076] Furthermore, in order to eliminate the impact of dimensional differences on subsequent feature extraction, the spatiotemporal data after masking is normalized by Z-score to unify the data distribution and obtain preprocessed spatiotemporal data.

[0077] S130. Input the undirected graph model and the preprocessed spatiotemporal data into the spatiotemporal feature extraction network to extract spatial and temporal features, and fuse the spatial and temporal features to obtain spatiotemporal joint features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a time-encoded gating module.

[0078] First, to address the issue that traditional graph convolutional neural networks (GCNs) can only capture local spatial dependencies and ignore cross-regional electrical correlations, this invention extracts spatial features from preprocessed spatiotemporal data using a spatial graph capsule module to obtain a spatial feature matrix. Specifically, this includes the following steps (a)-(c):

[0079] (a) Based on the adjacency matrix of the undirected graph model, a normalized Laplacian matrix and its corresponding forward and backward transition matrices are constructed. Multi-step signal diffusion is then performed using the forward and backward transition matrices to obtain the preliminary fused spatial correlation features. Specifically,

[0080] Introducing the normalized symmetric positive definite (PSD) Laplace matrix Simulates the thermal conduction propagation of electrical signals in power transmission networks; and constructs a forward transfer matrix. With the reverse transition matrix ,pass The diffusion operation is performed to fuse the connection characteristics and implicit correlation characteristics (such as equipment failure history correlation) of each line (node) in the target power transmission network to obtain the spatial correlation characteristics after preliminary fusion.

[0081] in, The identity matrix of order ( Equal to the total number of nodes ); A: Node degree diagonal matrix; A: Adjacency matrix of the target power transmission network undirected graph model; The inverse square root of the diagonal matrix of node degree; : Laplace matrix The summation of the column elements is used to normalize the transition matrix; The transpose of the Laplace matrix The summation of column elements is used for normalization of the reverse transition matrix; : Diffusion steps, fixed at 2.

[0082] (b) Multiple cluster centers are set up based on the functional partitions of the target power transmission network, and the spatial correlation features after preliminary fusion are iteratively optimized through the capsule dynamic routing mechanism to obtain the iteratively updated capsule embedding features;

[0083] Preferably, the power transmission network is divided into functional zones (such as power node clusters, load node clusters, and tie line clusters) and multiple cluster centers are set as super edges, and the capsule embedding is iteratively updated through a capsule dynamic routing mechanism.

[0084] The capsule embedding is iteratively updated through a capsule dynamic routing mechanism, including: enhancing the nonlinear expressive power of the initially fused spatial association features through an activation function, determining the association weights between the cluster center and each capsule after normalization, iteratively updating the capsule embedding vectors based on the association weights, and outputting the iteratively updated capsule embedding features after the capsule embedding vectors converge.

[0085] The specific calculation formula is as follows:

[0086]

[0087] in, Capsule output vector; The total input signal to the capsule is obtained by weighted summation of the information transmitted from the cluster center to the capsule; Iteration weight, representing the weight of the iteration. The cluster center and the first The association weights of each capsule are enhanced with the LeakyReLU activation function to enhance the nonlinear expression, and then normalized with Softmax to ensure that the sum of the weights is 1; The amount of information transferred from the cluster center to the capsule, i.e., the first... The eigenvector of the cluster center moves towards the first... Each capsule conveys effective information.

[0088] (c) Construct a multi-scale matrix containing the Laplacian matrix, forward transition matrix and reverse transition matrix, and perform a convolution operation on the multi-scale matrix in combination with the iteratively updated capsule embedding features to output a spatial feature matrix.

[0089] Preferably, in this embodiment, a matrix containing the original Laplacian matrix is ​​constructed. Forward transition matrix Reverse transition matrix The multi-scale matrix is ​​combined with the iteratively updated capsule embedding features and then fused with local neighborhood and global cross-region features through convolution operations to finally output a spatial feature matrix. ( To hide the feature dimension, it is set to 32, which is used to characterize the high-dimensional representation of the node space features.

[0090] Secondly, to address the issues of vanishing gradients in traditional RNNs and limited receptive fields in TCNs, this invention extracts temporal features from preprocessed spatiotemporal data using a time-encoding gating module to obtain a temporal feature matrix. Specifically, this includes the following steps (d)-(g):

[0091] (d) First, short-term fluctuation features and long-term trend features are extracted from the preprocessed spatiotemporal data through a two-branch embedding design;

[0092] Specifically, the dual-branch embedding design includes local embedding. With global embedding , where the local embedding :pass Convolution captures short-term fluctuations (such as second-level voltage drops and current surges); global embedding By dilating the convolution (dilation rate) , To expand the temporal receptive field (by increasing the number of convolutional layers), long-term trend characteristics (such as daily load peaks and troughs, and seasonal power fluctuations) are learned.

[0093] (e) Input the short-term fluctuation characteristics and long-term trend characteristics into the gating adjustment mechanism for dynamic screening and enhancement of effective time characteristics;

[0094] (f) The effective time features are superimposed with the original input features passed through residuals to obtain the optimized time series features;

[0095] Preferably, a gating mechanism is constructed by introducing a Sigmoid gating function and a hyperbolic tangent (Tanh) activation function to dynamically regulate the flow of temporal information, filter effective features, and alleviate gradient vanishing. The Sigmoid gating function is responsible for dynamically filtering temporal information (retaining effective features and masking redundant information), while the hyperbolic tangent (Tanh) activation function is used to enhance the non-linear expressive power of the features. The specific formula is as follows:

[0096]

[0097] in, The output formula of the time-encoded gating module is used to dynamically adjust the flow of time information, filter effective features, and alleviate gradient vanishing. : Input vector of the time-coded gating module; : Filtering function, used to filter input Extract effective time features (such as fault-related temporal change patterns) to enhance feature discriminative power; : Gating function; The Sigmoid activation function is used to gate the function. The output is mapped to The interval enables dynamic filtering of time information (retaining information close to 1 and masking information close to 0). Element-wise multiplication is used to multiply the filtered effective features with the gating weights element by element to achieve information filtering and enhancement. The residual join function directly inputs the module. The features are passed to the output and superimposed with the filtered features to alleviate the gradient vanishing problem in deep networks.

[0098] (g) Multiple time-encoding gating blocks are superimposed to perform batch normalization and regularization on the optimized time-series features, and the time feature matrix is ​​output.

[0099] Preferably, this step involves stacking four temporal encoding gating blocks (each containing two network layers), inserting batch normalization (BatchNorm) and temporal dropout (scale 0.3, zeroing out the entire temporal dimension features), and outputting a temporal feature matrix. .

[0100] Batch Normalization is a regularization operation that normalizes the output features of each network layer (mean is 0, variance is 1), accelerating model training convergence and improving stability.

[0101] Temporal Dropout: A regularization operation with a dropout ratio of 0.3, which nullifies some features across the entire time dimension to prevent the model from over-relying on information from specific time steps and enhances generalization.

[0102] : Time feature matrix, output dimension is ( The length of the time series. (To hide feature dimensions), integrating short-term fluctuations and long-term trends in terms of time characteristics.

[0103] Finally, the spatial feature matrix is ​​processed by a learnable weight matrix. With time feature matrix Mapping to the same dimension and then concatenating the associated features along the channel dimension after element-wise multiplication to obtain spatiotemporal joint features. This provides a high-dimensional, strongly correlated feature basis for fault and anomaly detection.

[0104] Among them, the learnable weight matrix is ​​the adaptation matrix in spatiotemporal feature fusion, used to integrate spatial features. With time characteristics Mapping to the same dimension ensures the feasibility of fusion operations;

[0105] Spatiotemporal joint feature matrix, output dimension is ( The total number of nodes. The length of the time series. (The feature dimension after fusion).

[0106] S140. Input the spatiotemporal joint features into a pre-trained dual-layer multilayer perceptron prediction model, and output the probability of fault occurrence of each line in the target power transmission network at a future set time.

[0107] Preferably, based on spatiotemporal joint features Using a dual-layer multilayer perceptron (MLP) as input, a fault predictor is used to predict the probability of fault occurrence for each line in the target transmission network at a future set time. The dual-layer MLP includes:

[0108] First-layer MLP: Mapped to The feature space is 3D, and the activation function is Leaky ReLU;

[0109] Second-layer MLP: Outputs the future state of each node / line Failure probability at time steps (set to 15 minutes, 30 minutes, and 60 minutes) ;

[0110] Loss function setting: A joint loss function of mean absolute error (MAE) and KL divergence is used to minimize the difference between the predicted value and the historical fault label. The specific formula is as follows:

[0111]

[0112] in, The output feature dimension of the first layer MLP. To hide the feature dimension (set to 32); Leaky ReLU: The activation function used in the first layer of the MLP, which avoids neuron death and enhances the non-linear expressive ability of the model by giving the negative input a small slope (such as 0.01); The number of future prediction time steps is set to 3 (corresponding to 15 minutes, 30 minutes, and 60 minutes) to cover different time-sensitive fault prediction needs. Fault occurrence probability matrix, dimension 1 ( The total number of nodes. (For the prediction time step), the matrix elements represent the probability value of the corresponding node failing at the corresponding time step; Mean absolute error function; Spatiotemporal feature mapping function, which maps spatiotemporal joint features The mapping is to a predicted value vector consistent with the dimension of the fault label. Mask tensor, dimension and Consistent, the element is 0 or 1, 1 indicates that the corresponding position is a valid data area, and 0 indicates invalid data (such as missing or noisy data). Fault label matrix, with dimensions of ( The total number of nodes. (For the predicted time step), an element of 1 indicates that the corresponding node failed at the corresponding time step, and 0 indicates that it is normal; The KL divergence (relative entropy) function calculates the difference between the predicted probability distribution after Softmax normalization and the true label distribution, thereby enhancing the accuracy of probability prediction.

[0113] S150. When the probability of the fault occurrence exceeds a preset threshold, a location optimization model based on the fusion of the gray wolf optimization algorithm and the optimal power flow model is triggered. The model searches the power transmission network with the goal of minimizing the fault location error and outputs the optimal fault location.

[0114] The threshold is used to balance the risk of missed fault detection and the probability of false triggering of the location process. It ensures coverage of most real fault scenarios while avoiding frequent start-ups of the location process due to slight fluctuations, thus reducing system computational redundancy. Simulations were performed based on the IEEE-30 / 57 bus system simulation dataset and historical fault data of the actual power transmission network. Multiple candidate thresholds in the range of 0.7-0.9 were verified. When the threshold is set to 0.8, the missed fault detection rate is less than 3% and the false triggering rate of the location process is less than 5%, which fully meets the practical requirements of engineering. Therefore, the preferred threshold in this embodiment is 0.8.

[0115] Preferably, this invention proposes to combine the Grey Wolf Optimization (GWO) algorithm with the Optimal Power Flow (OPF) model to achieve accurate fault prediction and location. The GWO-OPF model aims to minimize fault location error, and the fault location is achieved by combining an optimization model with OPF constraints. Its objective function expression is:

[0116]

[0117] in, : No. For the measured electrical quantities of each node, electrical parameters that are highly related to the fault, such as impedance and power, can be selected. The location of the fault is At that time, the first The theoretical calculation values ​​of electrical quantities of each node are derived based on the optimal power flow (OPF) equation and compared with the measured values ​​to locate faults. The fault location variable to be optimized corresponds to the line segment number or node coordinate in the power transmission network and is the optimization target of the GWO algorithm. The weighting coefficient is fixed at 0.5 and is used to balance the importance of fault location error and OPF constraint cost, so as to avoid a single objective dominating the optimization result. OPF (Optical Power Factor) constraint costs encompass generator output costs (such as fuel costs for thermal power plants and direct costs of renewable energy generation) and network loss costs (energy costs corresponding to transmission line resistance losses), ensuring that the positioning results comply with the economic constraints of power grid operation. The expression is:

[0118] thermal power generation cost The corresponding operating cost of traditional thermal power generators (TPGs), considering the valve point loading effect, is expressed as:

[0119]

[0120] in, Total number of thermal power generators; : No. The basic cost coefficient of Taiwan's thermal power plant; : No. The valve point effect coefficient of Taiwan's thermal power plants; : No. Actual output (MW) of Taiwan's thermal power plants; : No. Minimum output limit (MW) for Taiwan's thermal power plants.

[0121] Direct costs of renewable energy The contract power supply costs for wind power (WPG) and solar power (SPG) are expressed as follows:

[0122]

[0123] in, Total number of wind farms / photovoltaic power plants; : No. Wind farm / No. The direct cost coefficient of a photovoltaic power station ( ); : No. Wind farm / No. The planned output (MW) of a photovoltaic power plant.

[0124] Renewable energy backup costs To address the spinning reserve cost required to address the overestimation of renewable energy output (actual output < planned output), the expression is:

[0125]

[0126] in, : No. Wind farm / No. Backup cost coefficient of a photovoltaic power station ; : No. Wind farm / No. The actual output (MW) of each photovoltaic power station; : Expectation operators based on probability distributions (Weibull distribution for wind power, lognormal distribution for photovoltaics).

[0127] Renewable energy penalty costs To address the curtailment penalty cost when renewable energy output is underestimated (actual output > planned output), the expression is:

[0128]

[0129] in, : No. Wind farm / No. Penalty cost coefficient for each photovoltaic power station ( The meanings of the remaining parameters are the same as those in the reserve cost expression.

[0130] Network loss cost The economic cost corresponding to the active power loss caused by the resistance of transmission lines is expressed as:

[0131]

[0132] in, Economic cost coefficient per unit power loss ( ); The total active power loss (MW) of the entire network can be calculated from the power flow.

[0133] Preferred, such as Figure 3 As shown, the fault location optimization model based on the fusion of the Grey Wolf optimization algorithm and the optimal power flow model searches the transmission network with the goal of minimizing the fault location error, and outputs the optimal fault location, including the following steps (h)-(j):

[0134] (h) Population initialization: Set the gray wolf population size to 50, with each individual corresponding to a possible fault location in the target power transmission network (encoded as a line segment number or node coordinates), and the population location boundary is the power transmission network topology range.

[0135] (i) Social hierarchy renewal

[0136] according to (Optimal solution) (Suboptimal solution) (Third optimal solution) (Ordinary individuals) are divided into populations, ordinary individuals The position is updated according to the following update formula, which guides the population to converge toward the globally optimal fault position by merging the positions of the current best, second-best, and third-best solutions:

[0137]

[0138] in, Ordinary individuals In the The position after the next iteration corresponds to the updated candidate fault location (line segment number or node coordinates) in the power transmission network. : Current iteration number, used to mark the progress of algorithm optimization, with an iteration range of 0 to 1000; : No. In the next iteration The location of the (optimal solution) corresponds to the candidate fault location with the smallest localization error and the best constraint in the current population; : No. In the next iteration The location of the (suboptimal solution) corresponds to the candidate fault location with the second smallest positioning error in the current population, which helps guide the population's search direction; : No. In the next iteration The position of the (third optimal solution) corresponds to the candidate fault position with the third smallest positioning error in the current population, further optimizing the population search accuracy.

[0139] Furthermore, to achieve a dynamic balance between population exploration and utilization, this invention introduces an exploration-utilization control mechanism and a stochastic enhancement mechanism: through coefficients Regulating search behavior, among which The coefficient is a linearly decreasing factor (decreasing linearly from 2 to 0 in successive iterations). for Random numbers in an interval; when When the algorithm is in exploratory mode, it forces the population to explore new candidate fault location regions to avoid premature convergence; when At this point, the algorithm switches to utilization mode, guiding the population to focus on the vicinity of the current optimal solution for a refined search, improving positioning accuracy. Simultaneously, a coefficient is introduced. ( for The randomness of the search is enhanced by using interval random numbers. By assigning random weights to candidate fault locations, the population is prevented from being overly concentrated in local areas, effectively avoiding the trap of local optima and ensuring the algorithm's global search capability.

[0140] (j) Setting of constraints and termination conditions

[0141] The operational constraints of the power transmission network (node ​​voltage range of 0.95–1.10 pu, upper limit of line transmission capacity, and upper and lower limits of generator output) are incorporated into the objective function through a penalty function, imposing additional costs on individuals that violate the constraints. After 1000 iterations, the output is... The corresponding location is taken as the optimal fault location result.

[0142] The penalty function is a function that transforms the operational constraints of the power transmission network into a penalty term of the objective function. It imposes additional costs on individuals in the population that violate the constraints (candidate fault locations), forcing the algorithm to search for areas that meet the constraints, thus ensuring that the location results are consistent with engineering practice.

[0143] Preferably, after searching the target transmission network and outputting the optimal fault location, the method further includes:

[0144] From the spatiotemporal joint features Multi-dimensional fault features are extracted and input into a pre-trained fault classification model to output the corresponding fault type. Specifically,

[0145] First, from the spatiotemporal joint characteristics The system specifically extracts four core distinguishing features: First, abnormal characteristics of electrical quantity amplitudes, including the voltage drop amplitude at each node at the time of the fault. Current surge factor and power imbalance difference For example, short circuit faults are usually accompanied by pu、 The amplitude did not change significantly when the equipment overheated; secondly, the temporal trend characteristics, based on time characteristics. Calculate the rate of change of voltage / current Short-circuit faults manifest as a sudden drop / increase (absolute value of slope). ( ) Open circuit faults exhibit a gradual decrease in current; thirdly, spectral and harmonic characteristics are extracted using FFT. Secondary harmonic proportion and total harmonic distortion Short circuit fault Equipment overheating Fourth, the response characteristics of associated equipment, relying on spatial characteristics. Analyze the synchronization of surrounding equipment, and the synchronization of the response of the faulty node and adjacent nodes during a short circuit. When the circuit is broken, the current of the faulty line drops sharply to 0 and the load transfer of adjacent lines increases slowly.

[0146] Subsequently, a judgment process of feature selection - classifier training - result correction was constructed: first, the correlation was selected by mutual information entropy. The core features are assigned weights (e.g., the current surge multiple in a single-phase short circuit is weighted at 0.4), and then the LightGBM fault classifier is used to train on 100,000+ simulated fault samples (including different fault locations and resistance parameters), outputting the probability distribution of fault types; finally, a spatiotemporal consistency check is introduced. If the classification result contradicts the feature trend, features are extracted a second time, combined with a confidence threshold ( Output directly. Corrected based on historical data, (Mark for manual review) to ensure accuracy.

[0147] Based on the above embodiments, the present invention achieves the following beneficial effects:

[0148] (1) The adaptive masking strategy proposed in this invention forces the model to learn the semantic association of missing information by using a fixed ratio of random masking. On the other hand, it dynamically adapts the masking ratio based on the topological characteristics of the power transmission network, strengthens masking learning in key areas such as load-dense areas, and moderately masks remote areas, making the abnormal features of key areas more prominent. The signal-to-noise ratio of the preprocessed data is improved by more than 30%, effectively filtering out noise interference and laying a high-quality data foundation for subsequent deep feature extraction.

[0149] (2) The spatial map capsule module in this invention achieves cross-regional spatial feature fusion through Laplacian matrix propagation modeling and capsule dynamic routing. Compared with the traditional GCN, the global feature capture capability is improved by 40%. The time coding gating module takes into account both short-term fluctuations and long-term trends through dual-branch embedding and gating mechanism, solves the gradient vanishing problem, and improves the accuracy of time feature extraction by more than 25%. The spatiotemporal joint feature formed by the fusion of the two can completely depict the spatiotemporal evolution law of the fault, and provide high-dimensional and strongly correlated feature support for fault prediction and location.

[0150] (3) The fault location optimization model of the present invention optimizes the fault location error and OPF constraint cost in a coordinated manner, which not only ensures the positioning accuracy, but also takes into account the economic efficiency of power grid operation. The network loss cost is reduced by more than 15%, and the renewable energy utilization efficiency is increased by 10%. Moreover, the exploration-utilization balance mechanism of the GWO algorithm avoids local optima and can converge after 1000 iterations. Compared with algorithms such as SHADE-SF, the convergence time is shortened by 40%, which meets the real-time positioning requirements.

[0151] (4) Based on multi-dimensional features (amplitude anomaly, time series trend, spectrum harmonics, and correlation response) and LightGBM classifier, the fault type identification accuracy exceeds 88%, and the false judgment rate is effectively reduced through spatiotemporal consistency verification and confidence threshold mechanism. After the model is deployed, the fault prediction response time is ≤3.5 seconds, and the total time for location and type judgment is ≤10 seconds, which significantly improves the timeliness and pertinence of power grid operation and maintenance.

[0152] (5) This invention has good compatibility and scalability, and can be directly adapted to complex power transmission networks containing wind power and photovoltaics. It supports standard bus systems such as IEEE-30 / 57 bus and actual engineering power grids of different scales. By fine-tuning the parameters, it can be adapted to different voltage levels such as 110kV, 220kV, and 500kV. It can meet the needs of power grids dominated by traditional thermal power, and can also adapt to power grids with a high proportion of renewable energy. It has strong engineering practicality and scenario scalability.

[0153] Example 2

[0154] Combination Figure 4 (Comparison chart of core performance of four algorithms). This embodiment details the training and deployment process and technical solution advancement verification of the fault prediction model (dual-layer multilayer perceptron (MLP)), the fault location optimization model (GWO-OPF), and the fault type classification model (LightGBM fault classifier), as follows:

[0155] I. Optimization of Model Training Strategy

[0156] To ensure that the models possess both generalization ability and real-world adaptability, the training process of all the above models adopts a two-stage strategy of pre-training and fine-tuning:

[0157] First, pre-training was performed using the IEEE-30 / 57 bus system fault simulation dataset, which covers different fault types, locations, and operating conditions, providing comprehensive basic feature learning for the model. Then, fine-tuning was performed using real-time uploaded data collected from transmission network sensors to adapt the model to the actual operating characteristics of the power grid. The Adam optimizer was used during training, with initial learning rate and weight decay parameters configured to balance training efficiency and model stability. A total of 200 training epochs were conducted, and an early stopping strategy was implemented: training automatically stopped when the validation set loss did not decrease for 10 consecutive epochs to avoid overfitting.

[0158] II. Real-time Deployment and Closed-Loop Operation

[0159] The trained dual-layer multilayer perceptron (MLP), fault location optimization model (GWO-OPF), and fault type classification model (LightGBM fault classifier) ​​are deployed on the power transmission network monitoring platform to form a closed-loop process of real-time data input, fault prediction, fault location judgment, and result push.

[0160] The platform receives multi-dimensional monitoring data updates at 5-minute intervals. It first enters the prediction stage, outputting the probability of fault occurrence for each line / node in the next three time steps (15 minutes, 30 minutes, and 60 minutes) through model forward propagation (single time ≤ 3.5 seconds). When the probability of fault occurrence is ≥ a preset threshold (0.8), the GWO-OPF positioning process is automatically triggered, completing the accurate location and type judgment of the fault within 10 seconds, and pushing the results synchronously to the power grid operation and maintenance system to provide timely support for operation and maintenance decisions.

[0161] III. Verification of the Advanced Nature of the Technical Solution

[0162] To verify the advancement of the technical solution, the GWO-OPF algorithm of this invention was compared and verified with traditional optimization algorithms (GA, PSO, SHADE-SF) using four core indicators: fault location error, spatiotemporal feature extraction accuracy, algorithm convergence time, and network loss cost reduction rate. Figure 4 As shown in the figure:

[0163] (1) The fault location error of the algorithm of the present invention is only 2.5%, while that of the GA algorithm is 8.5%, the PSO algorithm is 7.2%, and the SHADE algorithm is 5.8%. Therefore, the fault location error of the present invention is reduced by 20%-30% compared with the traditional algorithm, and the fault location locking accuracy is significantly improved.

[0164] (2) The spatiotemporal feature extraction accuracy of the algorithm of the present invention reaches 90%, while that of the GA algorithm is 65%, the PSO algorithm is 70%, and the SHADE algorithm is 75%. Therefore, the present invention has a better ability to capture spatiotemporal coupled features.

[0165] (3) The convergence time of the algorithm of the present invention is only 11 seconds; the GA algorithm is 25 seconds, the PSO algorithm is 20 seconds, and the SHADE algorithm is 18 seconds. Therefore, the present invention effectively avoids the local optimum trap by exploring and utilizing the balance mechanism of the GWO algorithm, and the convergence efficiency is improved by more than 40% compared with the traditional algorithm.

[0166] (4) The network loss cost reduction rate of the algorithm of the present invention is 15%, that of the GA algorithm is 5%, that of the PSO algorithm is 8%, and that of the SHADE algorithm is 10%. Therefore, the present invention achieves the coordinated optimization of fault location and power grid operation economy.

[0167] In summary, this embodiment verifies the feasibility and advancement of the technical solution of the present invention through a training strategy of pre-training and fine-tuning and a closed-loop deployment throughout the entire process. The actual operation results also show that the dual-layer multilayer perceptron (MLP), fault location optimization model (GWO-OPF), and fault type classification model (LightGBM fault classifier) ​​of the present invention not only have strong generalization ability and adaptability to real-world scenarios, but also comprehensively surpass traditional algorithms in terms of positioning accuracy, feature extraction ability, convergence efficiency, and operational economy. The fault prediction response time is ≤3.5 seconds, and the total time for positioning and type judgment is ≤10 seconds. It can provide efficient and accurate fault detection and operation and maintenance decision support for smart grids and has significant engineering practical value.

[0168] Example 3

[0169] Figure 5 This is a schematic diagram of the structure of an AI-based power transmission network fault prediction and location system for spatiotemporal anomaly detection provided in Embodiment 3 of the present invention, as shown below. Figure 5 As shown, the system includes:

[0170] The data processing and modeling module 510 is used to represent the target power transmission network as an undirected graph model and to construct a spatiotemporal data tensor based on the multi-dimensional monitoring data in the target power transmission network.

[0171] The data preprocessing module 520 is used to preprocess the spatiotemporal data tensor according to the adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data.

[0172] The spatiotemporal feature extraction and fusion module 530 is used to input the undirected graph model and the preprocessed spatiotemporal data into the spatiotemporal feature extraction network to extract spatial and temporal features, and fuse the spatial and temporal features to obtain spatiotemporal joint features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a time coding gating module.

[0173] The line fault prediction module 540 is used to input the spatiotemporal joint features into a pre-trained dual-layer multilayer perceptron prediction model and output the probability of fault occurrence of each line in the target power transmission network at a future set time.

[0174] The line fault location module 550 is used to trigger a location optimization model based on the fusion of the gray wolf optimization algorithm and the optimal power flow model when the probability of the fault occurrence exceeds a preset threshold. The model searches the power transmission network with the goal of minimizing the fault location error and outputs the optimal fault location.

[0175] The AI-based power transmission network fault prediction and location system for spatiotemporal anomaly detection provided in this embodiment of the invention can execute the AI-based power transmission network fault prediction and location method for spatiotemporal anomaly detection provided in any of the above embodiments of the invention. It has the corresponding functions and beneficial effects of executing the AI-based power transmission network fault prediction and location method for spatiotemporal anomaly detection. For detailed process, please refer to the relevant operations of the AI-based power transmission network fault prediction and location method for spatiotemporal anomaly detection in the foregoing embodiments.

[0176] Example 4

[0177] Figure 6 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, and may also represent various forms of mobile devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.

[0178] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0179] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0180] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 executes the AI-based transmission network fault prediction and location method for spatiotemporal anomaly detection described above.

[0181] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0182] The above embodiments are merely illustrative examples and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. An AI-based method for fault prediction and localization in power transmission networks based on spatiotemporal anomaly detection, characterized in that, include: The target power transmission network is represented as an undirected graph model, and a spatiotemporal data tensor is constructed based on the multi-dimensional monitoring data in the target power transmission network. The spatiotemporal data tensor is preprocessed according to an adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data. The undirected graph model and preprocessed spatiotemporal data are input into a spatiotemporal feature extraction network to extract spatial and temporal features, and the spatial and temporal features are fused to obtain spatiotemporal joint features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a temporal coding gating module. The spatiotemporal joint features are input into a pre-trained dual-layer multilayer perceptron prediction model, which outputs the probability of fault occurrence of each line in the target power transmission network at a future set time. When the probability of the fault occurrence exceeds a preset threshold, a location optimization model based on the fusion of the Grey Wolf optimization algorithm and the optimal power flow model is triggered. With the goal of minimizing the fault location error, the target power transmission network is searched and the optimal fault location is output.

2. The method according to claim 1, characterized in that, After searching the power transmission network and outputting the optimal fault location, the method further includes: Multi-dimensional fault features are extracted from the spatiotemporal joint features. The multi-dimensional fault features are input into a pre-trained fault classification model, which outputs the corresponding fault type.

3. The method according to claim 1, characterized in that, The step of preprocessing the spatiotemporal data tensor according to the adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data includes: The spatiotemporal data tensor is randomly masked using a fixed mask ratio; Based on the power transmission network topology, critical areas and remote areas are determined, and a first dynamic mask ratio is applied to the critical areas and a second dynamic mask ratio is applied to the remote areas, wherein the first dynamic mask ratio is greater than the second dynamic mask ratio. The masked data is normalized to unify the data distribution, resulting in preprocessed spatiotemporal data.

4. The method according to claim 3, characterized in that, The undirected graph model and preprocessed spatiotemporal data are input into a spatiotemporal feature extraction network to extract spatial and temporal features. These features are then fused to obtain joint spatiotemporal features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a time-encoded gating module. Spatial features are extracted from the preprocessed spatiotemporal data using the spatial map capsule module to obtain a spatial feature matrix; The time feature matrix is ​​obtained by extracting time features from the preprocessed spatiotemporal data through the time coding gating module. The spatial feature matrix and the temporal feature matrix are mapped to the same dimension by a learnable weight matrix, and then the associated features are strengthened by element-wise multiplication and spliced ​​along the channel dimension to obtain the spatiotemporal joint features.

5. The method according to claim 4, characterized in that, Spatial features are extracted from the preprocessed spatiotemporal data using the spatial map capsule module, resulting in a spatial feature matrix, including: Based on the adjacency matrix of the undirected graph model, a normalized Laplacian matrix and its corresponding forward transition matrix and reverse transition matrix are constructed. Multi-step signal diffusion is performed based on the forward transition matrix and reverse transition matrix to obtain the spatial correlation features after preliminary fusion. Multiple cluster centers are set up based on the functional partitions of the target power transmission network, and the spatial correlation features after initial fusion are iteratively optimized through the capsule dynamic routing mechanism to obtain the iteratively updated capsule embedding features. A multi-scale matrix containing the Laplacian matrix, forward transition matrix, and backward transition matrix is ​​constructed. The multi-scale matrix is ​​then combined with the iteratively updated capsule embedding features and convolutional operation is performed to output a spatial feature matrix.

6. The method according to claim 5, characterized in that, The step involves iteratively optimizing the initially fused spatial association features using a capsule dynamic routing mechanism to obtain iteratively updated capsule embedding features, including: The nonlinear expressive power of the spatial correlation features after preliminary fusion is enhanced by an activation function, and the correlation weights between the cluster center and each capsule are determined by normalization. The embedding vector of the capsule is iteratively updated based on the association weight. When the embedding vector of the capsule converges, the iteratively updated capsule embedding feature is output.

7. The method according to claim 4, characterized in that, The time feature matrix is ​​obtained by extracting time features from the preprocessed spatiotemporal data through a time-coding gating module, including: Short-term fluctuation features and long-term trend features are extracted from the preprocessed spatiotemporal data through a dual-branch embedding design. The short-term fluctuation characteristics and long-term trend characteristics are input into the gating adjustment mechanism for dynamic screening and enhancement of effective time characteristics; The effective time features are superimposed with the original input features passed through residuals to obtain the optimized time series features; Multiple time-encoding gating blocks are superimposed to perform batch normalization and regularization on the optimized time-series features, and the time feature matrix is ​​output.

8. The method according to claim 1, characterized in that, The step of inputting the spatiotemporal joint features into a pre-trained dual-layer multidimensional perceptron prediction model and outputting the probability of fault occurrence of each line in the target power transmission network at a future set time includes: The spatiotemporal joint features are input into the first fully connected layer of the dual-layer multilayer perceptron prediction model, and nonlinear transformation is performed through the Leaky ReLU activation function to map the spatiotemporal joint features to a high-dimensional feature space. The high-dimensional features transformed by the first fully connected layer are input into the second fully connected layer of the dual-layer multilayer perceptron prediction model, and the probability of fault occurrence is output.

9. The method according to claim 8, characterized in that, When the probability of the fault occurrence exceeds a preset threshold, a location optimization model based on the fusion of the Grey Wolf optimization algorithm and the optimal power flow model is triggered. With the goal of minimizing the fault location error, the model searches the transmission network and outputs the optimal fault location, including: Initialize a gray wolf population, wherein each individual in the population is encoded to represent a possible fault location in the target power transmission network; The gray wolf population is driven to perform iterative search under the condition of satisfying the operation constraints of the power transmission network, with the goal of minimizing the fault location error. When the iteration meets the termination condition, the position encoded by the best individual in the population is output and used as the optimal fault position.

10. An AI-based power transmission network fault prediction and location system for spatiotemporal anomaly detection, characterized in that, include: The data processing and modeling module is used to represent the target power transmission network as an undirected graph model and to construct a spatiotemporal data tensor based on the multi-dimensional monitoring data in the target power transmission network. The data preprocessing module is used to preprocess the spatiotemporal data tensor according to the adaptive mask preprocessing strategy to obtain preprocessed spatiotemporal data. The spatiotemporal feature extraction and fusion module is used to input the undirected graph model and the preprocessed spatiotemporal data into the spatiotemporal feature extraction network to extract spatial and temporal features, and to fuse the spatial and temporal features to obtain spatiotemporal joint features. The spatiotemporal feature extraction network includes a spatial graph capsule module and a time-encoding gating module. The line fault prediction module is used to input the spatiotemporal joint features into a pre-trained dual-layer multilayer perceptron prediction model and output the probability of fault occurrence of each line in the target power transmission network at a future set time. The line fault location module is used to trigger a location optimization model based on the fusion of the gray wolf optimization algorithm and the optimal power flow model when the probability of the fault occurrence exceeds a preset threshold. The model searches the target transmission network with the goal of minimizing the fault location error and outputs the optimal fault location.