Power load probability prediction model construction method and application
The Mamba encoder and Gaussian process decoder enhance electric load forecasting by addressing information compression and interpretability issues, improving prediction accuracy and uncertainty quantification in complex load data.
Patent Information
- Application Number
- CN202510334332.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-15
AI Technical Summary
The existing Seq2Seq model has problems such as insufficient information compression and low interpretability in power load prediction, resulting in low prediction accuracy, especially in multi-step load prediction tasks with large cumulative errors.
The power load probability prediction model is constructed by using Mamba encoder and Gaussian process decoder. The timing dependencies are captured through the Mamba encoder and the interrelationship between the Gaussian process decoder modeling features. Combined with the inducible point set and Lanczos decomposition technology, the prediction accuracy and interpretability of the model are improved.
It significantly improves the accuracy and interpretability of power load prediction, can effectively process complex time series data, provide efficient multi-step load prediction and uncertainty quantification, and is suitable for complex industrial environments.
Smart Images

Figure CN120320288A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric load forecasting, and more specifically, relates to a method for constructing an electric load probability forecasting model and its application. Background Art
[0002] With the accelerating development of modernization and urbanization, electricity, as a basic resource in modern society, its stability and supply efficiency play an important role in social and economic development. In the power system, through accurate electric load forecasting, a reasonable power supply plan can be formulated in advance, thereby optimizing resource allocation, reducing system losses, and improving power supply reliability and security. For power enterprises and energy suppliers, accurate electric load forecasting can help balance the supply and demand relationship, reduce operating costs, and provide data support for implementing demand response. However, due to the complexity and uncertainty of electric load data (such as being affected by weather, economic fluctuations, and changes in electricity consumption patterns), accurately forecasting electric load has always been a challenging task.
[0003] Electric load data is essentially time - series data, and its characteristics are manifested as complex time - dependence, non - linear volatility, and covariate - dependence. To solve the problem of electric load forecasting, the currently commonly used technical methods are mainly divided into three categories: statistics - based methods, traditional machine learning methods, and deep - learning - based methods. Compared with statistics - based methods and traditional machine learning methods, deep learning has become a research hotspot in electric load forecasting in recent years due to its powerful non - linear modeling ability. Convolutional neural networks (CNNs) and long short - term memory (LSTM) networks have been widely used in single - step load forecasting tasks and achieved certain results. However, in multi - step load forecasting tasks, there will be cumulative errors. The Seq2Seq model (sequence - to - sequence model) provides a new idea for multi - step forecasting. The Seq2Seq model can achieve input - output forecasting in different time dimensions through an encoder - decoder architecture. The encoder converts the input sequence into a fixed - size context vector, and the decoder generates the output sequence based on the context vector.
[0004] However, the existing Seq2Seq model shows obvious defects when dealing with such long - sequence data as electric load data: (1) Insufficient information compression: It is difficult for the encoder to compress all the effective information in a long time series into a fixed - size context vector. Therefore, when forecasting electric load data, it is impossible to effectively mine the time - series characteristics of electric load data, resulting in low forecasting accuracy; (2) Low interpretability: Using quantile regression for electric load probability forecasting makes the interpretability of the model low; moreover, the modeling ability is poor, resulting in low forecasting accuracy. Summary of the Invention
[0005] In view of the above defects or improvement requirements of the prior art, the present invention provides a method for constructing a power load probability prediction model and its application, aiming to improve the interpretability of the power load probability prediction model and the accuracy of power load prediction.
[0006] To achieve the above object, the present invention provides a method for constructing a power load probability prediction model, including:
[0007] Construct a power load probability prediction model, and train the power load probability prediction model using a training sample set. The training samples include: a sequence of power load data at T historical time steps and external covariates, and the label is a sequence of power load data at M prediction time steps; wherein, the external covariates include weather data and date data at the corresponding time steps.
[0008] The power load probability prediction model includes: a Mamba encoder and a Gaussian process decoder; the Mamba encoder is used to capture the temporal dependence relationship of the input training samples to obtain the corresponding feature vector z; the Gaussian process decoder is used to model the mutual relationship between the features in the feature vector z to obtain the corresponding covariance matrix and mean; the Gaussian distribution composed of the covariance matrix and the mean is used as the power load probability distribution at the predicted next time step t; wherein, t ∈ {T + 1, T + 2,..., T + M}.
[0009] Take the mean of the probability distribution as the power load value at the predicted next time step t; splice the power load data at the predicted next time step t with the power load data at its nearest neighbor's T - 1 historical time steps to form a power load data sequence with a length of T, and splice it with the corresponding external covariates, and then input it into the Mamba encoder for regression. After M regressions, obtain the power load probability distributions at M prediction time steps.
[0010] Use the likelihood function or negative log-likelihood function between the mean of the power load probability distribution predicted by the Gaussian process decoder and the corresponding label as the loss function to train the model until the model converges or reaches the preset number of training epochs, and obtain the trained power load probability prediction model.
[0011] Further, the Gaussian process decoder models the mutual relationship between the features in the feature vector z to obtain the corresponding covariance matrix and mean, including:
[0012] Linear interpolation is performed on the features of each dimension in the feature vector z using the induced point set U to obtain the corresponding weight vector W. Based on the weight vector W and the kernel function matrix K(U, U) corresponding to the induced point set U, the kernel function matrices corresponding to the features of each dimension are approximated; wherein, the induced point set U is a sparse point set of a preset dimension, and the values of the elements in the set are learned through model training.
[0013] Multiply the kernel function matrices corresponding to the features of each dimension in the feature vector z as the covariance matrix of the feature vector z; the mean value of the feature vector z is updated using the mean value of the training samples during the model training process, and the initial mean value is 0.
[0014] Further, the kernel function matrix K(z, z) corresponding to the features of each dimension is WK(U, U)W T ;
[0015] Among them, K(U, U) is approximated by Lanczos decomposition, including:
[0016] Using Lanczos decomposition, decompose the kernel function matrix K(U, U) corresponding to the induced point set U into QNQ T ; where N is the tridiagonal matrix after Lanczos decomposition, Q is the orthogonal matrix corresponding to K(U, U), and Q T is the transpose of Q.
[0017] Further, the Mamba encoder includes 3 cascaded Mamba modules; each of the Mamba modules includes a Mamba state space neural network and application layer normalization;
[0018] The application layer normalization is used to normalize the feature vector output by the Mamba state space neural network to obtain the feature vector z.
[0019] Further, the Mamba state space neural network includes:
[0020] A multi-layer perceptron for embedding the input training samples into a high-dimensional feature space to obtain high-dimensional features;
[0021] A convolutional layer for capturing the local time dependence characteristics in the high-dimensional features to obtain an enhanced feature vector x;
[0022] A selective state space model for dynamically processing the enhanced feature vector x based on a selective mechanism to obtain a processed feature vector.
[0023] Further, it also includes normalizing the power load data sequence and weather data in the training samples;
[0024] It also includes extracting the periodic features of the date data using a triangular position encoding function and replacing the date data in the training samples with the periodic features.
[0025] The present invention also provides a method for predicting the probability of electric load, including:
[0026] Inputting the electric load data sequence and corresponding external covariates at T historical time steps including the current time step into the trained electric load probability prediction model to obtain the electric load probability distribution at M prediction time steps; wherein, the trained electric load probability prediction model is constructed by the electric load probability prediction model construction method described in any one of the above.
[0027] Further, it also includes:
[0028] Outputting the mean μ of the electric load probability distribution f* and using it as the electric load data at the corresponding prediction time step;
[0029] Outputting the variance of the electric load probability distribution to quantify the uncertainty of the prediction result;
[0030] According to the mean μ f* and the variance generate the confidence interval of the electric load.
[0031] The present invention also provides an electronic device, including a computer-readable storage medium and a processor;
[0032] The computer-readable storage medium is used to store executable instructions;
[0033] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the electric load probability prediction model construction method described in any one of the above, or execute the electric load probability prediction method described above.
[0034] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the electric load probability prediction model construction method described in any one of the above, or implements the electric load probability prediction method described above.
[0035] Generally speaking, through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:
[0036] (1) The method of the present invention uses a Mamba encoder to capture complex temporal dependencies in input samples, improving the prediction accuracy of the model; a Gaussian process decoder is used to model the correlations between features in the feature vectors output by the Mamba encoder. The predicted covariance matrix can intuitively reflect the correlations between features in the input feature vectors. Subsequent probability predictions are made based on the covariance matrix, improving the interpretability of the model and having the advantage of strong Gaussian process modeling capabilities. After the Mamba encoder, the present invention uses Gaussian process to model the correlations between features in the feature vectors output by the Mamba encoder, which can make full use of the feature extraction ability of the Mamba encoder and further improve the prediction accuracy of the model.
[0037] (2) Preferably, the Gaussian process decoder uses kernel function interpolation technology to approximate the covariance matrix, combined with inducing points, reducing the computational complexity and storage requirements. The power load probability prediction model based on the Mamba encoder and the Gaussian process decoder can adapt to high-noise and complex load data environments.
[0038] (3) Preferably, the Lanczos low-rank matrix factorization method is used to decompose the kernel function matrix K(U,U) corresponding to the inducing point set U into a tridiagonal matrix, further accelerating matrix operations and ensuring the efficiency and accuracy of predictions.
[0039] (4) Preferably, the Mamba encoder includes 3 cascaded Mamba modules, enabling the model to fully extract complex temporal dependencies in the sequence while maintaining computational efficiency.
[0040] (5) Preferably, the Mamba encoder is composed of a multi-layer perceptron, a convolutional network, and a selective state space module, which can efficiently process long sequence data, extract important features in the input data and ignore redundant information through the selective state space mechanism.
[0041] (6) Preferably, by normalizing the original load data, the data range is limited to [0,1] to reduce the influence of data dimensions and accelerate the model convergence speed. The date data is replaced with periodic features of the date data, enhancing the model's ability to capture time series data.
[0042] (7) Preferably, the prediction results of the model include point prediction, probability distribution, and prediction interval, quantifying the uncertainty of the prediction.
[0043] In summary, the present invention deeply integrates the Mamba state space neural network encoder and the Gaussian process decoder, thereby realizing multi-step load probability prediction. During the prediction process, the Mamba neural network encoder can efficiently extract spatio-temporal features from long-sequence input data, dynamically process power load sequence information through the selective state space module, and enhance the feature expression ability of the model; the Gaussian process decoder combines kernel function interpolation technology, approximates the covariance matrix (kernel function matrix), realizes scalable probability prediction, and provides accurate uncertainty quantification. By inputting the features extracted by the Mamba encoder into the Gaussian process decoder, the model generates the predicted mean and prediction interval, and at the same time adopts low-rank matrix factorization technology to improve the calculation efficiency, overcoming the limitations of traditional methods in dealing with noisy data and large-scale data sets. Through the organic combination of Gaussian processes and probability modeling, the present invention significantly improves the accuracy and robustness of load prediction, is particularly suitable for multi-step load prediction tasks in complex industrial environments, and has high practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Schematic diagram of the power load probability prediction model in the embodiment of the present invention;
[0045] Figure 2 Schematic diagram of the Mamba encoder structure in the embodiment of the present invention;
[0046] Figure 3 Schematic diagram of the Mamba state space neural network structure;
[0047] Figure 4 Schematic diagram of the SSM unit;
[0048] Figure 5 Schematic diagram of the kernel function interpolation GP calculation process in the embodiment of the present invention;
[0049] Figure 6 Schematic diagram of the MaGP model prediction process in the embodiment of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS
[0050] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0051] Embodiment 1
[0052] As Figure 1 shown, the embodiment of the present invention provides a method for constructing a power load probability prediction model, which mainly includes:
[0053] Construct a power load probability prediction model (MaGP model), and use the training sample set to train the power load probability prediction model. The training samples include: a sequence of power load data at T historical time steps and corresponding external covariates, and the label is a sequence of power load data at M prediction time steps; wherein, the external covariates include weather data and date data at the corresponding time steps; the weather data includes rainfall, temperature, air pressure, humidity, etc. In order to eliminate the dimensional difference between data of different dimensions, it also includes using a normalization method to normalize the power load data sequence and weather data to the range of [0, 1]; in the embodiment of the present invention, the normalization method is the Max-Min normalization method. Preferably, it also includes using a triangular positional encoding function (Sin-Cos) to extract the periodic characteristics of the date data, and replacing the date data with the periodic characteristics of the date data to enhance the model's ability to capture time series data. The periodic characteristics of the normalized power load data sequence, weather data, and date data at T historical time steps are organized into a sequence with a length of S and input into the power load probability prediction model for training; in the embodiment of the present invention, the length of each time step is 24 hours.
[0054] In the embodiment of the present invention, the power load probability prediction model includes: a Mamba encoder and a Gaussian process decoder (GP decoder).
[0055] The Mamba encoder is used to capture the temporal dependence of the input training samples to obtain the corresponding feature vector z.
[0056] The Gaussian process decoder is used to model the mutual relationship between the features in the feature vector z to obtain the corresponding covariance matrix and mean; the Gaussian distribution composed of the covariance matrix and mean is used as the power load probability distribution at the predicted next time step t; wherein, t ∈ {T + 1, T + 2,..., T + M}.
[0057] The data obtained after taking the mean of the probability distribution is used as the power load value at the predicted next time step t; the power load data at the predicted next time step t and the power load data at its nearest neighbor's T - 1 historical time steps are concatenated into a power load data sequence with a length of T, and after being concatenated with external covariates such as corresponding weather data and date data, they are used as new training samples and input into the Mamba encoder for regression. After M regressions, the probability distributions corresponding to M time steps are obtained.
[0058] Using the likelihood function or negative log-likelihood function between the mean of the probability distribution predicted by the Gaussian process decoder and the corresponding label as the loss function, the model is trained until the model converges or reaches the preset number of training epochs to obtain a trained power load probability prediction model.
[0059] Preferably, the Mamba encoder includes 3 Mamba modules connected in series, enabling the model to fully extract complex temporal dependencies in the sequence while maintaining computational efficiency, such as Figure 2 shown. Each Mamba module includes a Mamba state space neural network and an application layer normalization (Layer Normalization). The structure of the Mamba state space neural network is as Figure 3 shown; the application layer normalization is used to normalize the feature vectors output by the Mamba state space neural network to obtain the feature vector z, so as to stabilize and accelerate the training process and alleviate the problems of gradient vanishing and explosion at the same time.
[0060] In the embodiment of the present invention, the Mamba state space neural network includes a multi-layer perceptron (MLP), a convolutional layer, and a selective state space model (SSM) connected in sequence.
[0061] The multi-layer perceptron (MLP) is used to embed the input training samples into a high-dimensional feature space to obtain high-dimensional features; in the embodiment of the present invention, the input training samples are transformed into a 256-dimensional feature space through the multi-layer perceptron (MLP). This process aims to extract high-level features of the input data through a series of non-linear transformations.
[0062] The convolutional layer is used to capture the local temporal dependence characteristics in the high-dimensional features to obtain an enhanced feature vector x; in the embodiment of the present invention, the high-dimensional feature data is processed by a convolutional layer with a kernel size of 3 to capture local temporal dependencies, thereby further enhancing the representation ability of the input features.
[0063] As Figure 4 shown, the selective state space model (SSM) is used to dynamically process the enhanced feature vector based on a selective mechanism to obtain a processed feature vector. In the embodiment of the present invention, the data output by the convolution is input into the selective state space model (SSM) module and extended to 512 dimensions. In this process, by performing a dynamic linear transformation on the enhanced feature vector x output by the convolutional layer, the parameter matrices Δ, B, and C of the selective state space model are obtained:
[0064] B = Linear B (x), C = Linear C (x), Δ = Linear Δ (x)
[0065] wherein, Linear P (·) represents the linear transformation for the parameter matrix P in the selective state space model, and P ∈ {Δ, B, C}.
[0066] In order to capture time series data and perform reasonable forgetting, the parameter matrix A adopts the Hippo matrix.
[0067] To improve numerical stability and computational efficiency, the parameter matrices A and B are discretized using the zero-order hold method, and the formula is as follows:
[0068]
[0069]
[0070] where and represent the discrete forms of the parameter matrices A and B respectively; * represents the dot product operation, I represents the identity matrix; (Δ*A) -1 represents the inverse matrix of Δ*A.
[0071] Based on and the selective state space model performs an autoregressive process to update the hidden state h t and the output o t :
[0072]
[0073] o t = Ch t
[0074] where h t represents the hidden state of the selective state space model at the next time step t.
[0075] To stabilize and accelerate the training process and at the same time alleviate the problems of gradient vanishing and explosion, the output o t is processed by layer normalization:
[0076]
[0077] where o (i) represents the i-th feature in the output o t , z (i) represents the i-th feature in the feature vector z output by the Mamba encoder, that is, the normalized feature; represents the mean of the features of a single sample, Var(o batch ) represents the variance of the features of a single sample; ∈ represents a parameter to avoid division by zero; γ represents the scale parameter, and β represents the bias parameter, which are learned through model training.
[0078] The feature vector z output by the Mamba encoder is passed to the Gaussian process decoder. As a non-parametric model, the Gaussian process predicts future power load values by modeling the relationships between internal features in the feature vector z. To enhance the robustness of the model and better reflect the uncertainty in prediction, Gaussian noise is added to the predicted values:
[0079] y pred = f(z) + ∈ n , ∈ n ~N(0, σ′I)
[0080] where y pred represents the output predicted by the Gaussian process decoder; f(z) represents the Gaussian process, and ∈ n represents Gaussian noise; I is the identity matrix, and σ′ is the variance of the Gaussian noise.
[0081] As a specific implementation, as Figure 5 shown, in the Gaussian process decoder, by modeling the mutual relationships between variables in the feature vector z, the corresponding covariance matrix and mean are obtained, including:
[0082] The induced point set U is used to linearly interpolate the features of the i-th dimension in the feature vector z to obtain the corresponding weight vector W. Based on the weight vector W and the kernel function matrix K(U, U) corresponding to the induced point set U, the kernel function matrix corresponding to the features of the i-th dimension is approximated, and the kernel function matrices corresponding to the features of each dimension in the feature vector z are multiplied as the covariance matrix of the current feature vector z; the mean of the current feature vector z is updated using the mean of the samples during the model training process, and the initial mean is 0; among them, the induced point set U is a sparse point set with a dimension preset to be lower than the dimension of the feature vector z, and the elements (induced points) in the induced point set U are learned through model training. In the embodiments of the present invention, the dimension of the induced point set U is 8, and its initial elements follow a uniform distribution between 0 and 1; in the embodiments of the present invention, the dimension of the feature vector z is n.
[0083] The Gaussian process is trained by maximizing the likelihood function or minimizing the negative log-likelihood (NLL). Since traditional Gaussian processes face high computational complexity when dealing with large-scale datasets, this model uses scalable kernel interpolation techniques to approximate the kernel function matrix K(z, z) through the induced point set U:
[0084] K(z, z) ≈ WK(U, U)W T
[0085] Among them, W is the interpolation weight matrix. To further improve the calculation efficiency, the model uses Lanczos decomposition to approximate the kernel function matrix K(U, U) (the kernel function matrix of the induced points, covariance matrix) corresponding to the induced point set U as a tridiagonal matrix N:
[0086] K(U, U) ≈ QNQ T
[0087] Among them, K(U, U) is the matrix composed of the kernel function values at each induced point in the induced point set U, Q is the orthogonal matrix corresponding to K(U, U), and Q T is the transpose of Q.
[0088] This method not only reduces the computational complexity but also maintains the key properties of the kernel matrix, enabling the model to run efficiently on large-scale datasets.
[0089] In the embodiments of the present invention, the model parameters are adjusted with the goal of minimizing the negative log-likelihood (NLL). During the training process, the model calculates the gradient of NLL with respect to the model parameters through the backpropagation algorithm and uses the Adam optimizer to update the hyperparameters θ of the Gaussian process and the parameters of the Mamba neural network encoder to minimize NLL. The training process continues to iterate until the model converges or reaches the preset number of training epochs.
[0090] The negative log-likelihood (NLL) loss function in the embodiments of the present invention is:
[0091]
[0092] Among them, Δy = y - m(z), y represents the label, m(z) represents the mean of the probability distribution output by the model, K is the covariance matrix, θ is the model parameter, and n is the dimension of the feature vector z. The parameters of the Mamba encoder and GP decoder are optimized through backpropagation to minimize the loss function and ensure the stable convergence of the model.
[0093] After the model is trained, in the application prediction stage, the power load probability prediction method provided by the present invention includes:
[0094] The new data x formed by splicing the power load data sequence at T historical time steps including the current time step and the corresponding external covariates * is input into the above-trained power load probability prediction model. After being processed by the encoder and decoder, the decoder outputs the power load probability distribution at M prediction time steps. As Figure 6 shown, B represents the batch size, S is the sequence length, and D is the dimension of the features in the sample.
[0095] Output the mean μ of the power load probability distribution at each predicted time stepf* , and use it as the power load data at the corresponding predicted time step; output the variance of the probability distribution of the predicted power load at each time step to quantify the uncertainty of the prediction results.
[0096] It also includes generating a confidence interval (such as a 95% prediction interval) for the power load according to the mean μ f* and variance to provide a reliable risk assessment reference for power grid decision-making.
[0097] Finally, the model provides the probability distribution, point prediction value, and confidence interval of the future power load. These outputs not only improve the accuracy of the prediction but also provide scientific support for the operation and scheduling of the power system by quantifying the uncertainty, helping power grid managers make more robust decisions in an uncertain environment.
[0098] During the implementation process, the model relies on high-performance GPUs to accelerate the training of deep neural networks and the kernel matrix operations of Gaussian processes. In terms of the software environment, the Python programming language is used, combined with the PyTorch deep learning framework and the GPyTorch Gaussian process library. The hyperparameters of the model, such as the hidden state dimension of the Mamba encoder, the number of inducing points of the Gaussian process, the learning rate, and the batch size, are optimized through a cross-validation strategy. In addition, the learning rate decay and early stopping mechanisms are combined during the model training process to improve the training efficiency and prevent overfitting.
[0099] The present invention has significant technical advantages. The provided MaGP model can effectively process long sequence data, capture complex temporal dependencies, and provide high-precision probabilistic load forecasting. In addition, the scalable kernel interpolation technology and Lanczos decomposition method are adopted, significantly improving the computational efficiency and scalability of the model on large-scale datasets (low computational cost, suitable for larger datasets), meeting the high requirements of modern power grids for real-time and accuracy. The probability distribution and confidence interval output by the model enhance the interpretability of the prediction results and provide an important basis for uncertainty management in power grid operation.
[0100] In summary, by combining the advantages of the Mamba encoder and the Gaussian process decoder, the present invention innovatively proposes a prediction method suitable for complex power load data, solves the deficiencies of traditional load prediction models, significantly improves the reliability, adaptability, and interpretability of power grid load forecasting, and provides important technical support for smart grid management.
[0101] Embodiment 2
[0102] An embodiment of the present invention provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method in the above-mentioned Embodiment 1 are implemented.
[0103] The electronic device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The memory can be used to store computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory, various functions of the electronic device can be realized.
[0104] The related technical solutions are the same as above and will not be elaborated here.
[0105] Embodiment 3
[0106] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above-mentioned Embodiment 1 are implemented.
[0107] Specifically, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0108] The related technical solutions are the same as above and will not be elaborated here.
[0109] Embodiment 4
[0110] An embodiment of the present application provides a computer program product, including a computer program. When the computer program runs on a computer, the computer is enabled to execute the steps of the method in the above-mentioned Embodiment 1.
[0111] The related technical solutions are the same as above and will not be elaborated here.
[0112] Those skilled in the art can easily understand that the foregoing is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for constructing an electric load probability prediction model, characterized in that, Including: Construct a probability prediction model for electric load, and train the probability prediction model for electric load using a training sample set. The training sample includes: a sequence of electric load data at T historical time steps and external covariates, and the label is a sequence of electric load data at M prediction time steps; wherein, the external covariates include weather data and date data at the corresponding time steps; The probability prediction model for electric load includes: a Mamba encoder and a Gaussian process decoder; the Mamba encoder is used to capture the temporal dependence relationship of the input training sample to obtain a corresponding feature vector z; the Gaussian process decoder is used to model the mutual relationship between the features in the feature vector z to obtain a corresponding covariance matrix and mean; the Gaussian distribution composed of the covariance matrix and the mean is used as the probability distribution of the electric load at the next time step t to be predicted; wherein, t ∈ {T + 1, T + 2, …, T + M}; Use the mean of the probability distribution as the value of the electric load at the next time step t to be predicted; concatenate the electric load data at the predicted next time step t with the electric load data at its nearest T - 1 historical time steps to form an electric load data sequence with a length of T, and then concatenate it with the corresponding external covariates, and use it as a new training sample to input to the Mamba encoder for regression. After M regressions, obtain the probability distributions of the electric load at M prediction time steps; Use the likelihood function or negative log-likelihood function between the mean of the probability distribution predicted by the Gaussian process decoder and the corresponding label as the loss function to train the model until the model converges or reaches the preset number of training epochs, and obtain the trained probability prediction model for electric load.
2. The method for constructing a power load probability prediction model according to claim 1, wherein The Gaussian process decoder models the mutual relationship between the features in the feature vector z to obtain a corresponding covariance matrix and mean, including: Use the inducing point set U to perform linear interpolation on the features of each dimension in the feature vector z to obtain a corresponding weight vector W, and approximate the kernel function matrix corresponding to the features of each dimension based on the weight vector W and the kernel function matrix K(U, U) corresponding to the inducing point set U; wherein, the inducing point set U is a sparse point set with a preset dimension, and the values of the elements in the set are learned through model training; Multiply the kernel function matrices corresponding to the features of each dimension in the feature vector z as the covariance matrix of the feature vector z; the mean of the feature vector z is updated using the mean of the training samples during the model training process, and the initial mean is 0.
3. The method for constructing a power load probability prediction model according to claim 2, characterized in that, The kernel function matrix K(z, z) corresponding to each dimensional feature is WK(U, U)W T ; Wherein, K(U, U) is approximated by Lanczos decomposition, including: Using the Lanczos decomposition, the kernel function matrix K(U, U) corresponding to the induced point set U is decomposed into QNQ T ; where N is the tridiagonal matrix after the Lanczos decomposition, Q is the orthogonal matrix corresponding to K(U, U), and Q T is the transpose of Q.
4. The method for constructing a power load probability prediction model according to any one of claims 1-3, characterized in that, The Mamba encoder includes 3 cascaded Mamba modules; each Mamba module includes a Mamba state space neural network and application layer normalization; The application layer normalization is used to normalize the feature vector output by the Mamba state space neural network to obtain the feature vector z.
5. The method for constructing a power load probability prediction model according to claim 4, wherein The Mamba state space neural network includes: A multi-layer perceptron, which is used to embed the input training sample into a high-dimensional feature space to obtain high-dimensional features; A convolutional layer, which is used to capture local temporal dependence characteristics in the high-dimensional features to obtain an enhanced feature vector x; A selective state space model, which is used to dynamically process the enhanced feature vector x based on a selective mechanism to obtain a processed feature vector.
6. The method for constructing a power load probability prediction model according to claim 1, wherein, It further includes normalizing the power load data sequence and weather data in the training samples; It further includes using a triangular positional encoding function to extract the periodic features of the date data and replacing the date data in the training samples with the periodic features.
7. A method for probabilistic prediction of electric load, characterized in that, It includes: Inputting the power load data sequence and corresponding external covariates at T historical time steps including the current time step into the trained power load probability prediction model to obtain the power load probability distribution at M prediction time steps; wherein, the trained power load probability prediction model is constructed by the power load probability prediction model construction method according to any one of claims 1-6.
8. The power load probability prediction method according to claim 7, characterized in that, It further includes: Output the mean μ of the probability distribution of the electric load, f* and use it as the electric load data at the corresponding prediction time step; Output the variance of the probability distribution of the power load to quantify the uncertainty of the prediction result; Based on the mean value μ f* and variance generate a confidence interval for the power load.
9. An electronic device, characterized in that, It includes a computer-readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the power load probability prediction model construction method according to any one of claims 1-6, or execute the power load probability prediction method according to claim 7 or 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the power load probability prediction model construction method according to any one of claims 1-6, or implements the power load probability prediction method according to claim 7 or 8.
Citation Information
Cited By
Power load prediction agent construction method based on large model
CN121282850A
A Method for Constructing an Intelligent Agent for Power Load Forecasting Based on a Large Model
CN121282850B
