Prediction model generation method and device for power grid dispatching future state early warning
By adopting the BP neural network model in the investment decisions of power grid enterprises, and using z-score standardization and Elastic Net feature selection, the problems of large calculation volume and slow solution speed of traditional methods are solved, and efficient investment results prediction and decision support are achieved.
Patent Information
- Application Number
- CN202411714187.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-21
AI Technical Summary
Traditional mathematical models and expert systems are large in the investment decisions of power grid companies, slow in solving, and high construction and maintenance costs, making it difficult to quickly provide accurate prediction results.
The BP neural network model is used to process the cost data of future state warning of power grid scheduling, and an efficient prediction model is generated through z-score standardization and Elastic Net feature selection.
It significantly improves computing speed and decision-making efficiency, reduces construction and maintenance costs, enhances the flexibility and adaptability of the model, and can quickly provide accurate prediction results.
Smart Images

Figure CN119670949A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to a method and device for generating a prediction model for future state warning of power grid dispatching. Background Art
[0002] In power grid enterprises, investment decision-making is a complex and multi-step process involving market research and analysis, policy and regulatory considerations, local economic development assessments, and the strategic development needs of the power grid company itself. Under the combined effect of these factors, a project plan is drawn up. In order to ensure the feasibility and economic benefits of the project, economic and technical feasibility analysis is required before the investment project is established. Traditional mathematical models mainly rely on historical data and specific algorithms for calculations to evaluate the economic benefits and technical feasibility of investment projects. Specifically, by first collecting and sorting out historical data related to the power grid, mathematical methods such as regression analysis, linear programming, and dynamic programming are used to model and calculate the data to predict the future returns and technical feasibility of the investment project. After multiple iterations and adjustments, the final analysis results are obtained to support investment decisions. On the other hand, the expert system uses a knowledge base and reasoning mechanism to simulate the decision-making process of experts. The expert system first builds a knowledge base containing a large amount of professional knowledge and experience, and then uses the reasoning mechanism to comprehensively evaluate the investment project based on the input project data and the current market and technical conditions. The expert system derives the feasibility and expected benefits of the project by matching the input data with the rules and cases in the knowledge base, and generates corresponding decision recommendations.
[0003] Although traditional mathematical models play an important role in the investment decision-making of power grid companies, their disadvantages are that they require large amounts of calculations and are slow to solve. Especially when faced with complex and ever-changing scenarios, it is difficult to quickly provide accurate prediction results, which is an obvious disadvantage for investment projects that require rapid decision-making. In addition, although expert systems can simulate the expert decision-making process and combine multiple data sources to provide more accurate decision support, their construction and maintenance costs are high, and they rely on the updating of the knowledge base and the efficiency of the reasoning mechanism, resulting in a slow response speed when responding to real-time and diversified needs. In contrast, the present invention Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for generating a prediction model for future state warning of power grid dispatching, aiming to solve the above-mentioned problems in the prior art.
[0005] The present invention provides a method for generating a prediction model for early warning of future state of power grid dispatching, comprising:
[0006] Collect historical data on scenarios that power grid companies may face during dispatching and cost data on future investment warnings;
[0007] Processing the historical data and the cost data by using a z-score standardization method to scale data of different orders of magnitude to the same order of magnitude;
[0008] Elastic Net is used to perform feature selection on different prediction targets to obtain respective highly correlated feature data sets, which are then split into a training set and a test set. The training set is used to train the BP neural network model to obtain prediction models for different prediction targets, and the prediction model is performance tested using the test set to obtain the final prediction model.
[0009] The present invention provides a prediction model generation device for future state early warning of power grid dispatching, comprising:
[0010] The collection module is used to collect historical data of scenarios that power grid companies may face during dispatching and cost data for future investment warnings;
[0011] A processing module, used for processing the historical data and the cost data by a z-score standardization method, and scaling data of different orders of magnitude to the same order of magnitude;
[0012] The training module is used to use Elastic Net to perform feature selection on different prediction targets respectively, obtain respective highly correlated feature data sets, split the highly correlated feature data sets into a training set and a test set, and use the training set to train the BP neural network model to obtain prediction models for different prediction targets respectively, and perform performance testing on the prediction model through the test set to obtain the final prediction model.
[0013] An embodiment of the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for generating a prediction model for future state warning of power grid dispatching.
[0014] An embodiment of the present invention further provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps of the method for generating a prediction model for future state warning of power grid dispatching are implemented.
[0015] The embodiment of the present invention uses a BP neural network model to predict investment effectiveness, aiming to improve calculation speed and decision-making efficiency, thereby more effectively supporting the future state early warning technology investment decision-making process of power grid dispatching business. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0017] Figure 1 is a flow chart of a method for generating a prediction model for early warning of future state of power grid dispatching according to an embodiment of the present invention;
[0018] Figure 2 It is a schematic diagram of realizing a prediction model generation method for early warning of future state of power grid dispatching according to an embodiment of the present invention;
[0019] Figure 3 It is a detailed processing flow chart of a method for generating a prediction model for early warning of future state of power grid dispatching according to an embodiment of the present invention;
[0020] Figure 4 is a schematic diagram of a prediction model generation device for early warning of future state of power grid dispatching according to an embodiment of the present invention;
[0021] Figure 5 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0023] Method Embodiment
[0024] According to an embodiment of the present invention, a method for generating a prediction model for early warning of future state of power grid dispatching is provided. Figure 1 is a flow chart of a method for generating a prediction model for early warning of future state of power grid dispatching according to an embodiment of the present invention. Figure 1 As shown, the prediction model generation method for future state warning of power grid dispatching according to an embodiment of the present invention specifically includes:
[0025] Step S101, collecting historical data of scenarios that power grid companies may face during dispatching and cost data of future state warnings for investment; specifically including:
[0026] Collect historical data on three scenarios that power grid companies may face during dispatching and cost data for future investment warnings, where the three scenarios specifically include: sudden wildfire scenario, severe typhoon weather scenario, and coal transportation congestion scenario.
[0027] Step S102, through z- score The standardization method processes the historical data and the cost data to scale the data of different orders of magnitude to the same order of magnitude; specifically, it includes:
[0028] According to formula 1, by z- score The standardization method processes the historical data and the cost data, scaling the data of different orders of magnitude to the same order of magnitude:
[0029]
[0030] Among them, X is the initial value of the data; μ is the mean of the data set; σ is the standard deviation of the data set.
[0031] Step S103: Use Elasti c Net performs feature selection on different prediction targets respectively to obtain respective highly correlated feature data sets, splits the highly correlated feature data sets into a training set and a test set, and uses the training set to train the BP neural network model to obtain prediction models for different prediction targets respectively, and uses the test set to perform performance testing on the prediction model to obtain the final prediction model.
[0032] Among them, Elasti c Net performs feature selection for different prediction targets and obtains their respective highly correlated feature data sets, including:
[0033] According to Formula 2 and Formula 3, using Elasti c Net performs feature selection for different prediction targets and obtains their respective highly correlated feature data sets:
[0034]
[0035]
[0036] Where N is the number of samples, y i is the true data of the i-th sample, β0 is the scalar of β, β0 and β are scalar and vector respectively, x i is the p feature data corresponding to the i-th sample, which is a vector, λ is the penalty coefficient used to control the strength of feature selection, P a (β) is the penalty function, α is a non-negative regularization parameter used to control the weights of the two regularization terms in the penalty term, and β is the regression coefficient vector.
[0037] Using the training set to train the BP neural network model specifically includes:
[0038] The BP neural network model is trained through three steps of forward propagation, back propagation and weight update, wherein the BP neural network model specifically includes: an input layer, a hidden layer and an output layer; during the forward propagation process, the input of the neurons in the hidden layer is determined according to Formula 4, the activation function of each neuron is determined according to Formula 5, and during the back propagation process, the error terms of the output layer and the hidden layer are calculated according to Formula 6 and Formula 7, and the weights and biases are updated using the gradient descent method according to Formula 8 and Formula 9:
[0039]
[0040]
[0041] in, is the input of the jth neuron in the lth layer, is the weight from layer l-1 to layer l, is the activation function output of the i-th neuron in the l-1th layer, represents the bias of the jth neuron in the lth layer, f is the activation function, and L is the loss function, which calculates the error between the target value and the output value. represents the activation function output of the jth neuron in the lth layer, represents the layer error term, represents the input of the kth neuron in the lth layer, The sign of the partial derivative, is the partial derivative of function F with respect to the independent variable x, is the hidden layer error term, It is represented as the weight from the i-th neuron in the l-1th layer to the j-th neuron in the lth layer, The superscript represents the different number of layers, that is, it represents the error term output by the kth neuron in the l+1th layer. represents the weight from the jth neuron in the lth layer to the kth neuron in the l+1th layer, It represents the derivative of the activation function, which indicates the rate of change of the activation function; η represents the learning rate, which determines the step size each time the weight or bias is updated.
[0042] The prediction model is tested for performance using the test set to obtain a final prediction model, specifically including:
[0043] The mean square error (MSE), root mean square error (RMSE), and determination coefficient (R) were used. 2The prediction model was tested for performance using four parameters, namely, mean absolute error (MAE) and average absolute error (MAE). After multiple iterations of training and hyperparameter tuning, the final prediction model was obtained.
[0044] The technical solution of the embodiment of the present invention has the following beneficial effects:
[0045] (1) Significantly improve computing speed and decision-making efficiency: Traditional mathematical models rely on complex data processing and a large amount of calculations, which are slow to solve and difficult to adapt to the rapidly changing market and technical environment. However, BP neural network, with its powerful parallel processing capabilities and efficient learning algorithms, can quickly process large amounts of data, provide real-time prediction results, and significantly improve the efficiency of investment decision-making.
[0046] (2) Reduce construction and maintenance costs: Although expert systems can simulate expert decision-making processes, their construction and maintenance costs are high and require constant updating of the knowledge base and optimization of the reasoning mechanism. In contrast, the construction and training process of the BP neural network model is relatively simple and does not require a complex knowledge base and reasoning mechanism, which reduces the construction and maintenance costs of the system.
[0047] (3) Enhance the flexibility and adaptability of the model: The BP neural network model can continuously optimize its own parameters through self-learning to adapt to different input data and prediction targets. This enables the model to maintain high prediction accuracy and stability when facing complex and changing power grid dispatching scenarios, providing strong support for scientific decision-making.
[0048] The above technical solution of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
[0049] Figure 2The technical implementation process of the embodiment of the present invention is shown. The embodiment of the present invention first collects relevant historical data of three scenarios (including sudden wildfires, severe typhoon weather, and coal transportation congestion) that may be faced during the dispatching process of power grid enterprises, as well as the cost data required for investment in future state warning; then the data is processed by the z-score standardization method to scale data of different orders of magnitude to the same order of magnitude, reducing the impact of different data dimensions on model training; then the present invention uses Elastic Net to perform feature selection on different prediction targets, wherein a total of four prediction targets are set, namely, the benefits of investment in future state warning of wildfire scenario, the benefits of investment in future state warning of coal congestion scenario, the benefits of investment in future state warning of typhoon scenario, and the annualized rate of return of multi-scenario warning of investment in future state warning of three scenarios. Feature selection is performed for different prediction targets respectively to obtain their respective highly correlated feature data sets. Subsequently, the highly correlated feature data sets are split into training sets and test sets, and the bp neural network model is trained using the training set. Different prediction targets are trained with their respective highly correlated feature data sets to obtain prediction models of different prediction targets. The prediction model is tested for performance by the test set.
[0050] In an embodiment of the present invention, before using data for model training, the data is first preprocessed, and based on different prediction targets, feature selection is performed on each prediction target to select a high-correlation feature set corresponding to each prediction target.
[0051] Before performing feature selection and model training on data containing multiple features, the data is preprocessed. Z-score standardization is used to standardize data with different dimensions to eliminate the impact of the dimension during neural network model training, so that each feature contributes roughly the same to the result.
[0052]
[0053] Among them, X is the initial value of the data; μ is the mean of the data set; σ is the standard deviation of the data set.
[0054] In order to further improve the performance of the model, the embodiment of the present invention adopts Elasti c Net method, Elastic Net introduces L1 regularization term and L2 regularization term in the loss function at the same time, retaining the properties of lasso regression for feature selection and the stability of Ridge regression
[0055]
[0056] in
[0057]
[0058] Where, N: number of samples; y: i : The real data of the i-th sample; x i : p feature data corresponding to the i-th sample, which is a vector; λ: penalty coefficient, used to control the strength of feature selection; P a (β): penalty function; α: non-negative regularization parameter used to control the weights of the two regularization terms in the penalty term; β: regression coefficient vector
[0059] Specifically, Figure 3 As shown in Figure 1, a BP neural network (Backpropagation Neural Network) is introduced to solve the complex nonlinear problems in the future state investment return analysis of power grid dispatching. With its powerful nonlinear fitting ability and flexible network structure, the BP neural network can efficiently learn the complex relationship between input parameters and output results. The BP neural network usually includes an input layer, a hidden layer, and an output layer. The input layer accepts input data, the hidden layer processes the input data through weighted summation and activation function, and finally the output layer generates output data. In the training process of the BP neural network model, it mainly includes three steps: forward propagation, backpropagation, and weight update. These four steps are repeated during the training process until the loss function converges to the preset threshold or the training reaches the maximum number of iterations. During the forward propagation process, the input of the hidden layer neurons is shown in formula (4).
[0060]
[0061] The input of the i-th neuron in the l-th layer; The weights from layer l-1 to layer l; The activation function output of the i-th neuron in the l-1th layer; The bias of the j-th neuron in the l-th layer.
[0062] The BP neural network applies an activation function to each neuron to improve the nonlinear mapping ability of the entire network. The activation function is shown in formula (5).
[0063]
[0064] Where f is the activation function.
[0065] During the back-propagation process, the error terms of the output layer and the hidden layer are first calculated, and then the weights and biases are updated using the gradient descent method.
[0066] The output layer error term is shown in formula (6):
[0067]
[0068] L is the loss function, which is to calculate the error between the target value and the output value
[0069] The hidden layer error term is shown in formula (7):
[0070]
[0071] The weight and bias updates are shown in formula (8) and formula (9).
[0072]
[0073] In terms of model evaluation, mean square error (MSE), root mean square error (RMSE), and determination coefficient (R 2 ) and mean absolute error (MAE) to measure the model performance. After multiple iterations of training and hyperparameter tuning, a prediction model with good performance was finally obtained. The model can accurately predict the benefits of future investment strategies of power grid dispatching, thus providing strong support for scientific decision-making.
[0074] In actual implementation, refer to the following steps:
[0075] Step 1: Identify the three scenarios that may be encountered during the grid dispatch process: sudden wildfires, severe typhoon weather, and coal transportation congestion.
[0076] Step 2: According to Figure 2 , the collected historical data is processed by z-score standardization, so that data of different orders of magnitude are scaled to the same order of magnitude, reducing the impact of different data dimensions on model training. For details, refer to formula (1).
[0077] Step 3: Use the Elastic Net method to select features for different prediction targets, and obtain high-correlation feature data sets for wildfire scenarios, coal congestion scenarios, typhoon scenarios, and multi-scenario warning annualized yields. Elastic Net retains the properties of lasso regression for feature selection and the stability of Ridge regression by introducing L1 regularization terms and L2 regularization terms in the loss function. For details, refer to formula (2) and formula (3).
[0078] Step 4: Split the highly correlated feature data set into a training set and a test set, use the training set to train the BP neural network model, and use different prediction targets to train their own highly correlated feature data sets to obtain prediction models for different prediction targets. The BP neural network usually includes an input layer, a hidden layer, and an output layer. The input layer accepts input data, the hidden layer processes the input data through weighted summation and activation function, and finally the output layer generates output data.
[0079] Step 5: Use the test set to perform a performance test on the prediction model and evaluate the prediction effect of the model. First, split the data set into a training set and a test set. Then use the training set to train the BP neural network model. Finally, use the test set to perform a performance test on the trained model and evaluate the prediction effect of the model.
[0080] In summary, when dealing with complex and changeable power grid scenarios, traditional mathematical models have large computational complexity and slow solution speed, while BP neural networks can efficiently process large amounts of data and quickly provide prediction results. By adopting the BP neural network model for investment effectiveness prediction, the embodiment of the present invention significantly improves the calculation speed. The embodiment of the present invention reduces the construction and maintenance costs. Compared with expert systems that rely on knowledge base updates and complex reasoning mechanisms, the training and application of BP neural network models are simpler and more flexible, while reducing dependence on expert knowledge bases while maintaining high prediction accuracy. The present invention effectively handles the impact of data of different orders of magnitude on model training through z-score standardization and Elastic Net feature selection, ensuring the accuracy and stability of model prediction. Finally, the embodiment of the present invention performs feature selection and model training for different investment scenarios, ensuring the high correlation and prediction effect of each prediction target, thereby providing more reliable and efficient support in the investment decision-making of future state early warning technology for power grid dispatching business.
[0081] Device Example 1
[0082] According to an embodiment of the present invention, a prediction model generation device for future state warning of power grid dispatching is provided. Figure 4 is a schematic diagram of a prediction model generation device for early warning of future state of power grid dispatching according to an embodiment of the present invention, such as Figure 4 As shown, the prediction model generation device for future state warning of power grid dispatching according to an embodiment of the present invention specifically includes:
[0083] The collection module 40 is used to collect historical data of scenarios that power grid enterprises may face during dispatching and cost data of future investment warnings; specifically, it is used to:
[0084] Collect historical data and cost data of future state warnings for three scenarios that power grid companies may face during dispatching, including sudden wildfires, severe typhoon weather, and coal transportation congestion;
[0085] The processing module 42 is used to score The standardization method processes the historical data and the cost data to scale the data of different orders of magnitude to the same order of magnitude; specifically, it is used for:
[0086] According to formula 1, by z- scoreThe standardization method processes the historical data and the cost data, scaling the data of different orders of magnitude to the same order of magnitude:
[0087]
[0088] Where X is the initial value of the data; μ is the mean of the data set; σ is the standard deviation of the data set;
[0089] Training Module 44 for Elasti c Net performs feature selection on different prediction targets respectively to obtain their respective highly correlated feature data sets, splits the highly correlated feature data sets into training sets and test sets, and uses the training sets to train the BP neural network model to obtain prediction models for different prediction targets respectively, and uses the test sets to perform performance tests on the prediction models to obtain the final prediction model. Specifically used for:
[0090] According to Formula 2 and Formula 3, using Elasti c Net performs feature selection for different prediction targets and obtains their respective highly correlated feature data sets:
[0091]
[0092]
[0093] Where N is the number of samples, y i is the true data of the i-th sample, β0 is the scalar of β, β0 and β are scalar and vector respectively, x i is the p feature data corresponding to the i-th sample, which is a vector, λ is the penalty coefficient used to control the strength of feature selection, P a (β) is the penalty function, α is a non-negative regularization parameter used to control the weights of the two regularization terms in the penalty term, and " is the regression coefficient vector;
[0094] The BP neural network model is trained through three steps of forward propagation, back propagation and weight update, wherein the BP neural network model specifically includes: an input layer, a hidden layer and an output layer; during the forward propagation process, the input of the neurons in the hidden layer is determined according to Formula 4, the activation function of each neuron is determined according to Formula 5, and during the back propagation process, the error terms of the output layer and the hidden layer are calculated according to Formula 6 and Formula 7, and the weights and biases are updated using the gradient descent method according to Formula 8 and Formula 9:
[0095]
[0096] in, is the input of the jth neuron in the lth layer, is the weight from layer l-1 to layer l, is the activation function output of the i-th neuron in the l-1th layer, represents the bias of the jth neuron in the lth layer, f is the activation function, and L is the loss function, which calculates the error between the target value and the output value. represents the activation function output of the jth neuron in the lth layer, represents the layer error term, represents the input of the kth neuron in the lth layer, The symbol for the partial derivative, is the partial derivative of function F with respect to the independent variable x, is the hidden layer error term, It is represented as the weight from the i-th neuron in the l-1th layer to the j-th neuron in the lth layer, The superscript represents the different number of layers, that is, it represents the error term output by the kth neuron in the l+1th layer. represents the weight from the jth neuron in the lth layer to the kth neuron in the l+1th layer, It represents the derivative of the activation function, which indicates the rate of change of the activation function; η represents the learning rate, which determines the step size each time the weight or bias is updated.
[0097] The mean square error (MSE), root mean square error (RMSE), and determination coefficient (R) were used. 2 The prediction model was tested for performance using four parameters, namely, mean absolute error (MAE) and average absolute error (MAE). After multiple iterations of training and hyperparameter tuning, the final prediction model was obtained.
[0098] The present invention aims to solve the problems of large amount of calculation, slow solution speed, high construction and maintenance cost, and insufficient response speed in traditional mathematical models and expert systems in the investment decision-making of power grid enterprises. By adopting the BP neural network model for investment effectiveness prediction, the present invention significantly improves the calculation speed and decision-making efficiency, and meets the needs of rapid decision-making. Specifically, firstly, the historical data of three scenarios (sudden wildfires, severe typhoon weather, and coal transportation congestion) that may be faced by power grid enterprises in the dispatching process and the cost data of investment future state warning are collected, and then the data is processed by the z-score standardization method to scale data of different orders of magnitude to the same order of magnitude, reducing the impact of different data dimensions on model training. Then, Elastic Net is used to perform feature selection for different prediction targets, including the benefits of investment future state warning in wildfire scenario, the benefits of investment future state warning in coal congestion scenario, the benefits of investment future state warning in typhoon scenario, and the annualized rate of return of multi-scenario warning of investment future state warning in three scenarios. Feature selection is performed for different prediction targets to obtain their respective highly correlated feature data sets. Then the highly correlated feature data set is split into a training set and a test set. The training set is used to train the BP neural network model, and prediction models for different prediction targets are obtained. Finally, the prediction model is tested on the test set to verify the prediction accuracy and efficiency of the model.
[0099] The embodiment of the present invention is a device embodiment corresponding to the above method embodiment. The specific operations of each module can be understood by referring to the description of the method embodiment, which will not be repeated here.
[0100] Device Example 2
[0101] An embodiment of the present invention provides an electronic device, such as Figure 5 As shown, it includes: a memory 50, a processor 52, and a computer program stored in the memory 50 and executable on the processor 52. When the computer program is executed by the processor 52, the steps described in the method embodiment are implemented.
[0102] Device Example 3
[0103] An embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by the processor 52, the steps described in the method embodiment are implemented.
[0104] The computer-readable storage medium in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk or optical disk, etc.
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a prediction model for early warning of future power grid dispatching, characterized in that: include: Collect historical data on scenarios that power grid companies may face during dispatching and cost data on future investment warnings; Processing the historical data and the cost data by using a z-score standardization method to scale data of different orders of magnitude to the same order of magnitude; Elastic Net is used to perform feature selection on different prediction targets to obtain respective highly correlated feature data sets, which are then split into a training set and a test set. The training set is used to train the BP neural network model to obtain prediction models for different prediction targets, and the prediction model is performance tested using the test set to obtain the final prediction model.
2. The method according to claim 1, characterized in that Collect historical data on scenarios that power grid companies may face during dispatching and cost data on future investment warnings, including: Collect historical data on three scenarios that power grid companies may face during dispatching and cost data for future investment warnings, where the three scenarios specifically include: sudden wildfire scenario, severe typhoon weather scenario, and coal transportation congestion scenario.
3. The method according to claim 1, characterized in that The historical data and the cost data are processed by the z-score standardization method to scale the data of different orders of magnitude to the same order of magnitude, specifically including: According to Formula 1, the historical data and the cost data are processed by the z-score standardization method to scale data of different orders of magnitude to the same order of magnitude: Among them, X is the initial value of the data; μ is the mean of the data set; σ is the standard deviation of the data set.
4. The method according to claim 1, characterized in that: Elastic Net is used to select features for different prediction targets, and the high-correlation feature data sets obtained are as follows: According to Formula 2 and Formula 3, Elastic Net is used to perform feature selection for different prediction targets to obtain their respective highly correlated feature data sets: Where N is the number of samples, y i is the true data of the i-th sample, β0 is the scalar of β, β0 and β are scalar and vector respectively, x i is the p feature data corresponding to the i-th sample, which is a vector, λ is the penalty coefficient used to control the strength of feature selection, P a (β) is the penalty function, α is a non-negative regularization parameter used to control the weights of the two regularization terms in the penalty term, and β is the regression coefficient vector.
5. The method according to claim 1, characterized in that Using the training set to train the BP neural network model specifically includes: The BP neural network model is trained through three steps of forward propagation, back propagation and weight update, wherein the BP neural network model specifically includes: an input layer, a hidden layer and an output layer; during the forward propagation process, the input of the neurons in the hidden layer is determined according to Formula 4, the activation function of each neuron is determined according to Formula 5, and during the back propagation process, the error terms of the output layer and the hidden layer are calculated according to Formula 6 and Formula 7, and the weights and biases are updated using the gradient descent method according to Formula 8 and Formula 9: in, is the input of the jth neuron in the lth layer, is the weight from layer l-1 to layer l, is the activation function output of the i-th neuron in the l-1th layer, represents the bias of the jth neuron in the lth layer, f is the activation function, and L is the loss function, which calculates the error between the target value and the output value. represents the activation function output of the jth neuron in the lth layer, represents the layer error term, represents the input of the kth neuron in the lth layer, The sign of the partial derivative, is the partial derivative of function F with respect to the independent variable x, is the hidden layer error term, It is represented as the weight from the i-th neuron in the l-1th layer to the j-th neuron in the lth layer, The superscript represents the different number of layers, that is, it represents the error term output by the kth neuron in the l+1th layer. represents the weight from the jth neuron in the lth layer to the kth neuron in the l+1th layer, It represents the derivative of the activation function, which indicates the rate of change of the activation function; η represents the learning rate, which determines the step size each time the weight or bias is updated.
6. The method according to claim 1, characterized in that The prediction model is tested for performance using the test set to obtain a final prediction model, specifically including: The prediction model was tested for performance using mean square error (MSE), root mean square error (RMSE), determination coefficient (R2) and mean absolute error (MAE). After multiple iterations of training and hyperparameter tuning, the final prediction model was obtained.
7. A prediction model generation device for early warning of future state of power grid dispatching, characterized in that: include: The collection module is used to collect historical data of scenarios that power grid companies may face during dispatching and cost data for future investment warnings; A processing module, used for processing the historical data and the cost data by a z-score standardization method, and scaling data of different orders of magnitude to the same order of magnitude; The training module is used to use Elastic Net to perform feature selection on different prediction targets respectively, obtain respective highly correlated feature data sets, split the highly correlated feature data sets into a training set and a test set, and use the training set to train the BP neural network model to obtain prediction models for different prediction targets respectively, and perform performance testing on the prediction model through the test set to obtain the final prediction model.
8. The device according to claim 7, characterized in that The collection module is specifically used for: Collect historical data and cost data of future state warnings for three scenarios that power grid companies may face during dispatching, including sudden wildfires, severe typhoon weather, and coal transportation congestion; The processing module is specifically used for: According to Formula 1, the historical data and the cost data are processed by the z-score standardization method to scale data of different orders of magnitude to the same order of magnitude: Where X is the initial value of the data; μ is the mean of the data set; σ is the standard deviation of the data set; The training module is specifically used for: According to Formula 2 and Formula 3, Elastic Net is used to perform feature selection for different prediction targets to obtain their respective highly correlated feature data sets: Where N is the number of samples, y i is the true data of the i-th sample, β0 is the scalar of β, β0 and β are scalar and vector respectively, x i is the p feature data corresponding to the i-th sample, which is a vector, λ is the penalty coefficient used to control the strength of feature selection, P a (β) is the penalty function, α is a non-negative regularization parameter used to control the weights of the two regularization terms in the penalty term, and β is the regression coefficient vector; The BP neural network model is trained through three steps of forward propagation, back propagation and weight update, wherein the BP neural network model specifically includes: an input layer, a hidden layer and an output layer; during the forward propagation process, the input of the neurons in the hidden layer is determined according to Formula 4, the activation function of each neuron is determined according to Formula 5, and during the back propagation process, the error terms of the output layer and the hidden layer are calculated according to Formula 6 and Formula 7, and the weights and biases are updated using the gradient descent method according to Formula 8 and Formula 9: in, is the input of the jth neuron in the lth layer, is the weight from layer l-1 to layer l, is the activation function output of the i-th neuron in the l-1th layer, represents the bias of the jth neuron in the lth layer, f is the activation function, and L is the loss function, which calculates the error between the target value and the output value. represents the activation function output of the jth neuron in the lth layer, represents the layer error term, represents the input of the kth neuron in the lth layer, The sign of the partial derivative, is the partial derivative of function F with respect to the independent variable x, is the hidden layer error term, It is represented as the weight from the i-th neuron in the l-1th layer to the j-th neuron in the lth layer, The superscript represents the different number of layers, that is, it represents the error term output by the kth neuron in the l+1th layer. represents the weight from the jth neuron in the lth layer to the kth neuron in the l+1th layer, It represents the derivative of the activation function, which indicates the rate of change of the activation function; η represents the learning rate, which determines the step size each time the weight or bias is updated. The prediction model was tested for performance using mean square error (MSE), root mean square error (RMSE), determination coefficient (R2) and mean absolute error (MAE). After multiple iterations of training and hyperparameter tuning, the final prediction model was obtained.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for generating a prediction model for future state warning of power grid dispatching as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by a processor, the steps of the method for generating a prediction model for future state warning of power grid dispatching as described in any one of claims 1 to 6 are implemented.