Space-time feature enhancement prediction method and device with wide applicability

By building a neural network architecture with spatiotemporal feature enhancer and integrated attention mechanism, combined with dynamic peak-to-trough weighted loss function, the problem of renewable energy generation and uncertain load power prediction is solved, and the stable operation of the power grid and efficient management of the energy system are achieved.

CN119831241APending Publication Date: 2025-04-15TIANJIN UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411891346.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict uncertain power of renewable energy generation and load, resulting in risks in grid stability and safety.

Method used

A widely applicable spatiotemporal feature enhancement prediction method is adopted to design dynamic peak-to-trough weighted loss functions to optimize the performance of neural network prediction models by constructing a spatiotemporal feature enhancer and a lightweight neural network architecture that integrates attention mechanism.

Benefits of technology

It has achieved accurate prediction of renewable energy power generation and uncertain load power, improved the stable operation capability of the power grid, enhanced the operating efficiency of the energy system, and promoted the intelligent development of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831241A_ABST
    Figure CN119831241A_ABST
Patent Text Reader

Abstract

The invention discloses a spatio-temporal feature enhancement prediction method and device with wide applicability, and the method comprises the steps: obtaining the pure time series data of renewable energy power generation and load through setting a database, and carrying out the normalization processing of the pure time series data; constructing a spatial-temporal feature enhancer, and performing reconstruction processing on the normalized pure time sequence data to obtain enhanced feature data; designing a dynamic peak-valley weighted loss function according to the horizontal coordinate difference of the uncertain extreme fluctuation values in the sequence; training a set neural network prediction model through a lightweight neural network architecture integrated with an attention mechanism according to the dynamic peak valley weighted loss function, the training data and the test data; inputting the plurality of pure time sequence data into a set neural network prediction model for prediction processing to obtain a plurality of prediction values; and verifying the performance of the set neural network prediction model according to the set evaluation index. According to the method, prediction of the uncertain power can be accurately optimized, and reliable technical support is provided for stable operation of a power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of new energy spatiotemporal feature enhancement, and in particular to a spatiotemporal feature enhancement prediction method and device with wide applicability. Background Art

[0002] Against the backdrop of global energy transformation, renewable energy generation such as wind power and photovoltaics is booming; at the same time, electricity loads represented by electric vehicles are growing rapidly. This trend has promoted the large-scale access of renewable energy generation and load-side equipment to the power grid, and continues to increase its penetration in the market. For example, in the first three quarters of 2024, China's new installed capacity of renewable energy accounted for 86%, and electric vehicle charging facilities increased by 49.6%. However, due to uncertain factors such as weather and user behavior, renewable energy generation and electricity demand show significant intermittency, volatility and uncertainty, bringing imbalance and instability risks to the power grid. Therefore, accurate prediction of the uncertain power of renewable energy and load has become the key to ensuring the stable operation of the power grid.

[0003] At present, with the widespread access of renewable energy generation and load, a large number of literatures show that accurate prediction of their uncertain power has become a key issue in academia and industry. The essence of prediction is to establish a mapping relationship between historical data information and future output, so as to provide a basis for the optimal operation of the power grid. Commonly used methods include traditional statistical methods and artificial intelligence methods. Traditional statistical methods establish statistical models by analyzing historical data, but have limitations in capturing nonlinear complex relationships and processing high-dimensional data. In contrast, artificial intelligence methods have stronger nonlinear fitting and adaptive capabilities, and can handle complex time series and uncertainties. The input of artificial intelligence models can be divided into two categories: one is multidimensional input-driven prediction that integrates diversified external data such as meteorological information and traffic flow; the other is prediction that focuses on historical time series. This method focuses on mining the inherent laws in historical data to reveal the dynamic trend of changes in time series. Multidimensional input-driven prediction predicts the target output value by comprehensively analyzing the characteristics of historical data, meteorological data, traffic flow, etc., and using specific mapping functions. Although this method provides a more comprehensive prediction perspective, the challenges of obtaining accurate meteorological data and data processing delays limit its applicability in diverse application scenarios. In addition, the complex data integration process also weakens its ability to track fluctuations in real time. The core of the pure time series prediction method that focuses on historical series is to construct an accurate mapping between historical time features and future output by analyzing the historical output data itself. This method focuses on mining the laws and patterns in the time series without relying on other external variables, thereby achieving accurate prediction of future output. Time series prediction methods can be summarized into two categories: decomposition prediction methods and direct prediction methods. Decomposition prediction methods decompose complex prediction tasks into several independently modeled sub-problems through component analysis, signal processing and other technologies, and optimize the overall prediction performance at a fine-grained level. However, its decomposition process is complex and prone to information loss. In addition, the prediction effect is highly dependent on the characteristics of the data set and is difficult to maintain stability in diverse scenarios. The direct prediction method captures global dependencies through feature extraction technology and directly constructs a mapping between historical time features and future output. Although the direct prediction method has high requirements for computing resources, it achieves efficient modeling by avoiding complex decomposition steps and has strong scene adaptability.

[0004] Therefore, how to invent a widely applicable spatiotemporal feature enhanced prediction method to accurately optimize the prediction of uncertain power and provide reliable technical support for the stable operation of the power grid has become an urgent problem to be solved. Summary of the invention

[0005] To this end, the present invention provides a widely applicable spatiotemporal feature enhanced prediction method, which accurately optimizes the prediction of uncertain power, provides reliable technical support for the stable operation of the power grid, lays a solid theoretical foundation for optimizing the scheduling strategy, significantly enhances the operating efficiency of the energy system, and comprehensively promotes the intelligent development of the power grid.

[0006] In order to achieve the above object, the present invention provides the following technical solution: a widely applicable spatiotemporal feature enhancement prediction method, comprising:

[0007] By setting a database, pure time series data of renewable energy power generation and load are obtained; the pure time series data are normalized to obtain normalized pure time series data;

[0008] Constructing a spatiotemporal feature enhancer, and reconstructing the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; dividing the enhanced feature data into training data and test data according to a set ratio;

[0009] According to the horizontal coordinate differences of the uncertain extreme fluctuation values ​​in the sequence, a dynamic peak-valley weighted loss function is designed;

[0010] According to the dynamic peak-valley weighted loss function, the training data and the test data, the set neural network prediction model is trained through a lightweight neural network architecture with an integrated attention mechanism to obtain the trained set neural network prediction model;

[0011] Inputting some of the pure time series data into the trained set neural network prediction model for prediction processing to obtain some prediction values; evaluating some of the prediction values ​​according to the set evaluation index to obtain evaluation values; and verifying the performance of the trained set neural network prediction model through the evaluation values.

[0012] As a preferred solution of a spatiotemporal feature enhancement prediction method with wide applicability, in the process of normalizing the pure time series data, the difference between each data point and the minimum and maximum values ​​of its data set is calculated through the Min-Max normalization strategy, and the difference is scaled to a specified interval; the expression of the normalization process is:

[0013]

[0014] In the formula, x′ is the normalized data point; x is the original data point; x min is the minimum value of the data set; x max is the maximum value of the data set.

[0015] As a preferred solution of a spatiotemporal feature enhancement prediction method with wide applicability, the steps of reconstructing the normalized pure time series data by the spatiotemporal feature enhancer are:

[0016] Through phase space reconstruction processing, one-dimensional pure time series data is mapped to high-dimensional phase space;

[0017] Perform position encoding and adding processing on the sliding window data;

[0018] By masking specific data points and utilizing the time series information on both sides of the specific data points, the neural network prediction model is set to incorporate future information features during the training process.

[0019] As a preferred solution of a spatiotemporal feature enhancement prediction method with wide applicability, in the process of training the set neural network prediction model through a lightweight neural network architecture with an integrated attention mechanism, the lightweight neural network architecture with an integrated attention mechanism includes: a convolutional neural network, a long short-term memory network, a gated recurrent unit, a Transformer, a temporal convolutional network, and a Kolmogorov–Arnold Network;

[0020] When the sampling attention mechanism is used to train the set neural network prediction model, the dot product operation is combined with normalization processing to determine the attention weight; the expression of the dot product operation is:

[0021]

[0022] Where Q is the query vector; K is the key vector; V is the value vector; d k is the dimension of the key vector; T represents transpose; A scaling factor to avoid the vanishing gradient problem when the dimensions of the key and query vectors are large; a softmax function is used to normalize the weights so that they sum to 1.

[0023] As a preferred solution of a widely applicable spatiotemporal feature enhancement prediction method, the dynamic peak-valley weighted loss function expression is:

[0024] L=L RMSE *(1+α*pd+β*vd)

[0025] Where, L RMSE is the local root mean square error; pd is the horizontal coordinate difference of the peak; vd is the horizontal coordinate difference of the trough; α and β are weight coefficients used to dynamically adjust the relative contribution of peak and trough fluctuations to the loss function.

[0026] As a preferred solution for a spatiotemporal feature enhancement prediction method with wide applicability, the dynamic peak-valley weighted loss function is optimized in performance through a bidirectional dynamic weight adjustment strategy based on an adaptive adjustment mechanism; the relative contribution of the peak-valley fluctuation weight coefficient in the dynamic peak-valley weighted loss function is adaptively adjusted by real-time monitoring of the difference between the validation set loss and the training set loss;

[0027] When the validation set loss is higher than the training set loss, the weight coefficient gradually decreases to weaken the impact of peak and valley fluctuations on the loss and avoid model overfitting; when the validation set loss is lower than the training set loss, the weight coefficient gradually increases to strengthen the model's attention to extreme fluctuations.

[0028] As a preferred solution of a spatiotemporal feature enhancement prediction method with wide applicability, in the process of evaluating a plurality of the predicted values ​​according to the set evaluation indicators, the set evaluation indicators include: mean square error, root mean square error, mean absolute error, mean absolute percentage error, peak percentage threshold statistical indicator, mean square deviation error and structural similarity index;

[0029] The expression of the mean square error is:

[0030]

[0031] Where MSE is the mean square error; N is the total number of time steps; is the predicted value at the i-th time step; y i is the actual value of the i-th time step;

[0032] The expression of the root mean square error is:

[0033]

[0034] Where RMSE is the root mean square error;

[0035] The expression of the mean absolute error is:

[0036]

[0037] Where, MAE is the mean absolute error;

[0038] The expression of the mean absolute percentage error is:

[0039]

[0040] Where MAPE is the mean absolute percentage error; N is the total number of data points; is the predicted value; i is the actual value;

[0041] The expression of the peak percentage threshold statistical indicator is:

[0042]

[0043] Where PPTS is the peak percentage threshold statistical indicator; γ is the set threshold; G is the number of time points where the difference exceeds the threshold γ;

[0044] The expression of the mean square deviation error is:

[0045]

[0046] Where MVDE is the mean square deviation error; Var(y i ) is the variance of the true value, which is used to measure the volatility of the data at that time point;

[0047] The expression of the structural similarity index is:

[0048]

[0049] Where SSIM is the structural similarity index; μ y and The true sequence y and the predicted sequence are The mean of and The true sequence y and the predicted sequence are The variance of is the true sequence y and the predicted sequence The covariance of 1 and C 2 They are all constants used to avoid the denominator being zero.

[0050] The present invention also provides a widely applicable spatiotemporal feature enhancement prediction device, based on the above widely applicable spatiotemporal feature enhancement prediction method, comprising:

[0051] The pure time series data acquisition and processing module is used to acquire the pure time series data of renewable energy power generation and load by setting a database; normalize the pure time series data to obtain normalized pure time series data;

[0052] A spatiotemporal feature enhancer construction and processing module, used to construct a spatiotemporal feature enhancer, and reconstruct the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; and divide the enhanced feature data into training data and test data according to a set ratio;

[0053] Dynamic peak-valley weighted loss function design module, used to design dynamic peak-valley weighted loss function according to the horizontal coordinate difference of uncertain extreme fluctuation values ​​in the sequence;

[0054] A neural network prediction model training module is used to train a set neural network prediction model according to the dynamic peak-valley weighted loss function, the training data and the test data through a lightweight neural network architecture with an integrated attention mechanism to obtain a trained set neural network prediction model;

[0055] The neural network prediction model performance evaluation module is used to input a number of the pure time series data into the trained set neural network prediction model for prediction processing to obtain a number of prediction values; evaluate the several prediction values ​​according to the set evaluation indicators to obtain evaluation values; and verify the performance of the trained set neural network prediction model through the evaluation values.

[0056] As a preferred solution of a spatiotemporal feature enhancement prediction device with wide applicability, in the pure time series data acquisition and processing module, in the process of normalizing the pure time series data, the difference between each data point and the minimum and maximum values ​​of its data set is calculated through the Min-Max normalization strategy, and the difference is scaled to a specified interval; the expression of normalization is:

[0057]

[0058] In the formula, x′ is the normalized data point; x is the original data point; x min is the minimum value of the data set; x max is the maximum value of the data set.

[0059] As a preferred solution of a spatiotemporal feature enhancement prediction device with wide applicability, the submodule for reconstructing the normalized pure time series data in the spatiotemporal feature enhancer construction and processing module includes:

[0060] The phase space reconstruction processing submodule is used to map the one-dimensional pure time series data to the high-dimensional phase space through the phase space reconstruction processing;

[0061] The encoding processing submodule is used to perform position encoding and adding processing on the sliding window data;

[0062] The mask operation processing submodule is used to mask specific data points through mask operations and utilize the timing information on both sides of the specific data points, so that the set neural network prediction model can incorporate future information features during the training process.

[0063] As a preferred solution of a spatiotemporal feature enhancement prediction device with wide applicability, in the neural network prediction model training module, in the process of training the set neural network prediction model through a lightweight neural network architecture with an integrated attention mechanism, the lightweight neural network architecture with an integrated attention mechanism includes: a convolutional neural network, a long short-term memory network, a gated recurrent unit, a Transformer, a temporal convolutional network, and a Kolmogorov–Arnold Network;

[0064] When the sampling attention mechanism is used to train the set neural network prediction model, the dot product operation is combined with normalization processing to determine the attention weight; the expression of the dot product operation is:

[0065]

[0066] Where Q is the query vector; K is the key vector; V is the value vector; d k is the dimension of the key vector; T represents transpose; A scaling factor to avoid the vanishing gradient problem when the dimensions of the key and query vectors are large; a softmax function is used to normalize the weights so that they sum to 1.

[0067] As a preferred solution of a spatiotemporal feature enhancement prediction device with wide applicability, in the dynamic peak-valley weighted loss function design module, the dynamic peak-valley weighted loss function expression is:

[0068] L=L RMSE *(1+α*pd+β*vd)

[0069] Where, L RMSE is the local root mean square error; pd is the horizontal coordinate difference of the peak; vd is the horizontal coordinate difference of the trough; α and β are weight coefficients used to dynamically adjust the relative contribution of peak and trough fluctuations to the loss function.

[0070] As a preferred solution for a spatiotemporal feature enhancement prediction device with wide applicability, in the dynamic peak-valley weighted loss function design module, the performance of the dynamic peak-valley weighted loss function is optimized through a bidirectional dynamic weight adjustment strategy based on an adaptive adjustment mechanism; by real-time monitoring of the difference between the validation set loss and the training set loss, the relative contribution of the peak-valley fluctuation weight coefficient in the dynamic peak-valley weighted loss function is adaptively adjusted;

[0071] When the validation set loss is higher than the training set loss, the weight coefficient gradually decreases to weaken the impact of peak and valley fluctuations on the loss and avoid model overfitting; when the validation set loss is lower than the training set loss, the weight coefficient gradually increases to strengthen the model's attention to extreme fluctuations.

[0072] As a preferred solution of a spatiotemporal feature enhancement prediction device with wide applicability, in the neural network prediction model performance evaluation module, in the process of evaluating a plurality of the predicted values ​​according to the set evaluation indicators, the set evaluation indicators include: mean square error, root mean square error, mean absolute error, mean absolute percentage error, peak percentage threshold statistical indicator, mean square deviation error and structural similarity index;

[0073] The expression of the mean square error is:

[0074]

[0075] Where MSE is the mean square error; N is the total number of time steps; is the predicted value at the i-th time step; y i is the actual value of the i-th time step;

[0076] The expression of the root mean square error is:

[0077]

[0078] Where RMSE is the root mean square error;

[0079] The expression of the mean absolute error is:

[0080]

[0081] Where, MAE is the mean absolute error;

[0082] The expression of the mean absolute percentage error is:

[0083]

[0084] Where, MAPE is the mean absolute percentage error;

[0085] The expression of the peak percentage threshold statistical indicator is:

[0086]

[0087] Where PPTS is the peak percentage threshold statistical indicator; γ is the set threshold; G is the number of time points where the difference exceeds the threshold γ;

[0088] The expression of the mean square deviation error is:

[0089]

[0090] Where MVDE is the mean square deviation error; Var(y i ) is the variance of the true value, which is used to measure the volatility of the data at that time point;

[0091] The expression of the structural similarity index is:

[0092]

[0093] Where SSIM is the structural similarity index; μ y and The true sequence y and the predicted sequence are The mean of and The true sequence y and the predicted sequence are The variance of is the true sequence y and the predicted sequence The covariance of 1 and C 2 They are all constants used to avoid the denominator being zero.

[0094] The present invention has the following advantages: the present invention obtains pure time series data of renewable energy power generation and load by setting a database; normalizes the pure time series data to obtain normalized pure time series data; constructs a spatiotemporal feature enhancer, and reconstructs the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; divides the enhanced feature data into training data and test data according to a set ratio; designs a dynamic peak-valley weighted loss function according to the horizontal coordinate difference of uncertain extreme fluctuation values ​​in the sequence; trains a set neural network prediction model through a lightweight neural network architecture with an integrated attention mechanism according to the dynamic peak-valley weighted loss function, the training data and the test data to obtain the trained set neural network prediction model; inputs a number of the pure time series data into the trained set neural network prediction model for prediction processing to obtain a number of prediction values; evaluates a number of the prediction values ​​according to set evaluation indicators to obtain evaluation values; and verifies the performance of the trained set neural network prediction model through the evaluation values. The present invention constructs a spatiotemporal feature enhancer, sequentially integrates phase space reconstruction, position encoding and masking techniques, so that the model can more intuitively learn the historical trends and future potential fluctuation characteristics in the time series, enhance the perception of complex spatiotemporal features, and thus more effectively capture and predict the spatiotemporal uncertain fluctuation behavior. In order to improve the sensitivity to extreme fluctuations, the present invention proposes a dynamic peak-valley weighted loss function, which dynamically adjusts the parameters of the loss function in combination with the horizontal coordinate difference between the peak and the trough, so that the model pays more attention to the key extreme uncertain information during the training process. The present invention not only demonstrates wide adaptability on multiple data sets, but also has the ability to seamlessly integrate with a variety of models, ensuring that while achieving high-precision predictions, it improves reliability and flexibility in different scenarios. Through testing in five relevant data sets and six neural network models that have performed well in the field of time series prediction, they all showed high and stable prediction effects, which fully verified the effectiveness and applicability of the present invention and provided strong support for the safe and stable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0096] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0097] Figure 1 A schematic flow chart of a spatiotemporal feature enhancement prediction method with wide applicability provided in Embodiment 1 of the present invention;

[0098] Figure 2 A schematic diagram of a specific implementation process of a spatiotemporal feature enhancement prediction method with wide applicability provided in Example 1 of the present invention;

[0099] Figure 3 A schematic diagram of a Mask method in a widely applicable spatiotemporal feature enhancement prediction method provided in Example 1 of the present invention;

[0100] Figure 4 This is a thermal diagram of the SSIM index for day-ahead prediction in a possible embodiment provided in Embodiment 1 of the present invention;

[0101] Figure 5 This is a schematic diagram of the architecture of a widely applicable spatiotemporal feature enhancement prediction device provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0102] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0103] Example 1

[0104] See also Figure 1 and Figure 2 Embodiment 1 of the present invention provides a spatiotemporal feature enhancement prediction method with wide applicability, comprising the following steps:

[0105] S1. Acquire pure time series data of renewable energy power generation and load by setting a database; normalize the pure time series data to obtain normalized pure time series data;

[0106] S2, constructing a spatiotemporal feature enhancer, and reconstructing the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; dividing the enhanced feature data into training data and test data according to a set ratio;

[0107] S3. Design a dynamic peak-valley weighted loss function based on the horizontal coordinate differences of the uncertain extreme fluctuation values ​​within the sequence;

[0108] S4, according to the dynamic peak-valley weighted loss function, the training data and the test data, the set neural network prediction model is trained through a lightweight neural network architecture with an integrated attention mechanism to obtain the trained set neural network prediction model;

[0109] S5. Inputting some of the pure time series data into the trained set neural network prediction model for prediction processing to obtain some prediction values; evaluating some of the prediction values ​​according to the set evaluation index to obtain evaluation values; and verifying the performance of the trained set neural network prediction model through the evaluation values.

[0110] In this embodiment, in step S1, pure time series data of renewable energy power generation and load are obtained by setting a database; the pure time series data are normalized to obtain normalized pure time series data;

[0111] Specifically, by setting up a database, photovoltaic power generation data, electric vehicle charging data, wind power data, load data and net load data are obtained to explore the problem of power generation and load power prediction of multiple types of renewable energy.

[0112] Pure time series data collected Among them, t i (i=1,2,……,n) represents the specific time point corresponding to each observation value in the sequence. On this basis, these data are normalized and scaled to a fixed range of [0,1]. The Min-Max normalization technique is used to calculate the difference between each data point and the minimum and maximum values ​​of its data set, and then scale this difference to the specified interval. The normalization expression is:

[0113]

[0114] In the formula, x′ is the normalized data point; x is the original data point; x min is the minimum value of the data set; x max is the maximum value of the data set. This standardization process enables the deep learning model to process time series data more effectively, thereby improving the accuracy of prediction.

[0115] In this embodiment, in step S2, a spatiotemporal feature enhancer is constructed, and the normalized pure time series data is reconstructed by the spatiotemporal feature enhancer to obtain enhanced feature data; the enhanced feature data is divided into training data and test data according to a set ratio;

[0116] Specifically, a spatiotemporal feature enhancer is constructed to achieve efficient conversion and representation of one-dimensional time series data by fusing phase space reconstruction, position encoding and masking.

[0117] The steps of reconstructing the normalized pure time series data by the spatiotemporal feature enhancer are:

[0118] S21, mapping the one-dimensional pure time series data to a high-dimensional phase space through phase space reconstruction processing;

[0119] Specifically, the phase space reconstruction transforms the one-dimensional time series into Expanding to high-dimensional space, thereby recovering the dynamic system structure hidden in the sequence, the expression is:

[0120]

[0121] Where m is the embedding dimension, which is the dimension of the high-dimensional space into which the time series is expanded, and is used to reveal the complex structure and dynamic characteristics of the data; t is the time delay, which indicates the time interval between data points extracted from the time series when constructing the high-dimensional matrix.

[0122] In this embodiment, the correlation dimension method and the correlation integral method are applied to determine the key parameters m and t of reconstruction.

[0123] First, the correlation integral C(r) is calculated to reveal the autocorrelation characteristics of the time series. The formula is as follows:

[0124]

[0125] Where r is a given threshold (or radius) used to measure the distance between data points; N is the total number of data points; x i and x j is a data point, where i and j are the indices of the data point; d(x i ,x j ) is x i and x j The distance between them; δ(x) is a step function, that is, when x<0, δ(x)=0; when x≥0, δ(x)=1.

[0126] Secondly, the correlation dimension D(r) is estimated based on C(r) to reflect the complexity and chaos degree of the system. The formula is as follows:

[0127]

[0128] Finally, by adjusting m and t, the minimum value of C(r) is found to obtain the optimal parameters. After the key parameters are determined, the phase space reconstruction is performed to restore its dynamic system structure.

[0129] S22, performing position coding and adding processing on the sliding window data;

[0130] Specifically, the position encoding technology is introduced to effectively integrate the position information in the sequence data into the model training process, so that the model can more effectively identify and capture the sequential relationship in the time series. reconstrct It can provide richer time series features for subsequent neural network models and obtain data X with position encoding. pos As shown below:

[0131] X pos =X reconstrct +PE

[0132] In the formula, X reconstrct represents the reconstructed data obtained after the above steps, and PE is reconstrct A specific position encoding vector with the same dimension is defined as follows:

[0133]

[0134] In the formula, pos represents the position of the data point; i represents the index of the position encoding vector; d model represents the dimension of the input feature; the constant 10000 is used as a hyperparameter to scale the position encoding; the sine function sin and cosine function cos are used to generate specific values ​​of the position encoding.

[0135] By combining sine and cosine functions of different frequencies, position encoding can capture the relative distance characteristics between elements, allowing the model to consider both the elements in the input sequence and their position information.

[0136] S23. Masking specific data points through masking operations and utilizing the time series information on both sides of the specific data points, so that the neural network prediction model is set to incorporate future information features during the training process.

[0137] Specifically, the masking technology masks specific data points and uses the time series information on both sides of them, so that the model can incorporate future information features during the training process, thereby enhancing the understanding of time series dependencies. posThe first dimension data of is masked, but it still retains the spatial and temporal phase information of the position encoding. Then it is concatenated with the unmasked dimension data to finally form the masked data X′, as shown in the following formula:

[0138] X′=[X p ′ os1 ,X pos2 ,……,X posm ]

[0139] In the formula, X 1 ′ is for X pos1 The data after masking.

[0140] In this embodiment, half of the sequences are masked with random columns and the other half with the last column in the training set; while only the last column is masked in the test set to ensure the independence of the predicted points and future features. Subsequently, all masked data points are set to 0 to complete the masking operation. Figure 3 As shown, the black dots represent mask operations, which are used to mask data points at specific locations, and the gray dots are used as output labels.

[0141] In this embodiment, in step S3, a dynamic peak-valley weighted loss function is designed according to the horizontal coordinate difference of the uncertain extreme fluctuation value in the sequence;

[0142] Specifically, an improved loss function is constructed that pays special attention to the horizontal coordinate difference between uncertain fluctuation values ​​in the sequence. The dynamic peak-valley weighted loss function is based on the traditional root mean square error (RMSE) and is extended to include the local root mean square error L RMSE , peak horizontal coordinate difference pd and trough horizontal coordinate difference vd, as shown in the following formula:

[0143] L=L RMSE *(1+α*pd+β*vd)

[0144] Where, L RMSE is the local root mean square error; pd is the horizontal coordinate difference of the peak; vd is the horizontal coordinate difference of the trough; α and β are weight coefficients used to dynamically adjust the relative contribution of peak and trough fluctuations to the loss function.

[0145]

[0146] L RMSE It measures the difference between the predicted and actual sequences in time steps, while pd and vd focus on the horizontal coordinate difference between extreme values.

[0147]

[0148] In the formula, is the predicted value of the i-th peak point in the prediction sequence; is the average value of all peak points in the forecast sequence; N 1 is the total number of peak points.

[0149]

[0150] In the formula, is the predicted value of the jth trough point in the prediction sequence; is the average value of all trough points in the forecast sequence; N 2 is the total number of trough points.

[0151] In this embodiment, the present invention proposes a bidirectional dynamic weight adjustment strategy based on an adaptive adjustment mechanism to optimize the performance of a dynamic peak-valley weighted loss function. This strategy adaptively adjusts the relative contribution of the peak-valley fluctuation weight coefficient in the loss function by real-time monitoring the difference between the validation set loss and the training set loss. When the validation set loss is higher than the training set loss, the weight coefficient gradually decreases to reduce the impact of peak-valley fluctuations on the loss and avoid model overfitting; when the validation set loss is lower than the training set loss, the weight coefficient gradually increases to strengthen the model's attention to extreme fluctuations. The initial values ​​of the weight coefficients α and β are set to 0.5, and their dynamic adjustment range is limited to between 0.1 and 1.0 to ensure the stability of the adjustment process and the efficiency of model training. This mechanism can effectively improve the model's learning ability for uncertain fluctuations, while taking into account the robustness and accuracy of training, and is suitable for a variety of deep learning scenarios.

[0152] In this embodiment, in step S4, according to the dynamic peak-valley weighted loss function, the training data and the test data, the set neural network prediction model is trained through a lightweight neural network architecture with an integrated attention mechanism to obtain the trained set neural network prediction model;

[0153] Specifically, the present invention adopts six network architectures with significant performance advantages, namely, convolutional neural network (CNN), long short-term memory network (LSTM), gated recurrent unit (GRU), transformer, temporal convolutional network (TCN) and Kolmogorov–Arnold Network (KAN). Based on these six network models, the present invention further optimizes the model structure and innovatively introduces an attention mechanism layer before the fully connected output layer. This improvement enables the model to pay more attention to the key information in the time series, thereby improving the prediction accuracy and robustness. A brief introduction to each network model is as follows: CNN has the characteristics of local receptive field and parameter sharing, and can effectively extract local features in time series; LSTM has memory cells and gated structure, and can capture long-term dependencies in time series. GRU simplifies the structure based on LSTM, improves computational efficiency, and maintains good performance; Transformer is based on the self-attention mechanism, and can simultaneously process long-distance dependencies and local features in time series; TCN uses causal convolution and dilated convolution to effectively extract multi-scale features in time series; KAN is based on nonlinear dynamic system theory and has powerful feature expression capabilities. By combining these six network models with the attention mechanism, the time series prediction method of the present invention demonstrates excellent performance in practical applications.

[0154] In this embodiment, the present invention uses a variety of neural network models that integrate attention mechanisms to train data, aiming to learn patterns and their dependencies from complex data, and demonstrate its feasibility of seamless integration into existing deep learning methods. The input data X′ is first processed by the input layer and the neural network layer, and then further extracts features through several hidden layers. In this process, the attention mechanism is dynamically embedded to assign different weights to different parts of the sequence, so that the model can focus on more relevant time steps. Among the various attention mechanisms, dot product attention is the simplest one, so the present invention uses dot product operations combined with normalization to determine the attention weight, as shown in the following formula:

[0155]

[0156] Where Q is the query vector; K is the key vector; V is the value vector; d k is the dimension of the key vector; T represents transpose; A scaling factor to avoid the vanishing gradient problem when the dimensions of the key and query vectors are large; a softmax function is used to normalize the weights so that they sum to 1.

[0157] The original input feature X′ is linearly transformed through a series of learnable weight matrices W to obtain a new feature representation WX′. These weight matrices are Wq , W k and W v , which convert the input features into Q, K and V vectors respectively. The weight matrix W is randomly initialized and automatically learned and updated through the model training process. It changes continuously during the training process and is determined by the back propagation algorithm and Adam optimizer.

[0158] In this embodiment, in step S5, some of the pure time series data are input into the trained set neural network prediction model for prediction processing to obtain some prediction values; some of the prediction values ​​are evaluated according to the set evaluation indicators to obtain evaluation values; and the performance of the trained set neural network prediction model is verified by the evaluation values.

[0159] Specifically, by testing on different data sets and neural network models and using different performance indicators for evaluation, the universality and robustness of the set neural network prediction model are verified.

[0160] The evaluation indicators include mean square error, root mean square error, mean absolute error, mean absolute percentage error, peak percentage threshold statistical index, mean square deviation error and structural similarity index.

[0161] Mean Squared Error (MSE): The average squared error between the predicted value and the actual value is calculated to evaluate the overall error of the prediction. The expression of the mean squared error is:

[0162]

[0163] Where MSE is the mean square error; N is the total number of time steps; is the predicted value at the i-th time step; y i is the actual value of the i-th time step;

[0164] Root Mean Squared Error (RMSE): RMSE is the square root of MSE and is usually used to evaluate the accuracy of prediction results, especially when the predicted values ​​are widely distributed. The expression of the root mean square error is:

[0165]

[0166] Where RMSE is the root mean square error;

[0167] Mean Absolute Error (MAE): Calculates the average value of the absolute error between the predicted value and the actual value, reflecting the absolute error of the predicted result. The expression of the mean absolute error is:

[0168]

[0169] Where, MAE is the mean absolute error;

[0170] Mean Absolute Percentage Error (MAPE) is another important indicator for evaluating forecast accuracy, especially useful when predicting percentage changes. The expression of the mean absolute percentage error is:

[0171]

[0172] Where MAPE is the mean absolute percentage error; N is the total number of data points; is the predicted value; i is the actual value;

[0173] The peak percentage threshold statistic (PPTS) is a performance metric for evaluating the accuracy of extreme value predictions of a time series data prediction model. By setting a threshold γ, it focuses on the performance of the model in the key range (peaks and troughs). The expression of the peak percentage threshold statistic is:

[0174]

[0175] Where PPTS is the peak percentage threshold statistical indicator; γ is the set threshold; G is the number of time points where the difference exceeds the threshold γ; the threshold can be determined by the following steps: first calculate the mean and standard deviation of the data set, then select a confidence level, and finally calculate the upper and lower limits of the threshold according to the normal distribution formula.

[0176] The mean square deviation error (MVDE) is a performance indicator that evaluates the overall deviation of a forecasting model from the volatility of time series data. By calculating the square error of the deviation between the predicted value and the true value, it can quantify the model's sensitivity to volatility capture, especially the amplification of the forecast error when the data fluctuates greatly. The expression of the mean square deviation error is:

[0177]

[0178] Where MVDE is the mean square deviation error; Var(y i ) is the variance of the true value, which is used to measure the volatility of the data at that time point; by normalizing the prediction error, the performance of the model in areas with greater volatility can be better reflected.

[0179] The structural similarity index (SSIM) is used to evaluate the structural fidelity of time series forecasts. It reflects the similarity between the predicted sequence and the true sequence by comprehensively considering the mean, variance and covariance of the predicted sequence and the true sequence. A higher SSIM value (close to 1) indicates better forecasting performance and higher structural similarity. The expression of the structural similarity index is:

[0180]

[0181] Where SSIM is the structural similarity index; μ y and The true sequence y and the predicted sequence are The mean of and The true sequence y and the predicted sequence are The variance of is the true sequence y and the predicted sequence The covariance of 1 and C 2 They are all constants used to avoid the denominator being zero.

[0182] In a possible embodiment, six model test examples are provided as follows:

[0183] The method proposed in the present invention is applied to five data sets. Six models are selected for testing in the neural network model training stage to verify the applicability of the present invention in ultra-short-term prediction and day-ahead prediction. Evaluation indicators are also used for testing, and the SSIM indicator is only used for day-ahead prediction evaluation. The following is an analysis of the calculation results:

[0184]

[0185]

[0186] Table 1 Ultra-short-term forecast results

[0187] As shown in Table 1, in the ultra-short-term prediction, taking the photovoltaic power generation data test results as an example, the model using the method of the present invention has a significant decrease in the values ​​of the six performance indicators, which is significantly better than the model without the method (the lower the value, the better); at the same time, the improvement range is between 19.82% and 99.82%, which verifies the effectiveness of the method of the present invention in improving the prediction accuracy. Similar conclusions can be obtained for the other four data sets, which are not listed here one by one.

[0188]

[0189]

[0190] Table 2 Prediction results

[0191] As shown in Table 2, in the recent prediction, taking the electric vehicle charging power data test results as an example, the model using the method of the present invention has a significant decrease in the values ​​of the six performance indicators, which is significantly better than the model without the method (the lower the value, the better); at the same time, the improvement range is between 22.60% and 83.82%, which verifies the effectiveness of the method of the present invention in improving the prediction accuracy. Similar conclusions can be obtained for the other four data sets, which are not listed here one by one.

[0192] It can be concluded that the method of the present invention has certain improvement capabilities in multiple scenarios of ultra-short-term and day-ahead forecasting of multiple types of renewable energy power generation and loads. At the same time, according to the results of PPTS and MVDE indicators, the prediction of local extremes is also greatly improved; Figure 4 As shown in the figure, from the perspective of the SSIM index, the similarity between the predicted value and the true value in terms of structural features is significantly improved, and the local patterns and structural features in the data can be better captured. The method of the present invention has a good effect when combined with the six models, which further verifies that the method has the flexibility of plug-and-play and can support the embedding of most advanced neural networks.

[0193] In summary, the present invention obtains pure time series data of renewable energy power generation and load by setting a database; normalizes the pure time series data to obtain normalized pure time series data; constructs a spatiotemporal feature enhancer, and reconstructs the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; divides the enhanced feature data into training data and test data according to a set ratio; designs a dynamic peak-valley weighted loss function according to the horizontal coordinate difference of uncertain extreme fluctuation values ​​in the sequence; trains the set neural network prediction model through a lightweight neural network architecture with an integrated attention mechanism according to the dynamic peak-valley weighted loss function, the training data and the test data to obtain the trained set neural network prediction model; inputs a number of the pure time series data into the trained set neural network prediction model for prediction processing to obtain a number of prediction values; evaluates a number of the prediction values ​​according to set evaluation indicators to obtain evaluation values; and verifies the performance of the trained set neural network prediction model through the evaluation values. The present invention constructs a spatiotemporal feature enhancer, sequentially integrates phase space reconstruction, position encoding and masking techniques, so that the model can more intuitively learn the historical trends and future potential fluctuation characteristics in the time series, enhance the perception of complex spatiotemporal features, and thus more effectively capture and predict the spatiotemporal uncertain fluctuation behavior. In order to improve the sensitivity to extreme fluctuations, the present invention proposes a dynamic peak-valley weighted loss function, which dynamically adjusts the parameters of the loss function in combination with the horizontal coordinate difference between the peak and the trough, so that the model pays more attention to the key extreme uncertain information during the training process. The present invention not only demonstrates wide adaptability on multiple data sets, but also has the ability to seamlessly integrate with a variety of models, ensuring that while achieving high-precision predictions, it improves reliability and flexibility in different scenarios. Through testing in five relevant data sets and six neural network models that have performed well in the field of time series prediction, they all showed high and stable prediction effects, which fully verified the effectiveness and applicability of the present invention and provided strong support for the safe and stable operation of the power system.

[0194] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0195] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0196] Example 2

[0197] See also Figure 5 Embodiment 2 of the present invention further provides a spatiotemporal feature enhancement prediction device with wide applicability, comprising:

[0198] The pure time series data acquisition and processing module 001 is used to acquire the pure time series data of renewable energy power generation and load by setting a database; normalize the pure time series data to obtain normalized pure time series data;

[0199] The spatiotemporal feature enhancer construction and processing module 002 is used to construct a spatiotemporal feature enhancer, and reconstruct the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; the enhanced feature data is divided into training data and test data according to a set ratio;

[0200] Dynamic peak-valley weighted loss function design module 003, used to design a dynamic peak-valley weighted loss function according to the horizontal coordinate difference of the uncertain extreme fluctuation value in the sequence;

[0201] The neural network prediction model training module 004 is used to train the set neural network prediction model according to the dynamic peak-valley weighted loss function, the training data and the test data through a lightweight neural network architecture with an integrated attention mechanism to obtain the trained set neural network prediction model;

[0202] The neural network prediction model performance evaluation module 005 is used to input a number of the pure time series data into the trained set neural network prediction model for prediction processing to obtain a number of prediction values; evaluate the number of the prediction values ​​according to the set evaluation indicators to obtain evaluation values; and verify the performance of the trained set neural network prediction model through the evaluation values.

[0203] In this embodiment, in the pure time series data acquisition and processing module 001, in the process of normalizing the pure time series data, the difference between each data point and the minimum and maximum values ​​of the data set in which it is located is calculated through the Min-Max normalization strategy, and the difference is scaled to a specified interval; the expression of the normalization processing is:

[0204]

[0205] In the formula, x′ is the normalized data point; x is the original data point; x min is the minimum value of the data set; x max is the maximum value of the data set.

[0206] In this embodiment, in the spatiotemporal feature enhancer construction and processing module 002, the submodule for reconstructing the normalized pure time series data includes:

[0207] The phase space reconstruction processing submodule 021 is used to map the one-dimensional pure time series data to a high-dimensional phase space through phase space reconstruction processing;

[0208] The coding processing submodule 022 is used to perform position coding and adding processing on the sliding window data;

[0209] The mask operation processing submodule 023 is used to mask specific data points through mask operations and utilize the time series information on both sides of the specific data points, so that the set neural network prediction model can incorporate future information features during the training process.

[0210] In this embodiment, in the neural network prediction model training module 004, in the process of training the set neural network prediction model through the lightweight neural network architecture with integrated attention mechanism, the lightweight neural network architecture with integrated attention mechanism includes: convolutional neural network, long short-term memory network, gated recurrent unit, Transformer, temporal convolutional network and Kolmogorov–Arnold Network;

[0211] When the sampling attention mechanism is used to train the set neural network prediction model, the dot product operation is combined with normalization processing to determine the attention weight; the expression of the dot product operation is:

[0212]

[0213] Where Q is the query vector; K is the key vector; V is the value vector; d k is the dimension of the key vector; T represents transpose; A scaling factor to avoid the vanishing gradient problem when the dimensions of the key and query vectors are large; a softmax function is used to normalize the weights so that they sum to 1.

[0214] In this embodiment, in the dynamic peak-valley weighted loss function design module 003, the dynamic peak-valley weighted loss function expression is:

[0215] L=L RMSE *(1+α*pd+β*vd)

[0216] Where, L RMSE is the local root mean square error; pd is the horizontal coordinate difference of the peak; vd is the horizontal coordinate difference of the trough; α and β are weight coefficients used to dynamically adjust the relative contribution of peak and trough fluctuations to the loss function.

[0217] In this embodiment, in the dynamic peak-valley weighted loss function design module 003, the performance of the dynamic peak-valley weighted loss function is optimized through a bidirectional dynamic weight adjustment strategy based on an adaptive adjustment mechanism; the relative contribution of the peak-valley fluctuation weight coefficient in the dynamic peak-valley weighted loss function is adaptively adjusted by real-time monitoring of the difference between the validation set loss and the training set loss;

[0218] When the validation set loss is higher than the training set loss, the weight coefficient gradually decreases to weaken the impact of peak and valley fluctuations on the loss and avoid model overfitting; when the validation set loss is lower than the training set loss, the weight coefficient gradually increases to strengthen the model's attention to extreme fluctuations.

[0219] In this embodiment, in the neural network prediction model performance evaluation module 005, in the process of evaluating the plurality of predicted values ​​according to the set evaluation indicators, the set evaluation indicators include: mean square error, root mean square error, mean absolute error, mean absolute percentage error, peak percentage threshold statistical indicator, mean square deviation error and structural similarity index;

[0220] The expression of the mean square error is:

[0221]

[0222] Where MSE is the mean square error; N is the total number of time steps; is the predicted value at the i-th time step; y i is the actual value of the i-th time step;

[0223] The expression of the root mean square error is:

[0224]

[0225] Where RMSE is the root mean square error;

[0226] The expression of the mean absolute error is:

[0227]

[0228] Where, MAE is the mean absolute error;

[0229] The expression of the mean absolute percentage error is:

[0230]

[0231] Where, MAPE is the mean absolute percentage error;

[0232] The expression of the peak percentage threshold statistical indicator is:

[0233]

[0234] Where PPTS is the peak percentage threshold statistical indicator; γ is the set threshold; G is the number of time points where the difference exceeds the threshold γ;

[0235] The expression of the mean square deviation error is:

[0236]

[0237] Where MVDE is the mean square deviation error; Var(y i ) is the variance of the true value, which is used to measure the volatility of the data at that time point;

[0238] The expression of the structural similarity index is:

[0239]

[0240] Where SSIM is the structural similarity index; μ y and The true sequence y and the predicted sequence are The mean of and The true sequence y and the predicted sequence are The variance of is the true sequence y and the predicted sequence The covariance of 1 and C 2 They are all constants used to avoid the denominator being zero.

[0241] It should be noted that the information interaction, execution process and other contents between the modules of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.

[0242] Example 3

[0243] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which a program code for a widely applicable spatiotemporal feature enhancement prediction method is stored, and the program code includes instructions for executing embodiment 1 or any possible implementation method of the widely applicable spatiotemporal feature enhancement prediction method.

[0244] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0245] Example 4

[0246] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0247] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a widely applicable spatiotemporal feature enhancement prediction method of embodiment 1 or any possible implementation thereof.

[0248] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0249] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.

[0250] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented by a program code executable by a computing system, so that they can be stored in a storage system and executed by the computing system, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0251] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. A widely applicable spatiotemporal feature enhancement prediction method, characterized in that: include: By setting up a database, pure time series data of renewable energy generation and load are obtained; Normalizing the pure time series data to obtain normalized pure time series data; Constructing a spatiotemporal feature enhancer, and reconstructing the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; Dividing the enhanced feature data into training data and test data according to a set ratio; According to the horizontal coordinate differences of the uncertain extreme fluctuation values ​​in the sequence, a dynamic peak-valley weighted loss function is designed; According to the dynamic peak-valley weighted loss function, the training data and the test data, the set neural network prediction model is trained through a lightweight neural network architecture with an integrated attention mechanism to obtain the trained set neural network prediction model; Inputting some of the pure time series data into the trained set neural network prediction model for prediction processing to obtain some prediction values; evaluating some of the prediction values ​​according to the set evaluation index to obtain evaluation values; and verifying the performance of the trained set neural network prediction model through the evaluation values.

2. The method for enhancing spatiotemporal feature prediction with wide applicability according to claim 1, characterized in that: In the process of normalizing the pure time series data, the difference between each data point and the minimum and maximum values ​​of the data set is calculated through the Min-Max normalization strategy, and the difference is scaled to a specified interval; The normalized expression is: In the formula, x′ is the normalized data point; x is the original data point; x min is the minimum value of the data set; x max is the maximum value of the data set.

3. The method for enhancing spatiotemporal feature prediction with wide applicability according to claim 2, characterized in that: The steps of reconstructing the normalized pure time series data by the spatiotemporal feature enhancer are: Through phase space reconstruction processing, one-dimensional pure time series data is mapped to high-dimensional phase space; Perform position encoding and adding processing on the sliding window data; By masking specific data points and utilizing the time series information on both sides of the specific data points, the neural network prediction model is set to incorporate future information features during the training process.

4. The method for enhancing spatiotemporal feature prediction with wide applicability according to claim 3, characterized in that: In the process of training the set neural network prediction model by a lightweight neural network architecture integrating an attention mechanism, the lightweight neural network architecture integrating an attention mechanism includes: a convolutional neural network, a long short-term memory network, a gated recurrent unit, a transformer, a temporal convolutional network, and a Kolmogorov–Arnold Network; When the sampling attention mechanism is used to train the set neural network prediction model, the dot product operation is combined with normalization processing to determine the attention weight; the expression of the dot product operation is: Where Q is the query vector; K is the key vector; V is the value vector; d k is the dimension of the key vector; T represents transpose; A scaling factor to avoid the vanishing gradient problem when the dimensions of the key and query vectors are large; a softmax function is used to normalize the weights so that they sum to 1.

5. The method for enhancing spatiotemporal feature prediction with wide applicability according to claim 4, characterized in that: The dynamic peak-valley weighted loss function expression is: L=L RMSE *(1+a*pd+b*vd) Where, L RMSE is the local root mean square error; pd is the horizontal coordinate difference of the peak; vd is the horizontal coordinate difference of the trough; α and β are weight coefficients used to dynamically adjust the relative contribution of peak and trough fluctuations to the loss function.

6. A widely applicable spatiotemporal feature enhancement prediction method according to claim 5, characterized in that: The performance of the dynamic peak-valley weighted loss function is optimized through a bidirectional dynamic weight adjustment strategy based on an adaptive adjustment mechanism; the relative contribution of the peak-valley fluctuation weight coefficient in the dynamic peak-valley weighted loss function is adaptively adjusted by real-time monitoring of the difference between the validation set loss and the training set loss; When the validation set loss is higher than the training set loss, the weight coefficient gradually decreases to weaken the impact of peak and valley fluctuations on the loss and avoid model overfitting; when the validation set loss is lower than the training set loss, the weight coefficient gradually increases to strengthen the model's attention to extreme fluctuations.

7. The method for enhancing spatiotemporal feature prediction with wide applicability according to claim 6, characterized in that: In the process of evaluating the plurality of predicted values ​​according to the set evaluation indicators, the set evaluation indicators include: mean square error, root mean square error, mean absolute error, mean absolute percentage error, peak percentage threshold statistical indicator, mean square deviation error and structural similarity index; The expression of the mean square error is: Where MSE is the mean square error; N is the total number of time steps; is the predicted value at the i-th time step; y i is the actual value of the i-th time step; The expression of the root mean square error is: Where RMSE is the root mean square error; The expression of the mean absolute error is: Where, MAE is the mean absolute error; The expression of the mean absolute percentage error is: Where, MAPE is the mean absolute percentage error; The expression of the peak percentage threshold statistical indicator is: Where PPTS is the peak percentage threshold statistical indicator; γ is the set threshold; G is the number of time points where the difference exceeds the threshold γ; The expression of the mean square deviation error is: Where MVDE is the mean square deviation error; Var(y i ) is the variance of the true value, which is used to measure the volatility of the data at that time point; The expression of the structural similarity index is: Where SSIM is the structural similarity index; μ y and The true sequence y and the predicted sequence are The mean of and The true sequence y and the predicted sequence are The variance of is the true sequence y and the predicted sequence covariance of ; C1 and C2 are constants used to avoid the denominator being zero.

8. A widely applicable spatiotemporal feature enhancement prediction device, using a widely applicable spatiotemporal feature enhancement prediction method according to any one of claims 1 to 7, characterized in that: include: Pure time series data acquisition and processing module, used to obtain pure time series data of renewable energy generation and load by setting up a database; Normalizing the pure time series data to obtain normalized pure time series data; A spatiotemporal feature enhancer construction and processing module, used to construct a spatiotemporal feature enhancer, and reconstruct the normalized pure time series data through the spatiotemporal feature enhancer to obtain enhanced feature data; Dividing the enhanced feature data into training data and test data according to a set ratio; Dynamic peak-valley weighted loss function design module, used to design dynamic peak-valley weighted loss function according to the horizontal coordinate difference of uncertain extreme fluctuation values ​​in the sequence; A neural network prediction model training module is used to train a set neural network prediction model according to the dynamic peak-valley weighted loss function, the training data and the test data through a lightweight neural network architecture with an integrated attention mechanism to obtain a trained set neural network prediction model; The neural network prediction model performance evaluation module is used to input a number of the pure time series data into the trained set neural network prediction model for prediction processing to obtain a number of prediction values; evaluate the several prediction values ​​according to the set evaluation indicators to obtain evaluation values; and verify the performance of the trained set neural network prediction model through the evaluation values.

9. The widely applicable spatiotemporal feature enhancement prediction device according to claim 8, characterized in that: In the pure time series data acquisition and processing module, in the process of normalizing the pure time series data, the difference between each data point and the minimum and maximum values ​​of the data set in which it is located is calculated through the Min-Max normalization strategy, and the difference is scaled to a specified interval; The normalized expression is: In the formula, x′ is the normalized data point; x is the original data point; x min is the minimum value of the data set; x max is the maximum value of the data set.

10. The widely applicable spatiotemporal feature enhancement prediction device according to claim 9, characterized in that: In the spatiotemporal feature enhancer construction and processing module, the submodule for reconstructing the normalized pure time series data includes: The phase space reconstruction processing submodule is used to map the one-dimensional pure time series data to the high-dimensional phase space through the phase space reconstruction processing; The encoding processing submodule is used to perform position encoding and adding processing on the sliding window data; The mask operation processing submodule is used to mask specific data points through mask operations and utilize the timing information on both sides of the specific data points, so that the set neural network prediction model can incorporate future information features during the training process.

Citation Information

Cited By

  • County-level sea area sea wave correction forecasting method, equipment, medium and product

    CN120408331A

  • Station storm water increase prediction method, equipment, medium and product

    CN120806680A

  • Bill sequence prediction method and system based on composite neural network

    CN120954022A