Explanatable demand response potential assessment framework
By embedding interpretability components and causal analysis frameworks in the demand response potential assessment model, the problems of insufficient transparency and lack of causality are solved, and higher prediction accuracy and explanatory nature are achieved.
Patent Information
- Application Number
- CN202510057419.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-30
AI Technical Summary
The existing demand response potential assessment model is insufficiently transparent, unable to explain the source of the predicted results, lack of causal analysis, resulting in decision bias, and high model complexity, increasing interpretation difficulty and operating costs.
Provide an interpretable demand response potential assessment framework, by establishing data combing and feature extraction models, constructing predictive models based on long and short-term memory networks, and embed interpretability components such as SHAP values and causal forest analysis in the model, perform feature importance visualization and causal relationship analysis.
The transparency and causal analysis capabilities of the model are improved, allowing users to intuitively understand the source of the evaluation results and their changes, reduce decision bias, and improve prediction accuracy and explanatory model by optimizing model structure and hyperparameters.
Smart Images

Figure CN120069390A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system demand response, and particularly to an interpretable demand response potential evaluation framework. Background Art
[0002] With the continuous optimization of the energy structure and the wide access of new energy, the stability and flexibility of the power system face severe challenges. In this context, demand response, as an important load management means, has received extensive attention. Demand response can effectively relieve the grid pressure, improve the system operation efficiency and reduce the energy consumption by guiding users to adjust their electricity consumption behaviors.
[0003] At present, many demand response potential evaluation methods have been proposed. Most of these methods adopt prediction models based on machine learning or deep learning. However, the existing evaluation models lack transparency, especially the deep learning-based models. The collected data often operates as a "black box", and the source of the prediction results cannot be explained, making it difficult for grid operators to trust the evaluation results of the models, restricting their application in key decisions. Moreover, there is less visual support for the potential evaluation results, and it is difficult for users and operators to intuitively understand the source of the load potential and the reasons for its fluctuations. In addition, the existing technologies mostly make inferences based on correlations, lacking causal relationship analysis of potential influencing factors, which may lead to decision-making biases, and the overly complex algorithms and model architectures increase the model interpretation difficulty and operation cost. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the problem to be solved by the present invention is how to effectively solve the problems of insufficient model transparency, lack of result visualization, lack of causal analysis and high model complexity of the existing prediction models.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides an interpretable demand response potential evaluation framework, which includes:
[0008] Establish a data sorting and feature extraction model to collect electricity consumption feature data;
[0009] Construct a demand response potential prediction model based on the feature data, and input the feature data in sequence to complete model training;
[0010] Establish a feature importance visualization model, and conduct quantitative analysis and display of the prediction results;
[0011] Update and iterate the model to optimize the power grid electricity dispatching.
[0012] As a preferred solution of the interpretable demand response potential evaluation framework described in the present invention, wherein: the data grooming and feature extraction model includes a multi-source raw data grooming module and a data feature extraction module, specifically:
[0013] The multi-source raw data grooming module uses the pandas and NumPy libraries of the data cleaning tool Python to clean the collected load time series data, environmental data, user behavior data, and economic data, and then uses the scikit-learn library to detect and fill outliers in the data;
[0014] The method for the data feature extraction module to extract data features is as follows:
[0015] Calculate peak values, valley values, volatility through the sliding window technique, and use the Python library statsmodels to implement periodic decomposition to extract time series features;
[0016] Combine a linear regression model to quantify the sensitivity of temperature to load and extract environmental features;
[0017] Use pandas to perform frequency statistics on user response behaviors to extract user behavior features;
[0018] Calculate the price elasticity through a formula, and use the NumPy library for batch processing to extract economic features;
[0019] Then use TensorFlow to perform standardization processing on the extracted feature data.
[0020] As a preferred solution of the interpretable demand response potential evaluation framework described in the present invention, wherein: the demand response potential prediction model includes model selection and model training, specifically:
[0021] The model selection is based on a deep learning-based prediction model: the long short-term memory network LSTM model is used to capture the dynamic characteristics and global correlations of the load time series data respectively. The inputs are time series features, environmental features, behavior features, and economic features, and the output is the demand response potential prediction value, and an interpretability component is embedded in the prediction model;
[0022] The model training uses the gradient descent algorithm Adam optimizer to update the model parameters, and selects the best model architecture and hyperparameters through cross-validation, specifically:
[0023] A feature importance regularization term is introduced during the model training process, and the loss function formula is as follows:
[0024] L = L 预测 + λL 解释
[0025] Among them, L 预测 is the prediction error, and L 解释 is the feature importance regularization term, and λ is the hyperparameter.
[0026] As a preferred solution of the interpretable demand response potential evaluation framework described in the present invention, wherein: the interpretability component is to embed SHAP values in the prediction model to quantify the contribution of each input feature to the prediction result;
[0027] Use SHAP values to calculate the contribution degree of features to the demand response potential, and the calculation formula is:
[0028]
[0029] Among them, φ i represents the contribution degree of feature i, S is the feature subset, and N is the set of all features;
[0030] And use the causal inference framework causal forest to analyze the causal effect of key variables on the potential evaluation, and calculate the average causal effect. The formula is:
[0031] ACE = E[Y∣do(X = x 1 )] - E[Y∣do(X = x 0 )]
[0032] Among them, X is the independent variable, Y is the demand response potential, and x 1 and x 0 are different values of the variable respectively.
[0033] As a preferred solution of the interpretable demand response potential evaluation framework described in the present invention, wherein: the feature importance visualization model includes a pie chart and an interactive interface, which can display the importance of each input feature to the prediction result of the demand response potential, help users understand the source of the evaluation result, and the implementation method: use a pie chart to display the feature contribution degree calculated by SHAP values;
[0034] Dynamically display the causal analysis result through the interactive interface to reveal the causal relationship between key variables. The implementation method: represent the causal path between features using a causal relationship diagram for the electricity price change, provide adjustable sliders or input boxes, and allow users to simulate the change of specific variables and observe its impact on the demand response potential in real time;
[0035] Generate a natural language explanation for the contribution degree of the demand response potential. The implementation method:
[0036] The prediction result of the model can be split into the sum of the SHAP value contributions of each feature, and the expression is as follows:
[0037]
[0038] Among them, f(x) is the final predicted value of the model, φ 0 is the benchmark value, and φ i is the contribution degree of feature i to the prediction result, and M is the total number of features.
[0039] As a preferred solution of the interpretable demand response potential evaluation framework described in the present invention, wherein: the update iteration includes, on the premise of ensuring the prediction accuracy, using the prediction error RMSE and the average interpretability accuracy to optimize the interpretability index:
[0040] The prediction error RMSE can reduce the error and improve the model fitting degree. The calculation formula is:
[0041]
[0042] Among them, y i is the true value, y i is the predicted value, and N is the number of samples;
[0043] The average interpretability accuracy ExplAccuracy can improve the feature interpretability and model transparency. The calculation formula is:
[0044]
[0045] Among them, φ i is the feature contribution degree, is the predicted value;
[0046] By introducing a user feedback questionnaire, verify the actual effect of the model interpretability index, and adjust the model structure and the display method of feature importance according to the user feedback:
[0047]
[0048] Among them, S i is the user's score for interpretability, and N is the number of users participating in the survey.
[0049] As a preferred solution of the interpretable demand response potential evaluation framework described in the present invention, wherein: the update iteration further includes, to verify the effectiveness of the demand response potential evaluation framework, using actual load data and demand response records to comprehensively evaluate the model, specifically:
[0050] Mean absolute percentage error, calculation formula:
[0051]
[0052] Among them, y i is the true value, y iis the predicted value, N is the number of samples, and the mean absolute percentage error represents the error magnitude in percentage form. Among them, the smaller the MAPE value, the smaller the model prediction error and the higher the prediction accuracy; the smaller the RMSE value, the better the fitting effect of the model.
[0053] In a second aspect, an interpretable demand response potential evaluation system is provided in an embodiment of the present invention, which includes an electricity consumption feature data acquisition module; a demand response potential prediction, quantification analysis, and visualization module; and an update and iteration module.
[0054] The electricity consumption feature data acquisition module is used to collect data and sort out and extract features from the data.
[0055] The demand response potential prediction, quantification analysis, and visualization module is used to construct and train a demand response potential prediction model, and perform quantification analysis and visualization display on the output results.
[0056] The update and iteration module can optimize and iterate the demand response potential prediction model.
[0057] In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor. The memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the interpretable demand response potential evaluation framework as described in the first aspect of the present invention are implemented.
[0058] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein: when the computer program instructions are executed by the processor, the steps of the interpretable demand response potential evaluation framework as described in the first aspect of the present invention are implemented.
[0059] Advantages of the present invention: The present invention collects data affecting the electricity load through the Internet using existing devices and technologies such as smart meters, power grid monitoring systems, and meteorological APIs, providing raw data for the model. This can make full use of existing devices and reduce the data collection cost. At the same time, TensorFlow technology is used to standardize the extracted feature data, enabling pre-standardization processing of the data before it is input into the prediction model. This allows the prediction model based on the long short-term memory network (LSTM) model to directly obtain data for prediction, reducing the judgment time, accelerating the training speed of the model, and improving the efficiency and accuracy of the prediction model. Additionally, by embedding the SHAP value calculation for feature contribution degree and the causal forest analysis of the causal inference framework in the prediction model to analyze the causal effect of key variables on potential assessment, users can intuitively see the contribution degree and causal relationship of each feature to electricity price regulation, enabling them to intuitively understand the source and changes of the predicted demand potential, providing theoretical data support for power grid regulation of electricity consumption. The provided interactive visualization function supports users to individually modify one of the feature data to obtain new prediction results, freely simulate prediction scenarios according to user needs, expand the simulation range, and improve the flexibility of the prediction model. At the same time, the root mean square error (RMSE) and mean absolute percentage error are introduced to measure the deviation between the model prediction value and the actual value. By adjusting the model structure and hyperparameters, the smaller the MAPE value, the smaller the model prediction error and the higher the prediction accuracy. The smaller the RMSE value, the better the fitting effect of the model, thus realizing the update and iteration of the prediction model. Description of the Drawings
[0060] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0061] Figure 1 It is the overall flowchart of an interpretable demand response potential assessment framework;
[0062] Figure 2 It is the fan chart of feature contribution degree of an interpretable demand response potential assessment framework;
[0063] Figure 3 It is the causal relationship diagram of an interpretable demand response potential assessment framework. Detailed Embodiments
[0064] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention with reference to the drawings in the specification.
[0065] In the following description, many specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention may be practiced in other ways different from those described herein. Persons skilled in the art can make similar extensions without departing from the spirit of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0066] Secondly, as used herein, an "embodiment" or "embodiments" refer to specific features, structures, or characteristics that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it an embodiment that is separate or mutually exclusive of other embodiments.
[0067] Embodiment 1
[0068] Referring to Figure 1 , which is the first embodiment of the present invention, this embodiment provides an interpretable demand response potential evaluation framework, including:
[0069] Establish a data sorting and feature extraction model to collect electricity consumption feature data;
[0070] Based on the feature data, construct a demand response potential prediction model, and input the feature data in sequence to complete model training;
[0071] Establish a feature importance visualization model, and perform quantitative analysis and display on the prediction results;
[0072] Update and iterate the model to optimize the power grid electricity consumption scheduling.
[0073] Furthermore, data collection and feature engineering are the basis of the present invention. The purpose is to extract key features affecting the demand response potential from multi-source data, laying a foundation for subsequent model prediction and interpretation. The specific implementation is as follows:
[0074] Data collection is responsible for integrating raw data from different sources. Data collection includes the following sources:
[0075] 1. Load time series data: Obtained through smart meters and power grid monitoring systems, including daily, monthly, and annual data of user electricity consumption loads;
[0076] 2. Environmental data: Obtain historical and real-time temperature, humidity, and weather conditions through the meteorological API;
[0077] 3. User behavior data: Collect user response records, sourced from the power company's demand response system;
[0078] 4. Economic data: Obtain dynamic electricity price curves and user incentive records through the power grid real-time pricing system.
[0079] And through the data cleaning tools adopted, the pandas and NumPy libraries of Python are used for data cleaning, and the scikit-learn library is used for outlier detection and filling.
[0080] Furthermore, the feature extraction methods are as follows:
[0081] 1. Calculate the peak value, valley value, and volatility through the sliding window technique, and use the Python library statsmodels to implement periodic decomposition to extract time series features;
[0082] 2. Combine the linear regression model to quantify the sensitivity of temperature to load and extract environmental features;
[0083] 3. Use pandas to perform frequency statistics on user response behaviors to extract user behavior features;
[0084] 4. Calculate the price elasticity through a formula, and use the NumPy library for batch processing to extract economic features. The price elasticity calculation formula is:
[0085]
[0086] where ΔQ is the load change, ΔP is the price change, and P and Q are the benchmark electricity price and load value.
[0087] Adopt a deep learning model to train the feature extraction tool, and use TensorFlow to implement the standardization processing of the model input features.
[0088] Furthermore, the core technology of the present invention is to construct a demand response potential prediction model through model selection and training, and embed an interpretability analysis component, which is specifically implemented as follows:
[0089] 1. Model selection
[0090] Based on the deep learning prediction model: adopt the long short-term memory network LSTM model, which is respectively used to capture the dynamic characteristics and global correlation of load time series data. The input is time series features, environmental features, behavior features, and economic features, and the output is the demand response potential prediction value;
[0091] The specific implementation of LSTM for extracting time series features:
[0092] (1) Data preparation
[0093] Format the time series data such as load data, temperature, and electricity price into time steps, usually in the shape of:
[0094] (Number of samples, time step length, number of features)
[0095] Cut the time series using a sliding window method, use historical data as the model input, and predict the future response potential;
[0096] (2) Construction of the LSTM model;
[0097] (3) Model training and feature extraction:
[0098] Use the trained LSTM layer as a feature extractor to directly extract the high-dimensional time series features of the model for the input data;
[0099] The extracted features are usually a vector or matrix, representing the dynamic characteristics of the input time series;
[0100] Formula representation:
[0101] f t = σ(W f · [h t-1 , x t + b f )
[0102] i t = σ(W i · [h t-1 , x t + b i )
[0103] o t = σ(W o · [h t-1 , x t + b o )
[0104]
[0105] h t = o t · tanh(C t )
[0106] Among them, f t , i t , o t are the forget gate, input gate, and output gate; C t is the cell state; h t is the output state;
[0107] Embed an interpretability component: Embed SHAP (Shapley Additive Explanations) values in the prediction model to quantify the contribution of each input feature to the prediction result:
[0108] Use SHAP values to calculate the contribution degree of features to the demand response potential. The formula is:
[0109]
[0110] Among them, φ i represents the contribution degree of feature i, S is the feature subset, and N is the set of all features;
[0111] 2. Model training
[0112] During the model training process, a feature importance regularization term is introduced, and the loss function formula is as follows:
[0113] L = L 预测 + λL 解释
[0114] Among them, L 预测 is the prediction error, L 解释 is the feature importance regularization term, and λ is the hyperparameter that balances the two;
[0115] The Adam optimizer of the gradient descent algorithm is used to update the model parameters, and the best model architecture and hyperparameters are selected through cross-validation;
[0116] The Adam (Adaptive Moment Estimation) optimizer is an adaptive learning rate optimization algorithm that combines the advantages of the momentum method and RMSProp. The formula is as follows:
[0117] (1) Momentum update:
[0118] m t = β 1 m t-1 + (1 - β 1 )g t
[0119] Among them, m t is the first-order momentum estimate, g t is the current gradient, and β 1 is the decay rate of the first-order momentum;
[0120] Through the exponentially weighted average m t of the gradient, Adam can effectively smooth the fluctuations of the gradient;
[0121] (2) Squared gradient update:
[0122]
[0123] Among them, v t is the second-order momentum estimate, and β 2 is the decay rate of the second-order momentum;
[0124] Through the weighted average v t of the squared gradient, Adam can adaptively adjust the learning rate to make the update step size more stable;
[0125] (3) Deviation correction: To eliminate the influence that the momentum and squared gradient tend to 0 initially, the following correction is adopted:
[0126]
[0127] where m t is the first-order momentum estimate, β 1 is the decay rate of the first-order momentum, v t is the second-order momentum estimate, β 2 is the decay rate of the second-order momentum;
[0128] Correct the deviation of the momentum and squared gradient to improve the convergence performance of the algorithm;
[0129] (4) Parameter update:
[0130]
[0131] where θ t is the parameter value, η is the learning rate, and ∈ is a small number to prevent the denominator from being zero;
[0132] Combined with the momentum and adaptive learning rate adjustment, Adam has good robustness and efficiency in high-dimensional optimization problems.
[0133] Furthermore, by performing interpretability analysis to calculate the feature contribution degree and conduct causal analysis, specifically:
[0134] 1. Feature contribution degree calculation
[0135] Use the SHAP value to calculate the contribution degree of the feature to the demand response potential. The formula is:
[0136]
[0137] where φ i represents the contribution degree of feature i, S is the feature subset, and N is the set of all features;
[0138] 2. Causal analysis
[0139] Use the causal forest in the causal inference framework to analyze the causal effect of key variables on potential evaluation;
[0140] Calculate the average causal effect (ACE). The formula is:
[0141] ACE = E[Y∣do(X = x 1 )] - E[Y∣do(X = x 0 )]
[0142] where X is the independent variable (such as electricity price), Y is the demand response potential, and x 1and x 0 They are different values of variables respectively.
[0143] Furthermore, pie charts and causal diagrams are used to visually present the feature contribution degree, causal analysis results, and potential evaluation trends, specifically as follows:
[0144] 1. Visualization of feature importance
[0145] Show the importance of each input feature to the prediction result of demand response potential, and help users understand the source of the evaluation result;
[0146] 2. Dynamic causal analysis display
[0147] Dynamically display the causal analysis results through an interactive interface to reveal the causal relationship between key variables;
[0148] Provide adjustable sliders or input boxes to allow users to simulate changes in specific variables (such as increasing electricity prices or lowering temperatures) and observe their impact on demand response potential in real time;
[0149] 3. Potential decomposition and explanation
[0150] Decompose the model prediction result into the specific contribution values of each feature and generate a natural language explanation. The implementation method is as follows:
[0151] By calculating the SHAP value of each feature, decompose the prediction result into multiple components;
[0152] Use the SHAP value to calculate the contribution degree of each feature. The formula is:
[0153]
[0154] Among them, φ i represents the contribution degree of feature i, and S is the feature subset;
[0155] The prediction result of the model can be decomposed into the sum of the SHAP value contributions of each feature, expressed as follows:
[0156]
[0157] Among them, f(x) is the final prediction value of the model, φ 0 is the benchmark value, φ i is the contribution degree of feature i to the prediction result (SHAP value), and M is the total number of features.
[0158] Furthermore, on the premise of ensuring the prediction accuracy, optimize the interpretability indicators. The commonly used indicators include the prediction error RMSE and the average interpretability accuracy (ExplAccuracy):
[0159] (1) Optimization method of prediction error RMSE
[0160] Root Mean Square Error (RMSE) of the prediction error, calculation formula:
[0161]
[0162] where y i is the true value, y i is the predicted value, and N is the number of samples;
[0163] Adjust the model structure and hyperparameters, increase the depth or width of the model, improve the model complexity, and enhance the fitting ability for complex non-linear relationships;
[0164] Optimize the number of LSTM units or the number of Transformer layers, increase the memory capacity, capture more time series details, and use cross-validation and grid search to adjust hyperparameters including learning rate, batch size, regularization strength, etc.;
[0165] Data augmentation and cleaning:
[0166] Adopt interpolation or smoothing methods to complete the missing load data, remove outliers, and improve the generalization ability of the model by increasing the amount of historical load data or introducing data of similar users;
[0167] Feature engineering optimization:
[0168] Add highly correlated features including electricity price, temperature, user response frequency, etc., improve the sensitivity of the model to load fluctuations, capture more complete short-term and long-term load trends by adjusting the sliding window length, and reduce the error bias of a single model through model fusion to improve the robustness and prediction accuracy of the model;
[0169] (2) Optimization methods for Average Explanation Accuracy (ExplAccuracy)
[0170] Average Explanation Accuracy, calculation formula is:
[0171]
[0172] where φ i is the feature contribution degree, is the predicted value;
[0173] Optimization direction of ExplAccuracy: Improve feature interpretability and model transparency
[0174] After model training, introduce SHAP values to calculate the contribution degree of each feature to the predicted value to ensure interpretability, and use Transformer or attention mechanism to quantify the attention of the model at different time steps or features to improve interpretability transparency;
[0175] Improve the correlation between features and outputs, remove redundant features, retain features highly correlated with demand response potential, reduce interpretation bias, introduce causal inference analysis to ensure the causal relationship between features and outputs, prevent the model from only capturing correlations, and add an interpretive regularization term to the loss function so that the model maintains a high level of interpretability while optimizing the prediction error:
[0176] L = L 预测 + λL 解释
[0177] where L 解释 is the interpretive constraint term, λ is the adjustment parameter, and L 预测 is the prediction error loss.
[0178] Visualize the model prediction process in real time through feature importance to enable users to intuitively understand the feature contribution degree. Use natural language generation (NLG) tools to convert feature importance into text explanations to enhance users' understanding of the model prediction results;
[0179] (3) Data verification and user feedback mechanism
[0180] Verify the actual effect of the model interpretability metrics by introducing a user feedback questionnaire, and adjust the model structure and the way of displaying feature importance according to the user feedback:
[0181]
[0182] where S i is the user's score for interpretability;
[0183] In case of low satisfaction feedback, adjust the feature display method or the model interpretation strategy to improve ExplAccuracy. In case of high satisfaction feedback, further optimize the model in specific scenarios for promotion and application;
[0184] (4) Optimization effect expectation
[0185] Optimize while ensuring prediction accuracy, without sacrificing model transparency and interpretability and meeting the practical requirements of grid operators for the model. If the RMSE decreases after optimization, it indicates that the model fitting error is reduced, improving the accuracy of demand response potential prediction. If ExplAccuracy increases, it indicates that the interpretability of the model is significantly improved, making it easier for users to understand and trust the model output results.
[0186] Furthermore, to verify the effectiveness of the demand response potential assessment framework, the model is comprehensively evaluated using actual load data and demand response records. The verification process includes the following steps:
[0187] 1. Model accuracy detection
[0188] (1) Data source:
[0189] Collect historical load data from power companies or smart meters, covering at least 12 months of user electricity consumption records, and introduce data on demand response activities involving users, including response time, load reduction volume, and incentive amount, etc.;
[0190] (2) Data stratification and preprocessing:
[0191] Divide the dataset into a training set (70%), a validation set (15%), and a test set (15%);
[0192] Detect and process outliers, and use the sliding window smoothing method to fill in missing data;
[0193] (3) Model accuracy evaluation metrics:
[0194] Root Mean Square Error (RMSE), which measures the deviation between the model's predicted values and the actual values. The calculation formula is:
[0195] Prediction error RMSE, calculation formula:
[0196]
[0197] where y i is the true value, y i is the predicted value, and N is the number of samples.
[0198] Mean Absolute Percentage Error, calculation formula:
[0199]
[0200] where y i is the true value, y i is the predicted value, N is the number of samples. This formula represents the error size in percentage form. Among them, the smaller the MAPE value, the smaller the model prediction error, and the higher the prediction accuracy. The smaller the RMSE value, the better the model's fitting effect;
[0201] 2. User satisfaction evaluation
[0202] To evaluate the model interpretability and user understanding, quantify user satisfaction through user questionnaires. The questionnaire includes the credibility of the model prediction results, the understanding of the feature contribution degree, whether the interpretation results conform to the actual electricity consumption experience, and the intuitive evaluation of the visualization charts;
[0203] The questionnaire data calculates the average satisfaction through a quantitative scoring method. The satisfaction score calculation formula:
[0204]
[0205] Among them, S i is the score given by the i-th user, and N is the number of users participating in the survey;
[0206] The degree of users' understanding and acceptance of the model interpretability and the user perception of the transparency of the prediction results of the model are evaluated by the score of the average satisfaction. The higher the score, the better the performance.
[0207] 3. Comprehensive evaluation
[0208] For the user feedback with a satisfaction level lower than 75%, the model is adjusted and the visualization interface is optimized in combination with the actual requirements to improve the interpretability and user understanding. Then, the above steps are repeated until the RMSE is lower than the set threshold and the user satisfaction score is greater than 80%, and the model evaluation passes.
[0209] Furthermore, this embodiment also provides an interpretable demand response potential evaluation framework, including an electricity consumption feature data acquisition module, a demand response potential prediction, a quantitative analysis and visualization module, and an update and iteration module;
[0210] The electricity consumption feature data acquisition module is used to collect data and sort out and extract features from the data;
[0211] The demand response potential prediction, quantitative analysis and visualization module is used to construct and train a demand response potential prediction model, and perform quantitative analysis and visualization display on the output results;
[0212] The update and iteration module can optimize and iterate the demand response potential prediction model.
[0213] This embodiment also provides a computer device applicable to the case of the interpretable demand response potential evaluation framework, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the interpretable demand response potential evaluation framework proposed in the above embodiment.
[0214] The computer device can be a terminal, which includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, carrier networks, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0215] This embodiment also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the interpretable demand response potential evaluation framework proposed in the above embodiment.
[0216] It should be noted that the pandas and NumPy libraries, scikit-learn library, Python library statsmodels, NumPy library, TensorFlow, interpolation and smoothing methods, Transformer and attention mechanism, and natural language generation (NLG) tools of Python are all prior arts, so they will not be elaborated.
[0217] In summary, the present invention enhances the model transparency by embedding interpretable artificial intelligence technology, making the source of the evaluation results clearly visible, enabling users to intuitively see the contribution of each feature to electricity price regulation, enhancing the causal analysis ability, avoiding errors based on only correlation inference, significantly improving the evaluation scientificity, providing an interactive visualization function, enabling users and grid operators to intuitively understand the source of potential and its changes, achieving a balance between prediction accuracy and interpretability, and being both efficient and practical, suitable for complex power demand response optimization scenarios.
[0218] Embodiment 2
[0219] Refer to Figure 2 and Figure 3 , which is the second embodiment of the present invention. This embodiment provides an interpretable demand response potential evaluation framework. In order to verify the beneficial effects of the present invention, scientific demonstrations are carried out through economic benefit calculations and simulation experiments.
[0220] To conveniently display the importance of each input feature to the demand response potential prediction result and help users more intuitively understand the source of the evaluation result, the method such asFigure 2 The pie chart shown demonstrates the feature contribution degree of each feature data in SHAP value calculation to the prediction result of demand response potential. Among them, the higher the proportion of the color representing each feature data in the pie chart, the greater the influence on the prediction result of response potential;
[0221] To better reveal the causal relationship between key variables, the causal analysis result is dynamically displayed through an interactive interface. For example, Figure 3 As shown, the causal graph is used to represent the causal path between the characteristics of electricity price changes, which better shows how each characteristic affects the demand response potential;
[0222] At the same time, adjustable sliders or input boxes are provided to allow users to simulate the changes of specific variables (such as increasing electricity price or decreasing temperature) and observe their impact on the demand response potential in real time.
[0223] In summary, the present invention can clearly represent the contribution degree of each input feature to the prediction result of demand response potential, and at the same time enable users to understand the causal relationship between key variables. While realizing automatic prediction, it can manually simulate the changes of specific variables and observe the impact of key variables on the demand response potential in real time, improving the prediction flexibility of the model.
[0224] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.
Claims
1. An interpretable demand response potential assessment framework, characterized by: include: Establish data combing and feature extraction models to collect electricity consumption feature data; Build a demand response potential prediction model based on feature data, and input feature data in sequence to complete model training; Establish a feature importance visualization model, and perform quantitative analysis and display of the prediction results; Update and iterate the model to optimize power grid dispatch.
2. The interpretable demand response potential assessment framework of claim 1, wherein: The data combing and feature extraction model includes a multi-source raw data combing module and a data feature extraction module, specifically: The multi-source raw data combing module uses the data cleaning tool Python's pandas and NumPy libraries to clean the collected load time series data, environmental data, user behavior data, and economic data, and then uses the scikit-learn library to detect and fill in outliers on the data; The method for extracting data features by the data feature extraction module is: Calculate peaks, valleys, and volatility using sliding window techniques and use the Python library statsmodels to implement periodic decomposition and extract time series features; The linear regression model is used to quantify the sensitivity of temperature to load and extract environmental characteristics; Use pandas to perform frequency statistics on user response behaviors and extract user behavior characteristics; The electricity price elasticity is calculated through formulas, and the NumPy library is used for batch processing to extract economic characteristics; Then use TensorFlow to standardize the extracted feature data.
3. The interpretable demand response potential assessment framework of claim 2, wherein: The demand response potential prediction model includes model selection and model training, specifically: The model selected is a prediction model based on deep learning: a long short-term memory network LSTM model is used to capture the dynamic characteristics and global correlation of load time series data, the input is time series characteristics, environmental characteristics, behavioral characteristics and economic characteristics, the output is the demand response potential prediction value, and an explainability component is embedded in the prediction model; The model training uses the gradient descent algorithm Adam optimizer to update the model parameters, and selects the best model architecture and hyperparameters through cross-validation, specifically: The feature importance regularization term is introduced during model training, and the loss function formula is as follows: L=L 预测 +λL 解释 Among them, L 预测 is the prediction error, L 解释 is the feature importance regularization term, and λ is a hyperparameter.
4. The interpretable demand response potential assessment framework of claim 3, wherein: The explainability component embeds SHAP values in the prediction model to quantify the contribution of each input feature to the prediction result; The SHAP value is used to calculate the contribution of the feature to the demand response potential. The calculation formula is: Among them, φ i represents the contribution of feature i, s is the feature subset, and N is the set of all features; The causal inference framework causal forest is used to analyze the causal effects of key variables on potential assessment. The average causal effect is calculated as: ACE=E[Y∣do(X=x1)]-E[Y∣do(X=x0)] Among them, X is the dependent variable, Y is the demand response potential, and x1 and x0 are different values of the variables.
5. The interpretable demand response potential assessment framework of claim 4, wherein: The feature importance visualization model includes a fan chart and an interactive interface, which can show the importance of each input feature to the demand response potential prediction result, and help users understand the source of the evaluation result. The implementation method is: using a fan chart to show the feature contribution calculated by the SHAP value; The causal analysis results are dynamically displayed through an interactive interface to reveal the causal relationship between key variables. The implementation method is: electricity price changes use causal relationship diagrams to represent the causal path between features, and provide adjustable sliders or input boxes to allow users to simulate changes in specific variables and observe their impact on demand response potential in real time; The contribution of the demand response potential is generated into a natural language explanation, which is achieved by: The prediction result of the model can be decomposed into the sum of the SHAP value contributions of each feature, expressed as follows: Among them, f(x) is the final predicted value of the model, φ0 is the benchmark value, and φ i is the contribution of feature i to the prediction result, and M is the total number of features.
6. The interpretable demand response potential assessment framework of claim 5, wherein: The update iteration includes optimizing the explanatory index by using the prediction error RMSE and the average explanation accuracy under the premise of ensuring the prediction accuracy: The prediction error RMSE can reduce the error and improve the model fit. The calculation formula is: Among them, y i is the true value, y i is the predicted value, N is the number of samples; The average explanation accuracy ExplAccuracy can improve feature interpretability and model transparency. The calculation formula is: Among them, φ i is the feature contribution, is the predicted value; By introducing a user feedback questionnaire, we verify the actual effect of the model's explanatory indicators, and adjust the model structure and feature importance display method based on user feedback: Among them, S i is the user's rating of the interpretability, and N is the number of users participating in the survey.
7. The interpretable demand response potential assessment framework of claim 6, wherein: The update also includes a comprehensive evaluation of the model using actual load data and demand response records to verify the effectiveness of the demand response potential assessment framework, specifically: Mean absolute percentage error, calculated as: Among them, y i is the true value, y i is the predicted value, N is the number of samples, and the mean absolute percentage error represents the error size in percentage form. The smaller the MAPE value, the smaller the model prediction error and the higher the prediction accuracy; the smaller the RMSE value, the better the model fitting effect.
8. An interpretable demand response potential assessment system using the method according to any one of claims 1 to 7, characterized in that: It also includes a power consumption characteristic data collection module; a demand response potential prediction and quantitative analysis visualization module; and an update and iteration module; The power consumption characteristic data collection module is used to collect data and sort and extract characteristics from the data; The demand response potential prediction and quantitative analysis visualization module is used to build and train the demand response potential prediction model, and to perform quantitative analysis and visual display on the output results; The update iteration module can optimize and iterate the demand response potential prediction model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the processor implements the steps of the interpretable demand response potential assessment framework described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the interpretable demand response potential assessment framework described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Evaluation index system construction method and system of emergency rescue intelligent command decision-making system
CN120278259A
Causal inference method and device for traffic accident data processing and prediction model optimization
CN120781977A