Port short-term power load prediction method, device and equipment and storage medium
By constructing a combined prediction model of multiple single prediction models, and using the variation coefficient method to calculate the weight coefficient for weighting sum, the problem that a single prediction model cannot accurately reflect the change law of port power load, and improve the accuracy of short-term power load prediction.
Patent Information
- Application Number
- CN202411005789.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-12
AI Technical Summary
The single prediction model in the prior art cannot fully reflect the change pattern of port power load, resulting in low accuracy of short-term power load prediction.
Using a combined prediction model, multiple single prediction models (such as TPA-LSTM, MQ-RNN and Deep Factors) are calculated through the coefficient of variation method and weighted sum to construct a combined prediction model for short-term power load prediction.
It improves the accuracy of short-term power load prediction, reduces prediction errors, and enhances the reflection of the changes in port power load.
Smart Images

Figure CN118940895A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of port power load forecasting, and in particular to a method, device, equipment and storage medium for forecasting short-term port power load. Background Art
[0002] In recent years, with the vigorous promotion of electric energy in industries and other fields, more and more ports have begun to use electricity as the main energy source, thereby reducing the use of fossil energy. After the access of multiple energy sources, reasonable scheduling is necessary to maximize the utilization of energy, and the basis of all this is to know the energy demand of the port. Therefore, accurate prediction of port power load is of great significance and is crucial to the access of multiple clean energy sources in ports.
[0003] In the prior art, a single prediction model is generally used to predict the short-term power load of the port, such as time series model and machine learning model. However, the load of the port is variable and uncertain, and a single prediction model cannot fully reflect the changing pattern of the power load, which leads to the technical problem of low accuracy of short-term power load prediction.
[0004] Therefore, it is urgent to propose a method, device, equipment and storage medium for port short-term power load forecasting to solve the technical problem that the single prediction model in the prior art cannot fully reflect the changing law of power load, resulting in low accuracy of short-term power load forecasting. Summary of the invention
[0005] In view of this, it is necessary to provide a port short-term power load forecasting method, device, equipment and storage medium to solve the technical problem that the single prediction model existing in the prior art cannot fully reflect the changing law of power load, resulting in low accuracy of short-term power load forecasting.
[0006] In order to solve the above problems, the present invention provides a method for predicting short-term power load of a port, comprising: Obtain the power load data set of the port within a preset time; Constructing a combined prediction model according to the power load data set, wherein the combined prediction model is a weighted sum of multiple single prediction models; The short-term power load of the port is predicted based on the combined prediction model to obtain a short-term power load prediction value.
[0007] In a possible implementation, the step of constructing a combined prediction model according to the power load data set includes: Calculating the weights of the multiple single prediction models based on the coefficient of variation method and the power load data set to obtain a weight coefficient corresponding to each single prediction model; A combined prediction model is constructed based on the multiple single prediction models and all weight coefficients.
[0008] In a possible implementation, predicting the short-term power load of the port based on the combined prediction model to obtain a short-term power load prediction value includes: Predicting the power load data set according to each single prediction model respectively to obtain a prediction value corresponding to each single prediction model; All forecast values are weighted and calculated according to the combined forecast model to obtain the short-term power load forecast value of the port.
[0009] In a possible implementation, the weights of the multiple single prediction models are calculated based on the coefficient of variation method and the power load data set to obtain the weight coefficient corresponding to each single prediction model, including: Determine, according to the power load data set, a real value corresponding to the port at each time; Predicting all true values within the preset time period according to the multiple single prediction models respectively, to obtain a set of prediction values corresponding to each single prediction model; Based on the coefficient of variation method, all the true values and the predicted value set of each single prediction model are calculated to obtain the weight coefficient corresponding to each single prediction model.
[0010] In a possible implementation, the calculating of the set of predicted values of all the true values and each single prediction model based on the coefficient of variation method to obtain the weight coefficient corresponding to each single prediction model includes: Calculating the true value and the predicted value in the predicted value set of each single prediction model to obtain a relative error of each predicted value; According to all the relative errors of each single prediction model, an average relative error is obtained; Obtaining a relative error standard deviation corresponding to each single prediction model according to a maximum value among all relative errors of each single prediction model and an average of the relative errors; The relative error mean and the relative error standard deviation of each single prediction model are calculated to obtain a weight coefficient corresponding to each single prediction model.
[0011] In a possible implementation, the calculating the relative error mean and the relative error standard deviation of each single prediction model to obtain a weight coefficient corresponding to each single prediction model includes: Calculating the relative error mean and the relative error standard deviation of each single prediction model to obtain the coefficient of variation of each single prediction model; The coefficients of variation of the multiple single prediction models are calculated to obtain a weight coefficient corresponding to each single prediction model.
[0012] In a possible implementation, the calculation formula of the combined prediction model is as follows:
[0013] In the formula, y It represents the short-term power load forecast value predicted by the combined forecasting model; Expressed as i The predicted value of a prediction model; Expressed as i The weight coefficient of the prediction model; n Expressed as the number of prediction models.
[0014] On the other hand, the present invention also provides a port short-term power load forecasting device, comprising: A data set acquisition module is used to acquire the power load data set of the port within a preset time; A model combination module, used to construct a combined prediction model according to the power load data set, wherein the combined prediction model is a weighted sum of multiple single prediction models; The model prediction module is used to predict the short-term power load of the port based on the combined prediction model to obtain a short-term power load prediction value.
[0015] On the other hand, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the various steps of the above-mentioned port short-term power load forecasting method embodiment.
[0016] On the other hand, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the above-mentioned port short-term power load forecasting method embodiment are implemented.
[0017] The beneficial effect of the present invention is to obtain a data set of power load of the port within a preset time, and to construct a combined prediction model based on the power load data set. The combined prediction model can be a weighted sum of multiple single prediction models; then, the short-term power load of the port can be predicted based on the combined prediction model to obtain a short-term power load prediction value, thereby realizing multiple single prediction models for the short-term power load of the port and improving the accuracy of short-term power load prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic flow chart of an embodiment of a method for forecasting short-term power load of a port provided by the present invention; Figure 2 A schematic diagram of a flow chart of an embodiment of determining a weight coefficient provided by the present invention; Figure 3 For the present invention Figure 2 A schematic flow chart of an embodiment of step S203; Figure 4 A schematic diagram of an embodiment of the experimental results of three single prediction models provided by the present invention; Figure 5 A schematic diagram of a table of an embodiment of the comparison of experimental results of the combined prediction model and the single prediction model provided by the present invention; Figure 6 A schematic diagram of the structure of an embodiment of a port short-term power load forecasting device provided by the present invention; Figure 7 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0019] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0020] like Figure 1 As shown, a specific embodiment of the present invention discloses a method for predicting short-term power load of a port, comprising: S101, obtaining a data set of power load of the port within a preset time; S102, constructing a combined prediction model according to the power load data set, where the combined prediction model is a weighted sum of multiple single prediction models; S103. Predict the short-term power load of the port based on the combined prediction model to obtain a short-term power load prediction value.
[0021] The power load (power load) of the embodiment of the present invention refers to the sum of the power extracted from the power system by the user's power equipment at a certain moment. The prediction of power load refers to studying the relationship between various influencing factors and power load based on the law of change of power load, so as to obtain a scientific method that can reflect the relationship between past and future loads, and finally obtain the power load value at a specific moment in the future. Short-term prediction is mainly carried out in units of months, weeks, days and hours, which can provide necessary data for power dispatch and power balance between regions. Short-term prediction of power load is of great significance to the precise dispatch, optimal configuration and scientific use of power systems. Multiple single prediction models can be TPA-LSTM model, MQ-RNN model and Deep Factors model respectively.
[0022] Long Short Term Memory (LSTM) is an improvement of Recurrent Neural Network (RNN). It has a "gate" structure and controls the flow and loss of features through multiple gates. The three gates of LSTM are forget gate, input gate and output gate. The forget gate determines whether the state information of the previous moment is retained, the input gate determines the state of this unit. Whether to update, the output gate determines the output value of the unit. LSTM solves the problem of long-term dependency in RNN, can converge faster, and has higher prediction accuracy.
[0023] In a specific embodiment of the present invention, TPA-LSTM (Temporal Pattern Attention for Multivariate Time Series Forecasting) is a long short-term memory network model based on the temporal pattern attention mechanism. The LSTM model in TPA-LSTM solves the problem of long-term dependency in traditional RNN networks by introducing the "gate" control mechanism into the RNN network structure, and can solve the problem of gradient disappearance by using long-term storage of input information.
[0024] Temporal Pattern Attention (TPA), the attention mechanism is usually used in conjunction with a neural network model in prediction, so that the model pays more attention to current input information and historical information. The temporal pattern attention mechanism uses a CNN filter to extract fixed-length temporal patterns from the input information, uses a scoring function to determine the weights of each temporal pattern, and obtains the final output information based on the weights. The TPA mechanism is implemented through three parts: acquisition of temporal patterns, calculation of weights, and TPA output.
[0025] Furthermore, the TPA-LSTM algorithm process is as follows: Input a large amount of time series data into the LSTM neural network { x 1, x 2, . . . , x t}, x i ∈ R n , through the recursive function F and h t = F ( h t−1 , x t ), and obtain the steady-state matrix H , H = { h 1, h 2, . . . , h t−1}.
[0026] use k CNN filters extract the steady-state matrix H No. i Row features, get dimension n×k of The matrix is calculated as shown in formula (1): (1) In the formula, H i The steady-state matrix H No. i Row features.
[0027] Assume a scoring function f , by obtaining the predicted value h t and The matrix i The line action generates i Row Weight α i , α i Represents The matrix i Prediction value for row pair h t The influence of each time series on h The influence of 1 can be calculated by formulas (2) and (3): (2) (3) In the formula, Expressed as No. i OK, ∈ R k×m .
[0028] For the hidden state matrix H No. i The weighted sum of the rows is used to obtain the context vector v t , where the vector v t Represents the hidden state matrix H The time attention score vector can also be understood as the hidden state matrix H Each row has the desired predicted value h t The impact on the time dimension is calculated as shown in formula (4): (4) Finally, the context vector v i and the desired prediction value h t Perform integral operation to obtain the final prediction result, as shown in formulas (5) and (6): (5) (6) In the formula, and ∈ R m , ∈ R m×m , ∈ R m×k , ∈ R n×m , y t−1+∆ ∈ R n , is the predicted value of the TPA-LSTM algorithm.
[0029] MQ-RNN prediction model,MQ-RNN is an algorithm for unified modeling and prediction of batch time series. The algorithm is based on the sequence value of the historical Encoder-len length and can be expressed by formula (7): (7) In the formula, Indicates i Time series; Represents historical time features and is used as the input of the Encoder; Represents future time features and is used as the input of the Encoder; static invariant features are used To represent, for example, the cyclic stationary characteristics of each time series or category coding.
[0030] The Encoder part of MQ-RNN uses LSTM. The input of each time point in this part can be divided into two parts: one is the feature of the current moment, and the other is the sequence value. After inputting this, the final value can be obtained by encoding it through LSTM or WaveNet. c , and h t Pass in the Decoder part.
[0031] The Decoder uses two MLPs (Global-MLP and Local-MLP). Global-MLP is used to summarise the output of the Encoder. h t and future feature input c t+k and c a ,in k =Decoder-len, c t+1 ,…, c t+k Represents input at each future time point; c a To calculate the captured common information horizon-agnostic, it is input for all time points of the Decoder part. Local-MLP combines the "two context outputs of Global-MLP" and the "input of future feature values" to obtain the predicted value of the fractional digit at each future time point, which can be expressed by formula (8) (9); (8) (9) In the formula, q (.) represents each quantile in the quantile list, which is passed in as a parameter during model training.
[0032] For the Loss Function, MQ-RNN adopts the quantile loss function, as shown in formula (10): (10) In the formula, (.) +=max (0,.), is the predicted value of the MQ-RNN prediction model.
[0033] The Deep Factors model is a global-local combination framework prediction model, which includes three methods: DF-RNN, DF-LDS and DF-GP. The global parts of the above three methods are consistent, and are all composed of a set of linear combinations of deep factors, and these deep factors are obtained by DNN neural networks. Compared with DeepAR and MQ-RNN algorithms, Deep Factors sets multiple deep factors to reduce the prediction variance, and requires fewer learning parameters, so it has the advantages of high prediction accuracy and fast calculation speed.
[0034] Deep Factors is calculated based on the joint distribution of future views, which can be expressed as follows: (11) The specific implementation process is: (12) (13) (14) (15) (16) In the formula, k Expressed as linear in depth factor, x i,t Represented as the first i The sequence at time t The characteristics of time, z i,t Expressed as i The sequence at time t Observed value at time ; Expressed as a given forecast horizon, Equivalent to the predicted mean at each moment, it is given by k The linear combination of depth factors is obtained through RNN, and k is a super parameter, It is equivalent to the prediction variance at each moment. There are three types: DF-RNN, DF-LDS and DF-GP. Represented as the predicted value of the Deep Factors model.
[0035] The power load data set of the port within the preset time can be obtained. The preset time can be the time in months, weeks, days and hours for short-term prediction. The power load data set can provide necessary data for power dispatch and power balance within this period. Then, multiple single prediction models can be combined to obtain a combined prediction model. The combined prediction model is generally a method of combining two or more single prediction models in a certain way and then predicting the prediction object. Due to the existence of many uncertain factors and parameter drift in time series data sets, the prediction accuracy of a single prediction model for such data sets is often not accurate enough, and the direction of improvement is also relatively limited. The combined prediction model has been verified by a lot of theory and practice, which can effectively improve the prediction progress of the model and reduce the prediction error.
[0036] Compared with the prior art, the present embodiment provides a method for obtaining a data set of power load of a port within a preset time, and constructing a combined prediction model based on the power load data set. The combined prediction model can be a weighted sum of multiple single prediction models. Then, the short-term power load of the port can be predicted based on the combined prediction model to obtain a short-term power load prediction value, thereby realizing the use of multiple single prediction models for the short-term power load of the port and improving the accuracy of short-term power load prediction.
[0037] In some embodiments of the present invention, step S102 includes: Based on the coefficient of variation method and the power load data set, the weights of multiple single prediction models are calculated respectively to obtain the weight coefficient corresponding to each single prediction model; According to multiple single prediction models and all weight coefficients, a combined prediction model is obtained.
[0038] In a specific embodiment of the present invention, the multiple single prediction models may be three single prediction models, namely, TPA-LSTM, MQ-RNN and DeepFactors. These three single prediction models may be linearly combined, and the coefficient of variation method may be used to determine the weight coefficient of each model in the linear combination, so that the three single prediction models may be combined according to the weight coefficient to obtain a combined prediction model.
[0039] In some embodiments of the present invention, Figure 2 As shown, based on the coefficient of variation method and the power load data set, the weights of multiple single prediction models are calculated respectively to obtain the weight coefficient corresponding to each single prediction model, including: S201. Determine the actual value corresponding to the port at each time according to the power load data set; S202, predicting all true values within a preset time period according to multiple single prediction models respectively, and obtaining a set of prediction values corresponding to each single prediction model; S203. Calculate all true values and the predicted value set of each single prediction model based on the coefficient of variation method to obtain a weight coefficient corresponding to each single prediction model.
[0040] In a specific embodiment of the present invention, in order to provide a single prediction model for port prediction, it is necessary to determine the true value corresponding to the port at each time in the power load data set within a preset time, so that the next moment can be predicted through a single prediction model according to the true value at the current moment, and the predicted value at the next moment can be obtained, and then all the predicted values can be obtained through all the real values, that is, a set of predicted values can be obtained. Each single prediction model performs the above process, so that a single prediction model corresponding to the single prediction model can be obtained. Then, the predicted value set and all the real values of the single prediction model can be calculated based on the coefficient of variation method to obtain the weight coefficient corresponding to each single prediction model.
[0041] In some embodiments of the present invention, Figure 3 As shown, step S203 includes: S301, calculating the true value and the predicted value in the predicted value set of each single prediction model to obtain the relative error of each predicted value; S302, obtaining a relative error average according to all relative errors of each single prediction model; S303, obtaining the relative error standard deviation corresponding to each single prediction model according to the maximum value and the relative error average of all relative errors of each single prediction model; S304: Calculate the relative error mean and relative error standard deviation of each single prediction model to obtain a weight coefficient corresponding to each single prediction model.
[0042] In a specific embodiment of the present invention, the actual value and the predicted value in the predicted value set of a single prediction model can be calculated to obtain the relative error of each predicted value, so that all relative errors of all predicted values can be obtained. The calculation process can be: relative error = (predicted value-true value) / true value. After all relative errors are obtained, the average value of all relative errors can be calculated, so that the average relative error of each single prediction model can be obtained. The maximum value of all relative errors can also be determined, and the maximum value and the average relative error are calculated, so that the corresponding relative error standard deviation of each single prediction model can be obtained. The specific calculation process can be: maximum relative error = relative error standard deviation ÷ relative error average × 100%.
[0043] In some embodiments of the present invention, the relative error mean and relative error standard deviation of each single prediction model are calculated to obtain the weight coefficient corresponding to each single prediction model, including: The relative error mean and relative error standard deviation of each single prediction model were calculated to obtain the coefficient of variation of each single prediction model; The coefficients of variation of multiple single prediction models are calculated to obtain the weight coefficient corresponding to each single prediction model.
[0044] In a specific embodiment of the present invention, each single prediction model can be processed based on the coefficient of variation method to obtain the weight coefficient corresponding to each single prediction model. The specific process can be: the relative error mean and relative error standard deviation of each single prediction model are calculated to obtain the coefficient of variation of each single prediction model, and the calculation is shown in formula (17): (17) In the formula, v i Indicates i The coefficient of variation of a single prediction model, δ i represents the average relative error of the i-th single prediction model, Indicates i The relative error standard deviation of a single prediction model, n is the number of single prediction models.
[0045] Then, the coefficient of variation of all prediction models and the coefficient of variation of the current single prediction model can be calculated to obtain the weight coefficient corresponding to the current single prediction model. Similarly, the weight coefficient corresponding to each single prediction model can be calculated as shown in formula (18): (18) In the formula, w i Indicates i The weight of a single prediction model in the combined model.
[0046] In some embodiments of the present invention, step S103 includes: Predict the power load data set according to each single prediction model respectively, and obtain the prediction value corresponding to each single prediction model; All forecast values are weighted and calculated according to the combined forecast model to obtain the short-term power load forecast value of the port.
[0047] In a specific embodiment of the present invention, the power load data set can be predicted by each single prediction model, so as to obtain the prediction value corresponding to each single prediction model, and the power load data is input into the TPA-LSTM model, and the TPA-LSTM model can output the corresponding prediction value. Similarly, the prediction value of the MQ-RNN model and the prediction value of the DeepFactors model can be obtained, and then the prediction value of each single prediction model can be input into the combined prediction model, and the combined prediction model can output the short-term power load prediction value of the port.
[0048] In some embodiments of the present invention, the calculation formula of the combined prediction model is shown in formula (20): (20) In the formula, y represents the short-term power load forecast value predicted by the combined forecasting model; Expressed as i The predicted value of a single prediction model; Expressed as i The weight coefficient of a single prediction model; n Expressed as the number of single prediction models.
[0049] In a specific embodiment of the present invention, the weight coefficients and corresponding prediction values of all prediction models can be input into the formula (20) of the combined prediction model, and the combined prediction model can output a short-term power load prediction value.
[0050] The embodiment of the present invention uses 180 days of power load data from a port. The data set contains power load data and four related influencing factors: temperature, weather conditions, wind speed, and air quality. Since the sampling step selected by the embodiment of the present invention is 2 hours, there are a total of 2172 sampling points. The embodiment of the present invention divides the training set and the test set into a ratio of 7:3.
[0051] Commonly used prediction model evaluation indicators include mean absolute error (MAE), mean absolute percentage error (MAPE), mean square error (MSE), root mean square error (RMSE) and determination coefficient R-Square (R²). The embodiment of the present invention uses mean absolute percentage error (MAPE) to measure the performance of the prediction model. The calculation formula of mean absolute percentage error is shown in formula (21): (twenty one) In the formula, m is the number of samples, y i is the predicted value, is the true value.
[0052] TPA-LSTM model: The TPA-LSTM model is built based on the pytorch library. The model structure of power load prediction is an LSTM multi-input single-output structure. Its input values are four influencing factors related to electricity, and its output value is power load data.
[0053] MQ-RNN model: The MQ-RNN model is built based on the pytorch library. The model structure of power load prediction is a Seq2Seq structure based on LSTM, which is a multi-input single-output structure. Its input values are four influencing factors related to electricity, and its output value is power load data.
[0054] Deep Factors model: This paper builds a Deep Factors model based on the pytorch library. The model structure of power load prediction is a global-local structure, which is a multi-input single-output structure. Its input values are four influencing factors related to electricity, and the output value is power load data.
[0055] The experimental results of three single prediction models are shown in Figure 4 As shown in the figure, TPA-LSTM has the largest average absolute percentage error, reaching 14.05%, while Deep Factors has the smallest average absolute percentage error, only 13.48%. In general, the prediction effects of the three single prediction models are relatively close, with little difference.
[0056] The embodiment of the present invention uses the coefficient of variation method to combine three single prediction models. After calculation, it can be obtained that the weight coefficients of the three models are 0.3080, 0.3347 and 0.3573 respectively. The combined prediction model is shown in formula (22): (twenty two) In the formula, y is the predicted value of the combined prediction model, y 1 is the predicted value of the TPA-LSTM prediction model, y 2 is the predicted value of the MQ-RNN prediction model, y 3 is the predicted value of the Deep Factors prediction model.
[0057] The experimental results of the combined prediction model and the single prediction model are compared. Figure 5As shown, compared with the three single prediction models, the prediction accuracy of the combined prediction model has been greatly improved, with an average absolute percentage error of only 12.23%, which is 1.82% higher than the TPA-LSTM prediction model, 1.31% higher than the MQ-RNN prediction model, and 1.25% higher than the Deep Factors prediction model. In summary, the combined prediction model constructed in the embodiment of the present invention is more suitable for the prediction of short-term port power load than the single prediction model.
[0058] In order to better implement the port short-term power load forecasting method in the embodiment of the present invention, based on the port short-term power load forecasting method, the embodiment of the present invention also provides a port short-term power load forecasting device, such as Figure 6 As shown, the port short-term power load forecasting device 600 includes: The data set acquisition module 601 is used to acquire the power load data set of the port within a preset time; A model combination module 602 is used to construct a combined prediction model according to the power load data set, where the combined prediction model is a weighted sum of multiple single prediction models; The model prediction module 603 is used to predict the short-term power load of the port based on the combined prediction model to obtain a short-term power load prediction value.
[0059] The port short-term power load forecasting device 600 provided in the above embodiment can implement the technical solution described in the above port short-term power load forecasting method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above port short-term power load forecasting method embodiment, which will not be repeated here.
[0060] like Figure 7 As shown, the present invention also provides an electronic device 700. The electronic device 700 includes a processor 701, a memory 702 and a display 703. Figure 7 Only some components of the electronic device 700 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0061] In some embodiments, the memory 702 may be an internal storage unit of the electronic device 700, such as a hard disk or memory of the electronic device 700. In other embodiments, the memory 702 may also be an external storage device of the electronic device 700, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 700.
[0062] Furthermore, the memory 702 may include both an internal storage unit of the electronic device 700 and an external storage device. The memory 702 is used to store application software installed in the electronic device 700 and various data.
[0063] In some embodiments, the processor 701 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 702, such as the port short-term power load forecasting method of the present invention.
[0064] In some embodiments, the display 703 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 703 is used to display information of the electronic device 700 and to display a visual user interface. The components 701-703 of the electronic device 700 communicate with each other via a system bus.
[0065] In some embodiments of the present invention, when the processor 701 executes the port short-term power load forecasting program in the memory 702, the following steps may be implemented: Obtain the power load data set of the port within a preset time; A combined prediction model is constructed based on the power load data set, where the combined prediction model is a weighted sum of multiple single prediction models; The short-term power load of the port is predicted based on the combined prediction model to obtain the short-term power load prediction value.
[0066] It should be understood that: when the processor 701 executes the port short-term power load forecasting program in the memory 702, in addition to the above functions, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.
[0067] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 700 mentioned, and the electronic device 700 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 700 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0068] Accordingly, an embodiment of the present application also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, the steps or functions of the port short-term power load forecasting method provided in the above-mentioned method embodiments can be implemented.
[0069] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0070] The above is a detailed introduction to the port short-term power load forecasting method and device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for predicting short-term power load of a port, characterized in that: include: Obtain the power load data set of the port within a preset time; Constructing a combined prediction model according to the power load data set, wherein the combined prediction model is a weighted sum of multiple single prediction models; The short-term power load of the port is predicted based on the combined prediction model to obtain a short-term power load prediction value.
2. The method for predicting short-term power load of a port according to claim 1, characterized in that: The constructing a combined prediction model according to the power load data set includes: Calculating the weights of the multiple single prediction models based on the coefficient of variation method and the power load data set to obtain a weight coefficient corresponding to each single prediction model; A combined prediction model is constructed based on the multiple single prediction models and all weight coefficients.
3. The method for predicting short-term power load of a port according to claim 1, characterized in that: The step of predicting the short-term power load of the port based on the combined prediction model to obtain a short-term power load prediction value includes: Predicting the power load data set according to each single prediction model respectively to obtain a prediction value corresponding to each single prediction model; All forecast values are weighted and calculated according to the combined forecast model to obtain the short-term power load forecast value of the port.
4. The method for predicting short-term power load of a port according to claim 2, characterized in that: The weights of the multiple single prediction models are calculated based on the coefficient of variation method and the power load data set to obtain the weight coefficient corresponding to each single prediction model, including: Determine, according to the power load data set, a real value corresponding to the port at each time; Predicting all true values within the preset time period according to the multiple single prediction models respectively, to obtain a set of prediction values corresponding to each single prediction model; Based on the coefficient of variation method, all the true values and the predicted value set of each single prediction model are calculated to obtain the weight coefficient corresponding to each single prediction model.
5. The method for predicting short-term power load of a port according to claim 4, characterized in that: The step of calculating the set of predicted values of all the true values and each single prediction model based on the coefficient of variation method to obtain a weight coefficient corresponding to each single prediction model includes: Calculating the true value and the predicted value in the predicted value set of each single prediction model to obtain a relative error of each predicted value; According to all the relative errors of each single prediction model, an average relative error is obtained; Obtaining a relative error standard deviation corresponding to each single prediction model according to a maximum value among all relative errors of each single prediction model and an average of the relative errors; The relative error mean and the relative error standard deviation of each single prediction model are calculated to obtain a weight coefficient corresponding to each single prediction model.
6. The method for predicting short-term power load of a port according to claim 5, characterized in that: The calculating the relative error mean and the relative error standard deviation of each single prediction model to obtain the weight coefficient corresponding to each single prediction model includes: Calculating the relative error mean and the relative error standard deviation of each single prediction model to obtain the coefficient of variation of each single prediction model; The coefficients of variation of the multiple single prediction models are calculated to obtain a weight coefficient corresponding to each single prediction model.
7. The method for predicting short-term power load of a port according to claim 1, characterized in that: The calculation formula of the combined prediction model is as follows: In the formula, y It represents the short-term power load forecast value predicted by the combined forecasting model; Expressed as i The predicted value of a prediction model; Expressed as i The weight coefficient of the prediction model; n Expressed as the number of prediction models.
8. A port short-term power load forecasting device, characterized in that: include: A data set acquisition module is used to acquire the power load data set of the port within a preset time; A model combination module, used to construct a combined prediction model according to the power load data set, wherein the combined prediction model is a weighted sum of multiple single prediction models; The model prediction module is used to predict the short-term power load of the port based on the combined prediction model to obtain a short-term power load prediction value.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the port short-term power load forecasting method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the port short-term power load forecasting method according to any one of claims 1 to 7 are implemented.
