Short-term load prediction method and device, computer equipment, storage medium and program product

By combining a collaborative algorithm of multilayer perceptrons and long short-term memory networks, a load forecasting model is constructed, which solves the problem of low accuracy in short-term load forecasting, achieves high-precision load forecasting, adapts to the complex load changes of urban power grids, and improves the operating efficiency and security of the power system.

CN121769840APending Publication Date: 2026-03-31SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing short-term load forecasting methods suffer from low forecasting accuracy, especially in urban power grid operation and management, making it difficult to meet the demand for high-precision load forecasting.

Method used

By combining multilayer perceptrons and long short-term memory networks, and jointly training them through a multi-model collaborative algorithm, a load prediction model is constructed. The powerful static nonlinear fitting capability of multilayer perceptrons and the excellent dynamic sequence modeling capability of long short-term memory networks are used to collaboratively predict the load.

Benefits of technology

It improves the accuracy of load forecasting, alleviates the problems of gradient vanishing and gradient exploding, enhances the stability and adaptability of the model in long-term series modeling, adapts to complex and ever-changing load change patterns, and improves the accuracy and operational efficiency of power load forecasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121769840A_ABST
    Figure CN121769840A_ABST
Patent Text Reader

Abstract

The invention relates to a short-term load prediction method and device, computer equipment, a storage medium and a program product. The method comprises the steps of obtaining historical loads corresponding to a plurality of continuous time points in a target historical time period of a to-be-predicted region, and obtaining a historical load sequence; inputting the historical load sequence into a trained first load prediction model to obtain a first load prediction result; the first load prediction model is a multi-layer sensor; inputting the historical load sequence into a trained second load prediction model to obtain a second load prediction result; the first load prediction model is a long short-term memory network; and determining a target load prediction result according to the first load prediction result and the second load prediction result. By adopting the method, the load prediction precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power load forecasting technology, and in particular to a short-term load forecasting method, apparatus, computer equipment, storage medium, and program product. Background Technology

[0002] In the planning and operation of power systems, the strategy formulation for each link—generation, transmission, and distribution—is highly dependent on the accuracy of load forecasting. This is especially true in urban areas, where the diverse user types and complex, frequently changing electricity consumption behaviors present even greater challenges to power grid operation and management. Accurate load forecasting not only directly relates to the safe and stable operation of the power grid but also significantly impacts the formulation of power plant start-up and shutdown plans. Therefore, high-precision load forecasting plays an irreplaceable role in ensuring the reliability and efficiency of power supply.

[0003] Depending on the forecast period, load forecasting is generally divided into long-term load forecasting (forecast period exceeding one year), medium-term load forecasting (forecast period from one week to one year), and short-term load forecasting (forecasting load conditions for the next few hours to several weeks). Among them, short-term load forecasting plays a particularly crucial role in power system operation and dispatch, especially in scenarios where it is necessary to predict the next day's load level in advance to formulate optimized dispatch plans. The accuracy of short-term forecast results directly affects the economy of energy allocation and the system's safety margin.

[0004] However, current short-term load forecasting methods suffer from low forecasting accuracy. Summary of the Invention

[0005] Therefore, it is necessary to provide a short-term load forecasting method, apparatus, computer equipment, storage medium, and program product that can improve the accuracy of load forecasting in order to address the above-mentioned technical problems.

[0006] In a first aspect, this application provides a short-term load forecasting method, which includes: acquiring historical loads corresponding to multiple consecutive time points within a target historical time period of the region to be predicted, thereby obtaining a historical load sequence; inputting the historical load sequence into a trained first load forecasting model to obtain a first load forecasting result; the first load forecasting model is a multilayer perceptron; inputting the historical load sequence into a trained second load forecasting model to obtain a second load forecasting result; the first load forecasting model is a long short-term memory network; and determining a target load forecasting result based on the first load forecasting result and the second load forecasting result.

[0007] In one embodiment, the training method for the first load prediction model and the second load prediction model includes: jointly training the first initial load prediction model to be trained and the second initial load prediction model to be trained to obtain the first load prediction model and the second load prediction model.

[0008] In one embodiment, the first initial load prediction model and the second initial load prediction model to be trained are jointly trained to obtain the first load prediction model and the second load prediction model, including: obtaining the sample historical load sequence of the region to be predicted; inputting the sample historical load sequence into the first initial load prediction model and the second initial load prediction model respectively to obtain the first sample load prediction result and the second sample load prediction result; obtaining the target loss value based on the first sample load prediction result and the second sample load prediction result; training the first initial load prediction model and the second initial load prediction model based on the target loss value respectively, and obtaining the first load prediction model and the second load prediction model after training.

[0009] In one embodiment, obtaining a target loss value based on a first sample load prediction result and a second sample load prediction result includes: obtaining a first loss value based on the first sample load prediction result, the actual load sequence, and a first loss function; obtaining a second loss value based on the second sample load prediction result, the actual load sequence, and the second loss function; wherein the first loss function and the second loss function are different; and obtaining a target loss value based on the first loss value and the second loss value.

[0010] In one embodiment, obtaining a target loss value based on a first loss value and a second loss value includes: using the sum of the first loss value and the second loss value as the target loss value.

[0011] In one embodiment, obtaining the sample historical load sequence of the region to be predicted includes: obtaining multiple initial sample historical loads of the region to be predicted; preprocessing the multiple initial sample historical loads to obtain multiple sample historical loads; and obtaining the sample historical load sequence from the multiple sample historical loads based on a sliding window; wherein the preprocessing includes outlier correction processing and missing value filling processing.

[0012] Secondly, this application also provides a short-term load forecasting device, which includes:

[0013] The acquisition module is used to acquire the historical load corresponding to multiple consecutive time points within the target historical time period of the area to be predicted, and obtain the historical load sequence.

[0014] The first determination module is used to input the historical load sequence into the trained first load prediction model to obtain the first load prediction result; the first load prediction model is a multilayer perceptron.

[0015] The second determination module is used to input the historical load sequence into the trained second load prediction model to obtain the second load prediction result; the first load prediction model is a long short-term memory network.

[0016] The third determining module is used to determine the target load forecast result based on the first load forecast result and the second load forecast result.

[0017] In one embodiment, the apparatus further includes a training module for jointly training a first initial load prediction model and a second initial load prediction model to be trained, thereby obtaining a first load prediction model and a second load prediction model.

[0018] In one embodiment, the training module is specifically used to obtain the sample historical load sequence of the region to be predicted; input the sample historical load sequence into the first initial load prediction model and the second initial load prediction model respectively to obtain the first sample load prediction result and the second sample load prediction result; obtain the target loss value based on the first sample load prediction result and the second sample load prediction result; train the first initial load prediction model and the second initial load prediction model based on the target loss value respectively, and obtain the first load prediction model and the second load prediction model after the training is completed.

[0019] In one embodiment, the training module is specifically used to obtain a first loss value based on the first sample load prediction result, the actual load sequence, and the first loss function; to obtain a second loss value based on the second sample load prediction result, the actual load sequence, and the second loss function; the first loss function and the second loss function are different; and to obtain a target loss value based on the first loss value and the second loss value.

[0020] In one embodiment, the training module is specifically used to take the sum of the first loss value and the second loss value as the target loss value.

[0021] In one embodiment, the training module is specifically used to obtain multiple initial sample historical loads of the region to be predicted; preprocess the multiple initial sample historical loads to obtain multiple sample historical loads; and obtain a sample historical load sequence from the multiple sample historical loads based on a sliding window; wherein the preprocessing includes outlier correction processing and missing value filling processing.

[0022] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any one of the first aspects above.

[0023] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.

[0024] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects above.

[0025] The aforementioned short-term load forecasting method, apparatus, computer equipment, storage medium, and program products acquire historical loads corresponding to multiple consecutive time points within a target historical time period for the region to be predicted, obtaining a historical load sequence. This historical load sequence is then input into a trained first load forecasting model to obtain a first load forecasting result; the first load forecasting model is a multilayer perceptron (MLP). The historical load sequence is then input into a trained second load forecasting model to obtain a second load forecasting result; the first load forecasting model is a long short-term memory (LSM) network. Based on the first and second load forecasting results, the target load forecasting result is determined. This collaborative approach leverages the powerful static nonlinear fitting capability of the MLP and the excellent dynamic sequence modeling capability of the LSM network to predict complex power load time series from multiple perspectives and in a complementary manner, thus improving load forecasting accuracy. Furthermore, the LSM network effectively mitigates problems such as gradient vanishing and gradient exploding, ensuring the stability and convergence of the model in long-term series modeling. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a diagram illustrating the application environment of a short-term load forecasting method in one embodiment.

[0028] Figure 2 This is a flowchart illustrating a short-term load forecasting method in one embodiment;

[0029] Figure 3 This is a schematic diagram of the structure of a multilayer sensor in one embodiment;

[0030] Figure 4 This is a schematic diagram of the structure of a long short-term memory network in one embodiment;

[0031] Figure 5 This is a flowchart illustrating the training method in one embodiment;

[0032] Figure 6 This is a structural block diagram of a short-term load forecasting device in one embodiment;

[0033] Figure 7This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0035] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0036] In the planning and operation of power systems, the strategy formulation for each link—generation, transmission, and distribution—is highly dependent on the accuracy of load forecasting. This is especially true in urban areas, where the diverse user types and complex, frequently changing electricity consumption behaviors present even greater challenges to power grid operation and management. Accurate load forecasting not only directly relates to the safe and stable operation of the power grid but also significantly impacts the formulation of power plant start-up and shutdown plans. Therefore, high-precision load forecasting plays an irreplaceable role in ensuring the reliability and efficiency of power supply.

[0037] Depending on the forecast period, load forecasting is generally divided into long-term load forecasting (forecast period exceeding one year), medium-term load forecasting (forecast period from one week to one year), and short-term load forecasting (forecasting load conditions for the next few hours to several weeks). Among them, short-term load forecasting plays a particularly crucial role in power system operation and dispatch, especially in scenarios where it is necessary to predict the next day's load level in advance to formulate optimized dispatch plans. The accuracy of short-term forecast results directly affects the economy of energy allocation and the system's safety margin.

[0038] Existing short-term load forecasting methods can be broadly categorized into two types: traditional statistical methods and artificial intelligence-based forecasting methods. Traditional statistical methods, including autoregressive moving average models, multiple linear regression, and exponential smoothing, offer advantages such as computational simplicity and strong interpretability. However, the significant nonlinearity and time-varying characteristics of load time series data limit their applicability in short-term load forecasting. To overcome these shortcomings, various machine learning-based forecasting methods have been developed in recent years, such as artificial neural networks, fuzzy logic models, radial basis function networks, support vector machines, and various hybrid algorithms. These methods have demonstrated stronger adaptability and predictive performance in short-term load forecasting. However, some models based on recurrent neural networks may still encounter problems such as vanishing or exploding gradients during training, thus affecting forecast accuracy.

[0039] With the rapid development of deep learning technology, significant achievements have been made in areas such as time series forecasting and pattern recognition. Long Short-Term Memory (LSTM) networks, as an improved form of recurrent neural networks, can effectively capture complex dependencies in time series and alleviate the gradient vanishing problem to some extent, thus attracting widespread attention in load forecasting. On the other hand, multi-model collaborative algorithms integrate the predictive advantages of multiple models, achieving multi-faceted analysis and adaptive modeling of load characteristics, thereby improving overall forecasting performance. Combining LTM networks with multi-model collaborative algorithms can construct a load forecasting framework with collaborative learning and adaptive capabilities. This framework leverages the advantages of deep neural networks in handling complex time series dependencies while enhancing the robustness and generalization ability of forecasts through model collaboration mechanisms. It provides efficient and reliable technical support for addressing the dynamic changes and uncertainties of urban loads, thus providing a solid technical foundation for short-term load assessment and refined regulation in the power industry.

[0040] Based on this, this application proposes a short-term load forecasting method integrating multilayer perceptrons and long short-term memory networks to improve the accuracy and operational efficiency of power load forecasting. In this method, a multi-model collaborative algorithm is used to achieve joint learning of multiple models, enabling the forecasting system to more comprehensively characterize and adapt to complex and ever-changing load variation patterns. Long short-term memory networks have significant advantages in processing time-series data, effectively capturing long-term dependencies in load data and significantly enhancing forecasting capabilities by incorporating historical load data. This results in higher applicability and stability when dealing with power load data exhibiting significant nonlinear and time-varying characteristics. The following detailed explanation, in conjunction with the accompanying drawings, illustrates how this application addresses the aforementioned technical problems.

[0041] The short-term load forecasting method provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0042] In one exemplary embodiment, such as Figure 2 As shown, a short-term load forecasting method is provided, which can be applied to... Figure 1 Taking the server in the example, the explanation includes the following steps 201 to 204. Wherein:

[0043] Step 201: Obtain the historical load corresponding to multiple consecutive time points within the target historical time period of the area to be predicted, and obtain the historical load sequence.

[0044] The area to be predicted can be a province, an industrial zone or a residential area of ​​a city, etc., without any restrictions.

[0045] This application focuses on short-term load forecasting. Therefore, the duration between each point in the target historical time period and the time to be forecasted is less than or equal to a preset duration. The preset duration can be in weeks or hours, and is not limited here. For example, if the load is to be forecasted in the 8th and 9th weeks, the historical load corresponding to multiple consecutive points in the target historical time period could be the load corresponding to the 6th and 7th weeks.

[0046] By arranging the historical loads corresponding to multiple time points in chronological order, a historical load sequence can be obtained.

[0047] Step 202: Input the historical load sequence into the trained first load prediction model to obtain the first load prediction result; the first load prediction model is a multilayer perceptron.

[0048] like Figure 3 The diagram shows a schematic of a multilayer perceptron. Figure 3The diagram illustrates a Multilayer Perceptron (MLP) with two hidden layers. During operation, input data first enters the input layer and is multiplied by the corresponding connection weights, then passed to the first hidden layer. In the first hidden layer, the input values ​​are weighted and summed before undergoing a nonlinear transformation using a nonlinear activation function (such as the hyperbolic tangent). Subsequently, the data is multiplied by the new connection weights and passed to the second hidden layer, where it undergoes another weighted summation and nonlinear processing. Finally, the processed features are passed to the output layer, where they are multiplied by the output layer weights to complete the final calculation, yielding the network's predicted output.

[0049] The historical load sequence is input into the first load forecasting model, which outputs the first load forecast result, thus obtaining the first load forecast result. The first load forecast result includes the load sequence corresponding to the time to be forecasted;

[0050] Step 203: Input the historical load sequence into the trained second load prediction model to obtain the second load prediction result; the first load prediction model is a long short-term memory network.

[0051] like Figure 4 The diagram illustrates the structure of a Long Short-Term Memory (LSTM) network. LSTM is a special type of recurrent neural network capable of storing historical information in its internal memory units for extended periods, exhibiting superior performance in time series prediction tasks. LSTM consists of four key structures: an input gate, an output gate, a forget gate, and memory units. Through a gating mechanism, it regulates the flow of information within the memory units, effectively filtering redundant data while retaining crucial information. Compared to traditional recurrent neural networks, LSTM effectively mitigates problems such as vanishing and exploding gradients, ensuring the stability and convergence of the model in long-term series modeling.

[0052] The calculation process for the output of each node in a Long Short-Term Memory (LSTM) network includes:

[0053]

[0054]

[0055]

[0056]

[0057]

[0058]

[0059] Among them, time The input variables are denoted as The weight matrices are respectively used... , , and express; , , and These represent the outputs of the input gate, forget gate, output gate, and memory unit, respectively. The activation function used is the Sigmoid function, denoted by the symbol... Indicates; the hidden state at time... The output is denoted in vector form as .also, , , and These are the bias terms corresponding to each gating structure.

[0060] The historical load sequence is input into the second load forecasting model, which then outputs the second load forecast result. The second load forecast result includes the load sequence corresponding to the time to be forecasted.

[0061] Step 204: Determine the target load forecast result based on the first load forecast result and the second load forecast result.

[0062] The first load forecast result and the second load forecast result are both load sequences corresponding to the forecast time.

[0063] In one possible implementation, the load sequence in the first load forecast result and the load sequence in the second load forecast result are weighted and summed to obtain the target load sequence, which is the target load forecast result.

[0064] The above method can be called fusion prediction, and it can be expressed mathematically as follows:

[0065]

[0066]

[0067]

[0068] in, Indicates input data; and Let represent the prediction function of the first load forecasting model and the prediction function of the second load forecasting model, respectively. and These are the prediction results output by the first load forecasting model (first load forecasting result) and the prediction results output by the second load forecasting model (second load forecasting result), respectively. This indicates that the first load forecasting model and the second load forecasting model are weighted by factors. The fused target load prediction results. Among them, the weighting factors... This method measures the contribution of the multilayer perceptron's prediction results to the final output. Its value can be dynamically adjusted based on data characteristics and task requirements to optimize the performance of the fusion model (first load prediction model and second load prediction model). Through this method, the system can fully leverage the advantages of the multilayer perceptron in nonlinear feature extraction and the capabilities of long short-term memory networks in time-series modeling, achieving high-precision prediction and intelligent scheduling support for short-term power loads.

[0069] The aforementioned short-term load forecasting method obtains historical loads corresponding to multiple consecutive time points within the target historical time period of the region to be predicted, resulting in a historical load sequence. This historical load sequence is then input into a trained first load forecasting model to obtain a first load forecast result; the first load forecasting model is a multilayer perceptron (MLP). The historical load sequence is then input into a trained second load forecasting model to obtain a second load forecast result; the first load forecasting model is a long short-term memory (LSM) network. Based on the first and second load forecast results, the target load forecast result is determined. This method synergistically utilizes the powerful static nonlinear fitting capability of the MLP and the excellent dynamic sequence modeling capability of the LSM network, predicting complex power load time series from multiple perspectives and in a complementary manner, thus improving load forecasting accuracy. Furthermore, the LSM network effectively alleviates problems such as gradient vanishing and gradient exploding, ensuring the stability and convergence of the model in long-term series modeling.

[0070] In an exemplary embodiment, the training method for the first load prediction model and the second load prediction model includes: jointly training the first initial load prediction model to be trained and the second initial load prediction model to be trained to obtain the first load prediction model and the second load prediction model.

[0071] The first initial load forecasting model has the same structure as the first load forecasting model; the second initial load forecasting model has the same structure as the second load forecasting model.

[0072] It is understandable that once the first initial load forecasting model is trained, it becomes the first load forecasting model; once the second initial load forecasting model is trained, it becomes the second load forecasting model.

[0073] Optionally, the first initial load prediction model and the second initial load prediction model can be jointly trained by receiving the same sample historical load sequences, thereby enabling the models to learn complex structural features and time dependencies in parallel.

[0074] In one possible implementation, such as Figure 5 As shown, a training method is provided, including the following steps 501 to 504; wherein,

[0075] Step 501: Obtain the historical load sequence of the sample area to be predicted.

[0076] Understandably, to obtain accurate prediction results, it is necessary to construct the mapping relationship between input and output through numerous experiments and train the model based on historical load data covering different operating conditions and external factors. The training data must be sufficiently numerous and representative to reflect diverse operational characteristics, thereby improving the model's generalization performance. The first initial load prediction model (multilayer perceptron) is primarily responsible for uncovering complex patterns and nonlinear relationships in the historical load data, while the second initial load prediction model (long short-term memory network) focuses on modeling the temporal dependence and multi-timescale variation characteristics of the time series. Through this modular division of labor, the fusion model composed of the first and second load prediction models can achieve complementary representations of spatial and temporal features within the same prediction framework.

[0077] In one possible implementation, multiple initial sample historical loads of the region to be predicted are obtained; the multiple initial sample historical loads are preprocessed to obtain multiple sample historical loads; and a sample historical load sequence is obtained from the multiple sample historical loads based on a sliding window; wherein, the preprocessing includes outlier correction processing and missing value filling processing.

[0078] Load variations between adjacent time points are typically limited by physical inertia. Outliers can be identified using a relative rate of change threshold, which essentially sets a maximum permissible ramp rate (e.g., ±20% / minute). Points where the change exceeds this threshold may indicate data acquisition or transmission errors and are considered outliers. Correction for outliers can be achieved by replacing them with interpolation (e.g., taking the average load of adjacent time points), or by calculating a target value based on the maximum permissible ramp rate and the load of adjacent time points, and then replacing the outlier with the target value.

[0079] After obtaining the historical loads of multiple initial samples, a comprehensive analysis of the missing values ​​is performed. To ensure data quality, the missing values ​​are filled reasonably by referring to the historical load trend, or by interpolation.

[0080] Optionally, the obtained historical load samples are divided into a test set and a training set. The historical load sequence of samples is obtained from the training set based on a sliding window and used to train the first initial load prediction model and the second initial load prediction model. The test set is used to evaluate the performance of the first load prediction model and the second load prediction model obtained after training.

[0081] In one example, to implement the weighting factor The optimal settings reconstruct the load data into a three-dimensional structure of [number of samples, time step, number of features]. For example, using daily load data from seven consecutive days as input features to predict the load value for the eighth day no longer relies on the traditional forecasting model based on a fixed cycle. After the original data is flattened, the time series is traversed using a sliding window method, dividing the overlapping sample windows with a step size of 1, and generating a corresponding forecast target for the next day for each window. The test data remains unchanged throughout this process.

[0082] Step 502: Input the historical load sequence of the sample into the first initial load prediction model and the second initial load prediction model respectively to obtain the first sample load prediction result and the second sample load prediction result.

[0083] Step 503: Based on the first sample load prediction results and the second sample load prediction results, obtain the target loss value.

[0084] Step 504: Train the first initial load prediction model and the second initial load prediction model based on the target loss value, and obtain the first load prediction model and the second load prediction model after training.

[0085] During training, the Adam optimizer was used, the rectified linear unit (ReLU) was selected as the activation function, and the number of hidden layers and training epochs were reasonably configured to prevent overfitting. At the same time, appropriate structural parameters were set in the fully connected layers of the first initial load prediction model and in the second initial load prediction model to balance feature extraction depth and computational complexity.

[0086] In one possible implementation, a first loss value is obtained based on the first sample load prediction result, the actual load sequence, and the first loss function; a second loss value is obtained based on the second sample load prediction result, the actual load sequence, and the second loss function; the first loss function and the second loss function are different; and a target loss value is obtained based on the first loss value and the second loss value.

[0087] The first loss function can be the Mean Absolute Percentage Error (MAPE), and the second loss function can be the Root Mean Square Error (RMSE).

[0088] The expression for the mean absolute percentage error is as follows:

[0089]

[0090] The expression for the second loss function is as follows:

[0091]

[0092] in, This represents the total number of predicted time points. and The first The predicted and actual values ​​at each time point.

[0093] The target loss value is obtained based on the first loss value and the second loss value. This can be achieved by using the sum of the first loss value and the second loss value as the target loss value, or by taking a weighted sum of the first loss value and the second loss value.

[0094] During training, the multilayer perceptron requires known input and output samples. Through backpropagation, the network weights and biases are continuously adjusted to achieve a high-precision mapping between input and output, enabling the model to possess strong predictive capabilities even when facing unknown samples. This application integrates the multilayer perceptron with a long short-term memory network, fully leveraging the advantages of feedforward networks in feature extraction and nonlinear mapping, and the capabilities of recurrent networks in temporal dependency modeling. This results in the construction of a short-term power load forecasting framework with collaborative learning and adaptive capabilities, achieving high-precision prediction of short-term load changes in the power system.

[0095] In addition, the performance of the model can be evaluated using two types of metrics: mean absolute percentage error and root mean square error.

[0096] After training, the fusion model comprehensively utilizes the feature representations extracted by the multilayer perceptron and the long short-term memory network in the prediction stage to make accurate predictions on unknown data. This effectively overcomes the limitations of a single model in feature extraction or temporal modeling, and significantly enhances the robustness and adaptability of the prediction.

[0097] In summary, a three-dimensional input structure MLP-LSTM fusion model was designed for one-dimensional time series data. The multilayer perceptron, composed of multiple fully connected networks, possesses strong capabilities in feature abstraction and nonlinear relationship modeling. The long short-term memory network focuses on capturing and modeling time-dependent features, effectively identifying long-term dependency structures in the sequence. Combining the two, the multilayer perceptron is used to extract deep features from historical loads, and the long short-term memory network models their temporal evolution. Finally, the output layer generates the prediction results. The fusion structure model was built using the open-source neural network framework Keras and validated and optimized on multiple unseen datasets to improve the model's generalization ability. This application achieves a high degree of integration between feature modeling and time series prediction throughout the entire process, making it suitable for high-precision prediction and intelligent scheduling scenarios of short-term load in urban power grids.

[0098] The short-term load forecasting method proposed in this application achieves deep integration of feature extraction and time-series modeling by combining a multi-model collaborative algorithm. By introducing the nonlinear feature mapping capability of feedforward networks and the time dependency capture capability of recurrent networks into the same forecasting framework, this method can significantly improve the model's analytical ability and generalization performance for complex load patterns when dealing with load data that is high-dimensional, highly nonlinear, and has multi-time-scale variation characteristics. The introduction of long short-term memory networks effectively solves the problems of gradient vanishing and gradient exploding in traditional recurrent neural networks during long-sequence training, and uses gating mechanisms to retain key information while suppressing redundant information, thereby achieving long-term memory and accurate modeling of historical load change patterns.

[0099] This application introduces a multi-step time series construction mechanism in the data processing and modeling stages. By using a sliding window method, the raw load data is transformed into a three-dimensional structural input with time-dependent characteristics, overcoming the limitations of relying on fixed-period patterns. This allows the model to maintain high prediction accuracy even in non-stationary, frequently fluctuating load environments. Furthermore, a dynamic weighting factor is introduced into the fusion prediction formula. It can adaptively weight the prediction results of multilayer perceptron and long short-term memory network according to different data characteristics and operating scenarios, further enhancing the flexibility and robustness of the model in dealing with the variability and uncertainty of power load.

[0100] In terms of training strategy, this application utilizes an open-source neural network framework to construct and optimize a fusion model. Adaptive activation functions, optimizers, and regularization strategies are employed to prevent overfitting. The model is validated on multiple independent datasets to ensure its applicability and generalization ability under different operating conditions. This method not only achieves an organic unity between nonlinear mapping and temporal characteristics at the mathematical modeling level, but also provides a directly deployable technical solution for short-term load forecasting and optimized scheduling of power grids at the engineering application level, demonstrating significant practical value and potential for widespread application.

[0101] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0102] Based on the same inventive concept, this application also provides a short-term load forecasting device for implementing the aforementioned short-term load forecasting method. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the short-term load forecasting device provided below can be found in the limitations of the short-term load forecasting method described above, and will not be repeated here.

[0103] In one exemplary embodiment, such as Figure 6 As shown, a short-term load forecasting device 600 is provided, comprising: an acquisition module 601, a first determination module 602, a second determination module 603, and a third determination module 604, wherein:

[0104] The acquisition module 601 is used to acquire the historical load corresponding to multiple consecutive time points within the target historical time period of the area to be predicted, and to obtain the historical load sequence.

[0105] The first determining module 602 is used to input the historical load sequence into the trained first load prediction model to obtain the first load prediction result; the first load prediction model is a multilayer perceptron.

[0106] The second determining module 603 is used to input the historical load sequence into the trained second load prediction model to obtain the second load prediction result; the first load prediction model is a long short-term memory network.

[0107] The third determining module 604 is used to determine the target load forecast result based on the first load forecast result and the second load forecast result.

[0108] In one embodiment, the apparatus further includes a training module for jointly training a first initial load prediction model and a second initial load prediction model to be trained, thereby obtaining a first load prediction model and a second load prediction model.

[0109] In one embodiment, the training module is specifically used to obtain the sample historical load sequence of the region to be predicted; input the sample historical load sequence into the first initial load prediction model and the second initial load prediction model respectively to obtain the first sample load prediction result and the second sample load prediction result; obtain the target loss value based on the first sample load prediction result and the second sample load prediction result; train the first initial load prediction model and the second initial load prediction model based on the target loss value respectively, and obtain the first load prediction model and the second load prediction model after the training is completed.

[0110] In one embodiment, the training module is specifically used to obtain a first loss value based on the first sample load prediction result, the actual load sequence, and the first loss function; to obtain a second loss value based on the second sample load prediction result, the actual load sequence, and the second loss function; the first loss function and the second loss function are different; and to obtain a target loss value based on the first loss value and the second loss value.

[0111] In one embodiment, the training module is specifically used to take the sum of the first loss value and the second loss value as the target loss value.

[0112] In one embodiment, the training module is specifically used to obtain multiple initial sample historical loads of the region to be predicted; preprocess the multiple initial sample historical loads to obtain multiple sample historical loads; and obtain a sample historical load sequence from the multiple sample historical loads based on a sliding window; wherein the preprocessing includes outlier correction processing and missing value filling processing.

[0113] Each module in the aforementioned short-term load forecasting device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0114] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores data such as initial sample historical load, sample historical load, and historical load sequences. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a short-term load forecasting method.

[0115] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0116] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any one of the above method embodiments.

[0117] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above method embodiments.

[0118] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the above method embodiments.

[0119] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0120] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0121] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A short-term load forecasting method, characterized in that, The method includes: Obtain the historical load corresponding to multiple consecutive time points within the target historical time period of the region to be predicted, and obtain the historical load sequence. The historical load sequence is input into the trained first load prediction model to obtain the first load prediction result; the first load prediction model is a multilayer perceptron. The historical load sequence is input into the trained second load prediction model to obtain the second load prediction result; the first load prediction model is a long short-term memory network. The target load forecast result is determined based on the first load forecast result and the second load forecast result.

2. The method according to claim 1, characterized in that, The training methods for the first load forecasting model and the second load forecasting model include: The first initial load prediction model and the second initial load prediction model to be trained are jointly trained to obtain the first load prediction model and the second load prediction model.

3. The method according to claim 1, characterized in that, The process of jointly training the first initial load prediction model and the second initial load prediction model to obtain the first load prediction model and the second load prediction model includes: Obtain the historical load sequence of the sample in the region to be predicted; The sample historical load sequence is input into the first initial load prediction model and the second initial load prediction model respectively to obtain the first sample load prediction result and the second sample load prediction result. Based on the load prediction results of the first sample and the load prediction results of the second sample, the target loss value is obtained; The first initial load prediction model and the second initial load prediction model are trained based on the target loss value, and the first load prediction model and the second load prediction model are obtained after training.

4. The method according to claim 3, characterized in that, The step of obtaining the target loss value based on the first sample load prediction result and the second sample load prediction result includes: Based on the first sample load prediction result, the actual load sequence, and the first loss function, the first loss value is obtained; Based on the second sample load prediction result, the actual load sequence, and the second loss function, a second loss value is obtained; the first loss function and the second loss function are different. The target loss value is obtained based on the first loss value and the second loss value.

5. The method according to claim 4, characterized in that, The step of obtaining the target loss value based on the first loss value and the second loss value includes: The sum of the first loss value and the second loss value is taken as the target loss value.

6. The method according to claim 3, characterized in that, The step of obtaining the sample historical load sequence of the region to be predicted includes: Obtain the historical load of multiple initial samples in the region to be predicted; Multiple initial sample historical loads are preprocessed to obtain multiple sample historical loads; The historical load sequence of the samples is obtained from the multiple historical loads of the samples based on a sliding window. The preprocessing includes outlier correction and missing value filling.

7. A short-term load forecasting device, characterized in that, The device includes: The acquisition module is used to acquire the historical load corresponding to multiple consecutive time points within the target historical time period of the area to be predicted, and obtain the historical load sequence. The first determining module is used to input the historical load sequence into a trained first load prediction model to obtain a first load prediction result; the first load prediction model is a multilayer perceptron. The second determining module is used to input the historical load sequence into the trained second load prediction model to obtain the second load prediction result; the first load prediction model is a long short-term memory network. The third determining module is used to determine the target load forecast result based on the first load forecast result and the second load forecast result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.