A method, system, device, and medium for predicting the load of electricity market users

By building a model based on LSTM and dual Q network optimization in the power market user load prediction, the problems of imperfect data processing and insufficient generalization capabilities are solved, and higher prediction accuracy and model adaptability are achieved.

CN119940665BActive Publication Date: 2025-06-17LUCULENT SMART TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510436544.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-06-17
Estimated Expiration
2045-04-09

AI Technical Summary

Technical Problem

The existing power market user load prediction methods lack systematic processing of missing values, outliers and multimodal features in the data processing stage, resulting in unstable input data quality and affecting the accuracy of model training. Traditional LSTM models are difficult to effectively capture the influence of short-term fluctuations and environmental factors, resulting in large prediction errors, strong dependence on training data, and insufficient generalization ability.

Method used

A user load prediction method for power market is proposed. By collecting and preprocessing user load data, a user load prediction model based on LSTM and dual Q network optimization is constructed. The model performs missing value filling, outlier detection and normalization processing in the data preprocessing stage, and captures the long-term dependence relationship in the power load data through the LSTM network, and optimizes the prediction results with the independent learning ability of the dual Q network.

Benefits of technology

By systematically processing missing values ​​and outliers in the data, the quality and consistency of the input data are improved, and the generalization ability and prediction accuracy of the model are enhanced. The use of LSTM network effectively captures the long-term dependencies in power load data, while the optimization mechanism of the dual Q network improves the model's adaptability to environmental changes and reduces prediction errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940665B_ABST
    Figure CN119940665B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, device and medium for predicting the load of power market users, which relates to the technical field of predicting the load of power market users, including collecting the load data of power market users and performing preprocessing, and dividing the preprocessed data into a training set and an evaluation set. A user load prediction model optimized based on LSTM and double Q-network is constructed, and the training set is input for single-step prediction. The power market user load prediction model is evaluated based on the evaluation set. After the evaluation passes, future prediction data is input into the user load prediction model to obtain the predicted load of power market users. The method of the present invention can more comprehensively capture external variables affecting power load, thereby improving the accuracy and reliability of the prediction model. The adoption of the LSTM network combined with the double Q-network model enhances the model's ability to identify long-term trends, improves the accuracy of the prediction results and the generalization ability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power market user load forecasting, and specifically to a power market user load forecasting method, system, device and medium. Background Art

[0002] In the intelligent management of the power market, user load forecasting technology occupies a core position, and the importance of its research and practice cannot be ignored. From a scientific research perspective, power consumption patterns provide a solid theoretical basis for the iterative optimization of prediction models. From an engineering practice perspective, user load forecasting has a decisive impact on improving the economy and energy efficiency of the power grid. Accurate forecasting not only guides the rational allocation of power resources, reduces the construction and operation costs of the power system, but also effectively prevents power shortages or surpluses, ensuring the balance between power supply and demand. Therefore, power market user load forecasting is not only a quantitative estimate of power demand in the future period, but also one of the key technologies to ensure the safe, economic and efficient operation of the power system.

[0003] Currently, the application of deep learning technology has significantly promoted the development of power load forecasting technology. In particular, the user load forecasting method based on the long short-term memory network (LSTM), as an advanced time series forecasting technology, has been proven to be able to effectively capture the long-term dependencies in power load data. This method uses the unique memory ability of the LSTM network to deeply learn the historical patterns of power consumption, thereby providing more accurate load forecasting.

[0004] Although the LSTM-based power load forecasting method has significant advantages in capturing long-term dependencies, it may face challenges of insufficient generalization ability on unseen data. In addition, the accuracy of the LSTM model is largely limited by the quality and quantity of training data, which is particularly obvious in the case of scarce or low-quality data. Summary of the Invention

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

[0006] Therefore, the technical problems solved by the present invention are as follows: Existing methods usually rely on users' historical load data for forecasting, but lack systematic processing of missing values, outliers and multimodal features in the data processing stage, resulting in unstable input data quality, thus affecting the accuracy of model training. Although the traditional LSTM model can learn the long-term dependencies of time series, it is difficult to effectively capture the short-term fluctuations and the influence of environmental factors, resulting in large prediction errors. In addition, the existing LSTM forecasting methods are highly dependent on training data, have insufficient generalization ability when encountering unseen data, and are prone to overfitting, affecting the adaptability and stability of the model.

[0007] To solve the above technical problems, the present invention provides the following technical solutions: A method for predicting the load of power market users, including: collecting the load data of power market users and performing preprocessing, and dividing the preprocessed data into a training set and an evaluation set. Construct a user load prediction model optimized based on LSTM and double Q-network, and input the training set for single-step prediction. Evaluate the power market user load prediction model based on the evaluation set. After passing the evaluation, input future prediction data into the user load prediction model to obtain the predicted load of power market users. Constructing a user load prediction model optimized based on LSTM and double Q-network includes constructing an LSTM network, including an input layer, a hidden layer, and an output layer. The input layer receives a data sequence of consecutive time steps and performs data slicing according to a set time window to form input samples. The hidden layer uses memory units to calculate the impacts of user power consumption, weather data, and time characteristics on the current load state respectively, and extracts time series features representing the user load change pattern. The output layer generates short-term load prediction values as preliminary prediction results and further serves as state inputs to the double Q-network. Construct a double Q-network to optimize the prediction results output by LSTM. The state space of the double Q-network consists of the time series features output by LSTM, and the action space includes the adjustment range of the predicted load value. The double Q-network includes two independent Q-value networks. The first Q-value network estimates the Q-values of all possible actions in the current state, and the second Q-value network calculates the target Q-value. The parameters of the current Q-value network are updated by minimizing the mean square error between the predicted value and the target Q-value, and the parameters are periodically copied from the current Q-value network to the target Q-value network.

[0008] As a preferred solution of a method for predicting the load of power market users of the present invention, wherein: the collecting the load data of power market users and performing preprocessing includes obtaining user power consumption, weather data, time characteristics, and socio-economic indicators, and performing missing value filling, outlier detection, and normalization processing. The interpolation method is used for missing value filling. The Z-score method is used to identify outliers for outlier detection, and outliers are deleted based on the statistical distribution. The min-max method is used for normalization processing to scale all data to the range of -1 to 1.

[0009] As a preferred solution of a method for predicting the load of power market users of the present invention, wherein: dividing the preprocessed data into a training set and an evaluation set includes dividing according to a first division ratio.

[0010] As a preferred embodiment of a method for predicting the load of electricity market users according to the present invention, the construction of a user load prediction model optimized based on LSTM and double Q network includes constructing an LSTM network, which includes an input layer, a hidden layer, and an output layer. The input layer of the LSTM network receives a data sequence of consecutive time steps and performs data slicing according to a set time window to form input samples. The hidden layer of the LSTM network uses memory cells to calculate the impacts of user power consumption, weather data, and time features on the current load state respectively, and extracts time series features representing the change pattern of user load. The output layer of the LSTM network generates short-term load prediction values as preliminary prediction results, and further uses them as state inputs to the double Q network. A double Q network is constructed to optimize the prediction results output by the LSTM. The state space of the double Q network is composed of the time series features output by the LSTM, and the action space includes the adjustment range of the predicted load value. Two independent Q-value networks are constructed to calculate the Q-values of different actions. The first Q-value network estimates the Q-values of all possible actions in the current state, and the second Q-value network calculates the target Q-value.

[0011] As a preferred embodiment of a method for predicting the load of electricity market users according to the present invention, the single-step prediction of the input training set includes sequentially inputting the training set data into the LSTM neural network according to a set time step. During the training process, the mean square error is used as the loss function, and the Adam optimizer is used for gradient update to optimize the objective function and minimize the prediction error. After the training based on the LSTM network is completed, the hidden state vector of the final time step is extracted as the time series feature of the load prediction, and the time series feature of the load prediction is input into the double Q network to calculate the adjustment amount of the predicted load value. During the training process, the double Q network adopts a target Q-value update strategy to calculate the error between the current Q-value and the target Q-value and optimize the model parameters. An experience replay mechanism is adopted to store historical training samples and randomly extract past samples for training when updating the strategy.

[0012] As a preferred embodiment of a method for predicting the load of electricity market users according to the present invention, the evaluation of the electricity market user load prediction model based on the evaluation set includes calculating the error between the predicted value and the actual value, and using the mean square error, mean absolute error, and coefficient of determination as evaluation indicators to judge the prediction ability of the model. If the mean square error and mean absolute error are lower than the preset thresholds, and the coefficient of determination is in the range of 0.95 - 1, the model meets the actual prediction requirements; otherwise, the model is optimized.

[0013] As a preferred embodiment of the power market user load forecasting method of the present invention, it includes: obtaining the predicted power market user load by inputting the predicted data of the future time period, using the trained LSTM and double Q-network model for load forecasting, and storing and outputting the forecasting results. A rolling forecasting strategy is adopted during the forecasting process. Based on each step of forecasting, the latest forecasting value is used as the input for the next step. The forecasting results are stored in a database, and a real-time query function is provided through an API interface.

[0014] Another object of the present invention is to provide a power market user load forecasting system based on LSTM and double Q-network, which can obtain the predicted power market user load by constructing a user load forecasting model optimized based on LSTM and double Q-network, and solves the problems of imperfect data processing, large forecasting errors, low model generalization ability, and insufficient optimization and adjustment existing in the current power market user load forecasting method based on LSTM.

[0015] As a preferred embodiment of the system of the power market user load forecasting method of the present invention, it includes a preprocessing and dataset partitioning module, a training model module, and an evaluation and forecasting module.

[0016] The preprocessing and dataset partitioning module is used to collect power market user load data and perform preprocessing, and partition the preprocessed data into a training set and an evaluation set.

[0017] The training model module is used to construct a user load forecasting model optimized based on LSTM and double Q-network, and input the training set for single-step forecasting.

[0018] The evaluation and forecasting module is used to evaluate the power market user load forecasting model based on the evaluation set to obtain the predicted power market user load.

[0019] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a power market user load forecasting method.

[0020] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of a power market user load forecasting method.

[0021] Advantages of the present invention: In the process of constructing a power market user load prediction model, the power market user load prediction method provided by the present invention not only considers the traditional index of user power consumption, but also introduces multiple influencing factors such as temperature, holidays, and average monthly income of residents. This comprehensive consideration method can capture external variables affecting power load more comprehensively, thereby improving the accuracy and reliability of the prediction model. The present invention uses an LSTM network to capture long-term dependencies in power load data and combines the self-learning ability of a dual Q-network. This innovative fusion method not only enhances the model's ability to identify long-term trends, but also improves the model's adaptability to environmental changes through a reinforcement learning mechanism, improving the accuracy of prediction results and the generalization ability of the model. The present invention provides a more accurate and efficient technical solution in the field of power market user load prediction, with important practical value and broad application prospects. Description of the Drawings

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0023] Figure 1 It is the overall flowchart of a power market user load prediction method provided for the first embodiment of the present invention.

[0024] Figure 2 It is the model comparison curve graph of a power market user load prediction method provided for the second embodiment of the present invention. Detailed Embodiments

[0025] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will give a detailed description of the specific embodiments of the present invention in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.

[0026] Example 1, referring to Figure 1 This is an embodiment of the present invention, providing a power market user load prediction method, including:

[0027] S1: Collect power market user load data, perform preprocessing, and divide the preprocessed data into a training set and an evaluation set.

[0028] Obtain the user's power consumption, weather data, time features, and socio-economic indicators, and perform missing value filling, outlier detection, and normalization. Divide according to the first division ratio.

[0029] It should be noted that the obtained data needs to ensure comprehensive coverage of the factors affecting the power load, as shown in Table 1.

[0030] Table 1 Index table of the power market user load prediction dataset

[0031] Index Index type Index unit Example User power consumption Numeric type Degree 54,999,… Date Time type Year - Month - Day 2020-01-01,… Month Character type Month 1,2,3,…,12 Week Character type Week One, Two, Three, …, Seven Whether it is a holiday Character type None Yes / No Holiday category Character type None New Year's Day, Spring Festival, Tomb - Sweeping Day, … Average temperature Numeric type Degree Celsius 20,-2,… Humidity Numeric type Percentage 20,70,… Wind speed Numeric type Level 1,2,… Rainfall Numeric type Millimeter 10,23,… Average monthly income of residents Numeric type Yuan 3454,5677,…

[0032] It should be noted that a preferred solution for missing value filling, outlier detection, and normalization processing includes using the interpolation method for missing value filling. The Z-score method is used to identify outliers for outlier detection, and outliers are deleted based on the statistical distribution. The min-max method is used for normalization processing to scale all data to the range of -1 to 1. For the missing values in the data, the interpolation method is used for filling. For continuous data, linear interpolation is performed based on the trend of adjacent time points. For periodic features, such as the impact of holidays, the data of the most similar period is used for completion. For the outliers in the dataset, an outlier detection method based on the standard distribution is used to calculate the statistical distribution of the data, identify the outliers that deviate from the mean by more than a set multiple, and decide whether to correct or delete them according to the degree of the outliers. The determination of the outlier degree includes calculating the mean and standard deviation of the data, and judging whether the data points exceed the preset range. If they exceed the range, they are adjusted based on the distribution of historical data, or in extreme cases, the outliers are removed. For the user power consumption data, calculate the average value over a past period of time, and set the outlier range based on the standard deviation, so that the data points fall within the range of the mean plus or minus a fixed multiple of the standard deviation. The data points exceeding this range are regarded as outliers. For the user power consumption data with large short-term fluctuations, set the outlier detection threshold to the mean plus or minus three times the standard deviation to ensure that the data fluctuations during the peak or trough periods of the load are not misjudged as outliers, and at the same time, remove the data points outside this range. For weather data, including temperature, humidity, wind speed, and precipitation, set the outlier range according to the variation law of historical meteorological data. The outlier range of temperature is set to plus or minus two times the standard deviation of the historical mean, humidity is set to plus or minus three times the standard deviation, wind speed is set to plus or minus 2.5 times the standard deviation, and precipitation is set to plus or minus four times the standard deviation to adapt to the changes in different seasons and sudden weather conditions. For time features, including weekdays, weekends, holidays, etc., judge whether there are sudden power consumption outliers, set the outlier range to the mean of the load data in the same historical time period plus or minus two times the standard deviation, and adjust the outlier determination standard in combination with the holiday consumption behavior. For social and economic indicators such as the resident income level, since the data changes relatively slowly, set a stricter outlier determination standard, and the outlier range is the historical mean plus or minus 1.5 times the standard deviation to avoid affecting the overall stability of the data due to short-term fluctuations. After determining that the data is abnormal, if the data point deviates from the normal range but is still within the range that can be corrected, the weighted mean of adjacent time points is used for adjustment to maintain the data continuity. If the data point significantly deviates from the historical trend or exceeds the extreme threshold, it is marked as an outlier and removed to ensure the rationality and consistency of the data. In the data normalization processing, the normalization transformation method is used to scale all feature data to a unified interval to eliminate the influence of data dimensions, so that different types of data can be modeled and trained on the same scale.The normalization process uses the min-max scaling method. By calculating the minimum and maximum values of the data, it is converted into standardized data within a specific range to ensure that the numerical weights of different features are consistent.

[0033] Further, a preferred solution for dividing according to the first division ratio specifically includes setting the first division ratio to 8:2, and the ratio can be dynamically adjusted in actual applications.

[0034] S2: Construct a user load prediction model optimized based on LSTM and double Q-network, and input the training set for single-step prediction.

[0035] Construct an LSTM network, including an input layer, a hidden layer, and an output layer. The input layer of the LSTM network receives a data sequence of consecutive time steps and performs data slicing according to the set time window to form input samples. The hidden layer of the LSTM network uses memory cells to calculate the impacts of user power consumption, weather data, and time features on the current load state respectively, and extracts time series features representing the user load change pattern. The output layer of the LSTM network generates short-term load prediction values as the preliminary prediction results and further serves as the state input to the double Q-network. Construct a double Q-network to optimize the prediction results output by the LSTM. The state space of the double Q-network is composed of the time series features output by the LSTM, and the action space includes the adjustment range of the predicted load value. Construct two independent Q-value networks to calculate the Q-values of different actions. The first Q-value network estimates the Q-values of all possible actions in the current state, and the second Q-value network calculates the target Q-value.

[0036] Further, a preferred solution for constructing an LSTM network specifically includes: based on the training data set, first determine the input variables, including the user's historical power consumption, time features, weather data, and socio-economic indicators, and perform time window partitioning so that the data is input into the LSTM network in a sliding window manner. The input layer of the LSTM network receives multi-dimensional data within a set time window and organizes the data structure according to the time step, enabling the model to learn the time correlation of the load data. The input data is arranged in chronological order, and each time step corresponds to a data point of a time segment. The hidden layer of the LSTM network is composed of multiple recurrent units. Each recurrent unit controls the information flow through a gating mechanism and calculates the impacts of the user's power consumption, weather features, and time factors on the current load state respectively. The forget gate determines whether to retain past information, the input gate combines the current input data to adjust the state update, and the output gate generates the output of the current state based on the information of the previous time step. In the hidden layer, the calculation of each time step depends on the state information of the previous time step, enabling the LSTM to extract historical load patterns and learn long-term dependencies to adapt to the periodicity and mutability of the power load. The output layer of the LSTM network receives the final state of the hidden layer and maps it to a load prediction value through a fully connected layer to generate a short-term load prediction result. This prediction result can be used either as an independent prediction value or as the input state of the subsequent double Q network.

[0037] Furthermore, a preferred solution for constructing a double Q-network specifically includes constructing a double Q-network based on the prediction results output by the LSTM to optimize the load prediction accuracy and improve the generalization ability of the model. Among them, the input state of the double Q-network is composed of the final hidden state vector of the LSTM, reflecting the time series characteristics of the load data. The structure of the double Q-network includes a state space, an action space, and a reward function. The state space is composed of the time series characteristics output by the LSTM. The action space represents the adjustment amount of the predicted load value, defined in the range of [-δ, δ], allowing the model to make adjustments based on the prediction to reduce errors. The double Q-network is composed of two independent Q-value networks. One Q-value network is used to estimate the Q-values of all possible actions in the current state, and the other Q-value network is used to calculate the target Q-value to reduce the problem of overestimating the Q-value. The target Q-value is calculated using the temporal difference update method, enabling the model to gradually adjust the prediction strategy during the training process. Each Q-value network has an input layer, a hidden layer, and an output layer. The input layer receives the state vector. The hidden layer includes at least two layers of neurons, with no less than 64 neurons in each layer. The output layer outputs the Q-value of the action. The state space is composed of the time series characteristics output by the LSTM. The action space is defined as the adjustment range of the predicted load value, specifically [-δ, δ], where δ is the preset adjustment step. The action selection adopts the ε-greedy strategy. At the beginning of training, a random action is selected with a relatively large random probability ε. As the training progresses, ε is gradually reduced, and the probability of selecting the action with the maximum Q-value in the current state is increased. The update strategy includes updating the parameters of the current Q-value network and the target Q-value network. The parameters of the current Q-value network are updated by minimizing the mean square error between the predicted value and the target Q-value. The parameters of the target Q-value network are periodically copied from the current Q-value network. During the training process of the double Q-network, the current Q-value is first calculated, and the current optimal action is selected according to the reinforcement learning strategy. The corresponding target Q-value is calculated by the second Q-value network, thereby updating the parameters of the policy network to make the predicted value gradually approach the real load data.

[0038] It should be noted that the combined design of the LSTM and the double Q-network enables the model to not only utilize the time series modeling ability of the LSTM to extract long-term dependence information but also optimize the prediction error through the double Q-network and improve the generalization ability for unseen data. It solves the problem of insufficient generalization ability of the traditional LSTM model in load prediction, enables the model to have higher stability in the short-term power load prediction task, optimizes the prediction error through the reinforcement learning strategy, and improves the adaptability to the dynamic changes of the load, thereby avoiding the problem of accuracy decline of the fixed parameter model in a changing environment.

[0039] The single-step prediction includes sequentially inputting the training set data into the LSTM neural network according to the set time step. During the training process, the mean squared error is used as the loss function, and the Adam optimizer is used for gradient update to optimize the objective function and minimize the prediction error. After the LSTM network training is completed, the hidden state vector at the final time step is extracted as the time series feature for load prediction. The time series feature of load prediction is input into the double Q network as the state space to calculate the adjustment amount of the predicted load value. During the training process, the double Q network adopts the target Q-value update strategy, calculates the error between the current Q-value and the target Q-value, and optimizes the model parameters. The experience replay mechanism is adopted to store historical training samples, and past samples are randomly selected for training when updating the strategy.

[0040] Further, a preferred solution for single-step prediction specifically includes converting the hidden state vector of the LSTM into the state space of the double Q network. After the LSTM training is completed, the hidden state vector at the final time step is extracted. This vector contains the encoded information of the time series features by the LSTM network and is directly used as the input state vector of the double Q network. Coordinating the training processes of the two networks includes first training the LSTM network using the training set data until the loss function converges. Then, the output of the LSTM is used as the input of the double Q network, and the double Q network is trained using the reinforcement learning method. The experience replay mechanism is used to store historical training samples, and past samples are randomly selected for training when updating the strategy to improve the stability and generalization ability of the model.

[0041] S3: Evaluate the power market user load prediction model based on the evaluation set. After passing the evaluation, input future prediction data into the user load prediction model to obtain the predicted power market user load.

[0042] Calculate the error between the predicted value and the actual value, and use the mean squared error, mean absolute error, and coefficient of determination as evaluation indicators to judge the prediction ability of the model.

[0043] It should be noted that a preferred solution for using the mean squared error, mean absolute error, and coefficient of determination as evaluation indicators includes the mean error of the true value and the predicted value which is expressed as:

[0044] ,

[0045] where represents the actual load value, represents the load value predicted by the model, represents the total number of samples input into the model. represents the index of the samples input into the model.

[0046] The mean absolute error between the true value and the predicted value is expressed as:

[0047] ,

[0048] Coefficient of determination It is expressed as:

[0049] ,

[0050] wherein, represents the mean value of all actual load values.

[0051] If the mean squared error and the mean absolute error are lower than the preset threshold, and the coefficient of determination is close to 1, the model meets the actual prediction requirements; otherwise, the model is optimized.

[0052] Furthermore, based on the distribution characteristics of the historical load data of electricity market users in the present invention, the preset threshold of the mean squared error is set to 0.02. The threshold of the mean absolute error is set based on the load fluctuation of users. By statistically analyzing the load fluctuation range in different time periods, it is ensured that the error value does not exceed the normal load fluctuation range. In the present invention, the threshold of the mean absolute error is set to 0.15. The threshold of the coefficient of determination is set according to the model fitting degree requirement to ensure that the prediction result of the model can highly fit the actual load data. The experimental results on different evaluation sets show that when the coefficient of determination is close to one, the prediction effect of the model is optimal. Therefore, the threshold of the coefficient of determination is finally set to 0.95.

[0053] Even further, if the evaluation result satisfies that the mean squared error is less than 0.02, the mean absolute error is less than 0.15, and the coefficient of determination is greater than 0.95 and less than 1, it is considered that the prediction ability of the model meets the actual application requirements. If the evaluation result fails to meet the preset threshold, the model is optimized by adjusting the hyperparameters of the LSTM and the double Q-network, including the learning rate, the number of neurons in the hidden layer, and the number of training rounds, or by expanding the training data set to improve the generalization ability of the model until the evaluation index meets the set standard.

[0054] Input future prediction data into the user load prediction model to obtain the predicted electricity market user load, including inputting the prediction data for the future time period, including the user power consumption, weather data, time characteristics, and socioeconomic indicators for the next month. Use the trained LSTM and double Q-network models for load prediction, and store and output the prediction results. During the prediction process, a rolling prediction strategy is adopted. Based on each step of prediction, the latest prediction value is used as the input for the next step. The prediction results are stored in the database, and a real-time query function is provided through the API interface.

[0055] Example 2, refer to Figure 2, which is an embodiment of the present invention, provides a method for predicting user load in an electricity market. In order to verify the beneficial effects of the present invention, a scientific demonstration is carried out through simulation experiments.

[0056] In this embodiment, the historical load data of users in a certain area of ​​the power grid are selected, and the data is sampled with a time step of 15 minutes to construct a time series input. The simulation experiment builds a prediction model based on LSTM and double Q network, and compares and analyzes it with the traditional LSTM model to evaluate the performance of this method in unified load forecasting.

[0057] like Figure 2 As shown in the figure, the comparison curves of Q-LearningLSTM model, traditional LSTM model and real data are plotted. The horizontal axis represents time (in days), and the vertical axis represents user load (time-sharing value of unified load regulation). The experimental results show that the Q-LearningLSTM model can more accurately capture the changing trend of load and provide better prediction results in time periods with large load peak and valley changes (such as noon and night). In contrast, the traditional LSTM model has large errors in periods with drastic load fluctuations, while the method of the present invention optimizes the weight update strategy of LSTM through the reinforcement learning mechanism, thereby improving the generalization ability and prediction accuracy of the model.

[0058] Embodiment 3 is an embodiment of the present invention, which provides a power market user load forecasting system based on LSTM and dual Q network, including a preprocessing and data set partitioning module, a training model module, and an evaluation and prediction module.

[0059] The module for preprocessing and dividing data sets is used to collect user load data in the power market, perform preprocessing, and divide the preprocessed data into training sets and evaluation sets.

[0060] The training model module is used to build a user load forecasting model based on LSTM and dual Q network optimization, and input the training set for single-step prediction.

[0061] The evaluation and prediction module is used to evaluate the power market user load prediction model based on the evaluation set to obtain the predicted power market user load.

[0062] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, etc., all kinds of media that can store program codes.

[0063] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.

[0064] More specific examples (nonexhaustive list) of computer-readable media include the following: electrical connection parts with one or more wirings (electronic devices), portable computer disk cartridges (magnetic devices), random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memories), fiber optic devices, and portable compact disc read-only memories (CDROM). Additionally, a computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0065] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having suitable combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc. It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A method for predicting user load in a power market, characterized in that: include: Collect and preprocess the user load data of the power market, and divide the preprocessed data into a training set and an evaluation set; Build a user load forecasting model based on LSTM and dual Q network optimization, and input the training set for single-step forecasting; The power market user load forecasting model is evaluated based on the evaluation set. After the evaluation is passed, the future forecast data is input into the user load forecasting model to obtain the predicted power market user load; Building a user load forecasting model based on LSTM and dual Q network optimization includes building an LSTM network, including an input layer, a hidden layer, and an output layer; The input layer receives a data sequence of continuous time steps and slices the data according to the set time window to form input samples; The hidden layer uses memory units to calculate the impact of user power consumption, weather data and time characteristics on the current load state, and extract the time series features that characterize the user load change pattern; The output layer generates short-term load forecast values ​​as preliminary forecast results, which are further input into the dual Q network as states; A double Q network is constructed to optimize the prediction results of LSTM output. The state space of the double Q network is composed of the time series features of LSTM output, and the action space includes the adjustment range of the predicted load value. The dual Q-network consists of two independent Q-value networks. The first Q-value network estimates the Q-values ​​of all possible actions in the current state, and the second Q-value network calculates the target Q-value. The parameters of the current Q-value network are updated by minimizing the mean square error between the predicted value and the target Q-value, and the parameters are periodically copied from the current Q-value network to the target Q-value network. Inputting the training set for single-step prediction includes, Input the training set data into the LSTM neural network in sequence according to the set time step; During the training process, the mean square error is used as the loss function, and the Adam optimizer is used to update the gradient, optimize the objective function, and minimize the prediction error; After the LSTM network training is completed, the hidden state vector of the final time step is extracted as the time series feature of the load forecast, and the time series feature of the load forecast is input into the double Q network to calculate the adjustment amount of the predicted load value; During the training process, the dual Q network adopts the target Q value update strategy to calculate the error between the current Q value and the target Q value and optimize the model parameters; Adopt the experience replay mechanism to store historical training samples, and randomly extract past samples for training when updating the strategy; The predicted electricity market user load includes: Input forecast data for future time periods, use the trained LSTM and dual Q network models to perform load forecasting, and store and output the forecast results; The rolling forecast strategy is adopted in the forecast process. Based on each step of forecast, the latest forecast value is used as the input for the next step. The prediction results are stored in the database, and real-time query functions are provided through the API interface.

2. A method for predicting user load in a power market according to claim 1, characterized in that: The collecting and preprocessing of power market user load data includes: Obtain user power consumption, weather data, time characteristics, and socioeconomic indicators, and perform missing value filling, outlier detection, and normalization processing; Interpolation method is used to fill missing values; The Z-score method is used to identify outliers for outlier detection, and outliers are deleted based on statistical distribution; The min-max method was used for normalization, scaling all data to the range of -1 to 1.

3. A method for predicting user load in a power market according to claim 1 or 2, characterized in that: The dividing of the preprocessed data into a training set and an evaluation set includes: Divide according to the first division ratio.

4. A method for predicting user load in a power market according to claim 3, characterized in that: The evaluation of the power market user load forecasting model based on the evaluation set includes: Calculate the error between the predicted value and the actual value, and use the mean square error, mean absolute error, and determination coefficient as evaluation indicators to determine the prediction ability of the model; If the mean square error and mean absolute error are lower than the preset thresholds and the coefficient of determination is in the range of 0.95-1, the model meets the actual prediction requirements, otherwise the model is optimized.

5. A system for predicting user load in the power market, characterized in that: It includes modules for preprocessing and partitioning data sets, training models, and evaluation and prediction; The preprocessing and data set division module is used to collect and preprocess the user load data of the power market, and divide the preprocessed data into a training set and an evaluation set; The training model module is used to build a user load forecasting model based on LSTM and dual Q network optimization, and input the training set for single-step forecasting; Constructing a user load forecasting model based on LSTM and dual Q network optimization includes constructing an LSTM network, including an input layer, a hidden layer and an output layer; the input layer receives a data sequence of continuous time steps, and slices the data according to a set time window to form an input sample; the hidden layer uses memory units to respectively calculate the influence of user power consumption, weather data and time characteristics on the current load state, and extracts time series characteristics that characterize the user load change pattern; the output layer generates a short-term load forecast value as a preliminary forecast result, and further inputs it into the dual Q network as a state; constructing a dual Q network to optimize the forecast result output by LSTM, the state space of the dual Q network is composed of the time series characteristics of the LSTM output, and the action space includes the adjustment range of the forecast load value; the dual Q network includes two independent Q value networks, the first Q value network estimates the Q values ​​of all possible actions in the current state, and the second Q value network calculates the target Q value, updates the parameters of the current Q value network by minimizing the mean square error between the forecast value and the target Q value, and periodically copies the parameters from the current Q value network to the target Q value network; inputting a training set for single-step forecasting includes sequentially inputting the training set data into the LSTM neural network according to the set time step; During the training process, the mean square error is used as the loss function, and the Adam optimizer is used for gradient update to optimize the objective function and minimize the prediction error. After the LSTM network training is completed, the hidden state vector of the final time step is extracted as the time series feature of the load forecast, and the time series feature of the load forecast is input into the double Q network to calculate the adjustment amount of the predicted load value. During the training process, the dual Q network adopts the target Q value update strategy, calculates the error between the current Q value and the target Q value, and optimizes the model parameters; it adopts the experience replay mechanism to store historical training samples, and randomly extracts past samples for training when updating the strategy; The predicted power market user load includes: inputting the prediction data of the future time period, using the trained LSTM and double Q network models to perform load prediction, and storing and outputting the prediction results; adopting a rolling prediction strategy in the prediction process, and using the latest prediction value as the input of the next step based on each step of prediction; the prediction results are stored in a database, and a real-time query function is provided through an API interface; the evaluation and prediction module is used to evaluate the power market user load prediction model based on the evaluation set to obtain the predicted power market user load.

6. 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, the steps of a method for predicting user load in a power market as claimed in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for predicting user load in a power market according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Power short-term load prediction method based on deep reinforcement learning and transfer learning

    CN116306229A

  • Electric power load prediction method and prediction device based on LSTM network model

    CN117521724A