A new energy power prediction method based on improved locust optimization algorithm

By improving the locust optimization algorithm to optimize the parameters of the CNN-LSTM model, the problem of parameter optimization relying on human experience in traditional methods is solved, and efficient and stable new energy power prediction is achieved, improving prediction accuracy and robustness.

CN122495331APending Publication Date: 2026-07-31GUIZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU UNIV
Filing Date
2026-05-08
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing methods for predicting new energy power, the parameter optimization of traditional CNN-LSTM combined models relies on human experience, resulting in low convergence efficiency and limited prediction accuracy. Furthermore, existing intelligent optimization algorithms perform poorly in the complex hyperparameter space of deep hybrid models, making it difficult to achieve efficient and stable global optimization.

Method used

An improved locust optimization algorithm (IGOA) is adopted, which optimizes the learning rate, number of hidden layer nodes and regularization coefficient of convolutional neural network-long short-term memory network (CNN-LSTM) by combining greedy selection strategy and Cauchy mutation random jump strategy. This improves the locust optimization algorithm and achieves adaptive global optimization of model parameters.

Benefits of technology

It significantly improves the algorithm's global optimization capability and convergence efficiency in complex parameter spaces, reduces the time cost of parameter tuning, avoids the problems of low model convergence efficiency and limited prediction accuracy, and constructs a high-precision new energy power prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122495331A_ABST
    Figure CN122495331A_ABST
Patent Text Reader

Abstract

This invention discloses a new energy power prediction method based on an improved locust optimization algorithm, comprising: acquiring historical output power data and related influencing factor data of new energy power plants; constructing an improved locust optimization algorithm by fusing a greedy selection strategy and a Cauchy mutation random jump strategy into the original locust optimization algorithm; iteratively updating the position of individual locusts and calculating the prediction error value at the corresponding position through the improved locust optimization algorithm; when the preset maximum number of iterations is reached, outputting the globally optimal position of individual locusts as the optimal parameter combination of a convolutional neural network-long short-term memory network, thereby obtaining a power prediction model; training the power prediction model using training set data; and using the trained power prediction model to complete the prediction of new energy power generation. This invention can achieve high-precision and robust new energy power prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of new energy power generation and power system technology, and in particular relates to a new energy power prediction method based on an improved locust optimization algorithm. Background Technology

[0002] Against the backdrop of a global energy structure transition towards green and low-carbon development, accurate forecasting of power generation from new energy sources such as wind and solar energy is crucial for ensuring the safe and stable operation of the power grid. However, wind and solar power generation is significantly affected by natural weather conditions, exhibiting strong intermittency, random fluctuations, and non-stationarity, posing serious challenges to grid dispatching and maintenance. Therefore, improving the accuracy of new energy power forecasting has become a current research hotspot.

[0003] Currently, scholars both domestically and internationally have proposed various prediction methods, which can be broadly categorized into two types: single-model and combined-model approaches. Single-model approaches, such as backpropagation (BP) neural networks, support vector machines, convolutional neural networks (CNNs), and long short-term memory networks (LSTMs), are simple in structure and easy to implement, but their prediction accuracy is limited in complex meteorological scenarios. To overcome the shortcomings of single-model approaches, combined-model approaches have emerged, among which the CNN-LSTM combined model is widely used: CNNs excel at extracting local spatial features, while LSTMs can capture long-term dependencies in the temporal dimension; combining the two can significantly improve prediction performance.

[0004] However, the traditional CNN-LSTM combined model still has the following key shortcomings in practical applications: Key parameters rely on manual experience to set: Hyperparameters such as learning rate, number of hidden layer nodes, and regularization coefficient in the model are usually determined by repeated manual debugging, which is not only time-consuming, but also makes it difficult to guarantee the global optimality of parameter configuration, resulting in low model convergence efficiency and limited prediction accuracy.

[0005] Existing parameter optimization methods have insufficient applicability: To overcome the limitations of manual parameter tuning, some studies have attempted to introduce intelligent optimization algorithms (such as the beetle whisker search algorithm and the snake optimization algorithm) to automatically optimize model parameters. These methods have improved prediction performance to some extent, but the optimization algorithms themselves still suffer from problems such as insufficient solution accuracy, susceptibility to local optima, and slow convergence speed, making it difficult to stably and efficiently complete the global optimization of parameters for deep mixture models.

[0006] There is a lack of effective solutions for the complex optimization space of deep hybrid models: Unlike the low-dimensional, smooth optimization space of shallow models (such as Extreme Learning Machine), the hyperparameter optimization space of deep hybrid models such as CNN-LSTM has the characteristics of strong coupling, non-convexity, multi-peak, and high noise. Traditional or basic intelligent optimization algorithms often perform poorly in such complex spaces and are prone to problems such as premature convergence or low search efficiency.

[0007] In summary, existing methods for predicting renewable energy power still have significant shortcomings in terms of model parameter optimization. There is an urgent need for an optimization strategy that can efficiently and stably solve the complex hyperparameter space of deep hybrid models in order to further improve the prediction accuracy of renewable energy power. Summary of the Invention

[0008] To address the aforementioned technical problems, this invention provides a new energy power prediction method based on an improved locust optimization algorithm, comprising: Historical output power data and related influencing factor data of new energy power plants were obtained and divided into training set and test set; An improved locust optimization algorithm is constructed by integrating a greedy selection strategy with a Cauchy mutation random jump strategy into the original locust optimization algorithm. The learning rate, number of hidden layer nodes, and regularization coefficient of the convolutional neural network-long short-term memory network are encoded as the position vector of locust individuals in the improved locust optimization algorithm. With the goal of minimizing the prediction error of the convolutional neural network-long short-term memory network model on the test set data, the position of locust individuals is iteratively updated by the improved locust optimization algorithm and the prediction error value at the corresponding position is calculated. When the preset maximum number of iterations is reached, the globally optimal locust individual position is output as the optimal parameter combination of the convolutional neural network-long short-term memory network. The optimal parameter combination is configured in a convolutional neural network-long short-term memory network to obtain a power prediction model; The power prediction model is trained using the training set data; The trained power prediction model is used to predict the power generation of new energy sources.

[0009] Optionally, the original locust optimization algorithm is combined with a greedy selection strategy and a Cauchy mutation random jump strategy. The implementation of the greedy selection strategy includes: For the parameter combination of the convolutional neural network-long short-term memory network corresponding to the new position of the locust individual after the update, and the parameter combination of the convolutional neural network-long short-term memory network corresponding to the original position before the update, the prediction error obtained by the two on the test set is calculated respectively. If the prediction error corresponding to the new position is smaller, the original position is replaced by the new position.

[0010] Optionally, the original locust optimization algorithm is combined with a greedy selection strategy and a Cauchy mutation random jump strategy. The implementation of the Cauchy mutation random jump strategy includes: Introducing a random step size based on Cauchy distribution during the locust individual position update process allows locust individuals to make random jumps in the parameter space, expanding the search range for different parameter combinations of convolutional neural network-long short-term memory network.

[0011] Optionally, the specific process of iteratively updating the position of individual locusts and calculating the prediction error value at the corresponding position by improving the locust optimization algorithm includes: Initialize the parameters of the improved locust optimization algorithm and the basic parameters of the convolutional neural network-long short-term memory network; for each locust individual, construct the corresponding convolutional neural network-long short-term memory network, train it on the training set, and calculate the prediction error on the test set; update the position of the locust individual based on the greedy selection strategy and the Cauchy mutation random jump strategy; determine whether the preset maximum number of iterations has been reached, and continue if not, and stop if it has been reached.

[0012] Optionally, when constructing a convolutional neural network-long short-term memory network, the convolutional neural network includes two convolutional layers and one pooling layer, wherein the pooling layer uses max pooling to reduce the dimensionality of the feature sequence output by the convolutional layers.

[0013] Optionally, when constructing a convolutional neural network-long short-term memory network, the long short-term memory network includes two layers of long short-term memory networks, which are used to perform temporal modeling learning on the feature sequences extracted by the convolutional neural network.

[0014] Optionally, when training the power prediction model using the training set data, an adaptive moment estimation optimizer can be used as the model training optimizer.

[0015] Optionally, when training the power prediction model using the training set data, the sum of the mean squared error and the L2 regularization term is used as the loss function.

[0016] On the other hand, the present invention also provides an electronic device including a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.

[0017] On the other hand, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.

[0018] Compared with the prior art, the present invention has the following advantages and technical effects: This invention significantly improves the global optimization capability and convergence efficiency of the original locust optimization algorithm by integrating a greedy selection strategy and a Cauchy mutation random jump strategy. Specifically, the greedy selection strategy selectively retains the old and new positions of individual locusts after each position update, ensuring that the population quality continues to evolve towards a better direction. The Cauchy mutation random jump strategy introduces random perturbations during the update process, enabling the algorithm to escape local optima in the later stages of iteration, thus continuing to explore better parameter combinations in a broader parameter space. The synergistic effect of the two strategies overcomes the inherent defects of the original locust optimization algorithm, such as insufficient solution accuracy and susceptibility to local optima.

[0019] This invention also encodes the learning rate, number of hidden layer nodes, and regularization coefficients of the convolutional neural network-long short-term memory network into the position vectors of individual locusts in the improved locust optimization algorithm. It iterative optimization is then performed with the goal of minimizing the prediction error on the test set, thereby achieving adaptive global optimization of the model's core hyperparameters. Compared to the traditional method of repeatedly adjusting parameters based on human experience, this invention significantly reduces the time cost and subjectivity of parameter tuning, while avoiding problems such as low model convergence efficiency or limited prediction accuracy caused by improper parameter settings. Using the test set error as the optimization objective also ensures that the obtained optimal parameter combination has good generalization performance, preventing the model from overfitting the training data.

[0020] Based on this, the present invention configures the optimal parameter combination obtained through optimization into a convolutional neural network-long short-term memory network to obtain a power prediction model. This model is then trained using training set data to ultimately construct a high-precision power prediction model. This hybrid model fully leverages the advantages of convolutional neural networks in local feature extraction and the strengths of long short-term memory networks in capturing temporal dependencies. The deep integration of these two technologies allows the model to fully extract effective information from historical power data and related influencing factors, thereby accurately depicting the fluctuation patterns of wind and solar power generation.

[0021] In summary, this invention effectively solves the problems of low efficiency and limited prediction accuracy of manual parameter tuning in existing technologies by improving the locust optimization algorithm to globally adaptively optimize the core parameters of the hybrid neural network model. It achieves high-precision and robust new energy power prediction, providing reliable technical support for the efficient grid connection of new energy power plants and the stable dispatch of the power system. Attached Figure Description

[0022] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1This is a schematic diagram of the IGOA-CNN-LSTM model structure according to an embodiment of the present invention; Figure 2 This is a comparison chart of the convergence results of the improved locust optimization algorithm and the comparison algorithm in this embodiment of the invention on the CEC2005 test function; Figure 3 This is a comparison chart of photovoltaic power generation prediction results according to an embodiment of the present invention; Figure 4 This is a comparison chart of wind power generation prediction results according to an embodiment of the present invention; Figure 5 This is a flowchart illustrating the iterative optimization process of the improved locust optimization algorithm (IGOA) according to an embodiment of the present invention. Detailed Implementation

[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0024] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0025] Example 1 This embodiment provides a new energy power prediction method based on an improved locust optimization algorithm, including: Historical output power data and related influencing factor data of new energy power plants were obtained and divided into training set and test set; An improved locust optimization algorithm is constructed by integrating a greedy selection strategy with a Cauchy mutation random jump strategy into the original locust optimization algorithm. The learning rate, number of hidden layer nodes, and regularization coefficient of the convolutional neural network-long short-term memory network are encoded as the position vector of locust individuals in the improved locust optimization algorithm. With the goal of minimizing the prediction error of the convolutional neural network-long short-term memory network model on the test set data, the position of locust individuals is iteratively updated by the improved locust optimization algorithm and the prediction error value at the corresponding position is calculated. When the preset maximum number of iterations is reached, the globally optimal locust individual position is output as the optimal parameter combination of the convolutional neural network-long short-term memory network. The optimal parameter combination is configured in a convolutional neural network-long short-term memory network to obtain a power prediction model; The power prediction model is trained using the training set data; The trained power prediction model is used to predict the power generation of new energy sources.

[0026] As a specific implementation method, this embodiment addresses the problem of insufficient prediction accuracy caused by the randomness and volatility of new energy power generation. It provides a new energy power prediction method based on the Improved Grasshopper Optimization Algorithm (IGOA), which is implemented according to the following technical process.

[0027] Data preprocessing: Historical power output data and related influencing factors from wind and solar power plants were acquired, and the data was divided into training and testing sets. The training set was used for parameter learning of the subsequent model, while the testing set was used for final prediction performance evaluation.

[0028] CNN-LSTM model modeling: The data is input into the CNN-LSTM model. In this embodiment, the Convolutional Neural Network (CNN) part has two convolutional layers and one pooling layer. The convolutional layers traverse the input landscape data, performing convolution operations on the convolutional kernel weights and local sequence segments of the landscape information to obtain a more representative feature sequence. This feature sequence is then input into the pooling layer, where the pooling window slides across the sequence, and each slide takes the maximum value within the window for max pooling, outputting a more expressive feature sequence. Subsequently, the useful features extracted by the CNN network are input into a Long Short-Term Memory (LSTM) network for sufficient learning. The LSTM network is set to two layers to capture the long-term dependencies of the power data.

[0029] IGOA parameter optimization: To achieve adaptive optimization of the model's core hyperparameters, this embodiment improves the original Grasshopper Optimisation Algorithm (GOA), specifically including the following sub-steps.

[0030] (1) Improvement strategy: Greedy strategy: Compare the updated position of each locust with the fitness value of its original position. If the new position has better fitness, replace the original position with the new position; otherwise, retain the original position information. ; In the formula: Let i be the position of the i-th locust in the t-th iteration. Let the positions of the new and old locust individuals be defined in the t-th iteration. This represents the fitness value corresponding to an individual locust.

[0031] Cauchy Mutation Strategy: A Cauchy mutation mechanism is introduced to generate random variables following a Cauchy distribution, which are then embedded into the locust population's position update process. This strategy leverages the randomness of the random variables and the characteristics of the Cauchy distribution to broaden the population search space, enhance individual search capabilities, and significantly increase the probability of the algorithm escaping local optima, thereby optimizing overall optimization performance. Specifically, the relationship between the position of the i-th locust in the t-th iteration, the position of the locust with the best fitness in the t-th iteration, and the random number following a standard Cauchy distribution is updated according to the standard Cauchy mutation formula: ; In the formula: Let i be the position of the i-th locust in the t-th iteration. Let be the position of the locust individual with the best fitness in the t-th iteration. These are random numbers that follow a standard Cauchy distribution.

[0032] (2) Initialization and vector mapping: Initialization configuration: Set the population size to 30, the maximum number of iterations to a preset value (range 10 to 100), and the initial value of the global exploration and local development balance coefficient to 1.0.

[0033] Parameter vector mapping mechanism: The three core control parameters of CNN-LSTM, namely learning rate (encoding range 0.001-0.01), number of hidden layer nodes (encoding range 10-200), and regularization coefficient (encoding range 1e-10-0.01), are mapped to the three-dimensional position vector of locust individuals in IGOA, realizing a one-to-one correspondence between "parameter configuration → locust position".

[0034] (3) Definition and calculation of fitness function: The fitness function is defined with the goal of minimizing the root mean square error (RMSE) of the CNN-LSTM model. It should be noted that in this embodiment, the fitness value of an individual locust refers to the RMSE of the parameter combination corresponding to that individual. A smaller fitness value indicates a smaller prediction error, and this parameter combination results in higher prediction accuracy. The RMSE is calculated based on the total number of samples, the true power value, and the predicted power value.

[0035] Specifically, with the goal of minimizing the root mean square error of the CNN-LSTM model's predictions, the fitness function is defined as follows: ; In the formula: The total number of samples, For the true value, These are predicted values.

[0036] (4) Iterative convergence and optimal parameter output: The specific iterative process is as follows: First, initialize the locust population position (corresponding to the hyperparameter combination); then calculate the fitness value of the CNN-LSTM model for each individual; next, update the locust position by combining Cauchy mutation, and retain the best individual through greedy selection; then iteratively update the balance coefficient until the preset maximum number of iterations is reached; finally, output the globally optimal locust position, which is the optimal hyperparameter combination X_best of the CNN-LSTM.

[0037] CNN-LSTM model training: The optimal parameter combination obtained through optimization is configured in the CNN-LSTM model, and then the model is trained using the training set data. This embodiment uses the Adaptive Moment Estimator (Adam) as the training optimizer, where the learning rate is set as the first parameter in X_best; the LSTM part adopts a two-layer structure, with the number of hidden layer nodes set as the second parameter in X_best; the loss function is the sum of the mean squared error (MSE) and the L2 regularization term, where the regularization coefficient λ is set as the third parameter in X_best. Furthermore, an early stopping mechanism is implemented: training stops when the test set error does not decrease for 10 consecutive rounds to avoid overfitting.

[0038] Predicted output and evaluation: After training, the trained power prediction model is used to predict the power generation of new energy sources on the test set data, and the prediction results are output. To comprehensively measure the prediction performance, this embodiment uses three indicators: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Coefficient of Determination (R²). MAE reflects the average level of the absolute deviation between the model's predicted values ​​and the actual values, providing a direct measure of the overall magnitude of the prediction error and exhibiting robustness to outliers. RMSE, by squaring the error and then taking the square root, amplifies the impact of larger deviations and effectively reflects the model's sensitivity to extreme errors; it is a commonly used and rigorous indicator for evaluating prediction accuracy. R² measures the model's ability to explain data variation, typically ranging from 0 to 1. A value closer to 1 indicates a better model fit and a stronger ability to capture data patterns; conversely, a value closer to 1 indicates weaker explanatory power.

[0039] The complete implementation process of the new energy power prediction model based on IGOA-CNN-LSTM is as follows: Simultaneously initialize the IGOA algorithm parameters and the basic parameters of the CNN-LSTM model, mapping the core control parameters of the CNN-LSTM (learning rate, number of hidden layer nodes, and regularization coefficient) to the initial position vectors of locust individuals in IGOA; Using minimizing the prediction error of the CNN-LSTM model as the objective function, calculate the fitness value of each individual in the locust population under the constraint of the initial position vector; Based on the ranking of individual fitness values, iteratively update the individual positions of the locust population according to the position update rules of the IGOA algorithm; Repeat the above operations of calculating fitness and updating positions until the preset maximum number of iterations is met, at which point the output locust individual position vector is the optimal parameter configuration of the CNN-LSTM model; After completing the optimal assignment of key parameters, train the model on sample data, and finally construct a high-precision CNN-LSTM prediction model. The overall structure of this embodiment is as follows: Figure 1 As shown, the iterative process of the improved locust optimization algorithm is as follows: Figure 5 As shown.

[0040] The new energy power prediction method proposed in this embodiment, which combines the improved locust optimization algorithm (IGOA) with a convolutional neural network-long short-term memory network (CNN-LSTM), has the following advantages compared with existing technologies: The fundamental difference in parameter optimization between CNN-LSTM and ELM: Extreme Learning Machine (ELM), as a shallow neural network, involves simple optimization in a low-dimensional continuous space. ELM's parameter space has low dimensionality, with no coupling between parameters, and fitness evaluation can be completed in a single forward propagation. It also avoids training instability issues such as vanishing and exploding gradients. Therefore, conventional intelligent algorithms, even grid search, can be directly applied to ELM parameter optimization. In contrast, CNN-LSTM, as a deep hybrid neural network, involves complex optimization problems with strongly coupled, non-convex, and training-dependent hyperparameters. CNN-LSTM requires a complete iterative training process to calculate fitness, and during training, it is prone to problems such as vanishing gradients, non-convexity, and NaN (Not Innocent) errors. This results in an optimization space characterized by "multi-peaks, high noise, and discontinuity," fundamentally different from the smooth convex space of ELM, significantly increasing the optimization difficulty.

[0041] Advantages of applying IGOA to CNN-LSTM: First, the matching of algorithm capability with problem difficulty. The IGOA algorithm used in this embodiment is improved through a greedy strategy and Cauchy mutation, making it suitable for solving optimization problems of the "non-convex, multi-peak, and strongly coupled" type. ELM, on the other hand, has a simple optimization space structure, and the basic Locust Optimization Algorithm (GOA) can meet its optimization requirements. Therefore, combining IGOA with CNN-LSTM is an adaptation choice based on the problem complexity.

[0042] Second, the construction of a dedicated optimization framework. The optimization process of ELM is "parameter initialization → forward computation → fitness evaluation → optimization update", which does not require additional modeling. However, CNN-LSTM requires the design of a dedicated optimization framework: on the one hand, the parameter encoding needs to be compatible with a search space that mixes discrete variables (such as the number of network layers) and continuous variables (such as learning rate and regularization coefficient); on the other hand, it also needs to realize the dynamic construction of the network structure and the anomaly handling mechanism during the training process (such as setting a retraining mechanism when training does not converge).

[0043] Third, the objective function is optimized for adaptation. The error function of ELM is approximately convex, unimodal, and smooth, making it prone to premature convergence by conventional optimization algorithms. In contrast, the error function of CNN-LSTM is highly non-convex, multimodal, and noisy, making it susceptible to local optima by basic optimization algorithms. In this embodiment, the greedy strategy introduced by IGOA enhances local search capabilities, and Cauchy mutation balances global exploration with local exploitation, effectively avoiding local optima. This aligns with the complex characteristics of the CNN-LSTM objective function.

[0044] Fourth, synergistic optimization of computational cost and efficiency. ELM's single fitness evaluation takes only milliseconds, allowing for high-frequency iterations. In contrast, CNN-LSTM's single evaluation often takes tens of seconds, requiring the optimization algorithm to achieve efficient optimization within a limited number of iterations. IGOA improves search efficiency, satisfying the computational cost constraints of CNN-LSTM. To achieve a balance between optimization performance and computational efficiency, it is necessary to experimentally adjust the operator parameters of the optimization algorithm (such as population size and number of iterations) to achieve a reasonable balance between optimization performance and computational efficiency.

[0045] In summary, this embodiment combines the improved locust optimization algorithm with a convolutional neural network-long short-term memory network to achieve efficient global optimization of the model's core parameters. It can meet the comprehensive requirements of parameter optimization difficulty, algorithm adaptability, implementation threshold, and computational efficiency in wind and solar power generation prediction scenarios.

[0046] Experimental test: To verify the effectiveness of the proposed improved locust optimization algorithm (IGOA), the original locust optimization algorithm (GOA), the greedy strategy improved algorithm (TGOA), the Cauchy mutation improved algorithm (CGOA), and the improved algorithm (IGOA) of this study were compared and tested on the F1–F4 functions of the CEC2005 standard test set. Table 1 shows the comparison of the function test results. Figure 2 This is a diagram showing the convergence results of the algorithm.

[0047] Table 1 To verify the optimization performance of the improved locust optimization algorithm (IGOA), CEC2005 test functions F1~F4 were selected for comparative experiments. The optimization error value was used as the evaluation index, with a smaller value indicating higher solution accuracy. Experimental results show that the basic GOA algorithm has a large optimization error on all test functions, with the error magnitude ranging from 10⁻. 4 The error is between ~10⁻¹; although the TGOA algorithm is an improvement over GOA, the error is reduced to 10⁻². 0 ~10⁻ 9 However, it still did not reach the theoretical optimum. The proposed IGAA algorithm, on the other hand, achieved zero optimization error on all test functions from F1 to F4, successfully converging to the global optimum. This demonstrates that IGAA significantly outperforms GOA and TGOA in terms of optimization accuracy, convergence performance, and robustness, exhibiting superior optimization performance. Both CGOA and IGAA achieved zero optimization error and converged to the global optimum. The convergence curves show that although their optimization accuracy is comparable, IGAA's convergence speed is significantly faster than CGOA, quickly approaching and reaching the optimum in fewer iterations. In summary, IGAA maintains extremely high optimization accuracy while possessing superior convergence performance, with overall optimization efficiency exceeding that of CGOA, TGOA, and the original GOA algorithm. The comparative results fully demonstrate that IGAA has higher solution accuracy, stronger global optimization capability, and superior convergence performance, effectively overcoming the shortcomings of the original algorithm, such as being prone to getting trapped in local optima and insufficient solution accuracy, thus verifying the effectiveness and superiority of the algorithm improvement strategy.

[0048] To comprehensively verify the predictive performance of the proposed model, this experiment selected four types of models—BP, LSTM, CNN-LSTM, and IGOA-CNN-LSTM—as comparative studies. Three commonly used evaluation metrics for prediction were selected: mean absolute error (MAE), root mean square error (RMSE), and goodness-of-fit R². The comparison between the predicted model's output power and the actual power was examined to measure the model's predictive performance. Experimental data came from measured output power data of wind farms and photovoltaic power plants in a certain region, and also included relevant meteorological and operational characteristic datasets affecting wind and solar power output, totaling 2000 sets of data. Of these, 1600 sets were used as the training set for model training, and the remaining 400 sets were set as the test set, specifically for validating the effectiveness of each model and comparing their overall performance. Table 2 compares the results of the photovoltaic power generation prediction evaluation metrics for each model, and Table 3 compares the results of the wind power generation prediction evaluation metrics for each model. Figure 3 This is a diagram comparing photovoltaic power generation forecast results. Figure 4 This is a diagram showing the comparison of wind power generation prediction results.

[0049] Table 2 Table 3 Based on the three core evaluation metrics of mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²), the prediction performance of the four types of models shows a consistent gradient optimization trend: the IGOA-CNN-LSTM model has the best overall prediction performance, followed by the CNN-LSTM model, and the LSTM model is better than the BP neural network (BPNN). Specifically, in photovoltaic power generation prediction, the IGOA-CNN-LSTM model had the lowest MAE (0.79667) and RMSE (1.3208), and the highest R² (99.7557%). Compared with the basic BP model, the MAE (2.2001) and RMSE (3.0425) were reduced by 63.79% and 56.59% respectively, and the R² was increased by 1.07 percentage points. In wind power generation prediction, the model also performed well. The MAE (7.1325) and RMSE (10.3118) were reduced by 14.98% and 17.22% respectively compared with the best single model LSTM, and by 40.00% and 45.65% respectively compared with the BP model. The R² (96.6408%) was increased by 0.58 percentage points compared with the CNN-LSTM model.

[0050] Overall, the IGOA-CNN-LSTM combined model, through the synergistic improvement of parameter optimization and feature extraction capabilities, can effectively reduce prediction errors and improve fitting accuracy in wind and solar power generation prediction, fully verifying the superiority of the model in complex time-series power prediction tasks and providing more accurate power generation prediction results for new energy power plants.

[0051] On the other hand, this embodiment also provides an electronic device, including a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.

[0052] On the other hand, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.

[0053] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A new energy power prediction method based on an improved locust optimization algorithm, characterized in that, include: Historical output power data and related influencing factor data of new energy power plants were obtained and divided into training set and test set; An improved locust optimization algorithm is constructed by integrating a greedy selection strategy with a Cauchy mutation random jump strategy into the original locust optimization algorithm. The learning rate, number of hidden layer nodes, and regularization coefficient of the convolutional neural network-long short-term memory network are encoded as the position vector of locust individuals in the improved locust optimization algorithm. With the goal of minimizing the prediction error of the convolutional neural network-long short-term memory network model on the test set data, the position of locust individuals is iteratively updated by the improved locust optimization algorithm and the prediction error value at the corresponding position is calculated. When the preset maximum number of iterations is reached, the globally optimal locust individual position is output as the optimal parameter combination of the convolutional neural network-long short-term memory network. The optimal parameter combination is configured in a convolutional neural network-long short-term memory network to obtain a power prediction model; The power prediction model is trained using the training set data; The trained power prediction model is used to predict the power generation of new energy sources.

2. The prediction method according to claim 1, characterized in that, The original locust optimization algorithm is combined with a greedy selection strategy and a Cauchy mutation random jump strategy. The implementation of the greedy selection strategy includes: For the parameter combination of the convolutional neural network-long short-term memory network corresponding to the new position of the locust individual after the update, and the parameter combination of the convolutional neural network-long short-term memory network corresponding to the original position before the update, the prediction error obtained by the two on the test set is calculated respectively. If the prediction error corresponding to the new position is smaller, the original position is replaced by the new position.

3. The prediction method according to claim 2, characterized in that, The original locust optimization algorithm is combined with a greedy selection strategy and a Cauchy mutation random jump strategy. The implementation of the Cauchy mutation random jump strategy includes: Introducing a random step size based on Cauchy distribution during the locust individual position update process allows locust individuals to make random jumps in the parameter space, expanding the search range for different parameter combinations of convolutional neural network-long short-term memory network.

4. The prediction method according to claim 1, characterized in that, The specific process of iteratively updating the position of individual locusts and calculating the prediction error value at the corresponding position by improving the locust optimization algorithm includes: Initialize the parameters of the improved locust optimization algorithm and the basic parameters of the convolutional neural network-long short-term memory network; for each locust individual, construct the corresponding convolutional neural network-long short-term memory network, train it on the training set, and calculate the prediction error on the test set; update the position of the locust individual based on the greedy selection strategy and the Cauchy mutation random jump strategy; determine whether the preset maximum number of iterations has been reached, and continue if not, and stop if it has been reached.

5. The prediction method according to claim 1, characterized in that, When constructing a convolutional neural network-long short-term memory network, the convolutional neural network includes two convolutional layers and one pooling layer. The pooling layer uses max pooling to reduce the dimensionality of the feature sequence output by the convolutional layers.

6. The prediction method according to claim 1, characterized in that, When constructing a convolutional neural network-long short-term memory network, the long short-term memory network includes two layers of long short-term memory networks, which are used to perform temporal modeling learning on the feature sequences extracted by the convolutional neural network.

7. The prediction method according to claim 1, characterized in that, When training the power prediction model using the training set data, an adaptive moment estimation optimizer is used as the model training optimizer.

8. The prediction method according to claim 1, characterized in that, When training the power prediction model using the training set data, the sum of the mean squared error and the L2 regularization term is used as the loss function.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1-8.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-8.