Power load prediction method and system based on multi-target CNN-BiLSTM automatic optimization model

Through the multi-objective CNN-BiLSTM automatic optimization model, the power load prediction model is automatically optimized using the particle swarm optimization algorithm, which solves the problems of long development cycles and high resource consumption in the existing technology, and achieves high-precision and lightweight load prediction, which is suitable for online deployment of power systems.

CN120509539APending Publication Date: 2025-08-19WENZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510639493.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing power load prediction models rely highly on manual experience in the design and tuning process, have long development cycles, high costs, and are difficult to achieve efficient operation in resource-constrained environments, and cannot take into account both prediction accuracy and model lightweighting.

Method used

The multi-objective CNN-BiLSTM automatic optimization model is adopted, and the architecture and parameters of the CNN-BiLSTM model are automatically optimized through the real discrete coded particle swarm optimization algorithm, combined with non-dominant sorting and crowding calculation, and the architecture and parameters of the CNN-BiLSTM model are automatically optimized, balanced prediction accuracy and model lightweighting, and obtained Pareto optimal solution.

Benefits of technology

While achieving high-precision load prediction in the power system, it significantly reduces the complexity of the model, facilitates online deployment and real-time prediction, and improves the deployment efficiency and practical application value of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509539A_ABST
    Figure CN120509539A_ABST
Patent Text Reader

Abstract

The invention discloses a power load prediction method and system based on a multi-target CNN-BiLSTM automatic optimization model, and the method comprises the steps: coding a CNN-BiLSTM model neural architecture parameter and a training hyper-parameter of a CNN and BiLSTM combination into particles through real discrete coding, and enabling the minimization of a mean square error and a model parameter quantity of model prediction to serve as an optimization target; evaluation and screening of Pareto better particles are completed through non-dominated sorting of optimization targets and congestion degree distance calculation of positions of the optimization targets, off-line iterative optimization of a particle swarm is achieved by designing a particle position and speed updating technology, and a CNN-BiLSTM compromise optimization model giving consideration to power load prediction precision and model lightweight is obtained. According to the method, automatic optimization of the power load deep learning prediction model is realized, the obtained CNN-BiLSTM optimization model can be deployed in a power system on line in a lightweight manner, and accurate prediction of the power load is efficiently realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent prediction technology in the field of power system load forecasting, and in particular to a power load forecasting method and system based on a multi-objective CNN-BiLSTM automatic optimization model. Background Art

[0002] With the transformation of the power system's energy structure and the continuous increase in the access rate of new energy, the scale and operational complexity of the power system have increased significantly. Load forecasting is a core link in grid dispatching, economic operation, and demand response. Its accuracy directly affects the safety and economy of the power system. Traditional power system load forecasting methods such as linear regression and time series analysis, although they perform well under simple data conditions, are gradually showing limitations when faced with current nonlinear, multi-scale, and non-stationary load data. In addition, with the access of smart devices, the scale of power system data has expanded dramatically, and the demand for computing resources has increased significantly. The purchase of large amounts of computing power has increased the operating costs of the power grid and reduced its economic benefits, making the contradiction between computing efficiency and prediction accuracy increasingly prominent.

[0003] In recent years, deep learning neural networks represented by convolutional neural networks (CNN), recurrent neural networks (RNN), long short-term memory neural networks (LSTM) and bidirectional long short-term memory neural networks (BiLSTM) have shown great potential in power system load forecasting. CNN's local perception mechanism and low latency give it unique advantages in extracting the spatiotemporal characteristics of load data. When processing time series problems, RNNs use a "recurrent connection" mechanism, enabling the network to retain memory of previously input information, thereby capturing temporal dependencies within the sequence. However, this mechanism suffers from the problems of vanishing or exploding gradients. LSTMs, by introducing memory cells and gating mechanisms (input gate, forget gate, output gate), can alleviate the vanishing gradient problem compared to traditional RNNs and are favored by many scholars for time series forecasting. BiLSTMs, through two forward and backward LSTM layers, capture past and future dependencies in time series, respectively. This bidirectional modeling capability makes them more suitable for predicting seasonal characteristics, holiday effects, and sudden events in power load, offering unique advantages in power load forecasting. Therefore, it is worthwhile to fully leverage the spatiotemporal extraction capabilities of CNNs and the time series capture capabilities of BiLSTMs to design a hybrid neural network model that balances high-precision power load forecasting with lightweight models.

[0004] Although there are many deep learning neural network models with unique properties that can be used for power system load forecasting, existing models face the following key problems in design and application: (1) The model design and tuning process is highly dependent on human experience, and usually requires a lot of trial and error to determine the optimal architecture and parameters, resulting in long development cycles and high development costs; (2) Existing models often only focus on a single prediction accuracy and ignore model lightweight and computational efficiency, which makes it difficult for their models to operate efficiently in resource-constrained environments during actual deployment.

[0005] To address these issues, an effective approach is to reduce manual intervention and improve model design efficiency through automated search and hyperparameter optimization techniques. However, the power load forecasting field still lacks an effective solution for balancing the contradiction between model prediction accuracy and lightweightness. Therefore, there is an urgent need for an automated optimization design technology that can achieve both high prediction accuracy and lightweight power load forecasting models, thereby improving model deployment efficiency and practical application value. Summary of the Invention

[0006] The purpose of the present invention is to address the deficiencies of the existing technology and provide a power load forecasting method and system based on a multi-objective CNN-BiLSTM automatic optimization model.

[0007] The object of the present invention is achieved through the following technical solutions: In a first aspect, an embodiment of the present invention provides a power load forecasting method based on a multi-objective CNN-BiLSTM automatic optimization model, comprising the following steps:

[0008] S1: Construct training and testing datasets based on the power system load history database and real-time database in the power system load database;

[0009] S2: Set multiple first parameters and construct the optimization objective function of the multi-objective CNN-BiLSTM automatic optimization model;

[0010] S3: Perform real number discrete encoding on the CNN-BiLSTM model parameters to be optimized according to the first parameter, and randomly generate the initial particle swarm P g , and set the current number of iterations g = 0;

[0011] S4: Particle swarm P based on training data set g All particles in the dataset are trained offline, and the optimization targets of all particles are non-dominated sorted based on the test dataset. The excellent particles are merged with the particles in the external archive S, the optimization targets of the merged particles are non-dominated sorted, the congestion degree of their positions is calculated, the particles are evaluated and screened, and the external archive S and the global optimal position are updated. and the particle's historical optimal position

[0012] S5: Based on the globally optimal position and the historical optimal position of the particles update the velocity and position of the particles in the particle swarm P g by adaptive weight, record the iteration number g = g + 1, and repeat step S4;

[0013] S6: Judge whether the iteration number g satisfies g < G. If so, repeat step S5; if not, take all the solutions in the external archive S as the Pareto optimal solution set;

[0014] S7: Select the Pareto optimal solution that takes into account both the accuracy of power load forecasting and the lightweight of the model from the Pareto optimal solution set, and take the CNN - BiLSTM model represented by it as the optimal power load forecasting model;

[0015] S8: Deploy the optimal CNN - BiLSTM model online in the power system, and output the load forecasting performance index of the model after online load forecasting of the power system based on the real - time data set.

[0016] Furthermore, the specific steps of step S1 include:

[0017] For the historical database of power system load in the power system load database, extract and analyze the historical data of the power system load to obtain a data set, and divide this data set into a training data set and a test data set;

[0018] For the real - time database in the power system load database, extract and analyze the real - time data of the power system load to obtain a real - time data set;

[0019] Denote the training data set as X train , denote the test data set as X test , respectively construct X train and X test as data matrices; Each element in the X train matrix is represented as a m,h , where m represents the m - th sample of the training data set X train , that is, the m - th row of the X train matrix, 1 ≤ m ≤ M, and M represents the total number of samples in the training data set X train ; h represents the h - th feature of the sample, that is, the h - th column of the X train matrix, 1 ≤ h ≤ H, and H represents the total number of features of the sample; a m,h represents the specific value of the h - th feature of the m - th sample in the training data set; Each element in the X test matrix is represented as a w,h , where w represents the test data set Xtest The w-th sample of test The wth row of the matrix, 1≤w≤W, W represents the test data set X test The total number of samples in a w,h Indicates the specific value of the hth feature of the wth sample in the test dataset.

[0020] Furthermore, the first parameter includes the maximum number of offline iterations G, the particle swarm size N p , inertia weight ω, particle learning factor c1 and global learning factor c2;

[0021] The optimization objective function of the multi-objective CNN-BiLSTM automatic optimization model includes the model's predicted mean square error f1 and the number of model parameters f2; wherein, the calculation formula of the predicted mean square error f1 is shown in formula (1):

[0022]

[0023] Where y i Indicates the true value of the power load, represents the predicted value of power load, n represents the number of samples; the number of model parameters f2 is the sum of all trainable parameters in the CNN-BiLSTM model, and its calculation formula is shown in formula (2):

[0024] f2=P CNN +P Dense +P BiLSTM (2)

[0025] Where, P CNN 、P Dense and P BiLSTM They represent the number of trainable parameters of the convolutional neural network layer, the fully connected network layer, and the bidirectional long short-term memory network layer, respectively.

[0026] Furthermore, the step S3 specifically includes:

[0027] Randomly generate N p The particle swarm P 0 , expressed as in and They represent the initial particle swarm P 0 The 1st, i-th and N-th P particles, 1≤i≤N p ; In addition, the particle swarm is marked as P when it is updated to the gth iteration g , Where g represents the number of optimization times of the model offline iteration, and They represent the particle swarm P at the g-th offline iteration. g The 1st, i-th and N-th P particles, when g=0, P g =P 0 represents the initial particle swarm that has not been iteratively updated, 0≤g≤G, G represents the maximum number of offline iterative updates; The specific code is It also represents the position of the particle during training optimization, where E i represents the number of training rounds, B i Indicates the batch size, L i represents the number of neurons in the BiLSTM layer, F i Indicates the number of convolutional layer filters, PL i represents the pooling layer size, D i Indicates the dropout layer discard rate, R i represents the learning rate, d represents the particle The dimension of ,1≤d≤7, and Respectively represent the particles at the g-th offline iteration The positions of the 1st, dth, and 7th dimensions;

[0028] Among them, in the particles In the specific encoding, E i The specific value of is shown in formula (3):

[0029]

[0030] Where Randint represents the random integer selection function; E min and E max Respectively represent E i The minimum and maximum values that can be obtained, E min ≤E i ≤E max ; B i The specific value of is shown in formula (4):

[0031]

[0032] Where B min and B max Respectively represent B i The minimum and maximum values that can be obtained, B min ≤B i ≤B max ;L i The specific value of is shown in formula (5):

[0033]

[0034] Where, L min and L max Respectively represent L i The minimum and maximum values that can be obtained, L min ≤L i ≤L max ; F i The specific value of is shown in formula (6):

[0035]

[0036] Where, F min and F max Respectively represent F i The minimum and maximum values that can be obtained, F min ≤F i ≤F max ;PL i The specific value of is shown in formula (7):

[0037]

[0038] Where PL min and PL max Represents PL i The minimum and maximum values that can be obtained, PL min ≤PL i ≤PL max ;D i The specific value of is shown in formula (8):

[0039]

[0040] In the formula, Random represents the random decimal selection function; D min and D max Respectively represent D i The minimum and maximum values that can be obtained, D min ≤D i ≤D max ; R i The specific value of is shown in formula (9):

[0041]

[0042] Where R min and R max Respectively represent R i The minimum and maximum values that can be obtained, R min ≤R i ≤R max ; In the specific initialization process of the particle swarm, particles are randomly generated according to formulas (3) to (9) Initial position also, The initial velocity is marked as in and Represents the initial particles The initial velocities of the 1st, dth, and 7th dimensions, The specific generation process of is shown in formula (10):

[0043]

[0044] Where, Preset speed range v min,d and v max,d Randomly generated between min,d and v max,d Represents the initial particles Initial velocity The minimum and maximum values that the dth dimension can take,

[0045] Furthermore, the step S4 specifically includes the following sub-steps:

[0046] S41: For training data set X train Particle Swarm The CNN-BiLSTM model represented by each particle in the test dataset X is trained offline. test The CNN-BiLSTM model is tested. According to the prediction mean square error f1 of the optimization target and the number of model parameters f2 described in formula (1) and formula (2), the particle swarm P is g Particles in Perform optimization objective function calculation to obtain particles The corresponding optimization target value;

[0047] S42: Comparing particles one by one The current f1 and f2 and f1 and f2, if f1 and f2 are not greater than f1 and f2, select The position is the particle's best historical position Otherwise, choose The position is the particle's best historical position if f1 is not greater than f1, f2 is not greater than f2, then randomly select a position as the particle's historical optimal position in, and They represent the historical optimal position of the particle at the g-1th offline iteration and the historical optimal position of the particle at the gth offline iteration respectively; when g = 0, That is, the initial position of the particle is the optimal position in the particle's history;

[0048] S43: Based on the optimization objectives f1 and f2, the particle swarm P g Perform non-dominated sorting on all particles in the system and check one by one whether all particles are completely dominated by other particles. That is, if there is a particle Smaller than the particle at both f1 and f2 This indicates that the particles Completely dominate particles Delete the dominated particles If not completely dominated, keep the particle Mark all retained particles as the retained particle set U, where Represents the particle swarm P g Different from Particles, i≠j;

[0049] S44: Merge the particle set U with the external archive S and mark it as the particle set Q. Perform non-dominated sorting on all particles in Q according to the optimization goals f1 and f2. Check one by one whether all particles are completely dominated by other particles. That is, if there is a particle q j Smaller than particle q on both f1 and f2 i , then the particle q j Completely dominate particle q i , then delete the dominated particle q i ; if it is not completely dominated, then keep particle q i , mark all retained particles as the new external archive S, that is, update the external archive S, where S represents the set of all particles saved in the external archive. When initialized (g = 0), the number of particles in S is 0. At this time, the particle set Q is equal to the particle set U; q i and q j Both represent particles in the particle set Q, and particle q j Different from particle q i , i≠j;

[0050] S45: External archive S={s i} to calculate the congestion of all particles in , where s i represents the i-th particle in the external archive S, 0≤i≤|S|, |S| represents the total number of particles in the external archive S;

[0051] S46: Determine whether |S| is greater than the external archive threshold T. If |S|>T, then t=|S|-T. Calculate the probability h of the i-th particle being deleted in the external archive S according to formula (12) i :

[0052]

[0053] Where T represents the threshold of external archiving; h i represents the probability of the i-th particle in the external archive S being deleted, 0≤i≤|S|; a random decimal r3 is randomly generated in the range [0,1], when r3≤h1+h2+…+h i Delete h from external archive S when i The corresponding particle repeats this step t times until |S|=T, where h1, h2 and h i They represent the probability of being deleted for the first, second, and i-th particles in the external archive S respectively; the redundant particles in the external archive are deleted to complete the update of the external archive S;

[0054] S47: Based on congestion C i Calculate particle s i The probability of being selected as the global optimal particle e i , the calculation process is shown in formula (13):

[0055]

[0056] Where, e i represents the i-th particle s in the external archive S i The probability of being selected as the global optimal particle; randomly generate a random number r4 in the range [0,1], when r4≤e1+e2+…+e i When selecting e i The corresponding particle p i The global optimal particle Among them, e1, e2, and e i are the probabilities of the first, second and i-th particles in the external archive S being selected as the global optimal, It represents the global optimal particle after the g-th offline iteration, and its corresponding position is the global optimal position When g = 0, is the initial global optimal position

[0057] Furthermore, the step S45 specifically includes the following sub-steps:

[0058] S45.1: According to particle s i ={x0,…,x k,…,x6} is the position of its grid encoding id i Calculate, where x0, x k , and x6 represent particle s i The specific calculation process of the positions of the 1st dimension, the kth dimension and the 7th dimension is shown in formula (11):

[0059]

[0060] Where k represents the particle p i Dimension, 0≤k≤6; id i represents particle p i Grid code of x k,min and x k,max Represents particles s i The minimum and maximum values of the k-th dimension of the position; di represents the number of grid division levels;

[0061] S45.2: Complete the calculation of all particle grid codes in the external archive S and get the id S ={id i}, id i Represents the i-th particle grid code in the external archive S, id S Represents the set of all particle grid codes in S, 0≤i≤|S|; for id S Perform the same code number statistics to obtain particle s i The congestion degree C i , C i Represents the particle s i The number of particles with the same grid code, 1≤C i ≤|S|.

[0062] Furthermore, the step S5 specifically includes the following sub-steps:

[0063] S51: First, the inertia weight ω is dynamically adjusted according to the number of iterations g according to formula (14):

[0064] ω=1-e -(1-g / G) (14)

[0065] Where g is the current iteration number and G is the maximum iteration number. Then update the particle according to formula (15) and formula (16): The updated speed and position are marked as and

[0066]

[0067] Where, and respectively represent the velocity and position of the updated particle in the d-th dimension; ; represents the particle at the g-th offline iteration historical best position in the d-th dimension; represents the position of the globally optimal particle in the d-th dimension at the g-th offline iteration; ω is the inertia weight; c1 and c2 are the individual learning factor and the global learning factor of the particle respectively, and r1 and r2 are random numbers uniformly distributed between [0, 1]; ;

[0068] S52: After updating the particle position, perform constraint processing on each dimension of the particle position encoding according to formulas (3) to (9): If then If then where, p i,d,max and p i,d,min respectively represent the maximum and minimum values allowed for the particle in the d-th dimension position;

[0069] S53: Record the iteration number g = g + 1, repeat step S4; update the globally optimal position particle historical best position and the external archive S.

[0070] Furthermore, the specific steps of step S6 include:

[0071] Judge whether the iteration number g satisfies g < G. If so, repeat step S5: update the particle swarm P g and perform non-dominated sorting evaluation, then perform non-dominated sorting and crowding degree calculation evaluation on the external archive S, and finally update the external archive S, the globally optimal position and particle historical best position Otherwise, take all the solutions in the external archive S as the Pareto optimal solution set.

[0072] Furthermore, the load prediction performance evaluation indexes include root mean square error, mean absolute error and mean absolute percentage error, and their calculation formulas are respectively:

[0073]

[0074] In the formula, RMSE represents the root mean square error, MAE represents the mean absolute error, MAPE represents the mean absolute percentage error, y i represents the true value of the power load, represents the predicted value of the power load, and n represents the number of samples.

[0075] In the second aspect of the embodiments of the present invention, a power load forecasting system based on a multi-objective CNN-BiLSTM automatic optimization model is provided, which is used to implement the power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model. The system includes:

[0076] A dataset construction module, which is used to construct a training dataset and a test dataset based on the historical database and the real-time database of the power system load in the power system load database;

[0077] A setting module, which is used to set multiple first parameters and construct an optimization objective function for the multi-objective CNN-BiLSTM automatic optimization model;

[0078] A particle swarm initialization module, which is used to perform real number discrete coding on the parameters of the CNN-BiLSTM model to be optimized according to the first parameters, and randomly generate an initial particle swarm P g , and set the current iteration number g = 0;

[0079] A particle swarm particle evaluation module, which is used to perform offline training on all particles in the particle swarm P g based on the training dataset, perform non-dominated sorting on the optimization objectives of all particles based on the test dataset, merge the excellent particles with the particles in the external archive S, perform non-dominated sorting on the optimization objectives of the merged particles, calculate the crowding degree of their positions, evaluate and screen the particles, and update the external archive S, the global optimal position and the particle historical optimal position

[0080] A particle swarm update and evaluation module, which is used to update the speed and position of the particles in the particle swarm P based on the global optimal position and the particle historical optimal position g with an adaptive weight update, record the iteration number g = g + 1, and repeat the particle swarm particle evaluation module;

[0081] An iteration judgment module, which is used to judge whether the iteration number g satisfies g < G. If so, repeat the particle swarm update and evaluation module; if not, take all the solutions in the external archive S as the Pareto optimal solution set;

[0082] An optimal model selection module, which is used to select a Pareto optimal solution that takes into account both the power load forecasting accuracy and the model lightweight in the Pareto optimal solution set, and use the CNN-BiLSTM model represented by it as the optimal power load forecasting model;

[0083] The online deployment and performance evaluation module is used to deploy the optimal CNN-BiLSTM model online in the power system, perform online load forecasting on the power system based on real-time data sets, and output the model's load forecasting performance indicators.

[0084] Compared with the prior art, the present invention has the following beneficial effects:

[0085] (1) The present invention comprehensively considers the two key indicators of the power system load forecasting system, namely the prediction accuracy and model complexity, and designs a power load forecasting method and system based on a multi-objective CNN-BiLSTM automatic optimization model, which effectively realizes the multi-objective automatic optimization function of the CNN-BiLSTM model for power system load forecasting application scenarios and takes into account high prediction accuracy and model lightweight.

[0086] (2) The present invention has excellent performance in terms of root mean square error, mean absolute error and mean absolute percentage error in power system load forecasting. While ensuring high prediction accuracy, the number of parameters of the obtained CNN-BiLSTM model has been significantly reduced, which is more convenient for online deployment and real-time prediction of the power system load forecasting system. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 It is a flow chart of the power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model of the present invention;

[0088] Figure 2 This is a schematic diagram of the correspondence between the random particle coding of the present invention and the actual meaning of the coding;

[0089] Figure 3 Schematic diagram of the structure of the CNN-BiLSTM automatic optimization model of the present invention;

[0090] Figure 4 is a Pareto frontier graph obtained after iterative optimization of the example of the present invention; wherein, Figure 4 (a) in the figure is the Pareto front obtained for the January data set; Figure 4 (b) in the figure is the Pareto front obtained for the April data set; Figure 4 (c) in the figure is the Pareto front obtained for the July data set; Figure 4 (d) in the figure is the Pareto front obtained for the October data set;

[0091] Figure 5 This is a comparison chart of the load forecast value and the actual value of the Pareto frontier compromise solution obtained by the power system load forecasting example of the present invention; wherein, Figure 5(a) is a comparison chart of the load forecast value and the actual value of the Pareto front compromise solution for the January data set; Figure 5 (b) is a comparison chart of the load forecast value and the actual value of the Pareto front compromise solution for the April data set; Figure 5 (c) is a comparison chart of the load forecast value and the actual value of the Pareto front compromise solution for the July data set; Figure 5 (d) is a comparison chart of the load forecast value and the actual value of the Pareto front compromise solution for the October data set;

[0092] Figure 6 This is a comparison chart of the RMSE and MAE prediction performance indicators of the compromise model of the example experiment of the present invention; wherein, Figure 6 (a) is a comparison chart of the prediction performance indicators RMSE and MAE for the January data set; Figure 6 (b) is a comparison chart of the prediction performance indicators RMSE and MAE for the April data set; Figure 6 (c) is a comparison chart of the prediction performance indicators RMSE and MAE for the July data set; Figure 6 (d) is a comparison chart of the prediction performance indicators RMSE and MAE for the October data set;

[0093] Figure 7 This is a comparison chart of the MAPE performance indicators of the example experimental compromise model of the present invention for four months of data sets;

[0094] Figure 8 This is a comparison chart of the number of parameters of the compromise model neural network of the present invention; wherein, Figure 8 (a) is a comparison chart of the number of model neural network parameters for the January data set; Figure 8 (b) is a comparison chart of the number of model neural network parameters for the April dataset; Figure 8 (c) is a comparison chart of the number of model neural network parameters for the July data set; Figure 8 (d) is a comparison chart of the number of model neural network parameters for the October dataset;

[0095] Figure 9 This is a structural diagram of the power load forecasting system based on the multi-objective CNN-BiLSTM automatic optimization model of the present invention. DETAILED DESCRIPTION

[0096] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0097] The power load forecasting method and system based on the multi-objective CNN-BiLSTM automatic optimization model of the present invention will be as follows Figure 2 The CNN-BiLSTM model shown uses optimization variables such as the number of training rounds, batch size, number of BiLSTM layer neurons, number of convolutional layer filters, pooling layer size, dropout rate, and learning rate as optimization variables. These optimization variables are encoded into particles using a real number encoding mechanism. The mean squared error (MSE) of the CNN-BiLSTM model training and testing outputs and the number of model parameters are used as two optimization objective functions. Non-dominated sorting and congestion calculation are then used to screen all particles, and the model architecture and parameters are iteratively optimized. Ultimately, a CNN-BiLSTM model is obtained that strikes the optimal balance between prediction accuracy and model lightweightness. This model is deployed online in a power system load forecasting system, significantly reducing model complexity and computing resource requirements while maintaining prediction accuracy, thereby alleviating the pressure of model deployment.

[0098] See also Figure 1 The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model of the present invention specifically includes the following steps:

[0099] S1: Construct training data sets, test data sets, and real-time data sets based on the power system load historical database and real-time database in the power system load database. The power system load database includes two sub-databases, namely the power system load historical database and the real-time database.

[0100] Specifically, for the power system load history database in the power system load database, the historical power system load data is extracted and parsed to obtain a data set, and the data set is divided into a training data set and a test data set. The training data set is used to train and optimize the CNN-BiLSTM model, and the test data set is used to test the load forecasting performance of the trained CNN-BiLSTM model. For the real-time database in the power system load database, the real-time power system load data is extracted and parsed to obtain a real-time data set. Extracting and parsing the corresponding data includes feature extraction and normalization processing.

[0101] In addition, the training data set is recorded as X train , the test data set is recorded as Xtest , respectively X train and X test Constructed as a data matrix; X train Each element in the matrix is represented by a m,h , where m represents the training dataset X train The mth sample of train The mth row of the matrix, 1≤m≤M, M represents the training data set X train The total number of samples in; h represents the hth feature of the sample, which is X train The hth column of the matrix, 1≤h≤H, H represents the total number of features of the sample; a m,h represents the specific value of the hth feature of the mth sample in the training data set; X test Each element in the matrix is represented by a w,h , where w represents the test data set X test The w-th sample of test The wth row of the matrix, 1≤w≤W, W represents the test data set X test The total number of samples in a w,h Indicates the specific value of the hth feature of the wth sample in the test dataset.

[0102] It should be understood that M, W, and H can be determined based on actual data. For example, in this embodiment, the electricity load demand dataset of the Australian Energy Market Operator (AEMO) was used. The implementation case was conducted on the New South Wales (NSW) dataset in 2018. Since a day consists of 24 hours and a data point is taken every half hour, each day in the dataset used contains 48 data points. On the other hand, the data of each month in the dataset used in this embodiment is used as an independent dataset in the experiment. Each dataset is divided into two separate subsets, including a training set and a test set. Therefore, for a 30-day month, there are 30×48 data points. 75% of the early data points in each dataset are the training set, while the remaining data points are the test set. That is, H = 48, M = 30×48×0.75 = 1080, and W = 30×48×0.25 = 360. The dataset used in this embodiment includes four months: January, April, July, and October, which are considered to represent different seasons: summer, autumn, winter, and spring, respectively.

[0103] S2: Set multiple first parameters and construct the optimization objective function of the multi-objective CNN-BiLSTM automatic optimization model.

[0104] Furthermore, the first parameters include the maximum number of offline iterations G, the particle swarm size N p , inertia weight ω, particle learning factor c1 and global learning factor c2.

[0105] Furthermore, the optimization objective function of the multi-objective CNN-BiLSTM automatic optimization model includes the prediction mean square error f1 of the model and the number of parameters f2 of the model. The calculation formula of the prediction mean square error f1 is shown in formula (1):

[0106]

[0107] Where y i Indicates the true value of the power load, Represents the predicted value of power load, and n represents the number of samples. The number of model parameters f2 is the sum of all trainable parameters in the CNN-BiLSTM model, and its calculation formula is shown in formula (2):

[0108] f2=P CNN +P Dense +P BiLSTM (2)

[0109] Where, P CNN 、P Dense and P BiLSTM They represent the number of trainable parameters of the convolutional neural network layer (CNN), the fully connected network layer, and the bidirectional long short-term memory network layer (BiLSTM), respectively.

[0110] It should be noted that the first parameter can be set according to actual conditions. For example, in this embodiment, the first parameter is set to G=20, N p =30, ω=1, c1=1.5, c2=1.2.

[0111] In this embodiment, the CNN-BiLSTM model is composed of a CNN neural network module and a BiLSTM neural network module stacked in sequence, and its structure is as follows: Figure 3 As shown in the figure, the CNN neural network module includes a CNN convolutional layer, a CNN pooling layer, and a neural network tiling layer, and the BiLSTM neural network module includes a BiLSTM neural network layer, a dropout layer, and a fully connected layer. The CNN-BiLSTM model can be used to obtain predicted values for power load.

[0112] S3: Perform real number discrete encoding on the CNN-BiLSTM model parameters to be optimized according to the first parameter, and randomly generate the initial particle swarm P g , and set the current number of iterations g = 0.

[0113] Specifically, the random generation includes N p The particle swarm P 0 , expressed as in and They represent the initial particle swarm P 0 The 1st, i-th and N-th P particles, 1≤i≤N p ; In addition, the particle swarm is marked as P when it is updated to the gth iteration g , Where g represents the number of optimization times of the model offline iteration, and They represent the particle swarm P at the g-th offline iteration. g The 1st, i-th and N-th P particles, when g=0, P g =P 0 represents the initial particle swarm that has not been iteratively updated, 0≤g≤G, G represents the maximum number of offline iterative updates; The specific code is It also represents the position of the particle during training optimization, where E i represents the number of training rounds, B i Indicates the batch size, L i represents the number of neurons in the BiLSTM layer, F i Indicates the number of convolutional layer filters, PL i represents the pooling layer size, D i Indicates the dropout layer discard rate, R i represents the learning rate, d represents the particle The dimension of ,1≤d≤7, and Respectively represent the particles at the g-th offline iteration The positions of the 1st, dth, and 7th dimensions.

[0114] Among them, in the particles In the specific encoding, E i The specific value of is shown in formula (3):

[0115] E i =Randint(E min ,E max ) (3)

[0116] Where Randint represents the random integer selection function; E min and E max Respectively represent E i The minimum and maximum values that can be obtained, E min ≤E i ≤E max . B i The specific value of is shown in formula (4):

[0117] B i=Randint(B min ,B max ) (4)

[0118] Where B min and B max Respectively represent B i The minimum and maximum values that can be obtained, B min ≤B i ≤B max . L i The specific value of is shown in formula (5):

[0119] L i =Randint(L min ,L max ) (5)

[0120] Where, L min and L max Respectively represent L i The minimum and maximum values that can be obtained, L min ≤L i ≤L max . F i The specific value of is shown in formula (6):

[0121] F i =Randint(F min ,F max ) (6)

[0122] Where, F min and F max Represents F i The minimum and maximum values that can be obtained, F min ≤F i ≤F max PL i The specific value of is shown in formula (7):

[0123] PL i =Randint(PL min ,PL max ) (7)

[0124] Where PL min and PL max Represents PL i The minimum and maximum values that can be obtained, PL min ≤PL i ≤PL max . D i The specific value of is shown in formula (8):

[0125] D i =Random(Dmin ,D max ) (8)

[0126] In the formula, Random represents the random decimal selection function; D min and D max Respectively represent D i The minimum and maximum values that can be obtained, D min ≤D i ≤D max . R i The specific value of is shown in formula (9):

[0127] R i =Random(R min ,R max ) (9)

[0128] Where R min and R max Respectively represent R i The minimum and maximum values that can be obtained, R min ≤R i ≤R max In the specific initialization process of the particle swarm, particles are randomly generated according to formulas (3) to (9). Initial position also, The initial velocity is marked as in and Represents the initial particles The initial velocities of the 1st, dth, and 7th dimensions, The specific generation process of is shown in formula (10):

[0129]

[0130] Where, Preset speed range v min,d and v max,d Randomly generated between min,d and v max,d Represents the initial particles Initial velocity The minimum and maximum values that the dth dimension can take, 1≤d≤7.

[0131] For example, in this embodiment, the range of position and initial velocity is set as follows: ① The range of position optimization: E min =50,E max =500;B min =10,B max =100;L min=10,L max =150;F min =8,F max =256;PL min =1,PL max =15;D min =0.2,D max =0.55; R min =0.001,R max =0.101. ② Initial velocity generation range: v min,1 =22.5,v max,1 =22.5;v min,2 =-4.5v max,2 =4.5;v min,3 =-7,v max,3 =7;v min,4 =-12.4,v max,4 =12.4;v min,5 =-0.7,v max,5 =0.7; v min,6 =-0.0175,v max,6 =0.0175;v min,1 =-0.005,v max,1 = 0.005; the total number of particles in the initial particle group is N p = 30, some of the representative particles in the initial particle group are The three representative particles mentioned above and their corresponding initial velocities are expressed as:

[0132] S4: Particle swarm P based on training data set g All particles in the dataset are trained offline, and the optimization targets of all particles are non-dominated sorted based on the test dataset. The excellent particles are merged with the particles in the external archive S, the optimization targets of the merged particles are non-dominated sorted, the congestion degree of their positions is calculated, the particles are evaluated and screened, and the external archive S and the global optimal position are updated. and the particle's historical optimal position The specific steps include the following:

[0133] S41: For training data set X train Particle Swarm The CNN-BiLSTM model represented by each particle in the test dataset X is trained offline. test The CNN-BiLSTM model is tested. According to the prediction mean square error f1 of the optimization target and the number of model parameters f2 described in formula (1) and formula (2), the particle swarm P is g Particles in Perform optimization objective function calculation to obtain particles The corresponding optimization target value.

[0134] S42: Comparing particles one by one The current f1 and f2 and f1 and f2, if f1 and f2 are not greater than f1 and f2, select The position is the particle's best historical position Otherwise, choose The position is the particle's best historical position if f1 is not greater than f1, f2 is not greater than f2, then randomly select a position as the particle's historical optimal position in, and They represent the historical optimal position of the particle at the g-1th offline iteration and the historical optimal position of the particle at the gth offline iteration respectively; when g = 0, That is, the initial position of the particle is the optimal position in the particle's history.

[0135] S43: Based on the optimization objectives f1 and f2, the particle swarm P g Perform non-dominated sorting on all particles in the system and check one by one whether all particles are completely dominated by other particles. That is, if there is a particle Smaller than the particle at both f1 and f2 This indicates that the particles Completely dominate particles Then delete the dominated particles If not completely dominated, keep the particle Mark all retained particles as the retained particle set U, where Represents the particle swarm P g Different from particles, i≠j.

[0136] S44: Merge the particle set U with the external archive S and mark it as the particle set Q. Perform non-dominated sorting on all particles in Q according to the optimization goals f1 and f2. Check one by one whether all particles are completely dominated by other particles. That is, if there is a particle q j Smaller than particle q on both f1 and f2 i , then the particle q j Completely dominate particle q i , then delete the dominated particle q i ; if it is not completely dominated, then keep particle qi , mark all retained particles as the new external archive S, that is, update the external archive S, where S represents the set of all particles saved in the external archive. When initialized (g = 0), the number of particles in S is 0. At this time, the particle set Q is equal to the particle set U; q i and q j Both represent particles in the particle set Q, and particle q j Different from particle q i , that is, i≠j.

[0137] S45: External archive S={s i} to calculate the congestion of all particles in , where s i represents the i-th particle in the external archive S, 0≤i≤|S|, |S| represents the total number of particles in the external archive S. The specific calculation steps are as follows:

[0138] S45.1: According to particle s i ={x0,…,x k ,…,x6} is the position of its grid encoding id i Calculate, where x0, x k , and x6 represent particle s i The specific calculation process of the positions of the 1st dimension, the kth dimension and the 7th dimension is shown in formula (11):

[0139]

[0140] Where k represents the particle p i Dimension, 0≤k≤6; id i represents particle p i Grid code of x k,min and x k,max Represents particles s i The minimum and maximum values of the kth dimension of the position; di represents the number of grid division levels.

[0141] S45.2: Complete the calculation of all particle grid codes in the external archive S and get the id S ={id i}, id i Represents the i-th particle grid code in the external archive S, id S Represents the set of all particle grid codes in S, 0≤i≤|S|; for id S Perform the same code number statistics to obtain particle s i The congestion degree C i , C i Represents the particle s i The number of particles with the same grid code, 1≤C i ≤|S|.

[0142] S46: Determine whether |S| is greater than the external archive threshold T. If |S|>T, then t=|S|-T. Calculate the probability h of the i-th particle being deleted in the external archive S according to formula (12) i :

[0143]

[0144] Where T represents the threshold of external archiving; h i Represents the probability of the i-th particle in the external archive S being deleted, 0≤i≤|S|. Randomly generate a random decimal r3 in the range [0,1]. When r3≤h1+h2+…+h i Delete h from external archive S when i The corresponding particle repeats this step t times until |S|=T, where h1, h2 and h i They represent the probabilities of deletion corresponding to the first, second and i-th particles in the external archive S respectively; the redundant particles in the external archive are deleted to complete the update of the external archive S.

[0145] S47: Based on congestion C i Calculate particle s i The probability of being selected as the global optimal particle e i , the calculation process is shown in formula (13):

[0146]

[0147] Where, e i represents the i-th particle s in the external archive S i The probability of being selected as the global optimal particle. Randomly generate a random number r4 in the range [0,1], when r4≤e1+e2+…+e i When selecting e i The corresponding particle p i The global optimal particle Among them, e1, e2, and e i are the probabilities of the first, second and i-th particles in the external archive S being selected as the global optimal, It represents the global optimal particle after the g-th offline iteration, and its corresponding position is the global optimal position When g = 0, is the initial global optimal position

[0148] For example, in this embodiment, the threshold value T of the external archive is 500, and the number of grid division levels di is 100.

[0149] It should be understood that the CNN-BiLSTM model in the present invention is composed of a CNN neural network module and a BiLSTM neural network module stacked in sequence. The specific model structure is as follows: Figure 3 As shown in Figure 1, the goal of the optimization process is to obtain a compromise solution of the objective functions f1 and f2. The objective functions of different particles are determined by the model parameters corresponding to their particle positions. The quality of the particles can be judged based on the performance of the objective functions, and the inferior solutions can be deleted. Among the excellent particles, the global optimal particles are selected according to formulas (11) and (13). If the external archive exceeds the threshold, the redundant particles are deleted according to formula (12).

[0150] S5: Based on the global optimal position and the particle's historical optimal position For particle swarm P g The particle in the middle updates its speed and position based on the adaptive weight update, records the number of iterations g=g+1, and repeats step S4. Specifically, it includes the following sub-steps:

[0151] S51: First, the inertia weight ω is dynamically adjusted according to the number of iterations g according to formula (14):

[0152] ω=1-e -(1-g / G) (14)

[0153] Where g is the current iteration number and G is the maximum iteration number. Then update the particle according to formula (15) and formula (16): The updated speed and position are marked as and

[0154]

[0155] Where, and Represent the updated particles The velocity and position of the d-th dimension; Indicates that the particle is Best in history d-th dimension position; Indicates the global optimal particle at the gth offline iteration The d-th dimension position; ω is the inertia weight; c1 and c2 are the individual learning factor and global learning factor of the particle respectively, and r1 and r2 are random numbers uniformly distributed between [0,1].

[0156] S52: After updating the particle position, the particle is adjusted according to formulas (3) to (9). Each dimension of the position encoding is constrained: if but If then where p i,d,max and p i,d,min represent the maximum and minimum values allowed for the position of the particle in the d-th dimension, respectively.

[0157] S53: Record the iteration number g = g + 1, repeat step S4; update the global optimal position the historical optimal position of the particle and the external archive S.

[0158] It should be understood that since the update speeds and positions of different dimensions of different particles are different, when updating the speed and position, it is necessary to update the speed and position according to the corresponding dimension of each particle; according to formula (15), it can be seen that the speed is updated according to the specific dimension of each particle; according to formula (16), it can be seen that the position is updated according to the specific dimension of each particle.

[0159] S6: Judge whether the iteration number g satisfies g < G. If so, repeat step S5; if not, take all the solutions in the external archive S as the Pareto optimal solution set.

[0160] Specifically, judge whether the iteration number g satisfies g < G. If so, then repeat step S5: update the particle swarm P g and perform non-dominated sorting evaluation, then perform non-dominated sorting and crowding degree calculation evaluation on the external archive S, and finally update the external archive S, the global optimal position and the historical optimal position of the particle Otherwise, take all the solutions in the external archive S as the Pareto optimal solution set.

[0161] It should be understood that when g = G, the offline iterative optimization ends, and the solutions in the external archive S are taken as the optimal solution set.

[0162] S7: Select a Pareto optimal solution that takes into account both the accuracy of power load prediction and the lightweight of the model in the Pareto optimal solution set, and use the CNN-BiLSTM model represented by it as the optimal model for power load prediction.

[0163] Specifically, select a compromise Pareto optimal solution that ensures high accuracy of load prediction and takes into account the lightweight of the model in the Pareto optimal solution set, that is, select a model with fewer model parameter numbers while ensuring high prediction accuracy of power load in the Pareto optimal solution set, and use the CNN-BiLSTM model represented by its position as the online deployment model for power system load prediction, and perform online power system load prediction for the real-time data set collected by the power system.

[0164] In this example, after 20 iterations, the Pareto front distribution of the four seasons in NSW is as follows: Figure 4 , the selected compromise solution has been marked in the figure, and the model prediction pair represented by the compromise solution is Figure 5 .from Figure 4 In the figure, we can clearly see the effectiveness of the multi-objective optimization method, forming a Pareto frontier diagram that takes into account both prediction accuracy and lightweight prediction model. Figure 5 This intuitively reflects the high prediction accuracy of the proposed method, and the true value and the predicted value almost coincide.

[0165] S8: Deploy the optimal CNN-BiLSTM model online in the power system, perform online load forecasting on the power system based on real-time datasets, and output the model's load forecasting performance indicators.

[0166] Furthermore, the load forecasting performance evaluation indicators include root mean square error (RMSE), mean absolute error (MAE) and mean absolute percentage error (MAPE), and their calculation formulas are:

[0167]

[0168] Where RMSE stands for root mean square error, MAE stands for mean absolute error, and MAPE stands for mean absolute percentage error. i Indicates the true value of the power load, It represents the predicted value of power load, and n represents the number of samples.

[0169] It should be noted that the optimal CNN-BiLSTM model is a model trained based on the optimal CNN-BILSTM model parameters represented by the compromise particles in the Pareto optimal solution set, and then online load forecasting is performed on the real-time data set provided by the power system based on this model.

[0170] For example, in this embodiment, the method of the present invention and the existing method are used to predict the performance index of the compromise model based on the experimental results of the NSW region in the above embodiment. Figure 6 and Figure 7 , the number of parameters of the compromise model neural network is compared Figure 8. Compared with the two existing technologies, including the particle swarm optimization-convolutional bidirectional long short-term memory neural network technology (Particle Swarm Optimization-Convolutional Bidirectional Long Short-Term Memory, PSO-CNN-BiLSTM) and the enhanced grey wolf optimization convolutional neural network technology (P Enhanced Grey Wolf Optimizer-Convolutional Neural Network, EGWO-CNN), the method of the present invention performs well in performance indicators such as RMSE, MAE and MAPE of power system load forecasting. For example, in the load forecast for January, the RMSE, MAE and MAPE values of the method of the present invention were 0.015, 0.012 and 3.913, respectively, which are better than 0.017, 0.014 and 4.247 of PSO-CNN-BiLSTM, and better than 0.129, 0.099 and 24.431 of EGWO-CNN. The PSO-CNN-BiLSTM model with similar prediction performance has significantly more parameters than the model of the method of the present invention. For example, in July, the number of parameters in the proposed method was 240,689, while the number of model parameters in the PSO-CNN-BiLSTM model was 12,023,675. Clearly, the number of model parameters obtained by the proposed method is far smaller than that of the existing PSO-CNN-BiLSTM technology. Therefore, while ensuring high-precision power system load forecasting, the proposed method also achieves a lightweight model, which is more conducive to the online deployment of power system load forecasting models, saves computing resources, and improves the operational efficiency of power system load forecasting models.

[0171] In summary, through the above technical solution, the present invention comprehensively considers the two key indicators of prediction accuracy and model lightweight of power system load forecasting, and designs an automatic optimization model technology based on a multi-objective convolutional bidirectional long short-term memory neural network (CNN-BiLSTM). This technology is a multi-objective optimization strategy that combines discrete coding of model parameters with particle swarm optimization. It not only improves the intelligence level and prediction efficiency of the power load forecasting system, but also significantly reduces the amount of model parameters and computing power resource consumption while ensuring high prediction accuracy, making the model more lightweight and convenient for online deployment and real-time prediction. In addition, the present invention expands the application of multi-objective automatic optimization technology in power systems, and provides a power load forecasting solution that takes into account both high accuracy and high efficiency. Through steps S1 to S8 and the specific parameter settings and adjustments in the optimization process, it ultimately achieves the best balance between prediction performance indicators (such as RMSE, MAE and MAPE) and model lightweighting.

[0172] It is worth mentioning that the present invention also provides a power load forecasting system based on a multi-objective CNN-BiLSTM automatic optimization model for implementing the power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model in the above embodiments. As Figure 9 shown, the system includes a data set construction module 10, a setting module 20, a particle swarm initialization module 30, a particle swarm particle evaluation module 40, a particle swarm update and evaluation module 50, an iteration judgment module 60, an optimal model selection module 70, and an online deployment and performance evaluation module 80.

[0173] In this embodiment, the data set construction module 10 is used to construct a training data set and a test data set based on the power system load historical database and the real-time database in the power system load database.

[0174] In this embodiment, the setting module 20 is used to set a plurality of first parameters and construct an optimization objective function for the multi-objective CNN-BiLSTM automatic optimization model.

[0175] In this embodiment, the particle swarm initialization module 30 is used to perform real number discrete coding on the parameters of the CNN-BiLSTM model to be optimized according to the first parameters, and randomly generate an initial particle swarm P g , and set the current iteration number g = 0

[0176] In this embodiment, the particle swarm particle evaluation module 40 is used to perform offline training on all particles in the particle swarm P g based on the training data set, perform non-dominated sorting on the optimization objectives of all particles based on the test data set, merge the excellent particles with the particles in the external archive S, perform non-dominated sorting on the optimization objectives of the merged particles, calculate the crowding degree of their positions, evaluate and screen the particles, and update the external archive S, the global optimal position and the particle historical optimal position

[0177] In this embodiment, the particle swarm update and evaluation module 50 is used to update the speed and position of the particles in the particle swarm P based on the global optimal position and the particle historical optimal position g by means of adaptive weight update, record the iteration number g = g + 1, and repeat the particle swarm particle evaluation module 40.

[0178] In this embodiment, the iteration judgment module 60 is used to judge whether the iteration number g satisfies g < G. If so, repeat the particle swarm update and evaluation module 50; if not, take all the solutions in the external archive S as the Pareto optimal solution set.

[0179] In this embodiment, the optimal model selection module 70 is used to select a Pareto optimal solution that takes into account both power load prediction accuracy and model lightweightness from the Pareto optimal solution set, and use the CNN-BiLSTM model represented by it as the optimal model for power load prediction.

[0180] In this embodiment, the online deployment and performance evaluation module 80 is used to deploy the optimal CNN-BiLSTM model online in the power system, and output the load prediction performance index of the model after performing online load prediction on the power system based on the real-time data set.

[0181] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0182] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A power load forecasting method based on a multi-objective CNN-BiLSTM automatic optimization model, characterized in that: It includes the following steps: S1: Construct a training data set and a test data set based on the power system load historical database and the real-time database in the power system load database; S2: Set multiple first parameters and construct an optimization objective function for the multi-objective CNN-BiLSTM automatic optimization model; S3: Perform real number discrete encoding on the CNN-BiLSTM model parameters to be optimized according to the first parameter, and randomly generate the initial particle swarm P g , and set the current number of iterations g = 0; S4: Particle swarm P based on training data set g All particles in the dataset are trained offline, and the optimization targets of all particles are non-dominated sorted based on the test dataset. The excellent particles are merged with the particles in the external archive S, the optimization targets of the merged particles are non-dominated sorted, the congestion degree of their positions is calculated, the particles are evaluated and screened, and the external archive S and the global optimal position are updated. and the particle's historical optimal position S5: Based on the global optimal position and the particle's historical optimal position For particle swarm P g The particle in the middle updates its speed and position based on the adaptive weight update, records the number of iterations g=g+1, and repeats step S4; S6: Judge whether the iteration number g satisfies g < G. If so, repeat step S5; if not, take all the solutions in the external archive S as the Pareto optimal solution set; S7: Select a Pareto optimal solution that takes into account both the power load prediction accuracy and the model lightweighting in the Pareto optimal solution set, and use the CNN-BiLSTM model represented by it as the optimal power load prediction model; S8: Online deploy the optimal CNN-BiLSTM model in the power system, and output the load prediction performance index of the model after performing online load prediction on the power system based on the real-time data set.

2. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 1 is characterized in that: The specific steps of step S1 include: For the power system load historical database in the power system load database, extract and analyze the historical data of the power system load to obtain a data set, and divide this data set into a training data set and a test data set; For the real-time database in the power system load database, extract and analyze the real-time data of the power system load to obtain a real-time data set; Let the training dataset be X train , the test data set is recorded as X test , respectively X train and X test Constructed as a data matrix; X train Each element in the matrix is represented by a m,h , where m represents the training dataset X train The mth sample of train The mth row of the matrix, 1≤m≤M, M represents the training data set X train The total number of samples in; h represents the hth feature of the sample, which is X train The hth column of the matrix, 1≤h≤H, H represents the total number of features of the sample; a m,h represents the specific value of the hth feature of the mth sample in the training data set; X test Each element in the matrix is represented by a w,h , where w represents the test data set X test The w-th sample of test The w-th row of the matrix, 1≤w≤W, W represents the test data set X test The total number of samples in a w,h Indicates the specific value of the hth feature of the wth sample in the test dataset.

3. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 1 is characterized in that: The first parameters include the maximum number of offline iterations G, the particle swarm size N p , inertia weight ω, particle learning factor c1 and global learning factor c2; The optimization objective function of the multi-objective CNN-BiLSTM automatic optimization model includes the prediction mean square error f1 of the model and the number of parameters f2 of the model; among them, the calculation formula of the prediction mean square error f1 is shown in formula (1); Where y i Indicates the true value of the power load, represents the predicted value of power load, n represents the number of samples; the number of model parameters f2 is the sum of all trainable parameters in the CNN-BiLSTM model, and its calculation formula is shown in formula (2): f2=P CNN +P Dense +P BiLSTM (2) Where, P CNN 、P Dense and P BiLSTM They represent the number of trainable parameters of the convolutional neural network layer, the fully connected network layer, and the bidirectional long short-term memory network layer, respectively.

4. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 1 is characterized in that: The specific steps of step S3 include: Randomly generate N p The particle swarm P 0 , expressed as in and They represent the initial particle swarm P 0 The 1st, i-th and N-th P particles, 1≤i≤N p ; In addition, the particle swarm is marked as P when it is updated to the gth iteration g , Where g represents the number of optimization times of the model offline iteration, and They represent the particle swarm P at the g-th offline iteration. g The 1st, i-th and N-th P particles, when g=0, P g =P 0 represents the initial particle swarm that has not been iteratively updated, 0≤g≤G, G represents the maximum number of offline iterative updates; The specific code is It also represents the position of the particle during training optimization, where E i represents the number of training rounds, B i Indicates the batch size, L i represents the number of neurons in the BiLSTM layer, F i Indicates the number of convolutional layer filters, PL i represents the pooling layer size, D i Indicates the dropout layer discard rate, R i represents the learning rate, d represents the particle The dimension of ,1≤d≤7, and Respectively represent the particles at the g-th offline iteration The positions of the 1st, dth, and 7th dimensions; Among them, in the particles In the specific encoding, E i The specific value of is shown in formula (3): IN i =Randint(E min ,IN max )(3) Where Randint represents the random integer selection function; E min and E max Respectively represent E i The minimum and maximum values that can be obtained, E min ≤E i ≤E max ; B i The specific value of is shown in formula (4): B i =Randint(B min ,B max )(4) Where B min and B max Respectively represent B i The minimum and maximum values that can be obtained, B min ≤B i ≤B max ;L i The specific value of is shown in formula (5): L i =Randint(L min ,L max )(5) Where, L min and L max Respectively represent L i The minimum and maximum values that can be obtained, L min ≤L i ≤L max ; F i The specific value of is shown in formula (6): F i =Randint(F min ,F max )(6) Where, F min and F max Respectively represent F i The minimum and maximum values that can be obtained, F min ≤F i ≤F max PL i The specific value of is shown in formula (7): PL i =Randin(PL min ,PL max )(7) Where PL min and PL max Represents PL i The minimum and maximum values that can be obtained, PL min ≤PL i ≤PL max ;D i The specific value of is shown in formula (8): D i =Random(D min ,D max )(8) In the formula, Random represents the random decimal selection function; D min and D max Respectively represent D i The minimum and maximum values that can be obtained, D min ≤D i ≤D max ; R i The specific value of is shown in formula (9): R i =Random(R min ,R max )(9) Where R min and R max Respectively represent R i The minimum and maximum values that can be obtained, R min ≤R i ≤R max ; In the specific initialization process of the particle swarm, particles are randomly generated according to formulas (3) to (9) Initial position also, The initial velocity is marked as in and Represents the initial particles The initial velocities of the 1st, dth, and 7th dimensions, The specific generation process of is shown in formula (10): Where, Preset speed range v min,d and v max,d Randomly generated between min,d and v max,d Represents the initial particles Initial velocity The minimum and maximum values that the dth dimension can take, 5. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 1 is characterized in that: The specific steps of step S4 include the following sub-steps: S41: For training data set X train Particle Swarm The CNN-BiLSTM model represented by each particle in the test dataset X is trained offline. test The CNN-BiLSTM model is tested. According to the prediction mean square error f1 of the optimization target and the number of model parameters f2 described in formula (1) and formula (2), the particle swarm P is g Particles in Perform optimization objective function calculation to obtain particles The corresponding optimization target value; S42: Comparing particles one by one The current f1 and f2 and f1 and f2, if Neither f1 nor f2 is greater than f1 and f2, select The position is the particle's best historical position Otherwise, choose The position is the particle's best historical position if f1 is not greater than f1, f2 is not greater than f2, then randomly select a position as the particle's historical optimal position in, and They represent the historical optimal position of the particle at the g-1th offline iteration and the historical optimal position of the particle at the gth offline iteration respectively; when g = 0, That is, the initial position of the particle is the optimal position in the particle's history; S43: Based on the optimization objectives f1 and f2, the particle swarm P g Perform non-dominated sorting on all particles in the , and check one by one whether all particles are completely dominated by other particles, that is, if there is a particle Smaller than the particle at both f1 and f2 This indicates that the particles Completely dominate particles Then delete the dominated particles If not completely dominated, keep the particle Mark all retained particles as the retained particle set U, where Represents the particle swarm P g Different from Particles, i≠j; S44: Merge the particle set U with the external archive S and mark it as the particle set Q. Perform non-dominated sorting on all particles in Q according to the optimization goals f1 and f2. Check one by one whether all particles are completely dominated by other particles. That is, if there is a particle q j Smaller than particle q on both f1 and f2 i , then the particle q j Completely dominate particle q i , then delete the dominated particle q i ; if it is not completely dominated, then keep particle q i , mark all retained particles as the new external archive S, that is, update the external archive S, where S represents the set of all particles saved in the external archive. When initialized (g = 0), the number of particles in S is 0. At this time, the particle set Q is equal to the particle set U; q i and q j Both represent particles in the particle set Q, and particle q j Different from particle q i , i≠j; S45: External archive S={s i } to calculate the congestion of all particles in , where s i represents the i-th particle in the external archive S, 0≤i≤|S|, |S| represents the total number of particles in the external archive S; S46: Determine whether |S| is greater than the external archive threshold T. If |S|>T, then t=|S|-T. Calculate the probability h of the i-th particle being deleted in the external archive S according to formula (12) i : Where T represents the threshold of external archiving; h i represents the probability of the i-th particle in the external archive S being deleted, 0≤i≤|S|; a random decimal r3 is randomly generated in the range [0,1], when r3≤h1+h2+…+h i Delete h from external archive S when i The corresponding particle repeats this step t times until |S|=T, where h1, h2 and h i They represent the probability of being deleted for the first, second, and i-th particles in the external archive S respectively; the redundant particles in the external archive are deleted to complete the update of the external archive S; S47: Based on congestion C i Calculate particle s i The probability of being selected as the global optimal particle e i , the calculation process is shown in formula (13): Where, e i represents the i-th particle s in the external archive S i The probability of being selected as the global optimal particle; randomly generate a random number r4 in the range [0,1], when r4≤e1+e2+…+e i When selecting e i The corresponding particle p i The global optimal particle Among them, e1, e2, and e i are the probabilities of the first, second and i-th particles in the external archive S being selected as the global optimal, It represents the global optimal particle after the g-th offline iteration, and its corresponding position is the global optimal position When g = 0, is the initial global optimal position 6. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 5 is characterized in that: The specific steps of step S45 include the following sub-steps: S45.1: According to particle s i ={x0,…,x k ,…,x6} is the position of its grid encoding id i Calculate, where x0, x k , and x6 represent particle s i The specific calculation process of the positions of the 1st dimension, the kth dimension and the 7th dimension is shown in formula (11): Where k represents the particle p i Dimension, 0≤k≤6; id i Represents particle p i Grid code of x k,min and x k,max Represents particles s i The minimum and maximum values of the kth dimension of the position; di represents the number of grid division levels; S45.2: Complete the calculation of all particle grid codes in the external archive S and get the id S ={id i }, id i Represents the i-th particle grid code in the external archive S, id S Represents the set of all particle grid codes in S, 0≤i≤|S|; for id S Perform the same code number statistics to obtain particle s i The congestion degree C i , C i Represents the particle s i The number of particles with the same grid code, 1≤C i ≤|S|.

7. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 1 is characterized in that: The specific steps of step S5 include the following sub-steps: S51: First, dynamically adjust the inertia weight ω according to the iteration number g according to formula (14): ω=1-e -(1-g / G) (14) Where g is the current iteration number and G is the maximum iteration number. Then update the particle according to formula (15) and formula (16): The updated speed and position are marked as and Where, and Represent the updated particles The velocity and position of the d-th dimension; Indicates that the particle is Best in history d-th dimension position; Indicates the global optimal particle at the gth offline iteration The d-th dimension position; ω is the inertia weight; c1 and c2 are the particle individual learning factor and the global learning factor, respectively; r1 and r2 are random numbers uniformly distributed between [0,1]; S52: After updating the particle position, the particle is adjusted according to formulas (3) to (9). Each dimension of the position encoding is constrained: if but like but Among them, p i,d,max and p i,d,min Represent particles The maximum and minimum values allowed at the d-th dimension position; S53: Record the number of iterations g=g+1, repeat step S4; update the global optimal position Particle's historical optimal position and external archive S.

8. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 1 is characterized in that: The specific steps of step S6 include: Judge whether the iteration number g satisfies g < G. If so, repeat step S5: Update the particle swarm P g And perform non-dominated sorting evaluation, then perform non-dominated sorting and crowding distance calculation evaluation on the external archive S, and finally update the external archive S and the global optimal position And the historical optimal positions of the particles Otherwise, take all the solutions in the external archive S as the Pareto optimal solution set.

9. The power load forecasting method based on the multi-objective CNN-BiLSTM automatic optimization model according to claim 1 is characterized in that: The load prediction performance evaluation indexes include the root mean square error, the mean absolute error, and the mean absolute percentage error, and their calculation formulas are respectively: Where RMSE stands for root mean square error, MAE stands for mean absolute error, and MAPE stands for mean absolute percentage error. i Indicates the true value of the power load, It represents the predicted value of power load, and n represents the number of samples.

10. A power load forecasting system based on a multi-objective CNN-BiLSTM automatic optimization model, for implementing the power load forecasting method based on a multi-objective CNN-BiLSTM automatic optimization model according to any one of claims 1 to 9, characterized in that: The system includes: A data set construction module for constructing a training data set and a test data set based on the power system load historical database and the real-time database in the power system load database; A setting module for setting multiple first parameters and constructing an optimization objective function for the multi-objective CNN-BiLSTM automatic optimization model; The particle swarm initialization module is used to perform real number discrete encoding on the CNN-BiLSTM model parameters to be optimized according to the first parameter and randomly generate the initial particle swarm P g , and set the current number of iterations g = 0; The particle swarm particle evaluation module is used to evaluate the particle swarm P based on the training data set. g All particles in the dataset are trained offline, and the optimization targets of all particles are non-dominated sorted based on the test dataset. The excellent particles are merged with the particles in the external archive S, the optimization targets of the merged particles are non-dominated sorted, the congestion degree of their positions is calculated, the particles are evaluated and screened, and the external archive S and the global optimal position are updated. and the particle's historical optimal position Particle swarm update and evaluation module for global optimal position and the particle's historical optimal position For particle swarm P g The particles in the particle swarm perform speed and position updates based on adaptive weight updates, record the number of iterations g = g + 1, and repeat the particle swarm particle evaluation module; An iteration judgment module for judging whether the iteration number g satisfies g < G. If so, repeat the particle swarm update and evaluation module; If not, take all the solutions in the external archive S as the Pareto optimal solution set; An optimal model selection module for selecting a Pareto optimal solution that takes into account both the power load prediction accuracy and the model lightweighting in the Pareto optimal solution set, and using the CNN-BiLSTM model represented by it as the optimal power load prediction model; An online deployment and performance evaluation module for online deploying the optimal CNN-BiLSTM model in the power system, and outputting the load prediction performance index of the model after performing online load prediction on the power system based on the real-time data set.