Multi-feature charging load prediction method and system

By preprocessing and optimizing parameters on historical load data, LSTM model is constructed to predict charging load, which solves the problems of low prediction accuracy and poor model stability in the existing technology, and achieves higher prediction accuracy and stability.

CN119624165APending Publication Date: 2025-03-14NARI NANJING CONTROL SYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411532939.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing charging load prediction methods have problems such as short-term memory, gradient explosion, excessive model parameters, and excessive training parameters, resulting in limited prediction accuracy and poor model stability.

Method used

By obtaining the historical load sample data set for preprocessing, using the first optimization algorithm and the second optimization algorithm to optimize the training parameters, an LSTM prediction model is constructed, load prediction is performed, and model performance is optimized through data analysis.

Benefits of technology

It reduces the training time, improves the accuracy and stability of charging load prediction, reduces prediction errors, and provides more accurate load prediction support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119624165A_ABST
    Figure CN119624165A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-feature charging load prediction method and system, and the method comprises the steps: obtaining a historical load sample data set, and carrying out the preprocessing of the historical load sample data set, and obtaining a complete data set; optimizing the complete data set by using a first optimization algorithm and a second optimization algorithm to obtain training parameters; and constructing a prediction model by using the training parameters, predicting the load according to the prediction model to obtain a prediction result, and performing data analysis on the prediction result, thereby improving the prediction accuracy and stability, and providing technical support for accurate prediction of the charging load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of new energy technologies, and in particular to a multi-feature charging load prediction method and system. Background Art

[0002] With the continuous promotion of electric vehicles and the construction and gradual popularization of charging facilities, charging load forecasting, as a basic support work, is of vital importance to the planning, operation, control and dispatching of future new power systems. As the load of the power system, electric vehicles are random, intermittent and uncertain. The simultaneous access of large-scale electric vehicles to the power grid may affect the stability of the distribution network. Therefore, it is particularly important to analyze and predict the impact of electric vehicle access on the power grid. Charging load forecasting is the basis for the development trend of electric vehicle electricity consumption in the next few years. Understanding the type of electric vehicles and user habits is crucial to determining the load of electric vehicles. The charging load of electric vehicles is linearly related to the base number of electric vehicles. The larger the base number, the higher the required power consumption. The charging load of electric vehicles is affected by many factors, including the type of electric vehicles, energy supply mode, the number of electric vehicles, battery characteristics and electric vehicle charging mode. These factors jointly determine the charging demand of electric vehicles and the load characteristics of the power grid.

[0003] At present, charging load forecasting mainly adopts statistical methods based on statistics, deep learning and artificial intelligence methods. All of the above methods have certain shortcomings. Traditional statistical methods, such as multivariate linear regression and time series analysis, usually assume that there is a linear relationship between data and have low sensitivity to outliers and nonlinear patterns. These methods have limited prediction accuracy when dealing with data with complex nonlinear relationships and high volatility; artificial intelligence-based methods, such as support vector machines (SVM) and extreme learning machines (ELM), may require adjustment of a large number of model parameters, which may lead to model overfitting and are very sensitive to parameter selection. In addition, these models may not be able to effectively handle large-scale data sets because they usually need to explicitly process feature spaces. Therefore, a multi-feature charging load forecasting method and system are proposed to solve the shortcomings. Summary of the invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a multi-feature charging load prediction method and system to solve the problems of short-term memory, gradient explosion, too many model parameters, and too many training parameters in traditional technical methods.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a multi-feature charging load prediction method, comprising:

[0008] Acquire a historical load sample data set, and preprocess the historical load sample data set to obtain a complete data set;

[0009] Optimizing the complete data set using a first optimization algorithm and a second optimization algorithm to obtain training parameters;

[0010] The training parameters are used to construct a prediction model, the load is predicted according to the prediction model, a prediction result is obtained, and data analysis is performed on the prediction result.

[0011] As a preferred solution of the multi-feature charging load prediction method of the present invention, wherein: optimizing the complete data set using the first optimization algorithm and the second optimization algorithm includes:

[0012] Creating a neural network model, and optimizing parameters using a first optimization algorithm;

[0013] Wrap the neural network model in a classifier according to the defined parameter range;

[0014] Define the first optimization algorithm model, set the parameter search, the number of random searches and the number of cross-validation folds;

[0015] The optimization method of the first optimization algorithm model is called to perform optimization, calculate different parameter combinations and scores, and select parameter combinations according to the set scoring criteria.

[0016] As a preferred solution of the multi-feature charging load prediction method of the present invention, wherein: a parameter range near the parameter combination is determined, and the parameters near the parameter combination are optimized twice using a second optimization algorithm;

[0017] Use a cross-validator to make each fold continuous in time;

[0018] Encapsulating the neural network model in a classifier and making it compatible with a second optimization algorithm;

[0019] Define the second optimization algorithm model, use the encapsulated classifier as the estimator, pass in the parameter grid, cross-validation strategy and other search parameters;

[0020] The optimization method of the second optimization algorithm model is called to perform cross-validation. The second optimization algorithm model traverses all specified parameter combinations, trains and verifies each set of parameters, and records the score of each combination.

[0021] The second optimization algorithm obtains the best parameter combination for training according to the scoring criteria.

[0022] As a preferred solution of the multi-feature charging load prediction method of the present invention, the prediction model is constructed by using training parameters, including:

[0023] The training parameters are input into the prediction model and the loop iteration is started. Each output is used as the input for the next loop. The training process needs to be carried out within the set time step.

[0024] As a preferred solution of the multi-feature charging load prediction method of the present invention, it also includes:

[0025] The input of each time step passes through the forget gate, input gate, and output gate;

[0026] In the forget gate, the input of the current time step is combined with the hidden state of the previous moment to obtain a new vector, the new vector is multiplied by the weight matrix of the forget gate, and the bias term is added to obtain the calculation result, and the first activation function is applied to the calculation result to obtain the output of the forget gate;

[0027] In the input gate, the output of the input gate is calculated using the first activation function;

[0028] Combine the input of the current time step with the hidden state of the previous moment to obtain a new vector, multiply the new vector by the weight of the candidate memory unit, add the bias term, and obtain the calculation result. Apply the second activation function to the calculation result to obtain the output of the candidate memory unit.

[0029] In the output gate, based on the updated cell state, the hidden state of the current time step is calculated and output.

[0030] As a preferred solution of the multi-feature charging load prediction method of the present invention, the load prediction includes:

[0031] The mean absolute percentage error and root mean square error were used as evaluation indicators;

[0032] The mean absolute percentage error is the average square root of the difference between the predicted value and the actual value;

[0033] The root mean square error is the average of the sum of squares of the differences between the predicted values ​​and the actual values.

[0034] As a preferred solution of the multi-feature charging load prediction method of the present invention, the preprocessing of the historical load sample data set includes:

[0035] When the proportion of outliers and missing values ​​in the historical load sample data set is less than the first threshold, they are directly deleted;

[0036] When the proportion of outliers and missing values ​​in the historical load sample data set is greater than a first threshold, a classification algorithm is used to process the outliers and missing values ​​in the historical load sample data set;

[0037] The historical load sample data set is encoded and normalized.

[0038] In a second aspect, the present invention provides a multi-feature charging load prediction system, comprising:

[0039] A preprocessing module, used to obtain a historical load sample data set, and preprocess the historical load sample data set to obtain a complete data set;

[0040] A data optimization module, used to optimize the complete data set using a first optimization algorithm and a second optimization algorithm to obtain training parameters;

[0041] The prediction module is used to construct a prediction model using the training parameters, predict the load according to the prediction model, obtain a prediction result, and perform data analysis on the prediction result.

[0042] In a third aspect, the present invention provides a computing device, comprising:

[0043] Memory and processor;

[0044] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the multi-feature charging load prediction method are implemented.

[0045] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the multi-feature charging load prediction method.

[0046] Compared with the prior art, the present invention has the following beneficial effects: the present invention reduces the training time by preprocessing data, adjusting parameters using algorithms, and optimizing training parameters. It uses the LSTM prediction model to more accurately extract the implicit features of historical load data, reduces the prediction error of the charging load, improves the prediction accuracy and stability, and provides technical support for the accurate prediction of the charging load. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0048] Figure 1 A schematic diagram of the overall process logic of a multi-feature charging load prediction method according to an embodiment of the present invention;

[0049] Figure 2 This is a curve chart comparing simulation results of partial predicted values ​​and measured values ​​of a test set of a multi-feature charging load prediction method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0051] Example 1

[0052] Reference Figure 1 , is an embodiment of the present invention, and provides a multi-feature charging load prediction method, comprising:

[0053] S100: Acquire a historical load sample data set, pre-process the historical load sample data set, and obtain a complete data set;

[0054] S200: optimizing the complete data set using a first optimization algorithm and a second optimization algorithm to obtain training parameters;

[0055] S300: constructing a prediction model using the training parameters, predicting the load according to the prediction model, obtaining a prediction result, and performing data analysis on the prediction result;

[0056] It should be noted that the accuracy of charging load prediction can be improved by using the LSTM network, and the optimal training parameters can be found by combining the grid parameter tuning and random parameter tuning algorithms, thereby improving the generalization ability of the model and reducing the risk of overfitting.

[0057] In the embodiment of the present application, the above step S100 includes the following sub-steps A1-A3;

[0058] In A1: when the proportion of outliers and missing values ​​in the historical load sample data set is less than the first threshold, they are directly deleted;

[0059] In A2: when the proportion of outliers and missing values ​​in the historical load sample data set is greater than a first threshold, a classification algorithm is used to process the outliers and missing values ​​in the historical load sample data set;

[0060] In A3: the historical load sample data set is encoded and normalized.

[0061] In a preferred embodiment, the first threshold is set according to actual conditions, and can generally be set to 5%;

[0062] Specifically, preprocessing includes data cleaning, data conversion, data description, feature selection, feature extraction or dimensionality reduction. Data cleaning includes outlier processing and filling missing values;

[0063] When the proportion of outliers and missing values ​​is small, that is, less than 5%, they are directly deleted; when the proportion of outliers and missing values ​​is large, that is, greater than 5%, the classification algorithm is used to process the outliers and missing values ​​in the historical load sample data set;

[0064] Data conversion is to encode the temperature, weather, electricity price and date types in the historical load data with integers and normalize the data.

[0065] In a preferred embodiment, the classification algorithm may be based on a K-nearest neighbor algorithm;

[0066] In another optional implementation, the classification algorithm may also be a decision tree, a random forest, and a support vector machine;

[0067] It should be noted that by identifying and processing outliers, the noise in the data can be reduced, and these outliers can be prevented from having adverse effects on model training and prediction results; filling missing values ​​can maintain the integrity of the data, prevent information loss due to too many missing values, and improve the accuracy and robustness of the model. Filling missing values ​​with the KNN algorithm can maintain the integrity of the data set, avoid information loss due to missing values, and thus improve the quality of model training and the accuracy of prediction.

[0068] In the embodiment of the present application, the above step S200 optimizes the complete data set using the first optimization algorithm and the second optimization algorithm, including the following sub-steps B1-B4:

[0069] In B1: creating a neural network model, and optimizing parameters using the first optimization algorithm;

[0070] In B2: Wrap the neural network model in a classifier according to the defined parameter range;

[0071] In B3: define the first optimization algorithm model, set the parameter search, the number of random searches and the number of cross-validation folds;

[0072] In B4: the optimization method of the first optimization algorithm model is called to perform optimization, different parameter combinations and scores are calculated, and a parameter combination is selected according to a set scoring standard;

[0073] In a preferred embodiment, the first optimization algorithm may be a RandomizedSearchCV algorithm;

[0074] In another optional implementation, the first optimization algorithm may also be a Bayesian optimization algorithm, a gradient-based optimization algorithm, and Optuna;

[0075] Specifically, the RandomizedSearchCV algorithm is used to optimize the parameters in a wide range for the complete data set. Based on the defined parameter range, the created LSTM model is packaged in the KerasClassifier. The definition of the RandomizedSearchCV model includes setting the parameter search, defining the number of random searches and the number of cross-validation folds, calling the model fit method for optimization, and calculating different parameter combinations and scores.

[0076] In the embodiment of the present application, after completing steps B1-B4, the above step S200 may further include the following sub-steps B5-B10;

[0077] In B5: determining a parameter range near the parameter combination, and performing secondary optimization on the parameters near the parameter combination using a second optimization algorithm;

[0078] In B6: Use a cross-validator to make each fold continuous in time;

[0079] In B7: encapsulating the neural network model in the classifier and making it compatible with the second optimization algorithm;

[0080] In B8: define the second optimization algorithm model, use the encapsulated classifier as the estimator, pass in the parameter grid, cross-validation strategy and other search parameters;

[0081] In B9: the optimization method of the second optimization algorithm model is called to perform cross validation, the second optimization algorithm model traverses all specified parameter combinations, trains and validates each set of parameters, and records the score of each combination;

[0082] In B10: the second optimization algorithm obtains the best parameter combination for training according to the scoring criteria;

[0083] In a preferred embodiment, the second optimization algorithm may be a GridSearchCV algorithm;

[0084] In another optional implementation, the second optimization algorithm may also be an evolutionary algorithm, a particle swarm optimization algorithm, and a SMBO algorithm;

[0085] Specifically, given the risk of missing the local minimum value in the RandomizedSearchCV algorithm, parameters in the vicinity of the parameters are selected and the GridSearchCV algorithm is used to perform the final optimization of the parameters. The cross-validation method is defined, and the cross-validator TimeSeriesSplit is used for cross-validation. The KerasRegressor packager is defined to call the LSTM model. The GridSearchCV model is defined to call cross-validation. Cross-validation is performed to output the best parameters and scores, and to obtain the best training parameters.

[0086] It should be noted that random parameter tuning is to randomly select a subset of possible combination parameters for training, which is suitable for large parameter space and low computational complexity. Grid parameter tuning is to train the model separately for all parameter combinations within a given parameter range, which has a large amount of calculation and is suitable for small parameter space scenarios. By first using random parameter tuning to quickly locate the parameter space, and then fine-tuning through grid parameter tuning, it is ensured that the optimal parameters are found quickly.

[0087] In the embodiment of the present application, the above step S300 includes the following steps C1

[0088] In C1: the training parameters are input into the prediction model and the loop iteration is started. Each output is used as the input for the next loop. The training process needs to be carried out within the set time step.

[0089] In the embodiment of the present application, after completing step C1, the above step S300 may further include the following sub-steps C2-C6:

[0090] In C2: the input of each time step passes through the forget gate, input gate and output gate;

[0091] In C3: In the forget gate, the input of the current time step is combined with the hidden state of the previous moment to obtain a new vector, the new vector is multiplied by the weight matrix of the forget gate, and the bias term is added to obtain the calculation result, and the first activation function is applied to the calculation result to obtain the output of the forget gate;

[0092] In C4: In the input gate, the output of the input gate is calculated using the first activation function;

[0093] In C5: the input of the current time step is combined with the hidden state of the previous moment to obtain a new vector, the new vector is multiplied by the weight of the candidate memory unit, and the bias term is added to obtain the calculation result, and the second activation function is applied to the calculation result to obtain the output of the candidate memory unit;

[0094] In C6: In the output gate, based on the updated cell state, the hidden state of the current time step is calculated and output.

[0095] In a preferred embodiment, the first activation function may be a sigmoid activation function;

[0096] The second activation function may be a tanh activation function;

[0097] In another optional implementation, the first activation function may also be a ReLU function, a PReLU function, or a Swish function;

[0098] The second activation function may also be a SELU function, a Mish function, or a Softplus function.

[0099] Specifically, the model is constructed based on the TensorFlow deep learning framework provided by the Python platform;

[0100] In LSTM, the input of each time step passes through three main "gate" structures: forget gate, input gate and output gate. These gate structures use specific calculation formulas and control mechanisms to determine which information should be retained and which should be forgotten.

[0101] The forget gate controls whether to forget the hidden cell state of the previous layer and determines which information needs to be retained with a certain probability;

[0102] The input gate is responsible for processing the input of the current sequence position and updating the cell state. It consists of two parts:

[0103] One part uses the sigmoid activation function to calculate the value of the input gate;

[0104] The other part uses the tanh activation function to calculate the value of the candidate memory unit;

[0105] The output gate calculates and outputs the hidden state of the current time step based on the updated cell state.

[0106] LSTM maps the input sequence of x values ​​to the corresponding sequential output y. The learning training process needs to be performed at each time step from t = 1 to t = τ. For time step t, the RNN parameters of the first layer update their shared state through the following equation:

[0107] Forget gate output:

[0108] f t =σ(W f ·[h t-1 , X t ]+b f )

[0109] Input gate output:

[0110] i t =σ(W i·[h t-1 , X t ]+b i )

[0111] Candidate memory cells:

[0112]

[0113] Output gate output:

[0114] o t =σ(W o ·[h t-1 , X t ]+b o )

[0115] The final cell state and hidden state are:

[0116]

[0117] h t =o t *tanh(C t )

[0118] Among them, σ is the activation function, generally using the sigmoid function, X t is the input of step t, f t is the output of the forget gate, i t is the input gate output, is the candidate cell state, o t is the prediction result of the corresponding output, h t-1 is the hidden state at the previous moment, W f is the weight of the forget gate, b f is the bias term, W i is the weight of the input gate, b i is the bias term, W C is the weight of the candidate memory unit, b C is the bias term, W o is the weight of the output gate, b o is the bias term, C t Outputs a value between 0 and 1 for the current cell state information, where 0 means discarding the previous cell state C t-1 Information, 1 means retaining the previous cell state C t-1 information.

[0119] In the embodiment of the present application, after completing steps C2-C6, the above step S300 may further include the following sub-steps C7-C9:

[0120] In C7: mean absolute percentage error and root mean square error are used as evaluation indicators;

[0121] In C8: The mean absolute percentage error is the average square root of the difference between the predicted value and the actual value;

[0122] In C9: The root mean square error is the average of the sum of squares of the differences between the predicted values ​​and the actual values.

[0123] In a preferred embodiment, the evaluation index may be mean absolute percentage error and root mean square error;

[0124] In another optional embodiment, the evaluation index may also be mean absolute error, mean error and mean absolute error;

[0125] Specifically, in order to quantitatively analyze the accuracy of the prediction model, the mean absolute percentage error and root mean square error are used as evaluation indicators, expressed as:

[0126]

[0127] Among them, RMSE is the mean absolute percentage error, MAPE is the root mean square error, is the predicted value, y i is the true value.

[0128] The smaller the mean absolute percentage error and root mean square error values, the higher the prediction accuracy.

[0129] It should be noted that by using the long short-term memory (LSTM) network, the long-term dependencies and short-term patterns in the historical load data can be effectively captured, thereby improving the accuracy of charging load prediction. By combining the GridSearchCV algorithm and the RandomizedSearchCV algorithm, the optimal training parameters can be found, which helps to improve the generalization ability of the model and reduce the risk of overfitting. Optimized training parameters and effective parameter tuning strategies can reduce the training time of the model and improve training efficiency. The structural design and parameter optimization of the LSTM model help to improve the stability of the model under different conditions, making the prediction results more reliable.

[0130] The above is a schematic scheme of a multi-feature charging load prediction method of this embodiment. It should be noted that the technical scheme of the multi-feature charging load prediction system and the technical scheme of the multi-feature charging load prediction method described above belong to the same concept. For details not described in detail in the technical scheme of the multi-feature charging load prediction system in this embodiment, please refer to the description of the technical scheme of the multi-feature charging load prediction method described above.

[0131] The multi-feature charging load prediction system in this embodiment includes:

[0132] A preprocessing module, used to obtain a historical load sample data set, and preprocess the historical load sample data set to obtain a complete data set;

[0133] A data optimization module, used to optimize the complete data set using a first optimization algorithm and a second optimization algorithm to obtain training parameters;

[0134] The prediction module is used to construct a prediction model using the training parameters, predict the load according to the prediction model, obtain a prediction result, and perform data analysis on the prediction result.

[0135] This embodiment further provides a computing device, which is applicable to the case of multi-feature charging load prediction, including:

[0136] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the multi-feature charging load prediction method proposed in the above embodiment.

[0137] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the multi-feature charging load prediction method proposed in the above embodiment is implemented.

[0138] The storage medium proposed in this embodiment and the method for implementing multi-feature charging load prediction proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0139] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.

[0140] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0141] Example 2

[0142] Refer to Table 1-Table 3 and Figure 2 Based on the previous embodiment, this embodiment provides an application case of a multi-feature charging load prediction method to illustrate the feasibility and beneficial effects of our solution.

[0143] The data of a prefecture-level city from 2022-09-01 to 2023-06-01 is taken as the historical data set, and the charging load is collected every five minutes. In view of the large amount of data, the data is divided into training set, verification set and test set with a division ratio of 7:2:1. The model is trained on the training data set, evaluated on the verification data, and tested on the test set based on the evaluation parameters.

[0144] Select training parameters for modeling. The training parameters include the number of output layer nodes, memory units, number of hidden layers, and dropout parameters. Given that the training parameters have a significant impact on the model, it is necessary to determine the structure of the hidden layer in the LSTM model. Using MAPE as an indicator, the MAPE values ​​under different hidden layers are calculated as shown in Table 1 below.

[0145] Table 1 Evaluation results of different hidden layers

[0146] Number of layers 2 floors 3 floors Total 4 floors 5 floors First floor 64 64 64 64 Second floor 32 32 32 32 Third floor — 16 16 16 Fourth floor — — 16 16 Fifth floor — — — 16 MAPE(%) 1.563 1.232 1.336 1.372

[0147] As can be seen from Table 1, the increase in the number of hidden layers does not improve the generalization ability of the model. When the number of hidden layer neurons increases from 64 to 192, the MAPE value decreases from 1.563 to 1.232, but as the number of layers increases further, the MAPE value begins to increase again;

[0148] When the number of hidden layers increases from 2 to 3, the MAPE value decreases, but further increasing the number of layers (from 3 to 5) causes the MAPE value to increase. This suggests that increasing the number of hidden layers may make the model structure too complex, leading to overfitting.

[0149] According to the MAPE values ​​in Table 1, the optimal hidden layer structure is 3 layers, with 64, 32, and 16 neurons in each layer, respectively. This structure provides the lowest MAPE value (1.232%) on the test data, indicating that it achieves a good balance between prediction accuracy and model complexity.

[0150] Through model parameter optimization, the final model parameters are shown in Table 2;

[0151] Table 2 Final model parameters

[0152]

[0153]

[0154] By comparing the RNN-based deep learning prediction model and the Prophet-based time series prediction model, the models are quantitatively analyzed. The results are shown in Table 3.

[0155] Table 3 Analysis results of different models

[0156] method Mean absolute percentage error (%) Root mean square error (KW) This method 0.045 4.61 Comparison method 1 6.96 15.36 Comparison Method 2 12.35 24.86

[0157] As can be seen from the above table, the mean absolute percentage error (MAPE) and root mean square error (RMSE) of this method are significantly lower than those of comparison method 1 and comparison method 2;

[0158] Depend on Figure 2 It can be seen that this method is more accurate in predicting charging load and can more reliably predict the actual value;

[0159] The RMSE of this method is only 4.61KW, which is much lower than 15.36KW of comparison method 1 and 24.86KW of comparison method 2, indicating that this method produces smaller errors in the prediction process, which is particularly important for application scenarios that require high-precision predictions.

[0160] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A multi-feature charging load prediction method, characterized in that: include: Acquire a historical load sample data set, and preprocess the historical load sample data set to obtain a complete data set; Optimizing the complete data set using a first optimization algorithm and a second optimization algorithm to obtain training parameters; The training parameters are used to construct a prediction model, the load is predicted according to the prediction model, a prediction result is obtained, and data analysis is performed on the prediction result.

2. The multi-feature charging load prediction method according to claim 1, characterized in that: Optimizing the complete data set using a first optimization algorithm and a second optimization algorithm includes: Creating a neural network model, and optimizing parameters using a first optimization algorithm; Wrap the neural network model in a classifier according to the defined parameter range; Define the first optimization algorithm model, set the parameter search, the number of random searches and the number of cross-validation folds; The optimization method of the first optimization algorithm model is called to perform optimization, calculate different parameter combinations and scores, and select parameter combinations according to the set scoring criteria.

3. The multi-feature charging load prediction method according to claim 2, characterized in that: Also includes: Determine a parameter range near the parameter combination, and perform secondary optimization on the parameters near the parameter combination using a second optimization algorithm; Use a cross-validator to make each fold continuous in time; Encapsulating the neural network model in a classifier and making it compatible with a second optimization algorithm; Define the second optimization algorithm model, use the encapsulated classifier as the estimator, pass in the parameter grid, cross-validation strategy and other search parameters; The optimization method of the second optimization algorithm model is called to perform cross-validation. The second optimization algorithm model traverses all specified parameter combinations, trains and verifies each set of parameters, and records the score of each combination. The second optimization algorithm obtains the best parameter combination for training according to the scoring criteria.

4. The multi-feature charging load prediction method according to claim 2 or 3, characterized in that: Building a predictive model using training parameters includes: The training parameters are input into the prediction model and the loop iteration is started. Each output is used as the input for the next loop. The training process needs to be carried out within the set time step.

5. The multi-feature charging load prediction method according to claim 4, characterized in that: Also includes: The input of each time step passes through the forget gate, input gate, and output gate; In the forget gate, the input of the current time step is combined with the hidden state of the previous moment to obtain a new vector, the new vector is multiplied by the weight matrix of the forget gate, and the bias term is added to obtain the calculation result, and the first activation function is applied to the calculation result to obtain the output of the forget gate; In the input gate, the output of the input gate is calculated using the first activation function; Combine the input of the current time step with the hidden state of the previous moment to obtain a new vector, multiply the new vector by the weight of the candidate memory unit, add the bias term, and obtain the calculation result. Apply the second activation function to the calculation result to obtain the output of the candidate memory unit. In the output gate, based on the updated cell state, the hidden state of the current time step is calculated and output.

6. The multi-feature charging load prediction method according to claim 5, characterized in that: Load forecasting includes: The mean absolute percentage error and root mean square error were used as evaluation indicators; The mean absolute percentage error is the average square root of the difference between the predicted value and the actual value; The root mean square error is the average of the sum of squares of the differences between the predicted values ​​and the actual values.

7. The multi-feature charging load prediction method according to claim 6, characterized in that: The preprocessing of the historical load sample data set includes: When the proportion of outliers and missing values ​​in the historical load sample data set is less than the first threshold, they are directly deleted; When the proportion of outliers and missing values ​​in the historical load sample data set is greater than a first threshold, a classification algorithm is used to process the outliers and missing values ​​in the historical load sample data set; The historical load sample data set is encoded and normalized.

8. A system using the multi-feature charging load prediction method according to any one of claims 1 to 7, characterized in that: include: A preprocessing module, used to obtain a historical load sample data set, and preprocess the historical load sample data set to obtain a complete data set; A data optimization module, used to optimize the complete data set using a first optimization algorithm and a second optimization algorithm to obtain training parameters; The prediction module is used to construct a prediction model using the training parameters, predict the load according to the prediction model, obtain a prediction result, and perform data analysis on the prediction result.

9. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the multi-feature charging load prediction method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the multi-feature charging load prediction method according to any one of claims 1 to 7.