Power grid system-oriented explainability analysis method, system, device and medium

By generating a neighborhood sample set that conforms to physical laws through a diffusion model, an interpretability analysis method for power grid system models is constructed. This solves the credibility problem of deep learning model interpretation methods for power grid systems, realizes the visualization of the internal dynamic processes and the revelation of causal chains, and improves the credibility and reliability of the model.

CN122222334APending Publication Date: 2026-06-16STATE GRID ZHEJIANG ELECTRIC POWER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
Filing Date
2026-05-19
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing deep learning model interpretation methods for power grid systems lack credibility, fail to provide intuitive and structured auxiliary analysis tools, and struggle to reveal the dynamic evolution process and causal chains within the model, making it difficult for operation and maintenance personnel to understand the model's behavior.

Method used

A pre-trained diffusion model is used to generate a neighborhood sample set that conforms to physical laws. By using trajectory deviation path and feature propagation sensitivity value, an interpretability analysis method for power grid system model is constructed to track the propagation trajectory of features within the target power grid model and construct the causal chain between input disturbance and output response.

Benefits of technology

It significantly improves the accuracy and reliability of the power grid system model interpretation, provides intuitive and structured auxiliary analysis tools, and enhances the reliability of the model in scenarios with high safety requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122222334A_ABST
    Figure CN122222334A_ABST
Patent Text Reader

Abstract

The application relates to the technical field and discloses a power grid system-oriented explainability analysis method, system, device and medium. According to power time series data of a target power grid collected, an original sample set and an explicit feature label are determined, and a pre-trained diffusion model is used to generate a neighborhood sample set according to the original sample set and the explicit feature label. The original sample set and the neighborhood sample set are respectively input into a target power grid model, a trajectory deviation path is constructed according to a first intermediate feature representation set and a second intermediate feature representation set obtained, and an output response change is constructed according to a first intermediate output result set and a second intermediate output result set obtained. A feature propagation sensitivity value is obtained according to the trajectory deviation path and the output response change. An explainability analysis result is generated according to the feature propagation sensitivity value and the trajectory deviation path. The method improves the credibility of explainability analysis of a power grid system model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid management technology, and in particular to an interpretability analysis method, system, device and medium for power grid systems. Background Technology

[0002] With the rapid development of new power systems and the energy internet, power grid operation scenarios are increasingly moving towards digitalization and intelligence. Deep learning models are widely used in critical tasks such as load forecasting, equipment status identification, and anomaly detection to assist power system decision-making. However, these models often employ deep neural network structures, whose internal reasoning mechanisms are highly complex and invisible. This makes it difficult for operation and maintenance personnel to understand the model's behavior, raising doubts about the reliability and security of its predictions, and significantly hindering the comprehensive promotion and application of deep learning models in the power grid field.

[0003] Current interpretable methods are mostly concentrated in general scenarios such as natural language processing and computer vision, including LIM, SHAP, and Saliency Map. Traditional interpretable methods often rely on input perturbation strategies, constructing neighborhood samples by masking features or adding noise to analyze the model's sensitivity to features. However, such "unnatural perturbation" samples often violate the physical laws and distribution patterns of the original data, causing the generated neighborhood samples to deviate from normal operating conditions in the semantic space. This results in interpretations lacking practical credibility and cannot serve as a reliable basis for power grid analysis and decision-making. Furthermore, current interpretable methods lack modeling of the dynamic evolution process within the model, making it difficult to reveal the temporal propagation path of information flow within the model as power grid state variables change with perturbations, and also failing to construct the causal chain between input perturbations and output responses. This often leaves interpretations at the level of static feature importance scoring, lacking traceable information such as causal paths and staged responses, failing to provide operation and maintenance personnel with intuitive and structured auxiliary analysis tools, and significantly reducing the model's credibility.

[0004] Therefore, improving the reliability of interpretable analysis of power grid system models has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] This invention provides a method, system, device, and medium for interpretability analysis of power grid systems, in order to solve the technical problem of how to improve the credibility of interpretability analysis of power grid system models and achieve the effect of improving the credibility of interpretability analysis of power grid system models.

[0006] In a first aspect, the present invention provides an interpretability analysis method for power grid systems, the method comprising: Based on the collected power time series data of the target power grid, an original sample set and explicit feature labels are determined. Then, based on the original sample set and the explicit feature labels, a neighborhood sample set is generated using a pre-trained diffusion model. The explicit feature labels are set to reflect the operating conditions of the original sample set and / or features that are strongly correlated with the interpretability analysis target. The original sample set is input into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set. The neighborhood sample set is input into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set. Based on the first intermediate feature representation set and the second intermediate feature representation set, a trajectory deviation path is constructed, and based on the first intermediate output result set and the second intermediate output result set, an output response change is constructed. Based on the trajectory deviation path and the output response change, a feature propagation sensitivity value is obtained. The feature propagation sensitivity value is set to measure the impact of each dimension feature on the interpretability analysis target of each neural network layer in the target power grid model. Based on the feature propagation sensitivity value and the trajectory deviation path, an interpretable analysis result is generated.

[0007] Preferably, determining the original sample set and explicit feature labels based on the collected power time series data of the target power grid includes: Based on the collected power time series data of the target power grid, an original sample set is constructed; A consistency analysis is performed on the operating conditions of the original sample set to obtain explicit characteristics of the operating conditions; A correlation analysis is performed on the features of each dimension in the original sample set and the interpretability analysis target to obtain the explicit features of the target; Based on the explicit features of the operating conditions and the explicit features of the target, determine the explicit feature labels.

[0008] Preferably, the step of generating a neighborhood sample set using a pre-trained diffusion model based on the original sample set and the explicit feature labels includes: The original sample set is encoded using a pre-trained diffusion model encoder to obtain the latent variable encoding of each group of original sample data in the original sample set. Centered on the latent variable encoding, Gaussian perturbation sampling is performed in the latent space of the diffusion model to obtain pure noise samples for each set of the original sample data; Using the explicit feature labels as control conditions, the decoder of the diffusion model is used to decode the pure noise samples to obtain the neighborhood sample data corresponding to each group of original sample data. Based on the neighborhood sample data, construct a neighborhood sample set corresponding to each set of the original sample data.

[0009] Preferably, the step of inputting the original sample set into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set, and inputting the neighborhood sample set into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set, includes: The original sample set is input into the target power grid model. The first intermediate feature representation and the first intermediate output result of each set of initial sample data in the original sample set are extracted for each feature dimension in each layer of the neural network of the target power grid model. Based on each first intermediate feature representation, a first intermediate feature representation set is constructed. The neighborhood sample set is input into the target power grid model. The second intermediate feature representation and the second intermediate output result of each group of neighborhood sample data in the neighborhood sample set are extracted for each feature dimension in each layer of the neural network of the target power grid model. Based on each second intermediate feature representation, a second intermediate feature representation set is constructed.

[0010] Preferably, the step of constructing the trajectory deviation path based on the first intermediate feature representation set and the second intermediate feature representation set includes: Based on the first intermediate feature representation set and the second intermediate feature representation set, the deviation of the intermediate feature representation of the same feature dimension in the same layer of the neural network is obtained between the neighborhood sample data generated from the same original sample data and the corresponding original sample data; Based on the deviation, the trajectory deviation path of each original sample data propagating within the target power grid model is obtained.

[0011] Preferably, obtaining the feature propagation sensitivity value based on the trajectory deviation path and the output response change includes: Based on the changes in the output response, the importance of the decision contribution of each dimension feature in each neighborhood sample to each neural network layer is obtained. Based on the bias and the importance of the decision contribution, the feature propagation sensitivity value of each dimension feature in each neural network layer is obtained.

[0012] Preferably, the step of generating interpretable analysis results based on the feature propagation sensitivity value and the trajectory deviation path includes: Based on the feature propagation sensitivity value, the mean feature propagation sensitivity value of each feature dimension is obtained, and based on the mean feature propagation sensitivity value, a first interpretability analysis result is obtained. The first interpretability analysis result reflects the contribution intensity of each feature dimension to the interpretability analysis target. Based on the feature propagation sensitivity value, the maximum value of the first intermediate feature representation corresponding to each neural network layer is obtained, and based on the maximum value, the neural network layer deviation trajectory of the neighborhood samples is constructed. Based on the neural network layer deviation trajectory, the second interpretability analysis result is obtained, and the second interpretability analysis result reflects the contribution intensity of each neural network layer to the interpretability analysis target. The trajectory deviation path is compared with a pre-built trajectory deviation path library to obtain a third interpretable analysis result. The third interpretable analysis result includes the anomaly type label, associated device label, and operation record label corresponding to each original sample data.

[0013] Secondly, the present invention also provides an interpretability analysis system for power grid systems, which implements the aforementioned interpretability analysis method for power grid systems. The system includes: a sample set generation module, a feature extraction module, a trajectory deviation construction module, a sensitivity index construction module, and an interpretability analysis module. The sample set generation module is used to determine the original sample set and explicit feature labels based on the collected power time series data of the target power grid, and to generate a neighborhood sample set using a pre-trained diffusion model based on the original sample set and the explicit feature labels. The explicit feature labels are set to reflect the operating conditions of the original sample set and / or features that are strongly correlated with the interpretability analysis target. The feature extraction module is used to input the original sample set into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set, and to input the neighborhood sample set into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set. The trajectory deviation construction module is used to construct a trajectory deviation path based on the first intermediate feature representation set and the second intermediate feature representation set, and to construct an output response change based on the first intermediate output result set and the second intermediate output result set. The sensitivity index construction module is used to obtain the feature propagation sensitivity value based on the trajectory deviation path and the output response change. The feature propagation sensitivity value is set to measure the impact of each dimension feature on the interpretability analysis target of each neural network layer in the target power grid model. The interpretability analysis module is used to generate interpretable analysis results based on the feature propagation sensitivity value and the trajectory deviation path.

[0014] Thirdly, the present invention also provides a computer device, the computer device including a memory, a processor and a transceiver, which are connected to each other via a bus; the memory is used to store a set of computer program instructions and data, and to transmit the stored data to the processor, the processor executing the computer program instructions stored in the memory to perform the above-described interpretability analysis method for power grid systems.

[0015] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed, implements the above-described interpretability analysis method for power grid systems.

[0016] This application provides an interpretability analysis method, system, device, and medium for power grid systems. Compared with the prior art, the beneficial effects of the embodiments of this application are as follows: The interpretability analysis method for power grid systems disclosed in this application constructs natural disturbance neighborhood samples that conform to physical laws through a diffusion model and tracks their characteristic propagation trajectory within the target power grid model. This significantly improves the accuracy of interpreting the decision-making basis of the black-box model. The trajectory deviation path of this application reveals the temporal propagation path of information flow within the target power grid model when power grid state variables change with disturbances, constructs a causal chain between input disturbances and output responses, provides intuitive and structured auxiliary analysis tools, and enhances the credibility of the model output results through a dynamic and visual feedback interpretability mechanism. This provides a solid technical guarantee for the reliable application of the model in high-safety-requirement scenarios such as power grids, demonstrating significant inventiveness and beneficial effects. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the steps of an interpretability analysis method for power grid systems provided in a preferred embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an interpretability analysis system for power grid systems provided in a preferred embodiment of the present invention; Figure 3 This is an internal structural diagram of the computer device in an embodiment of the present invention; Figure label: 1-Sample set generation module, 2-Feature extraction module, 3-Trajectory deviation construction module, 4-Sensitivity index construction module, 5-Interpretability analysis module. Detailed Implementation

[0018] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. The embodiments are provided for illustrative purposes only and should not be construed as limiting the scope of the invention. The accompanying drawings are for reference and illustration only and do not constitute a limitation on the scope of protection of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of this invention.

[0019] In the description of this invention, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0020] Please see Figure 1 The diagram illustrates the steps of an interpretability analysis method for power grid systems. In an embodiment of the present invention, an interpretability analysis method for power grid systems is provided, the method comprising: S1. Based on the collected power time series data of the target power grid, determine the original sample set and explicit feature labels. Then, based on the original sample set and the explicit feature labels, generate a neighborhood sample set using a pre-trained diffusion model. The explicit feature labels are set to reflect the operating conditions of the original sample set and / or features strongly correlated with the interpretability analysis target. In traditional interpretability analysis methods, the "unnatural disturbance" samples constructed by the input disturbance strategy often violate the physical laws and distribution patterns of the original sample data. For example, in actual load forecasting tasks, when a deep learning model predicts an abnormal load spike in the next hour, maintenance personnel urgently need to understand its causes. If existing interpretability analysis methods are used for interpretation, the system will generate a "disturbance sample," which is an isolated, illogical increase in the "temperature" feature value for a certain time period, while strongly correlated features such as "wind speed" and "historical load curve shape" remain unchanged or are superimposed with irrelevant white noise. This creates a data point that is "physically impossible." In reality, drastic temperature changes are inevitably accompanied by a coordinated shift in a whole set of related weather indicators, and load curves also follow their inherent physical laws and user behavior patterns. This crude random disturbance completely destroys the inherent physical constraints and statistical correlations between the various dimensions of power grid data. Therefore, conclusions drawn based on "disturbance sample" data are themselves based on a response to a data point that will never appear in reality, and using this as a basis to infer decision-making logic is meaningless. In this application, power time-series data from various sources, such as load, voltage, current, and frequency, are collected from the power monitoring system. To ensure consistency and robustness in subsequent processing, the data from different sources are normalized to construct an original sample set. The original sample set is encoded using a feature adapter, transforming it into a data representation form that the model can recognize. This application ensures the comprehensiveness of input information by collecting multi-source sensing data. The power grid is a complex physical system with multiple variables coupled. No single indicator can fully describe its operating state. Only by obtaining a comprehensive and multi-dimensional system snapshot can the subsequent diffusion model learn the real physical relationship between features, thereby providing complete and rich learning data for constructing "natural disturbance" samples.

[0021] Furthermore, this application employs a trained diffusion model to generate a neighborhood sample set. The diffusion model is a generative AI model based on a "stepwise noise addition-reverse noise removal" logic. Its core is to achieve high-fidelity data generation by simulating the reverse diffusion process of data from "disordered noise" to "ordered real data." The diffusion model's processing flow is as follows: First, forward diffusion is performed to simulate the natural process of data moving from ordered to disordered, establishing a correlation between noise and real data. Within T time steps, small Gaussian noise is gradually added to the data object to be processed. After the Tth step of noise addition, the data to be processed becomes completely random noise. The intensity of noise addition at each step is controlled by a noise scheduler to ensure that the noise is calculable and reversible. Next, reverse noise amplification is performed, allowing the model to learn how to remove noise and gradually generate real data from pure noise. The model uses the current noise data and the current time step as input to predict the amount of noise to be removed at this time step, and then removes the noise through subtraction. After repeating this process T times, the pure noise gradually becomes a generated result consistent with the distribution of real data. Backdiffusion is key to condition generation. Adding control conditions to the model allows it to generate specific data that conforms to those conditions. Therefore, in this application, features that reflect the operating conditions of the original dataset and / or are strongly correlated with the interpretability analysis objective are selected as explicit feature labels. The selection of explicit feature labels should satisfy physical correlation, operating condition consistency, and interpretability. Physical correlation refers to selecting features that have a direct physical relationship with the power grid operation. For example, discrete feature labels like weather conditions directly affect power load and equipment operating status, exhibiting clear physical causality. Continuous feature labels like load factor reflect the load level of the power grid operation, following the physical laws of power consumption and user behavior rules. Operating condition consistency means that the selected features are consistent with the macroscopic operating state of the original samples, avoiding deviations from actual operating conditions. For example, if the original sample set is under "summer high temperature, high load" conditions, explicit feature labels would include "weather" and "load factor," ensuring that the generated neighborhood sample set matches the original operating conditions in a macroscopic "season-load" logic, preventing the generation of disturbed samples that violate physical laws, such as sudden temperature increases while other weather indicators remain unchanged. Explanatory relevance means that the selected features should be strongly correlated with the interpretability analysis target, focusing on dimensions that have a key impact on model decisions. The interpretability analysis target is the output object of the target power model. For example, in tasks such as load forecasting and equipment anomaly detection, load peaks and equipment anomalies are interpretability analysis targets. Prioritize the selection of features that are strongly correlated with the output of the target power model to ensure that the interpretation results can accurately reflect the model's reasoning logic and help operation and maintenance personnel understand the causes of decisions.

[0022] The diffusion model used in this application is learned from massive amounts of historical power time series data, ensuring a deep understanding of the complex relationships between power data such as temperature, load, current, and voltage. During the generation of the neighborhood sample set, a pre-trained diffusion model encoder encodes the original sample set to obtain the latent variable encoding for each group of sample data. Subsequently, Gaussian perturbation sampling is performed in the latent space of the diffusion model, centered on this latent variable encoding, to obtain pure noise samples for each group of original sample data. Further, using explicit feature labels as control conditions, the diffusion model decoder decodes the pure noise samples to obtain the neighborhood samples corresponding to each group of original sample data. Based on these neighborhood samples, a neighborhood sample set corresponding to each group of original sample data is constructed.

[0023] The decoded neighborhood sample data represents a complete real-world scenario with a distribution similar to the original sample data. This scenario features a smooth temperature increase, accompanied by wind speed variations consistent with this weather pattern, and historical load curves matching the specific scenario. The generated neighborhood sample data is natural and realistically possible. Therefore, by analyzing the response differences between the original and neighborhood sample data on the target power grid model, a highly reliable and interpretable conclusion can be drawn, thereby improving the credibility and operability of the interpretable conclusion.

[0024] S2. Input the original sample set into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set. Input the neighborhood sample set into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set. In a preferred embodiment of this application, the target power grid model includes various models involved in the power grid field, such as load forecasting models and anomaly detection models. Both the original sample set and the neighborhood sample set are input into the target power grid model to be interpreted. The target power grid model generally includes a multi-layer neural network. Extract the first intermediate feature representation and the first intermediate output result of each layer of the target power grid model for each feature dimension during the processing of the original sample data, and construct a first intermediate feature representation set based on each first intermediate feature representation. Extract the second intermediate feature representation and the second intermediate output result of each layer of the target power grid model for each feature dimension during the processing of the neighborhood sample data, and construct a second intermediate feature representation set based on each second intermediate feature representation.

[0025] S3. Construct a trajectory deviation path based on the first intermediate feature representation set and the second intermediate feature representation set; construct the output response change based on the first intermediate output result set and the second intermediate output result set. In a preferred embodiment of this application, for the intermediate output results, calculate the difference between the first intermediate output result of each original sample data and the second intermediate output result of the neighborhood sample data generated from the original sample data at each neural network layer to obtain the output response change of the target power grid model under local disturbance. The output response change is expressed as follows: in, Indicates the original sample data and the first The neighborhood sample data in the th... Differences between layers in a neural network Indicates the first The neighborhood sample data in the th... The second intermediate output of a layered neural network. Indicates the original sample data at the th The first intermediate output of a layered neural network.

[0026] For intermediate feature representations, the deviation between the intermediate feature representations of the same feature dimension in the same layer of the neural network and the neighboring sample data generated from the same original sample data is calculated. The deviation is expressed as: in, Indicates the original sample data and the first The neighborhood sample data in the th... Layer 1 of a neural network Deviation in feature dimensions Indicates the first The neighborhood sample data in the th... Layer 1 of a neural network The second intermediate feature representation of the feature dimension, Indicates the original sample data at the th Layer 1 of a neural network The second intermediate feature representation of the feature dimension.

[0027] Furthermore, based on the deviation, a trajectory deviation path is generated for each original sample data propagating within the target power grid model.

[0028] In a specific embodiment of this application, the target power grid model includes a three-layer neural network. For a certain original sample data, the trajectory deviation path obtained is the largest in the first layer of the neural network, indicating that the current trajectory deviation value is captured by the first layer of the target power model. In the third layer of the neural network, the voltage trajectory deviation value reaches the highest, becoming the feature dimension most sensitive to disturbances within the target power model.

[0029] By using the trajectory deviation path of this application, the temporal propagation path of information flow within the target power grid model is revealed when the power grid state variables change with disturbances. A causal chain between input disturbances and output responses is constructed, providing an intuitive and structured auxiliary analysis tool. The interpretable mechanism of dynamic visualization feedback enhances the credibility of the output model.

[0030] S4. Based on the trajectory deviation path and the output response change, a feature propagation sensitivity value is obtained. This value is set to measure the impact of each feature dimension on the interpretability analysis target of each neural network layer in the target power grid model. In a preferred embodiment of this application, a causal quantitative chain from the trajectory deviation path to the final output change is established, identifying the feature dimensions that decisively influence model decisions. Based on the trajectory deviation path and output response change, the contribution of each feature dimension combined with the neural network layer to the final prediction result change is calculated, achieving precise location of key influence paths. Specifically, based on the output response change, the decision contribution importance of each feature dimension in each neighborhood sample to each neural network layer in the target power grid model is obtained. The decision contribution importance is expressed as: The decision contribution importance is used to characterize the strength of the influence of changes in the feature dimension on the output of the corresponding neural network layer.

[0031] Furthermore, based on the bias and decision contribution importance of each dimension feature in each neighborhood sample at each neural network layer, the feature propagation sensitivity value of each dimension feature at each neural network layer is obtained. The feature propagation sensitivity value is expressed as: in, Indicates the first Feature dimension in the th The feature propagation sensitivity value of a layer in a neural network. Indicates the importance of the contribution to the decision-making process. This indicates the number of neighboring sample data corresponding to the original sample data.

[0032] The feature propagation sensitivity value of this application can clearly reveal the influence of small changes in each feature dimension of each neural network layer of the target power grid model on the output of the target power model, making the output of the target power network model more credible.

[0033] S5. Generate interpretable analysis results based on the feature propagation sensitivity value and the trajectory deviation path. In a preferred embodiment of this application, the mean value of the feature propagation sensitivity of each feature dimension in each neural network layer is extracted to obtain the mean value of the feature propagation sensitivity of each feature dimension, and a first interpretability analysis result is obtained. The first interpretability analysis result reflects the contribution intensity of each feature dimension to the interpretability analysis target. In a preferred embodiment of this application, the first interpretability analysis result can be displayed graphically.

[0034] In another preferred embodiment of this application, the maximum value of the first intermediate feature representation corresponding to each neural network layer is obtained based on the feature propagation sensitivity value, and the neural network layer deviation trajectory of the neighborhood samples is constructed based on the maximum value. Based on the neural network layer deviation trajectory, the second interpretability analysis result is obtained, and the second interpretability analysis result reflects the contribution intensity of each neural network layer to the interpretability analysis target.

[0035] In another preferred embodiment of this application, the trajectory deviation path is compared with a pre-built trajectory deviation path library to obtain a third interpretable analysis result corresponding to each original sample data. The third interpretable analysis result includes anomaly type labels, associated device labels, and operation record labels. The historical trajectory deviation paths in the pre-built trajectory deviation path library of this application are constructed based on historical sample data using the interpretability analysis method for power grid systems proposed in this application. Each historical trajectory deviation path is labeled with anomaly type, associated device, and corresponding operation record. The similarity comparison in this application uses the trajectory vector cosine similarity analysis method to select the Top-K most similar historical trajectory deviation paths. The anomaly type labels, associated device labels, and operation record labels corresponding to the Top-K historical trajectory deviation paths are used as the third interpretable analysis result.

[0036] In a preferred embodiment of this application, structured decision recommendations are further generated based on the first, second, and third interpretable analysis results. These recommendations include anomaly type alerts, key feature dimensions, high-risk propagation paths, and associated devices. For example, if the similarity between the trajectory deviation path and a historical trajectory deviation path with a voltage surge in the trajectory deviation path library reaches 91.6%, a suggested reference historical case number is provided. When a significant deviation is observed in the voltage range of 15V to 20V, a recommendation to check the power supply status of the corresponding device is given. If the neural network layer deviation trajectory shows that the intermediate feature deviation is mainly concentrated in the 6th attention channel layer of the target power grid model, the specific neural network layer number is provided.

[0037] To verify the effectiveness of the power grid system interpretability analysis method described in this application in practical applications, a series of comparative experiments were conducted using the publicly available power grid energy dataset BDG2 (Energy Data). The interpretability analysis method for power grid systems proposed in this invention (named GenExp) was quantitatively evaluated against several current mainstream time series forecasting and interpretation models in terms of "interpretation accuracy." The quantitative evaluation results are shown in Table 1.

[0038] Table 1 In Table 1, GRU represents a classic recurrent neural network model widely used for time series forecasting, while deepAR represents a probabilistic forecasting model based on deep learning proposed by Amazon. As shown in Table 1, while traditional deep learning models GRU and deepAR possess predictive capabilities, their accompanying interpretability analysis methods have low accuracy, only ranging from 56% to 58%, making it difficult to provide reliable decision-making support. The interpretability analysis method for power grid systems proposed in this invention achieves an interpretation accuracy of 76.7%, an improvement of approximately 20 percentage points compared to baseline models such as GRU and deepAR, demonstrating a significant advantage. In a preferred embodiment of the present invention, an original sample set and explicit feature labels are determined based on the collected power time series data of the target power grid. A neighborhood sample set is generated using a pre-trained diffusion model based on the original sample set and explicit feature labels. The explicit feature labels are set to reflect the operating conditions of the original sample set and / or features strongly correlated with the interpretability analysis target. The original sample set is input into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set. The neighborhood sample set is input into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set. A trajectory deviation path is constructed based on the first and second intermediate feature representation sets. An output response change is constructed based on the first and second intermediate output result sets. A feature propagation sensitivity value is obtained based on the trajectory deviation path and the output response change. The feature propagation sensitivity value is set to measure the impact of each dimension feature in each neural network layer of the target power grid model on the interpretability analysis target. An interpretable analysis result is generated based on the feature propagation sensitivity value and the trajectory deviation path. The interpretability analysis method for power grid systems disclosed in this application constructs natural disturbance neighborhood samples that conform to physical laws through a diffusion model and tracks their characteristic propagation trajectory within the target power grid model. This significantly improves the accuracy of interpreting the decision-making basis of the black-box model. The trajectory deviation path of this application reveals the temporal propagation path of information flow within the target power grid model when power grid state variables change with disturbances, constructs a causal chain between input disturbances and output responses, provides intuitive and structured auxiliary analysis tools, and enhances the credibility of the model output results through a dynamic and visual feedback interpretability mechanism. This provides a solid technical guarantee for the reliable application of the model in high-safety-requirement scenarios such as power grids, demonstrating significant inventiveness and beneficial effects.

[0039] Accordingly, such as Figure 2 The diagram shows the structure of an interpretability analysis system for power grid systems. Based on an interpretability analysis method for power grid systems, this embodiment of the invention also provides an interpretability analysis system for power grid systems, implementing the interpretability analysis method for power grid systems disclosed in this embodiment of the invention. The system includes: a sample set generation module 1, a feature extraction module 2, a trajectory deviation construction module 3, a sensitivity index construction module 4, and an interpretability analysis module 5. The sample set generation module 1 is used to determine the original sample set and explicit feature labels based on the collected power time series data of the target power grid, and to generate a neighborhood sample set using a pre-trained diffusion model based on the original sample set and the explicit feature labels. The explicit feature labels are set to reflect the operating conditions of the original sample set and / or features that are strongly correlated with the interpretability analysis target. The feature extraction module 2 is used to input the original sample set into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set, and to input the neighborhood sample set into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set; The trajectory deviation construction module 3 is used to construct a trajectory deviation path based on the first intermediate feature representation set and the second intermediate feature representation set, and to construct an output response change based on the first intermediate output result set and the second intermediate output result set. The sensitivity index construction module 4 is used to obtain the feature propagation sensitivity value based on the trajectory deviation path and the output response change. The feature propagation sensitivity value is set to measure the impact of each dimension feature on the interpretability analysis target of each neural network layer in the target power grid model. The interpretability analysis module 5 is used to generate interpretable analysis results based on the feature propagation sensitivity value and the trajectory deviation path.

[0040] For specific limitations regarding the interpretability analysis system for power grid systems, please refer to the above-described limitations regarding the interpretability analysis method for power grid systems, which will not be repeated here. Those skilled in the art will recognize that the various modules and steps described in conjunction with the embodiments disclosed in this invention can be implemented in hardware, software, or a combination of both. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0041] like Figure 3 The diagram shows the internal structure of a computer device. An embodiment of the present invention provides a computer device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps described above in the embodiment of the interpretability analysis method for power grid systems. Figure 1 Steps S1 to S5 as described above.

[0042] Those skilled in the art will understand that the illustrations Figure 3 This is merely an example of a computer device and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

[0043] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.

[0044] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0045] If the modules integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0046] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0047] Accordingly, embodiments of the present invention provide a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the steps described above in the embodiments of the interpretability analysis method for power grid systems, for example... Figure 1 Steps S1 to S5 as described above.

[0048] In summary, the present application provides an interpretability analysis method, system, device, and medium for power grid systems, addressing the technical problem of improving the reliability of interpretable analysis of power grid system models. The method includes: determining an original sample set and explicit feature labels based on collected power time-series data of the target power grid; generating a neighborhood sample set using a pre-trained diffusion model based on the original sample set and explicit feature labels; and setting the explicit feature labels to reflect the operating conditions of the original sample set and / or features strongly correlated with the interpretability analysis target; inputting the original sample set into the target power grid model to obtain a first intermediate feature representation set and a first intermediate feature representation set. The method involves inputting a neighborhood sample set into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set. Based on the first and second intermediate feature representation sets, a trajectory deviation path is constructed. Based on the first and second intermediate output result sets, an output response change is constructed. Based on the trajectory deviation path and the output response change, a feature propagation sensitivity value is obtained, which is set to measure the impact of each dimension of feature on the interpretability analysis target at each neural network layer in the target power grid model. Based on the feature propagation sensitivity value and the trajectory deviation path, interpretable analysis results are generated. The interpretability analysis method for power grid systems disclosed in this application constructs a naturally disturbed neighborhood sample set that conforms to physical laws through a diffusion model and tracks its feature propagation trajectory within the target power grid model, which can significantly improve the accuracy of interpreting the decision-making basis of the black-box model. The trajectory deviation path of this application reveals the temporal propagation path of information flow within the target power grid model when the power grid state variables change with disturbances, constructs the causal chain between input disturbances and output responses, provides an intuitive and structured auxiliary analysis tool, and the interpretable mechanism of dynamic visualization feedback improves the credibility of the model output results. It provides a solid technical guarantee for the reliable application of the model in high-safety-requirement scenarios such as power grids, and has significant creativity and beneficial effects.

[0049] The various embodiments in this specification are described in a progressive manner. For directly identical or similar parts of the embodiments, refer to each other. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0050] The embodiments described above are merely preferred embodiments of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various improvements and substitutions without departing from the technical principles of this application, and these improvements and substitutions should also be considered within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the scope of the claims.

Claims

1. An interpretability analysis method for power grid systems, characterized in that, The method includes: Based on the collected power time series data of the target power grid, an original sample set and explicit feature labels are determined. Then, based on the original sample set and the explicit feature labels, a neighborhood sample set is generated using a pre-trained diffusion model. The explicit feature labels are set to reflect the operating conditions of the original sample set and / or features that are strongly correlated with the interpretability analysis target. The original sample set is input into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set. The neighborhood sample set is input into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set. Based on the first intermediate feature representation set and the second intermediate feature representation set, a trajectory deviation path is constructed, and based on the first intermediate output result set and the second intermediate output result set, an output response change is constructed. Based on the trajectory deviation path and the output response change, a feature propagation sensitivity value is obtained. The feature propagation sensitivity value is set to measure the impact of each dimension feature on the interpretability analysis target of each neural network layer in the target power grid model. Based on the feature propagation sensitivity value and the trajectory deviation path, an interpretable analysis result is generated.

2. The interpretability analysis method for power grid systems as described in claim 1, characterized in that, The step of determining the original sample set and explicit feature labels based on the collected power time series data of the target power grid includes: Based on the collected power time series data of the target power grid, an original sample set is constructed; A consistency analysis is performed on the operating conditions of the original sample set to obtain explicit characteristics of the operating conditions; A correlation analysis is performed on the features of each dimension in the original sample set and the interpretability analysis target to obtain the explicit features of the target; Based on the explicit features of the operating conditions and the explicit features of the target, determine the explicit feature labels.

3. The interpretability analysis method for power grid systems as described in claim 1, characterized in that, The step of generating a neighborhood sample set using a pre-trained diffusion model based on the original sample set and the explicit feature labels includes: The original sample set is encoded using a pre-trained diffusion model encoder to obtain the latent variable encoding of each group of original sample data in the original sample set. Centered on the latent variable encoding, Gaussian perturbation sampling is performed in the latent space of the diffusion model to obtain pure noise samples for each set of the original sample data; Using the explicit feature labels as control conditions, the decoder of the diffusion model is used to decode the pure noise samples to obtain the neighborhood sample data corresponding to each group of original sample data. Based on the neighborhood sample data, construct a neighborhood sample set corresponding to each set of the original sample data.

4. The interpretability analysis method for power grid systems as described in claim 1, characterized in that, The step of inputting the original sample set into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set, and inputting the neighborhood sample set into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set, includes: The original sample set is input into the target power grid model. The first intermediate feature representation and the first intermediate output result of each set of initial sample data in the original sample set are extracted for each feature dimension in each layer of the neural network of the target power grid model. Based on each first intermediate feature representation, a first intermediate feature representation set is constructed. The neighborhood sample set is input into the target power grid model. The second intermediate feature representation and the second intermediate output result of each group of neighborhood sample data in the neighborhood sample set are extracted for each feature dimension in each layer of the neural network of the target power grid model. Based on each second intermediate feature representation, a second intermediate feature representation set is constructed.

5. The interpretability analysis method for power grid systems as described in claim 1, characterized in that, The step of constructing a trajectory deviation path based on the first intermediate feature representation set and the second intermediate feature representation set includes: Based on the first intermediate feature representation set and the second intermediate feature representation set, the deviation of the intermediate feature representation of the same feature dimension in the same layer of the neural network is obtained between the neighborhood sample data generated from the same original sample data and the corresponding original sample data; Based on the deviation, the trajectory deviation path of each original sample data propagating within the target power grid model is obtained.

6. The interpretability analysis method for power grid systems as described in claim 1, characterized in that, The step of obtaining the feature propagation sensitivity value based on the trajectory deviation path and the output response change includes: Based on the changes in the output response, the importance of the decision contribution of each dimension feature in each neighborhood sample to each neural network layer is obtained. Based on the bias and the importance of the decision contribution, the feature propagation sensitivity value of each dimension feature in each neural network layer is obtained.

7. The interpretability analysis method for power grid systems as described in claim 1, characterized in that, The step of generating interpretable analysis results based on the feature propagation sensitivity value and the trajectory deviation path includes: Based on the feature propagation sensitivity value, the mean feature propagation sensitivity value of each feature dimension is obtained, and based on the mean feature propagation sensitivity value, a first interpretability analysis result is obtained. The first interpretability analysis result reflects the contribution intensity of each feature dimension to the interpretability analysis target. Based on the feature propagation sensitivity value, the maximum value of the first intermediate feature representation corresponding to each neural network layer is obtained, and based on the maximum value, the neural network layer deviation trajectory of the neighborhood samples is constructed. Based on the neural network layer deviation trajectory, the second interpretability analysis result is obtained, and the second interpretability analysis result reflects the contribution intensity of each neural network layer to the interpretability analysis target. The trajectory deviation path is compared with a pre-built trajectory deviation path library to obtain a third interpretable analysis result. The third interpretable analysis result includes the anomaly type label, associated device label, and operation record label corresponding to each original sample data.

8. An interpretability analysis system for power grid systems, used to implement the interpretability analysis method for power grid systems according to any one of claims 1-7, characterized in that, The system includes: a sample set generation module, a feature extraction module, a trajectory deviation construction module, a sensitivity index construction module, and an interpretability analysis module; The sample set generation module is used to determine the original sample set and explicit feature labels based on the collected power time series data of the target power grid, and to generate a neighborhood sample set using a pre-trained diffusion model based on the original sample set and the explicit feature labels. The explicit feature labels are set to reflect the operating conditions of the original sample set and / or features that are strongly correlated with the interpretability analysis target. The feature extraction module is used to input the original sample set into the target power grid model to obtain a first intermediate feature representation set and a first intermediate output result set, and to input the neighborhood sample set into the target power grid model to obtain a second intermediate feature representation set and a second intermediate output result set. The trajectory deviation construction module is used to construct a trajectory deviation path based on the first intermediate feature representation set and the second intermediate feature representation set, and to construct an output response change based on the first intermediate output result set and the second intermediate output result set. The sensitivity index construction module is used to obtain the feature propagation sensitivity value based on the trajectory deviation path and the output response change. The feature propagation sensitivity value is set to measure the impact of each dimension feature on the interpretability analysis target of each neural network layer in the target power grid model. The interpretability analysis module is used to generate interpretable analysis results based on the feature propagation sensitivity value and the trajectory deviation path.

9. A computer device, characterized in that: The computer device includes a memory, a processor, and a transceiver connected to each other via a bus; the memory stores a set of computer program instructions and data, and transmits the stored data to the processor, which executes the computer program instructions stored in the memory to perform the interpretability analysis method for power grid systems as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that, when run, implements the interpretable analysis method for power grid systems as described in any one of claims 1 to 7.