Power grid load prediction system and method based on machine learning
By using multi-modal data processing and fusion module, LSTM and Transformer models in the grid load prediction system, as well as adaptive learning and real-time update module, the adaptiveness of traditional grid load prediction methods in multi-source data processing and dynamic environment is solved. The defects in the aspects have achieved higher prediction accuracy and system adaptability.
Patent Information
- Application Number
- CN202411674583.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-07
AI Technical Summary
The traditional grid load prediction method has defects in processing multi-source data and model adaptability and interpretability in dynamic environments, resulting in insufficient adaptability and accuracy of the prediction model.
Using a grid load prediction system based on machine learning, data cleaning, feature extraction and weighting fusion is carried out through multimodal data processing and fusion modules, short-term and long-term dependency modeling is carried out in combination with LSTM and Transformer models, and through adaptive learning and real-time updates Modules and feedback optimization modules improve the adaptability and interpretability of the model.
It significantly improves the accuracy of load prediction and the ability to comprehensively utilize multi-source information, significantly enhances the sensitivity of the model to complex environmental factors, and improves the accuracy of prediction and the adaptability and stability of the system.
Smart Images

Figure FT_1 
Figure FT_2 
Figure QLYQS_1
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent dispatching and prediction of electric power systems, and in particular to a power grid load prediction system and method based on machine learning. Background Art
[0002] Grid load forecasting is a key link in power system planning and real-time dispatching, which directly affects the safety, economy and operation efficiency of the power grid. With the diversification and increasing uncertainty of power demand, traditional load forecasting methods face many challenges. Existing load forecasting methods mainly build models based on historical load data, typically time series analysis, statistical regression methods and machine learning-based models. However, traditional methods have defects in processing multi-source data, model adaptability in dynamic environments, and model interpretability, as shown below: Traditional load forecasting methods usually build models based on historical load data and try to combine external factors such as weather. They often adopt simple splicing or independent processing methods, but fail to fully consider the association and weight distribution between different data sources, resulting in reduced sensitivity to changes in the external environment and limiting the adaptability and accuracy of the forecasting model. Traditional load forecasting models mostly use a single time-dependent modeling method, which makes the forecast results susceptible to data fluctuations. In particular, the accuracy is reduced in scenarios with drastic load fluctuations. In addition, they lack flexibility and comprehensiveness in capturing short-term fluctuations and long-term trends of load changes, and cannot accurately reflect the periodic and non-periodic characteristics of power grid loads. Existing load forecasting methods usually adopt a periodic batch update method, which leads to the lag and reduced stability of the forecast results and cannot adapt to the rapidly changing environment. Especially when emergencies occur, the model cannot adjust parameters in time, resulting in deviations in the forecast results, which in turn affects the reliability and stability of the system. In traditional load forecasting methods, most models use fixed parameters for forecasting after training, or manually adjust parameters periodically to cope with changes in data distribution, which reduces the flexibility and adaptability of the model, limits the accuracy of the forecast and the long-term stability of the model.
[0003] Therefore, those skilled in the art provide a power grid load forecasting system and method based on machine learning to solve the above-mentioned problems. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a power grid load forecasting system and method based on machine learning to solve the problems raised in the above background technology.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a power grid load forecasting system based on machine learning, comprising: The multimodal data processing and fusion module is used to collect multimodal data from power grid load data, meteorological data, economic data and social events, and then clean and extract features from the multimodal data, and perform weighted fusion of different data features through the self-attention mechanism to provide standardized feature input for the hybrid prediction model module; The hybrid prediction model module, through the combination of LSTM and Transformer models, models the short-term and long-term dependencies of the features output by the multimodal data processing and fusion module, extracts short-term time dependency features using the LSTM network, and captures global dependency features through the multi-head attention mechanism of the Transformer model to generate power grid load forecast results, and passes the forecast results to the model interpretation and visualization module, the adaptive learning and real-time update module, and the feedback optimization module; The adaptive learning and real-time updating module updates the parameters of the hybrid prediction model module through online incremental learning based on the outputs of the feedback optimization module and the model interpretability and visualization module. When changes in data features or emergencies are detected, the model parameters are adjusted, and the updated model results are fed back to the feedback optimization module. The model interpretability and visualization module performs interpretative analysis on the prediction results of the hybrid prediction model module and the input features of the multimodal data processing and fusion module, uses the SHAP value method to quantify the contribution of each input feature to the prediction results, and combines feature sensitivity analysis to generate visualization results for the key features and prediction trends of the model, so as to pass the analysis results to the feedback optimization module; The feedback optimization module monitors the prediction error of the model according to the analysis results of the model interpretation and visualization module and the adjustment feedback of the adaptive learning and real-time update module, re-evaluates the parameters of the hybrid prediction model module based on the real-time error and user feedback, and feeds back the optimization information to the adaptive learning and real-time update module and the multimodal data processing and fusion module; The system deployment and integration module deploys the system in a containerized form, integrates the power grid dispatching system through the API interface, obtains real-time data stream input to the multimodal data processing and fusion module, receives the prediction results of the hybrid prediction model module and transmits them to the power grid dispatching system.
[0006] Preferably, the multimodal data processing and fusion module includes: The data cleaning submodule pre-processes the original multimodal data, fills in missing values and removes outliers, and provides reliable basic data for the subsequent feature engineering submodule; The feature engineering submodule uses sliding window processing on the load data based on the data output by the data cleaning submodule to generate a sequence feature matrix , in, represents the feature matrix of the current time step, is the window length; The multimodal data fusion submodule receives the feature matrix generated by the feature engineering submodule and uses the self-attention mechanism to perform weighted fusion on the multimodal feature matrix. The fusion output is: , in, ; in, , , are the query matrix, key matrix and value matrix, is the output weight matrix, is the dimension of the key matrix, is the output of the hth head, is the normalization function, is the weight of the i-th query matrix, is the weight of the i-th bond matrix, is the weight of the i-th value matrix, is the output of the multi-head attention layer, Indicates that the outputs of multiple heads will be spliced together.
[0007] Preferably, the hybrid prediction model module includes: The LSTM layer is used to perform short-term dependency modeling on the features output by the multimodal data processing and fusion module and extract the local time series features of the power load. The unit state update formula of the LSTM layer is: , in, Forget gate, control the previous state The retention ratio, is the input gate, which controls the amount of new information written. is the candidate unit state, The cell state at the current time step; The Transformer layer performs long-term dependency modeling after receiving the short-term dependency features output by the LSTM layer. Through the multi-head attention mechanism, the Transformer layer captures the global dependency of the feature sequence on a long time scale. The calculation formula of the multi-head attention mechanism is: , in, represents the hth attention head, , , are the query matrix, key matrix and value matrix, is the output weight matrix, Indicates that the output of multiple heads will be spliced together. Represents the output of the multi-head attention mechanism.
[0008] Preferably, the hybrid prediction model module includes a position encoding module, which is used to add position encoding in the Transformer layer to retain the time order information of the sequence. The position encoding calculation formula is: , , Where t represents the time step, i represents the position, represents the encoding dimension, represents the time step t in the position encoding The value of the dimension, represents the time step t in the position encoding The value of the dimension, Represents a constant cardinality.
[0009] Preferably, the adaptive learning and real-time updating module includes: The anomaly detection submodule is used to detect sudden anomalies in the load data and pass the detection results to the incremental learning submodule. The anomaly detection submodule uses the isolation forest algorithm to identify anomalies by calculating anomaly scores. The anomaly score calculation formula of the isolation forest algorithm is: , in, represents the average path length of sample x, is the normalization factor, n represents the size of the data set, is the score value of input x, where x is the input data; The incremental learning submodule updates the model parameters in real time based on the detection results and feedback information provided by the anomaly detection submodule, so that the prediction model can adapt to the dynamic changes of the data. The incremental learning submodule uses online gradient update to minimize the prediction error. Its loss function is: , in, is the real load data, is the predicted value, G is the number of data samples, θ is the model parameter, is the mean square error loss function.
[0010] Preferably, the model interpretability and visualization module includes: The SHAP value analysis submodule is used to calculate the contribution of each feature to the prediction result and the relative importance of each feature in the model prediction. The SHAP value calculation formula is: , in, represents the contribution of feature i, Represents the output of the model using the feature set S, is the feature set, For the complete set of features, represents the model output after adding feature i to feature set S, is the number of elements in the feature set S, is the number of elements in the feature set N; After receiving the feature contribution results provided by the SHAP value analysis submodule, the sensitivity analysis submodule conducts further sensitivity analysis on the key features with high contribution, calculates the impact of changes in each feature on the prediction results, and identifies the sensitivity of the model to the key features. The sensitivity index is: , in, Features The amount of change, is the change in the predicted result, is the sensitivity of feature i.
[0011] Preferably, the system deployment and integration module includes: The real-time data processing submodule is used to receive and process the power grid load data stream and the external data stream, pre-process and format the received data to meet the input requirements of the containerized deployment submodule, and pass the processed data stream to the containerized deployment submodule so that the system can obtain the latest data updates in real time; The containerized deployment submodule, after receiving data from the real-time data processing submodule, encapsulates the system into a Docker container to expose the Dockerized system components to the API integration submodule; The API integration submodule establishes a connection with the system functional components packaged by the containerized deployment submodule, and realizes real-time data interaction with the power dispatching system through the API interface. The API integration submodule is responsible for receiving requests from the power dispatching system and passing the requests to the functional modules within the containerized deployment submodule to return the real-time prediction results of the system to the power dispatching system.
[0012] Preferably, the feedback optimization module includes: The error feedback submodule is used to monitor the prediction error of the model in real time and pass the error analysis results to the parameter adjustment submodule so that the model can be adjusted according to the real-time error. The error feedback submodule provides the calculated error information to the user feedback submodule to assist the user in providing guidance during the model adjustment process. The user feedback submodule, after receiving the error analysis results provided by the error feedback submodule, generates feedback suggestions based on the power load demand or special event information provided by the user and transmits them to the parameter adjustment submodule; The parameter adjustment submodule, after obtaining the error analysis results of the error feedback submodule and the feedback suggestions of the user feedback submodule, performs adjustments to the model parameters according to the error changes and user feedback requirements, and passes the adjusted parameters back to the error feedback submodule to update the error monitoring data in the next round of prediction.
[0013] Preferably, the error feedback submodule evaluates the difference between the predicted value and the actual value by calculating the mean square error, and the calculation formula is: , in, is the i-th eigenvalue of the input data, is the i-th eigenvalue of the reconstructed data, is the number of features, It represents the mean squared error between the predicted value and the true value.
[0014] A method for predicting power grid load based on machine learning comprises the following steps: Step 1: Collect multi-source data from power grid load, meteorology, economic and social events, and transmit the multi-source data to the multimodal data processing and fusion module; Step 2: In the multimodal data processing and fusion module, the collected data is cleaned and features are extracted, and the self-attention mechanism is used to weightedly fuse different data features. The fused feature data is standardized and then passed to the hybrid prediction model module; Step 3: In the hybrid prediction model module, the LSTM model is used to model the short-term dependency of the fused features. At the same time, the global time dependency is modeled through the multi-head attention mechanism of the Transformer model to generate the prediction results of the power grid load. Step 4: The power grid load forecasting result generated by the hybrid forecasting model module is transmitted to the model interpretation and visualization module, the adaptive learning and real-time update module and the feedback optimization module; Step 5: In the model interpretability and visualization module, the prediction results of the hybrid prediction model module and the input features of the multimodal data processing and fusion module are analyzed for interpretation. The contribution of each input feature to the prediction result is calculated using the SHAP value method, and the visual analysis results are generated in combination with the feature sensitivity analysis. Step 6: The analysis results of the model interpretation and visualization module are passed to the feedback optimization module to further optimize the prediction performance and parameter settings of the model; Step 7: In the adaptive learning and real-time updating module, based on the outputs of the feedback optimization module and the model interpretability and visualization module, the parameters of the hybrid prediction model module are updated through online incremental learning to adapt to changes in data features or emergencies; Step 8: In the feedback optimization module, the prediction error of the model is monitored and evaluated according to the analysis results of the model interpretation and visualization module and the feedback of the adaptive learning and real-time update module, and the key parameters of the hybrid prediction model module are adjusted; Step 9: Pass the parameter information optimized by the feedback optimization module to the adaptive learning and real-time update module and the multimodal data processing and fusion module to update the learning strategy and data fusion method of the model; Step 10. In the system deployment and integration module, the system is deployed in a containerized package. The real-time data stream of the power grid dispatching system is obtained through the API interface and passed to the multimodal data processing and fusion module. At the same time, the prediction results of the hybrid prediction model module are transmitted to the power grid dispatching system.
[0015] The present invention provides a power grid load forecasting system and method based on machine learning. It has the following beneficial effects: 1. The present invention deeply integrates the multimodal data of power grid load data, meteorological data, economic data and social events through a multimodal data processing and fusion module, and introduces a self-attention mechanism to weightedly process different data features, thereby achieving dynamic weighting and screening of key features, effectively improving the accuracy of load forecasting and the ability to comprehensively utilize multi-source information, and significantly enhancing the sensitivity of the prediction model to complex environmental factors.
[0016] 2. Through the combination of LSTM and Transformer, the system of the present invention can capture the characteristics of short-term dependence and long-term dependence, achieve comprehensiveness and flexibility in modeling the time dependence of power grid load, accurately reflect the complex periodicity and long-term and short-term changes of load, and improve the accuracy of prediction.
[0017] 3. The present invention uses an adaptive learning and real-time update module to achieve that when a change in data features or an emergency is detected, the model can automatically trigger incremental learning to adjust parameters, so as to update in real time when the data suddenly changes, so that the model can adapt to environmental changes, which is particularly suitable for sudden load fluctuation scenarios, thereby improving the adaptability and stability of the system in a dynamic environment.
[0018] 4. The present invention uses a feedback optimization module, combined with error monitoring and user feedback information, to make real-time fine adjustments to model parameters, with higher flexibility and adaptability, so that the model can be continuously adjusted according to real-time prediction results, thereby enhancing the accuracy of the prediction and the self-correction ability of the system, reflecting the dynamic and intelligent prediction optimization characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a system framework diagram of the present invention; Figure 2 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0020] In order to make the technical personnel in the technical field understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in combination with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a partial embodiment of the present invention, not a complete embodiment. Based on the embodiment of the present invention, other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present invention.
[0021] The present invention is described in detail below in conjunction with the accompanying drawings: Example: Please see attached Figure 1 and attached Figure 2 , an embodiment of the present invention provides a power grid load forecasting system based on machine learning, comprising: The multimodal data processing and fusion module is used to collect multimodal data from power grid load data, meteorological data, economic data and social events, and then clean and extract features from the multimodal data, and perform weighted fusion of different data features through the self-attention mechanism to provide standardized feature input for the hybrid prediction model module; The hybrid prediction model module, through the combination of LSTM and Transformer models, models the short-term and long-term dependencies of the features output by the multimodal data processing and fusion module, extracts short-term time dependency features using the LSTM network, and captures global dependency features through the multi-head attention mechanism of the Transformer model to generate power grid load forecast results, and passes the forecast results to the model interpretation and visualization module, the adaptive learning and real-time update module, and the feedback optimization module; The adaptive learning and real-time updating module updates the parameters of the hybrid prediction model module through online incremental learning based on the outputs of the feedback optimization module and the model interpretability and visualization module. When changes in data features or emergencies are detected, the model parameters are adjusted, and the updated model results are fed back to the feedback optimization module. The model interpretability and visualization module performs interpretative analysis on the prediction results of the hybrid prediction model module and the input features of the multimodal data processing and fusion module, uses the SHAP value method to quantify the contribution of each input feature to the prediction results, and combines feature sensitivity analysis to generate visualization results for the key features and prediction trends of the model, so as to pass the analysis results to the feedback optimization module; The feedback optimization module monitors the prediction error of the model according to the analysis results of the model interpretation and visualization module and the adjustment feedback of the adaptive learning and real-time update module, re-evaluates the parameters of the hybrid prediction model module based on the real-time error and user feedback, and feeds back the optimization information to the adaptive learning and real-time update module and the multimodal data processing and fusion module; The system deployment and integration module deploys the system in a containerized form, integrates the power grid dispatching system through the API interface, obtains real-time data stream input to the multimodal data processing and fusion module, receives the prediction results of the hybrid prediction model module and transmits them to the power grid dispatching system.
[0022] The advantage of the multimodal data processing and fusion module is that it can effectively collect and integrate power grid load data, meteorological data, economic data, and social event data, improve data quality, consistency, and standardization through cleaning and feature extraction, and use the self-attention mechanism to achieve dynamic weighting of features, so that the system can automatically focus on key features, thereby improving the model's sensitivity to external environmental changes and prediction accuracy; The advantage of the hybrid prediction model module is that it combines the advantages of LSTM and Transformer models to capture the short-term dependency characteristics of load data and model long-term global dependencies through a multi-head attention mechanism, so that the system has a comprehensive understanding of the complex changes in power grid load and provides reliable support for the prediction of short-term fluctuations and long-term trends. The benefit of the adaptive learning and real-time update module is that, through the online incremental learning mechanism, the system automatically updates the model parameters when data features change or emergencies occur, achieving efficient adaptation to the dynamic environment, ensuring that the model can respond accurately under different load fluctuations, and maintaining the stability and real-time nature of the prediction results; The benefit of the model interpretability and visualization module is that it uses SHAP values and feature sensitivity analysis to quantify the contribution of each feature to the prediction, generates intuitive visualization results, makes the prediction process transparent, helps power dispatchers understand the driving factors of load changes, and provides strong data support for load dispatch decisions; The benefit of the feedback optimization module is that it can dynamically adjust model parameters through real-time error monitoring and user feedback, achieve self-optimization for actual conditions, automatically correct prediction deviations, and adjust the model according to feedback information to meet the needs of specific power grid scenarios, so that the prediction results are highly consistent with the actual situation. The benefit of the system deployment and integration module is that it integrates the power grid dispatching system through containerized deployment and API interface, realizes flexible migration and rapid deployment in different platform environments, receives data from the power grid dispatching system in real time and feeds back prediction results, ensures that the system can respond to real-time data needs, and provides reliable data support for rapid decision-making in power grid dispatching.
[0023] The multimodal data processing and fusion module includes: The data cleaning submodule pre-processes the original multimodal data, fills in missing values and removes outliers, and provides reliable basic data for the subsequent feature engineering submodule; The feature engineering submodule uses sliding window processing on the load data based on the data output by the data cleaning submodule to generate a sequence feature matrix , in, represents the feature matrix of the current time step, is the window length; The multimodal data fusion submodule receives the feature matrix generated by the feature engineering submodule and uses the self-attention mechanism to perform weighted fusion on the multimodal feature matrix. The fusion output is: , in, ; in, , , are the query matrix, key matrix and value matrix, is the output weight matrix, is the dimension of the key matrix, is the output of the hth head, is the normalization function, is the weight of the i-th query matrix, is the weight of the i-th bond matrix, is the weight of the i-th value matrix, is the output of the multi-head attention layer, Indicates that the outputs of multiple heads will be spliced together.
[0024] The advantage of the multimodal data processing and fusion module is that it can systematically preprocess, extract features and dynamically fuse multi-source data through the synergy of sub-modules, and provide high-quality and standardized input features for the power grid load forecasting model; First, the data cleaning submodule preprocesses the original multimodal data by filling missing values and removing outliers to ensure the integrity and consistency of the data, providing reliable basic data for subsequent processing; Secondly, the feature engineering submodule generates a sequence feature matrix through a sliding window mechanism, which preserves the time dependency of load data and helps the subsequent prediction model capture short-term and long-term change trends; Finally, the multimodal data fusion submodule uses the self-attention mechanism to perform weighted fusion on the feature matrix, which can dynamically assign different weights to each data source, thereby strengthening key features and reducing the interference of irrelevant information. The generated fusion output retains the richness of multimodal data, improves the concentration and effectiveness of features, and lays the foundation for the accurate modeling of subsequent prediction models.
[0025] The hybrid prediction model module includes: The LSTM layer is used to perform short-term dependency modeling on the features output by the multimodal data processing and fusion module and extract the local time series features of the power load. The unit state update formula of the LSTM layer is: , in, Forget gate, control the previous state The retention ratio, is the input gate, which controls the amount of new information written. is the candidate unit state, The cell state at the current time step; The Transformer layer performs long-term dependency modeling after receiving the short-term dependency features output by the LSTM layer. Through the multi-head attention mechanism, the Transformer layer captures the global dependency of the feature sequence on a long time scale. The calculation formula of the multi-head attention mechanism is: , in, represents the hth attention head, , , are the query matrix, key matrix and value matrix, is the output weight matrix, Indicates that the output of multiple heads will be spliced together. Represents the output of the multi-head attention mechanism.
[0026] The advantage of the hybrid prediction model module is that it realizes the joint modeling of short-term and long-term dependencies through the combination of LSTM and Transformer layers, so that the system can fully capture the complex change patterns of power load and improve the accuracy and stability of prediction; First, the LSTM layer models the short-term dependency of the features output by the multimodal data processing and fusion module, extracts the local time series features of the load, and models the short-term fluctuations through the unit state update mechanism, while maintaining the continuity of effective information in the short-term data fluctuations; Then, after receiving the short-term dependency features output by LSTM, the Transformer layer further performs long-term dependency modeling and captures the global dependency of feature sequences over long time scales through a multi-head attention mechanism, enabling the model to identify periodic and long-term change patterns in load data.
[0027] The dynamic weighting capability of the multi-head attention mechanism gives the model a high degree of flexibility, allowing the system to respond to both short-term fluctuations and long-term trends simultaneously, thereby providing a more comprehensive and robust feature expression for power load forecasting, laying a solid foundation for subsequent modules to generate reliable prediction results.
[0028] The hybrid prediction model module includes a position encoding module, which is used to add position encoding in the Transformer layer to retain the time order information of the sequence. The position encoding calculation formula is: , , Where t represents the time step, i represents the position, represents the encoding dimension, represents the time step t in the position encoding The value of the dimension, represents the time step t in the position encoding The value of the dimension, Represents a constant cardinality.
[0029] The advantage of the position encoding module is that it introduces time sequence information in the Transformer layer, so that the model can retain and utilize the time sequence structure in the sequence data, thereby enhancing the ability to capture the time dependency of power load. The Transformer model itself lacks time sequence perception. The position encoding module ensures that the features of each time step can contain their relative position in the sequence by adding position encoding information to the input features.
[0030] The adaptive learning and real-time update modules include: The anomaly detection submodule is used to detect sudden anomalies in the load data and pass the detection results to the incremental learning submodule. The anomaly detection submodule uses the isolation forest algorithm to identify anomalies by calculating anomaly scores. The anomaly score calculation formula of the isolation forest algorithm is: , in, represents the average path length of sample x, is the normalization factor, n represents the size of the data set, is the score value of input x, where x is the input data; The incremental learning submodule updates the model parameters in real time based on the detection results and feedback information provided by the anomaly detection submodule, so that the prediction model can adapt to the dynamic changes of the data. The incremental learning submodule uses online gradient update to minimize the prediction error. Its loss function is: , in, is the real load data, is the predicted value, G is the number of data samples, θ is the model parameter, is the mean square error loss function.
[0031] The benefit of the adaptive learning and real-time update module is that, through the collaboration of anomaly detection and incremental learning, the system can respond to sudden anomalies of load data and environmental changes in real time, maintaining the dynamic adaptability and accuracy of the prediction model; First, the anomaly detection submodule uses the isolation forest algorithm to calculate the anomaly score, detects abnormal points in the load data, identifies abnormal fluctuations in the load, and passes the detection results to the incremental learning submodule; Next, the incremental learning submodule adjusts the model parameters through the online gradient update mechanism based on the anomaly detection results and feedback information to minimize the prediction error and ensure that the model maintains efficient prediction when the environment changes.
[0032] The model interpretability and visualization module includes: The SHAP value analysis submodule is used to calculate the contribution of each feature to the prediction result and the relative importance of each feature in the model prediction. The SHAP value calculation formula is: , in, represents the contribution of feature i, Represents the output of the model using the feature set S, is the feature set, For the complete set of features, represents the model output after adding feature i to feature set S, is the number of elements in the feature set S, is the number of elements in the feature set N; After receiving the feature contribution results provided by the SHAP value analysis submodule, the sensitivity analysis submodule conducts further sensitivity analysis on the key features with high contribution, calculates the impact of changes in each feature on the prediction results, and identifies the sensitivity of the model to the key features. The sensitivity index is: , in, Features The amount of change, is the change in the predicted result, is the sensitivity of feature i.
[0033] The benefit of the model interpretability and visualization module is that, through the collaborative work of the SHAP value analysis and sensitivity analysis submodules, the interpretability and transparency of the model prediction results are significantly enhanced, providing power dispatchers with a deep understanding of the driving factors of the prediction; First, the SHAP value analysis submodule calculates the contribution of each feature to the prediction results, conducts in-depth contribution analysis on the key features identified by the sensitivity analysis submodule, clarifies the relative importance of each feature in the model prediction, and helps identify the features that have the greatest impact on the prediction results; Secondly, after receiving the feature contribution results from the SHAP value analysis submodule, the sensitivity analysis submodule conducts further sensitivity analysis on the key features with high contribution, calculates the impact of feature changes on the prediction results, and identifies the sensitivity of the model to the key features.
[0034] The system deployment and integration modules include: The real-time data processing submodule is used to receive and process the power grid load data stream and the external data stream, pre-process and format the received data to meet the input requirements of the containerized deployment submodule, and pass the processed data stream to the containerized deployment submodule so that the system can obtain the latest data updates in real time; The containerized deployment submodule, after receiving data from the real-time data processing submodule, encapsulates the system into a Docker container to expose the Dockerized system components to the API integration submodule; The API integration submodule establishes a connection with the system functional components packaged by the containerized deployment submodule, and realizes real-time data interaction with the power dispatching system through the API interface. The API integration submodule is responsible for receiving requests from the power dispatching system and passing the requests to the functional modules within the containerized deployment submodule to return the real-time prediction results of the system to the power dispatching system.
[0035] The benefit of the system deployment and integration module is that through the collaborative work of real-time data processing, containerized deployment, and API integration, the system can be flexibly deployed in different platform environments, respond to dynamic changes in power grid load data in real time, and provide efficient data support for power dispatching; First, the real-time data processing submodule receives and processes the grid load data stream and external data stream, preprocesses and formats the data, ensures that the data meets the input standards of containerized deployment, and provides a continuously updated data source for the system; Secondly, the containerized deployment submodule encapsulates the system into a Docker container, making the system portable and efficiently deployable, facilitating quick startup in different environments, and exposing containerized system components to the API integration submodule; Finally, the API integration submodule establishes real-time data interaction with the power dispatching system through the API interface, receives requests from the power dispatching system and passes them to each functional module, and returns the real-time prediction results of the system to ensure that the dispatching system can quickly obtain the latest prediction data.
[0036] The feedback optimization module includes: The error feedback submodule is used to monitor the prediction error of the model in real time and pass the error analysis results to the parameter adjustment submodule so that the model can be adjusted according to the real-time error. The error feedback submodule provides the calculated error information to the user feedback submodule to assist the user in providing guidance during the model adjustment process. The user feedback submodule, after receiving the error analysis results provided by the error feedback submodule, generates feedback suggestions based on the power load demand or special event information provided by the user and transmits them to the parameter adjustment submodule; The parameter adjustment submodule, after obtaining the error analysis results of the error feedback submodule and the feedback suggestions of the user feedback submodule, performs adjustments on the model parameters according to the error changes and user feedback requirements, and transmits the adjusted parameters back to the error feedback submodule to update the error monitoring data in the next round of prediction; The error feedback submodule evaluates the difference between the predicted value and the actual value by calculating the mean square error, and its calculation formula is: , in, is the i-th eigenvalue of the input data, is the i-th eigenvalue of the reconstructed data, is the number of features, It represents the mean squared error between the predicted value and the true value.
[0037] The benefit of the feedback optimization module is that, through the synergy of the error feedback, user feedback and parameter adjustment submodules, the system can dynamically optimize the model parameters based on the prediction error monitoring and user demand changes, thereby improving the model's adaptability to real-time data and special load demands; First, the error feedback submodule monitors the prediction error of the model in real time by calculating the mean square error, passes the error analysis results to the parameter adjustment submodule, and provides the calculated error information to the user feedback submodule to help users understand the model performance more intuitively; Secondly, after receiving the error feedback results, the user feedback submodule generates feedback suggestions based on the power load demand or special event information provided by the user, and passes the suggestions to the parameter adjustment submodule so that the model optimization process takes into account the actual operation requirements; Finally, the parameter adjustment submodule flexibly adjusts the model parameters according to the error feedback and user feedback, and feeds the adjustment results back to the error feedback submodule to apply the updated model parameters in the next round of prediction.
[0038] A method for predicting power grid load based on machine learning comprises the following steps: Step 1: Collect multi-source data from power grid load, meteorology, economic and social events, and transmit the multi-source data to the multimodal data processing and fusion module; Step 2: In the multimodal data processing and fusion module, the collected data is cleaned and features are extracted, and the self-attention mechanism is used to weightedly fuse different data features. The fused feature data is standardized and then passed to the hybrid prediction model module; Step 3: In the hybrid prediction model module, the LSTM model is used to model the short-term dependency of the fused features. At the same time, the global time dependency is modeled through the multi-head attention mechanism of the Transformer model to generate the prediction results of the power grid load. Step 4: The power grid load forecasting result generated by the hybrid forecasting model module is transmitted to the model interpretation and visualization module, the adaptive learning and real-time update module and the feedback optimization module; Step 5: In the model interpretability and visualization module, the prediction results of the hybrid prediction model module and the input features of the multimodal data processing and fusion module are analyzed for interpretation. The contribution of each input feature to the prediction result is calculated using the SHAP value method, and the visual analysis results are generated in combination with the feature sensitivity analysis. Step 6: The analysis results of the model interpretation and visualization module are passed to the feedback optimization module to further optimize the prediction performance and parameter settings of the model; Step 7: In the adaptive learning and real-time updating module, based on the outputs of the feedback optimization module and the model interpretability and visualization module, the parameters of the hybrid prediction model module are updated through online incremental learning to adapt to changes in data features or emergencies; Step 8: In the feedback optimization module, the prediction error of the model is monitored and evaluated according to the analysis results of the model interpretation and visualization module and the feedback of the adaptive learning and real-time update module, and the key parameters of the hybrid prediction model module are adjusted; Step 9: Pass the parameter information optimized by the feedback optimization module to the adaptive learning and real-time update module and the multimodal data processing and fusion module to update the learning strategy and data fusion method of the model; Step 10. In the system deployment and integration module, the system is deployed in a containerized package. The real-time data stream of the power grid dispatching system is obtained through the API interface and passed to the multimodal data processing and fusion module. At the same time, the prediction results of the hybrid prediction model module are transmitted to the power grid dispatching system.
[0039] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A power grid load forecasting system based on machine learning, characterized in that: include: The multimodal data processing and fusion module is used to collect multimodal data from power grid load data, meteorological data, economic data and social events, and then clean and extract features from the multimodal data, and perform weighted fusion of different data features through the self-attention mechanism to provide standardized feature input for the hybrid prediction model module; The hybrid prediction model module, through the combination of LSTM and Transformer models, models the short-term and long-term dependencies of the features output by the multimodal data processing and fusion module, extracts short-term time dependency features using the LSTM network, and captures global dependency features through the multi-head attention mechanism of the Transformer model to generate power grid load forecast results, and passes the forecast results to the model interpretation and visualization module, the adaptive learning and real-time update module, and the feedback optimization module; The adaptive learning and real-time updating module updates the parameters of the hybrid prediction model module through online incremental learning based on the outputs of the feedback optimization module and the model interpretability and visualization module. When changes in data features or emergencies are detected, the model parameters are adjusted, and the updated model results are fed back to the feedback optimization module. The model interpretability and visualization module performs interpretative analysis on the prediction results of the hybrid prediction model module and the input features of the multimodal data processing and fusion module, uses the SHAP value method to quantify the contribution of each input feature to the prediction results, and combines feature sensitivity analysis to generate visualization results for the key features and prediction trends of the model, so as to pass the analysis results to the feedback optimization module; The feedback optimization module monitors the prediction error of the model according to the analysis results of the model interpretation and visualization module and the adjustment feedback of the adaptive learning and real-time update module, re-evaluates the parameters of the hybrid prediction model module based on the real-time error and user feedback, and feeds back the optimization information to the adaptive learning and real-time update module and the multimodal data processing and fusion module; The system deployment and integration module deploys the system in a containerized form, integrates the power grid dispatching system through the API interface, obtains real-time data stream input to the multimodal data processing and fusion module, receives the prediction results of the hybrid prediction model module and transmits them to the power grid dispatching system.
2. A power grid load forecasting system based on machine learning according to claim 1, characterized in that: The multimodal data processing and fusion module includes: The data cleaning submodule pre-processes the multimodal data and provides reliable basic data for the subsequent feature engineering submodule by filling missing values and removing outliers. The feature engineering submodule uses sliding window processing on the load data based on the data output by the data cleaning submodule to generate a sequence feature matrix , in, represents the feature matrix of the current time step, is the window length; The multimodal data fusion submodule receives the feature matrix generated by the feature engineering submodule and uses the self-attention mechanism to perform weighted fusion on the feature matrix. The fusion output is: , in, ; in, , , are the query matrix, key matrix and value matrix, is the output weight matrix, is the dimension of the key matrix, is the output of the hth head, is the normalization function, is the weight of the i-th query matrix, is the weight of the i-th bond matrix, is the weight of the i-th value matrix, is the output of the multi-head attention layer, Indicates that the outputs of multiple heads will be spliced together.
3. The power grid load forecasting system based on machine learning according to claim 1, characterized in that: The hybrid prediction model module includes: The LSTM layer is used to perform short-term dependency modeling on the features output by the multimodal data processing and fusion module and extract the local time series features of the power load. The unit state update formula of the LSTM layer is: , in, Forget gate, control the previous state The retention ratio, is the input gate, which controls the amount of new information written. is the candidate unit state, The cell state at the current time step; The Transformer layer performs long-term dependency modeling after receiving the short-term dependency features output by the LSTM layer. Through the multi-head attention mechanism, the Transformer layer captures the global dependency of the feature sequence on a long time scale. The calculation formula of the multi-head attention mechanism is: , in, represents the hth attention head, , , are the query matrix, key matrix and value matrix, is the output weight matrix, Indicates that the output of multiple heads will be spliced together. Represents the output of the multi-head attention mechanism.
4. A power grid load forecasting system based on machine learning according to claim 3, characterized in that: The hybrid prediction model module includes a position encoding module, which is used to add position encoding in the Transformer layer to retain the time order information of the sequence. The position encoding calculation formula is: , , Where t represents the time step, i represents the position, represents the encoding dimension, represents the time step t in the position encoding The value of the dimension, represents the time step t in the position encoding The value of the dimension, Represents a constant cardinality.
5. The power grid load forecasting system based on machine learning according to claim 1, characterized in that: The adaptive learning and real-time updating module includes: The anomaly detection submodule is used to detect sudden anomalies in the load data and pass the detection results to the incremental learning submodule. The anomaly detection submodule uses the isolation forest algorithm to identify anomalies by calculating anomaly scores. The anomaly score calculation formula of the isolation forest algorithm is: , in, represents the average path length of sample x, is the normalization factor, n represents the size of the data set, is the score value of input x, where x is the input data; The incremental learning submodule updates the model parameters in real time based on the detection results and feedback information provided by the anomaly detection submodule, so that the prediction model can adapt to the dynamic changes of the data. The incremental learning submodule uses online gradient update to minimize the prediction error. Its loss function is: , in, is the real load data, is the predicted value, G is the number of data samples, θ is the model parameter, is the mean square error loss function.
6. The power grid load forecasting system based on machine learning according to claim 1, characterized in that: The model interpretability and visualization module includes: The SHAP value analysis submodule is used to calculate the contribution of each feature to the prediction result and the relative importance of each feature in the model prediction. The SHAP value calculation formula is: , in, represents the contribution of feature i, Represents the output of the model using the feature set S, is the feature set, For the complete set of features, represents the model output after adding feature i to feature set S, is the number of elements in the feature set S, is the number of elements in the feature set N, and Represents the number of permutations of the feature set S and the number of permutations of the remaining features; After receiving the feature contribution results provided by the SHAP value analysis submodule, the sensitivity analysis submodule conducts further sensitivity analysis on the key features with high contribution, calculates the impact of changes in each feature on the prediction results, and identifies the sensitivity of the model to the key features. The sensitivity index is: , in, Features The amount of change, is the change in the predicted result, is the sensitivity of feature i.
7. The power grid load forecasting system based on machine learning according to claim 1, characterized in that: The system deployment and integration module includes: The real-time data processing submodule is used to receive and process the power grid load data stream and the external data stream, pre-process and format the received data to meet the input requirements of the containerized deployment submodule, and pass the processed data stream to the containerized deployment submodule so that the system can obtain the latest data updates in real time; The containerized deployment submodule, after receiving data from the real-time data processing submodule, encapsulates the system into a Docker container to expose the Dockerized system components to the API integration submodule; The API integration submodule establishes a connection with the system functional components packaged by the containerized deployment submodule, and realizes real-time data interaction with the power dispatching system through the API interface. The API integration submodule is responsible for receiving requests from the power dispatching system and passing the requests to the functional modules within the containerized deployment submodule to return the real-time prediction results of the system to the power dispatching system.
8. The power grid load forecasting system based on machine learning according to claim 1, characterized in that: The feedback optimization module comprises: The error feedback submodule is used to monitor the prediction error of the model in real time and pass the error analysis results to the parameter adjustment submodule so that the model can be adjusted according to the real-time error. The error feedback submodule provides the calculated error information to the user feedback submodule to assist the user in providing guidance during the model adjustment process. The user feedback submodule, after receiving the error analysis results provided by the error feedback submodule, generates feedback suggestions based on the power load demand or special event information provided by the user and transmits them to the parameter adjustment submodule; The parameter adjustment submodule, after obtaining the error analysis results of the error feedback submodule and the feedback suggestions of the user feedback submodule, performs adjustments to the model parameters according to the error changes and user feedback requirements, and passes the adjusted parameters back to the error feedback submodule to update the error monitoring data in the next round of prediction.
9. A power grid load forecasting system based on machine learning according to claim 8, characterized in that: The error feedback submodule evaluates the difference between the predicted value and the actual value by calculating the mean square error, and its calculation formula is: , in, is the i-th eigenvalue of the input data, is the i-th eigenvalue of the reconstructed data, is the number of features, It represents the mean squared error between the predicted value and the true value.
10. A method for predicting power grid load based on machine learning, according to a system for predicting power grid load based on machine learning according to any one of claims 1 to 9, characterized in that: The steps include: Step 1: Collect multi-source data from power grid load, meteorology, economic and social events, and transmit the multi-source data to the multimodal data processing and fusion module; Step 2: In the multimodal data processing and fusion module, the collected data is cleaned and features are extracted, and the self-attention mechanism is used to weightedly fuse different data features. The fused feature data is standardized and then passed to the hybrid prediction model module; Step 3: In the hybrid prediction model module, the LSTM model is used to model the short-term dependency of the fused features. At the same time, the global time dependency is modeled through the multi-head attention mechanism of the Transformer model to generate the prediction results of the power grid load. Step 4: The power grid load forecasting result generated by the hybrid forecasting model module is transmitted to the model interpretation and visualization module, the adaptive learning and real-time update module and the feedback optimization module; Step 5: In the model interpretability and visualization module, the prediction results of the hybrid prediction model module and the input features of the multimodal data processing and fusion module are analyzed for interpretation. The contribution of each input feature to the prediction result is calculated using the SHAP value method, and the visual analysis results are generated in combination with the feature sensitivity analysis. Step 6: The analysis results of the model interpretation and visualization module are passed to the feedback optimization module to further optimize the prediction performance and parameter settings of the model; Step 7: In the adaptive learning and real-time updating module, based on the outputs of the feedback optimization module and the model interpretability and visualization module, the parameters of the hybrid prediction model module are updated through online incremental learning to adapt to changes in data features or emergencies; Step 8: In the feedback optimization module, the prediction error of the model is monitored and evaluated according to the analysis results of the model interpretation and visualization module and the feedback of the adaptive learning and real-time update module, and the key parameters of the hybrid prediction model module are adjusted; Step 9: Pass the parameter information optimized by the feedback optimization module to the adaptive learning and real-time update module and the multimodal data processing and fusion module to update the learning strategy and data fusion method of the model; Step 10. In the system deployment and integration module, the system is deployed in a containerized package. The real-time data stream of the power grid dispatching system is obtained through the API interface and passed to the multimodal data processing and fusion module. At the same time, the prediction results of the hybrid prediction model module are transmitted to the power grid dispatching system.
Citation Information
Cited By
Power load prediction method and system based on meteorological prediction model
CN119849989A
Power Load Forecasting Method and System Based on Meteorological Prediction Model
CN119849989B
Dynamic load regulation and control method and system for distributed new energy access power grid
CN119965865A
A method and system for dynamically regulating the load of a distributed new energy grid connection
CN119965865B
Transform-based power system multi-modal data fusion toughness optimization method
CN120046044A