Green low-carbon power dispatching method and device based on power consumption prediction, equipment and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HOLLEY METERING LTD
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-07
AI Technical Summary
现有用电量预测方法多依赖传统统计模型与浅层学习模型,难以充分捕捉用电序列长期依赖关系与复杂影响因子的交互规律
[0014]本申请中,首先获取经过数据预处理的目标数据集;所述目标数据集中包括特征数据和用电量数据,所述特征数据包括多种类型的气象数据和节假日数据;之后从所述目标数据集中的所述特征数据中筛选出对所述用电量数据的影响重要性得分高于预设重要性阈值的目标特征数据;接着基于所述目标特征数据和门控循环单元构建初始预测模型,并生成若干组模型参数;随后利用改进后的鲸鱼算法对各组所述模型参数进行优化调整,以得到满足预设最优条件的目标模型参数;所述改进后的鲸鱼算法为基于预设量子粒子群优化算法、预设收缩包围机制和高斯变异对鲸鱼算法进行改进得到的算法;最后根据所述目标模型参数和所述初始预测模型确定目标预测模型,并利用所述目标预测模型基于实时气象数据和实时节假日数据生成相应的实时用电量预测值,以及基于所述实时用电量预测值进行电力调度。由上可见,本申请中先获取经预处理的目标数据集;再基于目标数据集中的特征数据的影响重要性得分,筛选出影响重要性得分高于预设重要性阈值的目标特征数据,降低冗余信息干扰;随后以目标特征为输入、门控循环单元为基础网络构建初始预测模型,并生成多组候选模型参数;接着采用融合预设量子粒子群优化算法、预设收缩包围机制和高斯变异的改进后的鲸鱼算法,对模型参数进行寻优,获得全局最优的目标模型参数;最终根据最优的目标模型参数确定目标预测模型,基于实时气象与实时节假日数据生成用电量预测值,并基于预测结果进行电力调度。这样一来,本申请通过特征筛选精简输入维度、提升模型训练效率,利用改进后的鲸鱼算法实现模型参数的自适应优化,有效避免局部最优、增强模型泛化能力与预测稳定性,从而提升居民用电量预测精度与效率,输出高精度的实时用电量预测结果,为电力资源合理配置、电网安全稳定运行与高效调度提供可靠支撑。
Smart Images

Figure CN122533141A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and in particular to a green and low-carbon power dispatching method, apparatus, equipment and medium based on electricity consumption prediction. Background Technology
[0002] With the continuous growth of electricity demand from urban and rural residents, electricity load exhibits significant temporal fluctuations and nonlinear characteristics. Residential electricity consumption forecasting has become a crucial aspect of power grid planning, dispatching, and energy allocation. Under the "dual carbon" goal, improving the accuracy of electricity consumption forecasting is of great significance for reducing energy waste, lowering carbon emissions, and promoting the efficient consumption of renewable energy. Accurate electricity consumption forecasting can support the power system in implementing demand-side response and energy-saving dispatching, avoiding over-allocation of power generation resources or curtailment of wind and solar power due to forecasting errors, thereby effectively improving the green and low-carbon operation level of the power system. Existing electricity consumption forecasting methods mostly rely on traditional statistical models and shallow learning models, making it difficult to fully capture the long-term dependencies and complex interaction patterns of influencing factors in electricity consumption sequences. Some methods can only fit linear trends and periodic changes, exhibiting poor adaptability to nonlinear abrupt changes caused by external factors such as meteorological fluctuations, seasonal changes, and holidays, resulting in insufficient forecast stability. Some forecasting models rely on artificially constructed features, limiting their ability to represent high-dimensional time-series data and failing to efficiently uncover hidden electricity consumption patterns. Meanwhile, traditional recurrent neural network models have relatively simple structures and lack adaptive feature weighting mechanisms. Their ability to focus on key time steps and important influencing factors is insufficient, making it difficult to meet the prediction accuracy requirements of practical applications. This hinders the power system from achieving accurate "source-load matching," thus exacerbating system energy consumption and carbon emissions. Regarding model parameter optimization, conventional optimization algorithms suffer from slow convergence speed and susceptibility to local optima, resulting in low model generalization ability and prediction efficiency. Furthermore, direct input of multi-source data can lead to excessive redundant features, triggering the curse of dimensionality and further reducing model training efficiency and prediction reliability. Existing technologies generally suffer from insufficient prediction accuracy, poor timeliness, inadequate feature utilization, and weak adaptive parameter optimization capabilities. Moreover, they lack a collaborative optimization mechanism for electricity consumption prediction and scheduling aimed at green and low-carbon goals, making it difficult to support refined power grid management, energy conservation and carbon reduction, and stable power supply.
[0003] In conclusion, improving the accuracy and efficiency of residential electricity consumption forecasting and achieving green and low-carbon-oriented power dispatch are urgent technical problems that need to be solved. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a green and low-carbon power dispatching method, apparatus, equipment, and medium based on electricity consumption forecasting, which can improve the accuracy and efficiency of residential electricity consumption forecasting and realize green and low-carbon oriented power dispatching. The specific solution is as follows: Firstly, this application provides a green and low-carbon power dispatch method based on electricity consumption forecasting, including: Obtain the target dataset after data preprocessing; the target dataset includes feature data and electricity consumption data, and the feature data includes various types of meteorological data and holiday data; Target feature data with an impact importance score higher than a preset importance threshold are selected from the feature data in the target dataset. An initial prediction model is constructed based on the target feature data and the gated loop unit, and several sets of model parameters are generated; The improved whale algorithm is used to optimize and adjust the model parameters of each group to obtain the target model parameters that meet the preset optimal conditions; the improved whale algorithm is an algorithm obtained by improving the whale algorithm based on the preset quantum particle swarm optimization algorithm, the preset shrinking encirclement mechanism and Gaussian mutation. The target prediction model is determined based on the target model parameters and the initial prediction model. The target prediction model is then used to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data. Power dispatch is then performed based on the real-time electricity consumption prediction values.
[0005] Optionally, the types of meteorological data include temperature, air pressure, precipitation, radiation, ultraviolet radiation, and wind speed; Accordingly, the step of filtering target feature data from the feature data in the target dataset whose impact importance score on the electricity consumption data is higher than a preset importance threshold includes: The importance score of each feature data to the electricity consumption data is calculated using the random forest algorithm; The feature data corresponding to the influence importance score that is higher than the preset importance threshold is determined as the target feature data.
[0006] Optionally, the step of constructing an initial prediction model based on the target feature data and the gated recurrent unit includes: The target feature data is weighted and fused using an attention mechanism, and the fused data is input into the gated recurrent unit to construct the initial prediction model.
[0007] Optionally, before generating several sets of model parameters, the method further includes: The target size of the whale population, the maximum number of iterations of the improved whale algorithm, several parameters to be optimized in the initial prediction model, and the parameter range corresponding to each parameter to be optimized are set. Accordingly, the generation of several sets of model parameters includes: Determine the target quantity corresponding to the target size of the whale population, and generate each set of model parameters based on the target quantity and the parameter range; wherein each set of model parameters includes the parameter values corresponding to each parameter to be optimized.
[0008] Optionally, after generating several sets of model parameters, the method further includes: The model parameters described in each group are used as the current position of each individual whale in the whale population; Accordingly, the step of optimizing and adjusting the model parameters of each group using the improved whale algorithm to obtain target model parameters that meet the preset optimal conditions includes: The improved whale algorithm is used to optimize and adjust the current position of each individual whale to obtain a target optimal position that meets the preset optimal conditions, and the corresponding target model parameters are determined based on the target optimal position.
[0009] Optionally, the step of optimizing and adjusting the current position of each individual whale using the improved whale algorithm to obtain a target optimal position that satisfies the preset optimal conditions includes: For any of the whale individuals, the initial prediction model is updated using a set of model parameters corresponding to the current position to obtain a first prediction model. The first prediction model is then trained using the target dataset to obtain a first mean square error corresponding to the first prediction model. The first mean square error is then determined as the fitness value corresponding to the current position of the whale individual. The current position of the whale individual with the smallest fitness value is determined as the current optimal position; Using the preset quantum particle swarm optimization algorithm and the preset shrinking encirclement mechanism corresponding to the improved whale algorithm, the current position of each individual whale is updated based on the current optimal position, and the updated position is used as the current position of each individual whale. Apply the Gaussian mutation to the current optimal position to obtain the updated optimal position, and determine the fitness value corresponding to the updated optimal position. Then, based on the comparison between the fitness value corresponding to the updated optimal position and the fitness value corresponding to the current optimal position, redetermine the current optimal position. If the number of times the position of the individual whale is updated is not less than the maximum number of iterations, then the current optimal position is directly determined as the target optimal position that satisfies the preset optimal condition; If the number of times the position of the individual whale is updated is less than the maximum number of iterations, then proceed to the step of updating the initial prediction model for any individual whale using a set of model parameters corresponding to the current position, until the number of times the position of the individual whale is updated is not less than the maximum number of iterations, and the current optimal position is determined as the target optimal position that satisfies the preset optimal condition.
[0010] Optionally, after determining the target prediction model based on the target model parameters and the initial prediction model, the method further includes: The target prediction model is used to generate electricity consumption test values corresponding to the test data; the test data includes meteorological data and holiday data. Obtain the actual electricity consumption corresponding to the test data, and calculate the performance index of the target prediction model based on the actual electricity consumption and the electricity consumption test value; the performance index includes mean absolute error, mean absolute percentage error, root mean square error, explained variance, median absolute error, and coefficient of determination; If all the performance indicators meet the preset performance conditions, the target prediction model is used to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data, and power dispatch is carried out based on the real-time electricity consumption prediction values.
[0011] Secondly, this application provides a green and low-carbon power dispatching device based on electricity consumption forecasting, comprising: The target dataset acquisition module is used to acquire the target dataset after data preprocessing; the target dataset includes feature data and electricity consumption data, and the feature data includes various types of meteorological data and holiday data. The target feature data filtering module is used to filter out target feature data from the feature data in the target dataset whose impact importance score on the electricity consumption data is higher than a preset importance threshold. The model parameter generation module is used to construct an initial prediction model based on the target feature data and the gated loop unit, and generate several sets of model parameters; The target model parameter determination module is used to optimize and adjust the model parameters of each group using the improved whale algorithm to obtain the target model parameters that meet the preset optimal conditions; the improved whale algorithm is an algorithm obtained by improving the whale algorithm based on the preset quantum particle swarm optimization algorithm, the preset shrinking encirclement mechanism and Gaussian mutation. The power dispatch module is used to determine a target prediction model based on the target model parameters and the initial prediction model, generate corresponding real-time power consumption prediction values based on real-time meteorological data and real-time holiday data using the target prediction model, and perform power dispatch based on the real-time power consumption prediction values.
[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned green and low-carbon power dispatching method based on electricity consumption forecasting.
[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned green and low-carbon power dispatching method based on electricity consumption prediction.
[0014] In this application, a target dataset after data preprocessing is first obtained. The target dataset includes feature data and electricity consumption data, and the feature data includes various types of meteorological data and holiday data. Then, target feature data with an impact importance score higher than a preset importance threshold on the electricity consumption data is selected from the feature data in the target dataset. Next, an initial prediction model is constructed based on the target feature data and a gated loop unit, and several sets of model parameters are generated. Subsequently, the improved whale algorithm is used to optimize and adjust each set of model parameters to obtain target model parameters that meet preset optimal conditions. The improved whale algorithm is an algorithm obtained by improving the whale algorithm based on a preset quantum particle swarm optimization algorithm, a preset shrinking encirclement mechanism, and Gaussian mutation. Finally, a target prediction model is determined according to the target model parameters and the initial prediction model, and the target prediction model is used to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data, and power dispatch is performed based on the real-time electricity consumption prediction values. As can be seen from the above, this application first obtains a preprocessed target dataset; then, based on the influence importance scores of the feature data in the target dataset, target feature data with influence importance scores higher than a preset importance threshold are selected to reduce redundant information interference; subsequently, an initial prediction model is constructed using the target features as input and a gated recurrent unit as the basic network, and multiple sets of candidate model parameters are generated; next, an improved whale algorithm that integrates a preset quantum particle swarm optimization algorithm, a preset shrinking encirclement mechanism, and Gaussian mutation is used to optimize the model parameters and obtain the globally optimal target model parameters; finally, the target prediction model is determined based on the optimal target model parameters, and electricity consumption prediction values are generated based on real-time meteorological and real-time holiday data, and power dispatch is carried out based on the prediction results. In this way, this application simplifies the input dimension and improves the model training efficiency through feature selection, and uses the improved whale algorithm to achieve adaptive optimization of model parameters, effectively avoiding local optima, enhancing the model's generalization ability and prediction stability, thereby improving the accuracy and efficiency of residential electricity consumption prediction, outputting high-precision real-time electricity consumption prediction results, and providing reliable support for the rational allocation of power resources, the safe and stable operation of the power grid, and efficient dispatch. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 A flowchart of a green and low-carbon power dispatching method based on electricity consumption forecasting is provided for this application; Figure 2 A specific gate control structure diagram is provided for this application; Figure 3 A flowchart of a specific improved whale algorithm provided in this application; Figure 4 A flowchart illustrating the generation and evaluation of a specific target prediction model provided in this application; Figure 5 A schematic diagram of a green and low-carbon power dispatching device based on electricity consumption forecasting is provided for this application. Figure 6 This application provides a structural diagram of an electronic device. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] With the continuous growth of electricity demand from urban and rural residents, electricity load exhibits significant temporal fluctuations and nonlinear characteristics. Residential electricity consumption forecasting has become a crucial aspect of power grid planning, dispatching, and energy allocation. Under the "dual carbon" goal, improving the accuracy of electricity consumption forecasting is of great significance for reducing energy waste, lowering carbon emissions, and promoting the efficient consumption of renewable energy. Accurate electricity consumption forecasting can support the power system in implementing demand-side response and energy-saving dispatching, avoiding over-allocation of power generation resources or curtailment of wind and solar power due to forecasting errors, thereby effectively improving the green and low-carbon operation level of the power system. Existing electricity consumption forecasting methods mostly rely on traditional statistical models and shallow learning models, making it difficult to fully capture the long-term dependencies and complex interaction patterns of influencing factors in electricity consumption sequences. Some methods can only fit linear trends and periodic changes, exhibiting poor adaptability to nonlinear abrupt changes caused by external factors such as meteorological fluctuations, seasonal changes, and holidays, resulting in insufficient forecast stability. Some forecasting models rely on artificially constructed features, limiting their ability to represent high-dimensional time-series data and failing to efficiently uncover hidden electricity consumption patterns. Meanwhile, traditional recurrent neural network models have relatively simple structures and lack adaptive feature weighting mechanisms. Their ability to focus on key time steps and important influencing factors is insufficient, and their prediction accuracy is difficult to meet the needs of practical applications. This makes it difficult for power systems to achieve accurate "source-load matching," thus exacerbating system energy consumption and carbon emissions. Regarding model parameter optimization, conventional optimization algorithms suffer from slow convergence speed and susceptibility to local optima, resulting in low model generalization ability and prediction efficiency. Furthermore, direct input of multi-source data can easily lead to excessive redundant features, triggering the curse of dimensionality and further reducing model training efficiency and prediction reliability. Existing technologies generally suffer from insufficient prediction accuracy, poor timeliness, inadequate feature utilization, and weak adaptive parameter optimization capabilities. They also lack a collaborative optimization mechanism for electricity consumption prediction and dispatch oriented towards green and low-carbon goals, making it difficult to support refined power grid management, energy conservation and carbon reduction, and stable power supply. Therefore, this application provides a green and low-carbon power dispatch scheme based on electricity consumption prediction, which can improve the accuracy and efficiency of residential electricity consumption prediction and achieve green and low-carbon oriented power dispatch.
[0019] See Figure 1 As shown in the figure, this invention discloses a green and low-carbon power dispatching method based on electricity consumption forecasting, which may include: Step S11: Obtain the target dataset after data preprocessing; the target dataset includes feature data and electricity consumption data, and the feature data includes various types of meteorological data and holiday data.
[0020] In this embodiment, monthly residential electricity consumption data for the target city from 2015 to 2025, along with feature data including various types of meteorological data and holiday data, are acquired to construct an initial dataset. The meteorological data types include temperature, air pressure, precipitation, radiation, ultraviolet radiation, and wind speed. Next, the data in the initial dataset undergoes normalization preprocessing to obtain the target dataset.
[0021] Step S12: Select target feature data from the feature data in the target dataset whose impact importance score on the electricity consumption data is higher than a preset importance threshold.
[0022] In this embodiment, to avoid the curse of dimensionality, feature selection can be used to filter out the target feature data that has the greatest impact on the target variable (electricity consumption data) from the original feature data.
[0023] To improve the learning efficiency of the prediction model, this embodiment introduces random forest to perform feature selection on meteorological (including temperature, air pressure, precipitation, radiation, ultraviolet radiation, wind speed, etc.) and monthly holiday datasets, in order to filter out target feature data from the feature data in the target dataset whose impact importance score on electricity consumption data is higher than a preset importance threshold. The specific process may include: firstly, using the random forest algorithm to calculate the impact importance score of each feature data on the electricity consumption data; then, determining the feature data corresponding to the impact importance score higher than the preset importance threshold as the target feature data.
[0024] Specifically, random forests construct multiple decision trees. At each leaf node, the average value of the target variable (residential electricity consumption) from the training samples falling into that node is used as the prediction result, and the importance of features is evaluated accordingly. The calculation formula is as follows: ; in, This represents the prediction result of a single decision tree in a random forest for the target variable (residential electricity consumption) at a certain leaf node. The total number of training samples that fall into this leaf node. This represents the actual residential electricity consumption value of the i-th training sample in this leaf node.
[0025] The target feature data is determined based on the comparison between the influence importance score and the preset importance threshold.
[0026] Step S13: Construct an initial prediction model based on the target feature data and the gated loop unit, and generate several sets of model parameters.
[0027] In this embodiment, an attention mechanism can be used to perform weighted fusion of target feature data, and the fused data can be input into a gated loop unit to construct an initial prediction model.
[0028] It's important to note that GRU (Gated Recurrent Unit) is a variant of RNN (Recurrent Neural Network). GRU employs a gating mechanism to effectively alleviate the long-term memory loss and gradient propagation problems inherent in RNNs. GRU includes two key gating units: the Update Gate and the Reset Gate. The Reset Gate dynamically controls the integration ratio of current input with historical memory information, while the Update Gate controls the retention ratio of historical information. These two gating mechanisms work together to filter out the effective information in the final output. Its unique advantage lies in its ability to stably maintain key features in long sequences, preventing information decay over time or interference from irrelevant features.
[0029] GRU gating structure such as Figure 2 As shown, Figure 2 middle The gate output is reset at time t. Update the gate output at time t. Let be the input vector at the t-th time step, which is the t-th component of the input sequence x. and The outputs at time t and time t-1 are respectively. This is the activation function.
[0030] Update goalkeeper and These two pieces of information are added together and fed into the Sigmoid activation function, thus compressing the activation result to between 0 and 1. The calculation formula for the update gate is shown below: ; In the formula, and It is the weight matrix learned during the training process.
[0031] The reset gate is primarily used to control the degree to which historical information is forgotten. The calculation formula for the reset gate is as follows: ; In the formula, and This is used to calculate the output vector r. The closer r is to 0, the more likely the previous hidden states need to be ignored. At the same time, use the currently input Reset the output vector.
[0032] In a GRU network, the importance of input data features varies for information processing. Furthermore, with the increase in events and the effect of the forget gate, the temporal information contained in the GRU output itself gradually diminishes. Attention mechanisms can assign higher weights to key data based on the influence of different features, thereby improving the information processing efficiency and prediction accuracy of the neural network. This model, by incorporating an attention mechanism, allows the neural network to better utilize the advantages of input data information, introducing the soft attention mechanism into the prediction model. The Softmax function is defined as follows: ; In the formula, Let J be the output value of the i-th node, J be the number of output nodes, and e be a constant.
[0033] In this embodiment, the whale algorithm is improved to obtain an improved whale algorithm, which is used to find the optimal target model parameters from several sets of model parameters. First, the target size of the whale population, the maximum number of iterations of the improved whale algorithm, several parameters to be optimized in the initial prediction model, and the parameter range corresponding to each parameter to be optimized are set. Then, the target number corresponding to the target size of the whale population is determined, and each set of model parameters is generated based on the target number and the parameter range. Each set of model parameters includes the parameter values corresponding to each parameter to be optimized.
[0034] Step S14: Optimize and adjust the model parameters of each group using the improved whale algorithm to obtain target model parameters that meet the preset optimal conditions; the improved whale algorithm is an algorithm obtained by improving the whale algorithm based on the preset quantum particle swarm optimization algorithm, the preset shrinking encirclement mechanism and Gaussian mutation.
[0035] It should be noted that this embodiment improves the whale algorithm based on a preset quantum particle swarm optimization algorithm, a preset shrinking encirclement mechanism, and Gaussian mutation to obtain the improved whale algorithm.
[0036] On the one hand, the quantum behavior position update method is used to replace the three behaviors in the original whale algorithm: encirclement and predation, spiral update, and random search.
[0037] Specifically, this algorithm introduces the concept of quantum behavior, abandoning the deterministic behavior switching strategy of the original WOA (Whale Optimization Algorithm) which relies on the optimal or random individual, and instead adopts the probabilistic modeling approach of quantum particle swarm optimization. Each whale individual is considered to be moving within a quantum potential well; its position is no longer determined by deterministic Newtonian mechanics, but rather described by a wave function. New solutions are generated through Monte Carlo sampling. This mechanism utilizes the heavy-tailed property of the log-normal distribution, allowing individuals to both perform fine-grained searches near local attractors with a high probability and make large jumps with a certain probability, thus significantly enhancing the algorithm's global exploration capability and solution space ergodicity. The improved formula is obtained by inverting the probability density function of the particle positions in the quantum potential well. The improved position update formula is shown below: ; In the formula: It is the position vector of the i-th individual whale in generation t+1. It is the position vector of the i-th individual whale in generation t; The center of the local attractor, i.e., the quantum potential well, is defined as... Uniformly random numbers, The position of the individual with the best fitness in the t-th generation population (the global optimal solution) balances the influence of its own historical position and the global optimal position; To determine the average optimal position, we take the average position of the top K fittest individuals in the population, which is the mean of the current optimal positions of all individuals. middle K represents the position of the individual with the best fitness in generation t, where K = 0.2 × N, and N is the population size. Let be the convergence factor that decreases linearly from 2 to 0; It is a random number uniformly distributed on (0,1).
[0038] Physical meaning: It is between and The point between these points can be understood as the center of the quantum potential well. Individuals sample the quantum potential well using a probability distribution around this center.
[0039] Advantages of the quantum particle swarm optimization algorithm: Quantum behavior enables individuals to make large jumps in regions far from the current optimal solution with a high probability, while also conducting fine-grained searches near the optimal solution with a high probability, naturally forming an exploration-exploitation balance.
[0040] On the other hand, an adaptive shrinking enclosing mechanism is designed to improve the parameters. Update.
[0041] Specifically, addressing the limitation of the original WOA (Wide Average Parameter Analysis) where the linear decrease of parameter 'a' fails to respond to the actual convergence state of the population, an exponential adaptive adjustment formula based on population fitness variance is proposed. When the population fitness value MSE (Mean Squared Error) is large, the parameter... Automatic reduction, focusing on local development; when the fitness value MSE is small. Automatically increasing in size enhances global exploration. This dynamic feedback mechanism allows the algorithm to autonomously balance exploration and development based on the real-time state of the population, avoiding the blindness caused by a fixed schedule. Improved parameters. The updated formula is shown below: ; In the formula: =0, Set to 2.0 (consistent with the original WOA's start and end values); This is the attenuation coefficient, with a value ranging from 5 to 10; For the population fitness variance (normalized), Where N is the population size, Let MSE be the fitness value of the i-th individual. The average fitness value of the population. , ) represents the maximum absolute value of the deviation between the fitness of all individuals and the mean, used for normalization, such that [0,1].
[0042] Thirdly, Gaussian mutation perturbation is added to enhance the ability to escape local optima.
[0043] Specifically, to prevent the algorithm from getting stuck in local optima in the later stages of iteration, Gaussian mutation is applied periodically (every 10 generations) to the current globally optimal individual. The variable perturbation length is related to the variance of the population distribution in the decision space, allowing the perturbation intensity to adaptively adjust with the convergence process. This strategy effectively enhances the ability to escape local optima without disrupting the main framework of the algorithm, improving convergence accuracy and robustness. The specific formula is as follows: ; In the formula: For adaptive step size coefficient, , The initial step size coefficient is 0.5, and t is the current iteration number. This represents the maximum number of iterations. The numbers are Gaussian distributed random numbers with a mean of 0 and a variance of . The normal distribution To obtain the variance of the current population in the decision space, , Is the population in the first The mean of the dimension, , Let be the vector value of the i-th individual whale in the d-th dimension, and N be the population size.
[0044] Finally, calculations are required. The fitness value MSE, if MSE( MSE( ), then use replace Otherwise, retain the original optimal value; that is, when the fitness value MSE corresponding to the updated optimal position is... The fitness value MSE corresponding to the current optimal position is greater than the fitness value MSE. When ), the current optimal position is determined as .
[0045] In order to use the improved whale algorithm to find the optimal target model parameters from the generated sets of model parameters, this embodiment uses the generated sets of model parameters as the current position of each individual whale in the whale population. Then, the improved whale algorithm is used to optimize and adjust the current position of each individual whale to obtain the target optimal position that meets the preset optimal conditions, and the corresponding target model parameters are determined based on the target optimal position.
[0046] It should be noted that the improved whale algorithm flowchart is available here. Figure 3As shown, the above-described optimization of the current position of each individual whale using the improved whale algorithm to obtain a target optimal position that meets preset optimal conditions can be specifically described as follows: For any individual whale, firstly, the initial prediction model is updated using a set of model parameters corresponding to the current position to obtain a first prediction model. The first prediction model is then trained using the target dataset to obtain a first mean square error corresponding to the first prediction model, and this first mean square error is determined as the fitness value corresponding to the current position of the individual whale. Next, the current position of the individual whale with the smallest fitness value is determined as the current optimal position. Then, using the preset quantum particle swarm optimization algorithm and the preset shrinking encirclement mechanism corresponding to the improved whale algorithm, the current positions of each individual whale are updated based on the current optimal position, and the updated positions are used as the current positions of each individual whale. Subsequently, Gaussian mutation is applied to the current optimal position to obtain the updated optimal position, and the fitness value corresponding to the updated optimal position is determined. The current optimal position is then re-determined based on the comparison between the fitness value corresponding to the updated optimal position and the fitness value corresponding to the current optimal position. Specifically, only when the fitness value MSE corresponding to the updated optimal position is... The fitness value MSE corresponding to the current optimal position is greater than the fitness value MSE. When updating the optimal position, The current optimal position is redefined. If the number of position updates for the individual whale is not less than the maximum number of iterations (max_iter), then the current optimal position is directly determined as the target optimal position that satisfies the preset optimal condition. If the number of position updates for the individual whale is less than the maximum number of iterations, then the process jumps to the step of updating the initial prediction model for any individual whale using a set of model parameters corresponding to the current position, until the number of position updates for the individual whale is not less than the maximum number of iterations, and the current optimal position is determined as the target optimal position that satisfies the preset optimal condition.
[0047] In this way, the target model parameters corresponding to the optimal target position can be obtained. It is evident that the improved Whale Algorithm (QSAWOA, Quantum-behaved and Self-adaptive Shrinking Encircling based WhaleOptimization Algorithm) achieves a triple improvement—from "behavior switching" to "probabilistic modeling," from "fixed parameters" to "state feedback," and from "passive randomness" to "active perturbation"—while maintaining the original bio-inspired characteristics of WOA. This provides a more exploratory and adaptive optimization method for complex high-dimensional optimization problems.
[0048] Step S15: Determine the target prediction model based on the target model parameters and the initial prediction model, and use the target prediction model to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data, and perform power dispatch based on the real-time electricity consumption prediction values.
[0049] In this embodiment, a target prediction model can be determined based on the target model parameters and the initial prediction model obtained above. After determining the target prediction model, its performance can be evaluated. The specific process may include: first, using the target prediction model to generate electricity consumption test values corresponding to test data; the test data includes meteorological data and holiday data; then, obtaining the actual electricity consumption corresponding to the test data, and calculating the performance indicators of the target prediction model based on the actual electricity consumption and the electricity consumption test values; the performance indicators include mean absolute error, mean absolute percentage error, root mean square error, explained variance, median absolute error, and coefficient of determination; if all the performance indicators meet the preset performance conditions, then using the target prediction model to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data, and performing power dispatch based on the real-time electricity consumption prediction values.
[0050] Specifically, the formula for calculating the Mean Absolute Error (MAE) is as follows: ; The formula for calculating Mean Absolute Percentage Error (MAPE) is as follows: ; The formula for calculating the root mean squared error (RMSE) is as follows: ; The formula for calculating Explained Variance (ExplVar) is as follows: ; The formula for calculating the Median Absolute Error (MedAE) is as follows: ; Coefficient of determination The calculation formula is as follows: ; in, The total number of samples in the test data. For the true value, For predicted values, 1 represents the true data mean, 2 represents the variance, and 3 represents the median. MAE measures overall prediction accuracy; a smaller value indicates a better data fit. MAPE measures relative prediction error; a smaller value indicates higher relative prediction accuracy. RMSE quantifies the magnitude of prediction error; a smaller value indicates higher prediction accuracy. ExpIVar measures the model's ability to explain the variability of the target variable; a value closer to 1 indicates better explanatory power. MedAE measures overall prediction accuracy and is robust to outliers. R 2 The model measures how well it fits the variability of the target variable; a value closer to 1 indicates a better fit.
[0051] In one specific implementation, see Figure 4 As shown, the specific process for generating and evaluating the target prediction model can be as follows: (1): Data set normalization preprocessing, and selection of optimal features using random forest; (2): Incorporate the attention mechanism into the selected feature factors and input them into the GRU model to obtain the initial prediction model; (3): Set the whale population size N, the maximum number of iterations max_iter, and the optimization parameters and search range of GRU; (4): The initial whale population is randomly generated using the whale algorithm, and the fitness values of individuals are calculated to determine the optimal location. The fitness function formula is shown below: ; in, For the true value, For predicted values, The total number of samples.
[0052] (5): Update the population individuals by using the formula for updating the quantum behavior position in QSAWOA and the formula for Gaussian mutation perturbation, that is, update and optimize the target parameters of GRU. (6): Recalculate the fitness value and compare the updated fitness value to determine the optimal position of the individual; (7): Check if the termination condition has been met. If it has, proceed to step (8) to execute; otherwise, return to step (5) to execute. (8): Output the optimal parameters of the GRU model and retrain the training sample set using the optimal parameters; (9): Use the trained model to make predictions on the test set; (10): Output the optimal predicted value of residential electricity consumption and evaluate the model output results.
[0053] As can be seen from the above, in this embodiment, a target dataset after data preprocessing is first obtained. The target dataset includes feature data and electricity consumption data. The feature data includes various types of meteorological data and holiday data. Then, target feature data with an impact importance score higher than a preset importance threshold on the electricity consumption data is selected from the feature data in the target dataset. Next, an initial prediction model is constructed based on the target feature data and a gated loop unit, and several sets of model parameters are generated. Subsequently, the improved whale algorithm is used to optimize and adjust each set of model parameters to obtain target model parameters that meet preset optimal conditions. The improved whale algorithm is an algorithm obtained by improving the whale algorithm based on a preset quantum particle swarm optimization algorithm, a preset shrinking encirclement mechanism, and Gaussian mutation. Finally, a target prediction model is determined according to the target model parameters and the initial prediction model, and the target prediction model is used to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data, and power dispatch is performed based on the real-time electricity consumption prediction values. As can be seen from the above, this embodiment first obtains a preprocessed target dataset; then, based on the influence importance scores of the feature data in the target dataset, target feature data with influence importance scores higher than a preset importance threshold are selected to reduce redundant information interference; subsequently, an initial prediction model is constructed using the target features as input and a gated recurrent unit as the basic network, and multiple sets of candidate model parameters are generated; next, an improved whale algorithm that integrates a preset quantum particle swarm optimization algorithm, a preset shrinking encirclement mechanism, and Gaussian mutation is used to optimize the model parameters and obtain the globally optimal target model parameters; finally, the target prediction model is determined based on the optimal target model parameters, and electricity consumption prediction values are generated based on real-time meteorological and real-time holiday data, and power dispatch is performed based on the prediction results. In this way, this embodiment simplifies the input dimension and improves the model training efficiency by feature selection, and uses the improved whale algorithm to achieve adaptive optimization of model parameters, effectively avoiding local optima, enhancing the model's generalization ability and prediction stability, thereby improving the accuracy and efficiency of residential electricity consumption prediction, outputting high-precision real-time electricity consumption prediction results, and providing reliable support for the rational allocation of power resources, the safe and stable operation of the power grid, and efficient dispatch.
[0054] Accordingly, see Figure 5 As shown in the illustration, this application also provides a green and low-carbon power dispatching device based on electricity consumption forecasting, which may include: The target dataset acquisition module 11 is used to acquire the target dataset after data preprocessing; the target dataset includes feature data and electricity consumption data, and the feature data includes various types of meteorological data and holiday data. The target feature data filtering module 12 is used to filter out target feature data from the feature data in the target dataset whose impact importance score on the electricity consumption data is higher than a preset importance threshold. The model parameter generation module 13 is used to construct an initial prediction model based on the target feature data and the gated loop unit, and generate several sets of model parameters; The target model parameter determination module 14 is used to optimize and adjust the model parameters of each group using the improved whale algorithm to obtain the target model parameters that meet the preset optimal conditions; the improved whale algorithm is an algorithm obtained by improving the whale algorithm based on the preset quantum particle swarm optimization algorithm, the preset shrinking encirclement mechanism and Gaussian mutation. The power dispatch module 15 is used to determine the target prediction model based on the target model parameters and the initial prediction model, generate corresponding real-time power consumption prediction values based on real-time meteorological data and real-time holiday data using the target prediction model, and perform power dispatch based on the real-time power consumption prediction values.
[0055] In some specific implementations, the types of meteorological data include temperature, air pressure, precipitation, radiation, ultraviolet radiation, and wind speed; Correspondingly, the target feature data filtering module 12 may include: The influence importance score calculation unit is used to calculate the influence importance score of each feature data on the electricity consumption data using the random forest algorithm; The target feature data determination unit is used to determine the feature data corresponding to the influence importance score that is higher than the preset importance threshold as the target feature data.
[0056] In some specific embodiments, the model parameter generation module 13 may include: The initial prediction model building unit is used to perform weighted fusion of the target feature data using an attention mechanism, and input the fused data into the gated loop unit to build the initial prediction model.
[0057] In some specific embodiments, the green and low-carbon power dispatching device based on electricity consumption forecasting may further include: The parameter setting module is used to set the target size of the whale population, the maximum number of iterations of the improved whale algorithm, several parameters to be optimized in the initial prediction model, and the parameter range corresponding to each parameter to be optimized. Accordingly, the model parameter generation module 13 may include: The model parameter generation unit is used to determine the target quantity corresponding to the target size of the whale population, and generate each set of model parameters based on the target quantity and the parameter range; wherein each set of model parameters includes the parameter value corresponding to each parameter to be optimized.
[0058] In some specific embodiments, the green and low-carbon power dispatching device based on electricity consumption forecasting may further include: The current location determination module is used to use the model parameters of each group as the current location of each individual whale in the whale population; Accordingly, the target model parameter determination module 14 may include: The target model parameter determination submodule is used to optimize and adjust the current position of each individual whale using the improved whale algorithm to obtain the target optimal position that meets the preset optimal conditions, and to determine the corresponding target model parameters based on the target optimal position.
[0059] In some specific implementations, the target model parameter determination submodule may include: The fitness value determination unit is used to update the initial prediction model for any individual whale using a set of model parameters corresponding to the current position to obtain a first prediction model, and to train the first prediction model using the target dataset to obtain a first mean square error corresponding to the first prediction model, and to determine the first mean square error as the fitness value corresponding to the current position of the individual whale. The current optimal position determination unit is used to determine the current optimal position of the whale individual with the smallest fitness value; The current position update unit is used to update the current position of each whale individual based on the current optimal position by using the preset quantum particle swarm optimization algorithm and the preset shrinking encirclement mechanism corresponding to the improved whale algorithm, and to use the updated position as the current position of each whale individual again. The fitness value comparison unit is used to apply the Gaussian mutation to the current optimal position to obtain the updated optimal position, and to determine the fitness value corresponding to the updated optimal position, so as to redetermine the current optimal position based on the comparison result between the fitness value corresponding to the updated optimal position and the fitness value corresponding to the current optimal position. The target optimal position determination unit is used to directly determine the current optimal position as the target optimal position that satisfies the preset optimal condition if the number of position updates of the individual whale is not less than the maximum number of iterations. The step jump unit is used to jump to the step of updating the initial prediction model for any whale individual using a set of model parameters corresponding to the current position if the number of position updates of the whale individual is less than the maximum number of iterations, until the number of position updates of the whale individual is not less than the maximum number of iterations, and the current optimal position is determined as the target optimal position that satisfies the preset optimal condition.
[0060] In some specific embodiments, the green and low-carbon power dispatching device based on electricity consumption forecasting may further include: The electricity consumption test value generation module is used to generate electricity consumption test values corresponding to the test data using the target prediction model; the test data includes meteorological data and holiday data. The performance index calculation module is used to obtain the actual electricity consumption corresponding to the test data, and calculate the performance index of the target prediction model based on the actual electricity consumption and the electricity consumption test value; the performance index includes mean absolute error, mean absolute percentage error, root mean square error, explained variance, median absolute error, and coefficient of determination. The condition judgment module is used to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data using the target prediction model if all the performance indicators meet the preset performance conditions, and to perform power dispatch based on the real-time electricity consumption prediction values.
[0061] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the green and low-carbon power dispatching method based on electricity consumption prediction disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0062] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0063] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0064] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the green and low-carbon power dispatching method based on electricity consumption forecasting disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0065] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned green and low-carbon power dispatching method based on electricity consumption prediction. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0066] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0067] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0068] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0069] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0070] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A green and low-carbon power dispatching method based on electricity consumption forecasting, characterized in that, include: Obtain the target dataset after data preprocessing; The target dataset includes feature data and electricity consumption data, and the feature data includes various types of meteorological data and holiday data. Target feature data with an impact importance score higher than a preset importance threshold are selected from the feature data in the target dataset. An initial prediction model is constructed based on the target feature data and the gated loop unit, and several sets of model parameters are generated; The improved whale algorithm is used to optimize and adjust the model parameters of each group to obtain the target model parameters that meet the preset optimal conditions; the improved whale algorithm is an algorithm obtained by improving the whale algorithm based on the preset quantum particle swarm optimization algorithm, the preset shrinking encirclement mechanism and Gaussian mutation. The target prediction model is determined based on the target model parameters and the initial prediction model. The target prediction model is then used to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data. Power dispatch is then performed based on the real-time electricity consumption prediction values.
2. The green and low-carbon power dispatching method based on electricity consumption forecasting according to claim 1, characterized in that, The types of meteorological data include temperature, air pressure, precipitation, radiation, ultraviolet radiation, and wind speed; Accordingly, the step of filtering target feature data from the feature data in the target dataset whose impact importance score on the electricity consumption data is higher than a preset importance threshold includes: The importance score of each feature data to the electricity consumption data is calculated using the random forest algorithm; The feature data corresponding to the influence importance score that is higher than the preset importance threshold is determined as the target feature data.
3. The green and low-carbon power dispatching method based on electricity consumption forecasting according to claim 1, characterized in that, The construction of the initial prediction model based on the target feature data and the gated recurrent unit includes: The target feature data is weighted and fused using an attention mechanism, and the fused data is input into the gated recurrent unit to construct the initial prediction model.
4. The green and low-carbon power dispatching method based on electricity consumption forecasting according to claim 1, characterized in that, Before generating several sets of model parameters, the process also includes: The target size of the whale population, the maximum number of iterations of the improved whale algorithm, several parameters to be optimized in the initial prediction model, and the parameter range corresponding to each parameter to be optimized are set. Accordingly, the generation of several sets of model parameters includes: Determine the target quantity corresponding to the target size of the whale population, and generate each set of model parameters based on the target quantity and the parameter range; wherein each set of model parameters includes the parameter values corresponding to each parameter to be optimized.
5. The green and low-carbon power dispatching method based on electricity consumption forecasting according to claim 4, characterized in that, After generating several sets of model parameters, the process also includes: The model parameters described in each group are used as the current position of each individual whale in the whale population; Accordingly, the step of optimizing and adjusting the model parameters of each group using the improved whale algorithm to obtain target model parameters that meet the preset optimal conditions includes: The improved whale algorithm is used to optimize and adjust the current position of each individual whale to obtain a target optimal position that meets the preset optimal conditions, and the corresponding target model parameters are determined based on the target optimal position.
6. The green and low-carbon power dispatching method based on electricity consumption forecasting according to claim 5, characterized in that, The step of optimizing and adjusting the current position of each individual whale using the improved whale algorithm to obtain a target optimal position that satisfies the preset optimal conditions includes: For any of the whale individuals, the initial prediction model is updated using a set of model parameters corresponding to the current position to obtain a first prediction model. The first prediction model is then trained using the target dataset to obtain a first mean square error corresponding to the first prediction model. The first mean square error is then determined as the fitness value corresponding to the current position of the whale individual. The current position of the whale individual with the smallest fitness value is determined as the current optimal position; Using the preset quantum particle swarm optimization algorithm and the preset shrinking encirclement mechanism corresponding to the improved whale algorithm, the current position of each individual whale is updated based on the current optimal position, and the updated position is used as the current position of each individual whale. Apply the Gaussian mutation to the current optimal position to obtain the updated optimal position, and determine the fitness value corresponding to the updated optimal position. Then, based on the comparison between the fitness value corresponding to the updated optimal position and the fitness value corresponding to the current optimal position, redetermine the current optimal position. If the number of times the position of the individual whale is updated is not less than the maximum number of iterations, then the current optimal position is directly determined as the target optimal position that satisfies the preset optimal condition; If the number of times the position of the individual whale is updated is less than the maximum number of iterations, then proceed to the step of updating the initial prediction model for any individual whale using a set of model parameters corresponding to the current position, until the number of times the position of the individual whale is updated is not less than the maximum number of iterations, and the current optimal position is determined as the target optimal position that satisfies the preset optimal condition.
7. The green and low-carbon power dispatching method based on electricity consumption forecasting according to any one of claims 1 to 6, characterized in that, After determining the target prediction model based on the target model parameters and the initial prediction model, the method further includes: The target prediction model is used to generate electricity consumption test values corresponding to the test data; the test data includes meteorological data and holiday data. Obtain the actual electricity consumption corresponding to the test data, and calculate the performance index of the target prediction model based on the actual electricity consumption and the electricity consumption test value; the performance index includes mean absolute error, mean absolute percentage error, root mean square error, explained variance, median absolute error, and coefficient of determination; If all the performance indicators meet the preset performance conditions, the target prediction model is used to generate corresponding real-time electricity consumption prediction values based on real-time meteorological data and real-time holiday data, and power dispatch is carried out based on the real-time electricity consumption prediction values.
8. A green and low-carbon power dispatching device based on electricity consumption forecasting, characterized in that, include: The target dataset acquisition module is used to acquire the target dataset after data preprocessing. The target dataset includes feature data and electricity consumption data, and the feature data includes various types of meteorological data and holiday data. The target feature data filtering module is used to filter out target feature data from the feature data in the target dataset whose impact importance score on the electricity consumption data is higher than a preset importance threshold. The model parameter generation module is used to construct an initial prediction model based on the target feature data and the gated loop unit, and generate several sets of model parameters; The target model parameter determination module is used to optimize and adjust the model parameters of each group using the improved whale algorithm to obtain the target model parameters that meet the preset optimal conditions; the improved whale algorithm is an algorithm obtained by improving the whale algorithm based on the preset quantum particle swarm optimization algorithm, the preset shrinking encirclement mechanism and Gaussian mutation. The power dispatch module is used to determine a target prediction model based on the target model parameters and the initial prediction model, generate corresponding real-time power consumption prediction values based on real-time meteorological data and real-time holiday data using the target prediction model, and perform power dispatch based on the real-time power consumption prediction values.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the green and low-carbon power dispatch method based on electricity consumption forecasting as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the green and low-carbon power dispatching method based on electricity consumption forecasting as described in any one of claims 1 to 7.