Short-term wind power forecasting method based on dynamic time series fusion of multi-source heterogeneous data
Through the dynamic timing fusion method of multi-source heterogeneous data, adversarial hash generator and GCN technology, the problem of lack of data type deviation and physical laws in wind power prediction is solved, and a high-precision and robust short-term wind power prediction is achieved.
Patent Information
- Application Number
- CN202510593439.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-09
AI Technical Summary
The existing wind power power prediction methods cannot effectively eliminate data type characteristic deviations in heterogeneous data fusion, and lack active guidance of physical laws, resulting in violation of prediction errors and operating specifications.
The dynamic timing fusion method of multi-source heterogeneous data is adopted to construct a unified feature representation space through an adversarial hash generator, regularization of projection diversity and perturbation immune training, integrate the physical laws and data distribution characteristics of wind power systems, build a dynamic fusion relationship diagram, and apply GCN for prediction.
The prediction accuracy and robustness are significantly improved, especially in extreme meteorological conditions, reducing the prediction error by about 50%, ensuring that the prediction results are in line with fan characteristics and grid operation specifications.
Smart Images

Figure CN120106622B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to wind power forecasting, and in particular to a short-term wind power forecasting method based on dynamic time series fusion of multi-source heterogeneous data. Background Art
[0002] As the energy transition accelerates, wind power, as a key clean energy source, plays an increasingly important role in the global power system. However, the intermittent, random, and volatile nature of wind power poses significant challenges to the safe and stable operation of power grids. Accurate and reliable short-term wind power forecasting has become a key technical support for the high-proportion integration and absorption of wind power. High-precision wind power forecasting can significantly improve wind farm operating efficiency, reduce wind curtailment, reduce the backup capacity of conventional power sources, optimize grid scheduling, and provide a solid foundation for the large-scale application of renewable energy.
[0003] Current wind power forecasting research is primarily categorized into three types: physical modeling, statistical learning, and hybrid modeling. Physical modeling, based on the principles of fluid mechanics and thermodynamics, calculates power output using numerical weather forecasts and wind turbine characteristic curves. While suitable for long-term forecasting, it lacks the ability to accurately characterize local micrometeorological characteristics. Statistical learning relies on historical data, leveraging traditional machine learning methods such as support vector machines and random forests, or deep learning models such as long-short-term memory networks and recursive neural networks, to mine the inherent patterns of the data. However, this approach is highly dependent on data quality. Hybrid modeling combines the advantages of the first two methods, integrating multiple forecast results through combined predictions or cascade structures. For example, methods such as combining wavelet decomposition with artificial neural networks and Gaussian processes with deep learning have demonstrated good adaptability across different time scales and meteorological conditions.
[0004] However, existing prediction methods face several key technical challenges: First, in heterogeneous data fusion, the distribution of wind turbine operating data, meteorological data, and grid load data varies significantly. Existing methods are unable to effectively eliminate the characteristic deviations of data types, making it difficult to represent them in a unified feature space, which in turn affects the effectiveness of subsequent fusion predictions. Second, existing prediction methods ignore the constraint integration between the physical laws of wind power systems and data-driven models. They lack an effective mechanism for actively guiding the physical laws, resulting in subtle but critical prediction errors in model output that violate wind farm operating specifications. Summary of the Invention
[0005] The purpose of the invention is to provide a short-term wind power prediction method based on dynamic time series fusion of multi-source heterogeneous data, in order to solve at least one technical problem existing in the prior art.
[0006] The technical solution provides a short-term wind power forecasting method based on dynamic time series fusion of multi-source heterogeneous data, including:
[0007] Read and preprocess multi-source data, extract time series features from it, and generate a time series feature vector set;
[0008] Based on the time series feature vector set and preset environmental conditions, an adversarial hash generator is applied to construct a unified feature representation space, and projection diversity regularization and perturbation immunity training are performed to generate an enhanced hash code set;
[0009] The enhanced hash code is integrated with the physical laws and data distribution characteristics of the wind power system, and constraint projection and distribution calibration are performed. A heterogeneous relationship graph is constructed based on the processed hash code, and historical similar condition data is used for correction to generate a dynamic fusion relationship graph.
[0010] GCN is applied on the dynamic fusion relationship graph to perform short-term wind power forecasting and obtain the wind power forecast value.
[0011] Preferably, the step of generating the enhanced hash code set includes:
[0012] The temporal feature vector set and environmental conditions are input into the adversarial hash generator, and a type-neutral hash code is generated through the type recognition discriminator and adversarial training;
[0013] The covariance matrix of the type-neutral hash code is calculated, and projection diversity regularization is applied to make the hash code distribution uniform, thus generating diversity-enhanced hash codes.
[0014] Perturbation-immune training is applied to the diversity-enhanced hash codes, and the difference between the hash codes before and after perturbation is minimized to generate a set of enhanced hash codes.
[0015] Preferably, the step of generating a type-neutral hash code comprises:
[0016] Applying a feature extraction function to the time series feature vector set to generate a feature extraction result;
[0017] Applying an environmental condition encoding function to the environmental condition to generate an environmental condition encoding result;
[0018] The feature extraction results and the environmental condition encoding results are fused to generate the feature fusion result and pass it through the hash mapping layer to generate the original hash code;
[0019] Based on the original hash code, the type identification discriminator is used to distinguish the hash representations of different data types, generate the discriminator output and minimize the discriminator accuracy, so as to encourage the hash generator to produce a type-independent unified representation and generate a type-neutral hash code.
[0020] Preferably, the step of generating a diversity-enhanced hash code comprises:
[0021] Perform distribution statistics analysis on the type-neutral hash code set, calculate the hash code mean vector, and generate hash distribution statistics;
[0022] Based on the hash distribution statistics, the covariance matrix of the hash code set is calculated to generate the hash covariance matrix;
[0023] Calculate the eigenvalues of the hash covariance matrix, design the diversity loss function based on it, and calculate the diversity loss value;
[0024] The diversity loss value is back-propagated to the hash generator network, the gradient is calculated and the network parameters are updated to generate diversity-enhanced hash codes.
[0025] Preferably, the step of generating the enhanced hash code set includes:
[0026] Analyze the time series feature vector set corresponding to the diversity-enhanced hash code, calculate the sensitivity index of each dimension feature, and generate a feature sensitivity matrix. Based on this, adopt an adaptive perturbation generation strategy to generate perturbations for high- and low-sensitivity dimensions respectively, and obtain adaptive perturbation vectors and environmental condition perturbation vectors.
[0027] Add the adaptive perturbation vector to the time series feature vector set and the environmental condition perturbation vector to the environmental condition to generate a perturbation feature vector set and perturbation environmental condition respectively. Generate a perturbation hash code based on the perturbation vector and calculate its perturbation distance from the original hash code.
[0028] Through the robustness loss function, the difference between the hash codes before and after perturbation is minimized to generate an enhanced hash code set.
[0029] Preferably, the step of generating a dynamic fusion relationship graph includes:
[0030] Apply physical constraint gradient projection to the enhanced hash code set, adjust the hash code to meet the physical constraints, generate the physical constraint hash code and analyze its distribution characteristics under the current environmental conditions, perform distribution calibration, and obtain the calibrated hash code and the initial relationship graph;
[0031] Retrieve the historical conditions most similar to the current environmental conditions and their corresponding hash representations from the historical database, perform historical information correction on the calibration hash code, and generate a historical correction hash code;
[0032] The node representation and edge weights of the relationship graph are updated based on the historical revised hash code to generate a dynamic fusion relationship graph.
[0033] Preferably, the step of generating a physical constraint hash code includes:
[0034] Based on the physical constraint rule library, a comprehensive physical constraint function is constructed, including the wind speed-power curve constraint function, the cut-in and cut-out wind speed constraint function, and the power change rate constraint function. The weights of each constraint are dynamically adjusted to generate a comprehensive physical violation degree.
[0035] Calculate the gradient of the comprehensive physical violation degree with respect to the hash code to generate the physical violation gradient;
[0036] Design an adaptive step-size control strategy based on the physical violation degree to generate an adaptive projection step-size;
[0037] Applying the gradient projection formula and combining the projection step size, the hash code is adjusted in the direction of satisfying the physical constraints to generate a physical constraint hash code.
[0038] Preferably, using historical similar condition data for correction includes:
[0039] According to the environmental conditions, the environmental condition feature vector is constructed, including time factors, meteorological factors and system status;
[0040] Based on the weighted environmental condition distance measurement function and the historical condition index structure, multiple historical conditions that are most similar to the current environmental condition are queried to obtain a set of similar historical conditions;
[0041] Calculate the similarity between each condition in the similar historical condition set and the current condition, and normalize them to obtain the similarity weight vector;
[0042] Retrieve the historical hash code corresponding to the similar historical condition set, and calculate the weighted historical hash code based on the similarity weight vector;
[0043] The weighted historical hash code is adjusted toward the historical experience by applying the historical matching correction formula, and the node representation and edge weight of the updated relationship graph based on the historical corrected hash code are obtained to generate a dynamic fusion relationship graph.
[0044] Preferably, the distribution calibration comprises:
[0045] Analyze the distribution characteristics of the physical constraint hash code under the current environmental conditions, calculate the mean vector and standard deviation vector of the hash code under the current conditions, and obtain the hash distribution statistics;
[0046] Applying a distribution calibration formula to adjust the hash distribution to a predefined target distribution;
[0047] A relationship graph is constructed based on the cosine similarity between the calibrated hash codes. Each data point is used as a node in the graph and the similarity is used as the edge weight to form an initial relationship graph that represents the intrinsic relationship of multi-source data.
[0048] Preferably, applying a graph convolutional neural network on a dynamic fusion relationship graph to perform short-term wind power forecasting includes:
[0049] Apply multi-layer graph convolution operations on the dynamic fusion relationship graph, combine the attention mechanism to fuse node features and graph structure information, and generate graph convolution features;
[0050] A time series prediction layer is constructed based on graph convolution features, and the original power prediction value is output for the prediction time domain;
[0051] Combined with the wind farm power curve model and current operating status, the original power forecast value is corrected by physical constraints and the corrected power forecast value is output;
[0052] Apply the confidence interval estimation method to calculate the prediction uncertainty of the corrected power forecast value, and output the wind power forecast result including the forecast value and confidence interval.
[0053] Preferably, generating a comprehensive physical violation degree includes:
[0054] Construct a wind speed-power curve constraint function, calculate the deviation between the predicted power corresponding to the hash code and the allowable power range under a given wind speed, and generate the power curve violation degree;
[0055] Construct a cut-in and cut-out wind speed constraint function, calculate the power output violation when the wind speed is lower than the cut-in wind speed or higher than the cut-out wind speed, and generate the cut-in and cut-out violation degree;
[0056] Design a power change rate constraint function, calculate the degree to which the power change at adjacent moments exceeds the maximum allowable change rate, and generate the change rate violation degree;
[0057] Integrate the above constraint functions, construct a comprehensive physical violation function, dynamically adjust the weights of each constraint, and generate a comprehensive physical violation.
[0058] Beneficial effects: This method significantly improves prediction accuracy and robustness, especially reducing prediction errors by about 50% under extreme weather conditions. The relevant technical effects will be described in detail in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flow chart of the present invention.
[0060] Figure 2 This is the overall flow chart of the present invention for generating an enhanced hash code set.
[0061] Figure 3 4 is a flow chart of generating type-neutral hash codes according to the present invention.
[0062] Figure 4 This is a flow chart of the present invention for generating a diversity-enhanced hash code.
[0063] Figure 5 This is a flow chart of the present invention applying perturbation immunity training to diversity enhanced hash codes to generate an enhanced hash code set.
[0064] Figure 6 It is a flow chart of the present invention for generating a dynamic fusion relationship diagram. DETAILED DESCRIPTION
[0065] like Figures 1 to 6 As shown in the figure, the short-term wind power forecasting method based on dynamic time series fusion of multi-source heterogeneous data includes:
[0066] S1. Acquire meteorological data, wind turbine operation data, grid load data, and historical power data, perform data cleaning, interpolation, and standardization, and apply multi-scale time series decomposition and feature extraction methods to generate a time series feature vector set.
[0067] S11. Collect wind turbine operating data, including monitoring data such as wind turbine speed, yaw angle, pitch angle, and generator torque, and normalize them using the minimum-maximum normalization method to obtain standardized wind turbine operating data.
[0068] S12. Acquire meteorological data, including wind speed, wind direction, temperature, humidity, and air pressure, and use a physical relationship-based anomaly detection algorithm to identify and correct abnormal meteorological data points to obtain cleaned meteorological data.
[0069] S13. Fuse standardized wind turbine operating data with cleaned meteorological data to construct a time-aligned multi-source fusion dataset, ensuring accurate temporal matching of data from different sources.
[0070] S14. Apply adaptive multi-scale spectral analysis to the multi-source fusion dataset to decompose the time series data into different frequency components, capturing long-term trends, cyclical patterns, and short-term fluctuations respectively, and obtain frequency domain decomposition data.
[0071] S15. Combine the frequency domain decomposition data and the original multi-source fusion data set to extract comprehensive features including time domain statistical features, frequency domain energy distribution, and phase relationship, and generate the final time series feature vector set.
[0072] S2. Based on the time series feature vector set and environmental conditions, an adversarial hash generator is applied to construct a unified feature representation space, and the robustness and discriminability of the representation are improved through perturbation immune training and projection diversity regularization to generate an enhanced hash code set.
[0073] S21. Design an adversarial hash generator structure that receives a set of temporal feature vectors and environmental conditions as input, maps them to the hash space through a multi-layer neural network, and initially generates the original hash code.
[0074] S22. A type recognition discriminator is introduced to try to distinguish the hash representations of different data types (wind speed, temperature, etc.). Through adversarial training, the discriminator accuracy is minimized, which forces the hash generator to produce a type-independent unified representation, thus obtaining a type-neutral hash code.
[0075] S23. Calculate the covariance matrix for type-neutral hash codes and design the projection diversity regularization term Ldiversity =-log(det(Cov({h i}))), the regularization term is incorporated into the optimization objective of the hash generator to ensure that the generated hash codes have good distribution diversity and output diversity-enhanced hash codes.
[0076] S24. Apply a perturbation-immune training mechanism to diversity-enhanced hash codes. Add controlled perturbations to the input features and environmental conditions, calculate the difference between the hash codes before and after the perturbation, and minimize the difference loss L_robust = ||h' - h||^2. This improves the robustness of the hash representation to input variations and generates the final set of enhanced hash codes.
[0077] S3. Integrate the physical laws and data distribution characteristics of the wind power system into the enhanced hash code set, perform constraint projection and distribution calibration, and construct a heterogeneous relationship graph based on the processed hash code. Use historical similar condition data for correction to generate a dynamic fusion relationship graph.
[0078] S31. Construct a physical constraint model for the wind power system, including wind speed-power curve constraints, cut-in and cut-out wind speed constraints, power change rate constraints, and wind direction impact constraints. These constraints are integrated into a comprehensive physical violation function V(h) to evaluate the physical rationality of the hash representation.
[0079] S32. Calculate the physical violation degree V(h) for each hash code h in the enhanced hash code set and apply the gradient projection method h constrained = h - η·▽ h V(h) adjusts the hash code to satisfy the physical constraints and obtains the physical constraint hash code.
[0080] S33. Analyze the distribution characteristics of the physical constraint hash code under the current environmental conditions and calculate the mean μ h (c) and standard deviation σ h (c), through the distribution calibration formula h calibrated = (h - μ h (c)) / σ h (c) * σ t arget + μ t arget adjusts the hash distribution to the target distribution and outputs a calibrated hash code.
[0081] S34. Constructing the initial relationship graph G based on the cosine similarity between the calibrated hash codes i nit, takes each data point as a node in the graph and the similarity as the edge weight, forming an initial relationship graph that represents the internal relationship of multi-source data.
[0082] S35. Design a historical matching correction mechanism to retrieve the k historical conditions most similar to the current environmental conditions from the historical database {csim} and its corresponding hash representation {h history}, calculate the conditional similarity weight β = exp(-d(c,c sim ) / τ) / (exp(-d(c,c sim ) / τ) + α), where d is the conditional distance metric, and τ and α are control parameters.
[0083] S36. Apply the historical correction formula h corrected = h calibrated + β·(h history -h calibrated ) adjusts the calibration hash code, updates the edge weights of the relationship graph according to the corrected hash code, and generates the final dynamic fusion relationship graph.
[0084] S4. Apply graph convolutional neural network on the dynamic fusion relationship graph to perform short-term wind power forecasting, and combine it with the physical model for post-processing to output the final wind power forecast value.
[0085] S41. Apply graph convolutional neural networks on dynamic fusion relationship graphs to fuse node features with graph structure information, extract high-order relationship features through multi-layer graph convolution operations, and generate graph convolution features.
[0086] S42. Build a time series prediction layer based on graph convolutional features to output preliminary raw power prediction values for the prediction time domain (e.g., the next 24 hours).
[0087] S43. Combine the wind farm power curve model and current operating status to perform physical constraint correction on the original power forecast value to ensure that the forecast result conforms to the physical characteristics of the wind turbine and the grid operation specifications, and output the corrected power forecast value.
[0088] S44. Apply the confidence interval estimation method to calculate the prediction uncertainty of the corrected power forecast value, provide a reliable confidence interval for wind power forecast, and ultimately output the wind power forecast result including the forecast value and confidence interval.
[0089] According to one aspect of the present application, S23, projection diversity regularization refinement, is specifically:
[0090] S231. Get type-neutral hash code set H = {h1, h2, ..., h_n}, where h i ∈ R^d represents a d-dimensional hash vector, n is the number of samples, and the distribution characteristics of the hash set are statistically analyzed to obtain the hash distribution statistics.
[0091] S232. Based on the hash distribution statistics, calculate the covariance matrix of the hash code set Σ = 1 / n·∑(h i -μ)(hi - μ)^T, where μ = 1 / n·∑h i is the hash code mean vector, and the hash covariance matrix Σ is obtained.
[0092] S233. Calculate the eigenvalues λ = {λ1, λ2, ..., λ_d} of the hash covariance matrix Σ, iterate the main eigenvalues using the power method, detect whether there are eigenvalues that are approximately zero, and generate an eigenvalue analysis report.
[0093] S234. Design a diversity loss function L based on the eigenvalue analysis report diversity = -log(det(Σ) + ε)= -∑log(λ i + ε), where ε is a small constant to prevent numerical instability, to obtain the diversity loss value.
[0094] S235. Backpropagate the diversity loss value to the hash generator network and calculate the gradient ▽_θL diversity , where θ is the network parameter, and the network parameter is updated by the gradient descent method θ_new = θ - α·▽_θL diversity , α is the learning rate, generating new diversity enhanced hash codes.
[0095] S236. Construct a hash distribution visualization map, project the diversity-enhanced hash codes onto a two-dimensional plane using t-SNE dimensionality reduction, analyze the uniformity and coverage of the hash distribution, and generate a hash distribution evaluation report.
[0096] S237. Dynamically adjust the diversity regularization strength λ based on the hash distribution evaluation report diversity , forming an adaptive regularization strategy λ_new = f(λ, hash distribution evaluation index), and outputting the final adaptive diversity enhanced hash code.
[0097] According to one aspect of the present application, S24, perturbation immunity training is refined, specifically as follows:
[0098] S241. Receive a diversity-enhanced hash code and a corresponding set of temporal feature vectors and environmental conditions as input, and construct a disturbance generator for generating a controlled disturbance.
[0099] S242. Analyze the characteristics of the time series feature vector set and calculate the sensitivity index S of each dimension feature i = dh / dx i , which is the partial derivative of the hash code with respect to the input features, and the feature sensitivity matrix is obtained. d is the symbol of the partial derivative.
[0100] S243. Based on the feature sensitivity matrix, an adaptive perturbation generation strategy is designed to generate smaller perturbations for highly sensitive dimensions and larger perturbations for less sensitive dimensions, generating an adaptive perturbation vector δ, where δ i ∝ 1 / S i r, r is a random factor.
[0101] S244. Apply a similar method to analyze the sensitivity of environmental conditions and generate an environmental condition disturbance vector ε, while ensuring that the environmental conditions after the disturbance are still within a reasonable range, to obtain the environmental condition disturbance vector.
[0102] S245. Add the adaptive disturbance vector δ to the time series feature vector set, and add the environmental condition disturbance vector ε to the environmental condition, to generate a disturbance feature vector set and a disturbance environmental condition after disturbance.
[0103] S246. Pass the original input and the perturbed input through the hash generator to obtain the original hash code h and the perturbed hash code h'. Calculate the Euclidean distance d(h, h') = ||h - h'||2 between the hash codes before and after the perturbation to obtain the hash perturbation distance.
[0104] S247. Design the perturbation robustness loss function L_robust = 1 / n·∑d(h i , h' i )^2, where n is the number of samples, and the robustness loss value is calculated.
[0105] S248. Design an adversarial perturbation training algorithm to iteratively find the perturbation vector that maximizes the hash perturbation distance to form the most challenging adversarial examples and obtain the set of adversarial perturbation vectors.
[0106] S249. Combined with the adversarial samples generated by the adversarial perturbation vector set, immune training is performed, and the robustness loss value is back-propagated to update the hash generator parameters, making the model immune to perturbations and outputting the final enhanced hash code set while ensuring that the diversity characteristics are not destroyed.
[0107] According to one aspect of the present application, S32, physical constraint gradient projection refinement, is specifically:
[0108] S321. Obtain an enhanced hash code set, analyze the physical laws of the wind power system, including the relationship between wind speed and power, power curve characteristics, cut-in and cut-out wind speed constraints, power change rate limits, etc., and establish a physical constraint rule library.
[0109] S322. Based on the physical constraint rule base, construct the wind speed-power curve constraint function V_power(h) = ∑max(0, P(h) - P max (WS(h))) 2+ ∑max(0, P min (WS(h)) - P(h)) 2 , where P(h) is the predicted power corresponding to the hash code, WS(h) is the wind speed information contained in the hash code, and P max and P min are the maximum and minimum possible powers at a given wind speed, respectively, and the power curve violation is obtained.
[0110] S323. Constructing the cut-in and cut-out wind speed constraint function V c utoff(h) = max(0, P(h)) 2 ·I(WS(h) <WS cut-in ) + max(0, P(h)) 2 ·I(WS(h)>WS cut-out ), where I() is the characteristic function, WS cut-in and WS cut-out are the cut-in and cut-out wind speeds respectively, and the cut-in and cut-out violation degrees are obtained.
[0111] S324. Design power change rate constraint function V ramp (h, h prev ) = max(0, |P(h) - P(h prev )| / Δt - R max ) 2 , where h prev is the hash code of the previous moment, Δt is the time interval, R max is the maximum allowable power change rate, and the change rate violation degree is obtained.
[0112] S325. Integrate the constraint functions and construct the comprehensive physical violation function V(h) = w1·V power (h) + w2·V cutoff (h) + w3·V ramp (h, h prev ), where w1, w2, and w3 are weight parameters, which are dynamically adjusted according to the importance of the constraints to obtain the comprehensive physical violation degree.
[0113] S326. Calculate the comprehensive physical violation degree V(h) and its gradient with respect to h for each enhanced hash code h h V(h), the gradient is efficiently calculated using automatic differentiation techniques to obtain the physically violating gradient.
[0114] S327. Design an adaptive step-size control strategy to dynamically adjust the projection step size η = η0·min(1, V(h) / V threshold ), where η0 is the basic step size, V thresholdis the threshold parameter, and the adaptive projection step size is obtained.
[0115] S328. Apply the gradient projection formula h constrained = h - η·▽ h V(h) adjusts the hash code in the direction of satisfying the physical constraints, ensuring that the projected hash code retains the original information and satisfies the physical constraints, and outputs the physical constraint hash code.
[0116] According to one aspect of the present application, S36, historical matching correction and refinement, is specifically as follows:
[0117] S361. Obtain the current environmental condition c and the calibration hash code, and construct an environmental condition feature vector, including time factors (hour, date, season), meteorological factors (wind speed, wind direction, temperature, pressure, humidity, etc.), and system status (grid connection capacity, scheduling strategy, etc.), to obtain the environmental condition feature vector.
[0118] S362. Establish the environmental condition distance metric function d(c1, c2) = ∑w i ·|c1 i - c2 i | / σ i , where w i is the weight of the i-th conditional feature, σ i is the standard deviation of the feature, and the weight w is automatically learned by minimizing the prediction error under historical similar conditions i , and obtain the conditional distance function.
[0119] S363. Construct a historical condition index structure (such as a KD tree or a ball tree) to spatially partition the historical environmental condition database, support efficient nearest neighbor queries, and generate a historical condition index.
[0120] S364. Based on the conditional distance function and the historical condition index, query the k historical conditions {c sim1 , c sim2 , ..., c simk}, and obtain a set of similar historical conditions.
[0121] S365. For each condition c in the similar historical condition set simi , calculate its similarity s with the current condition c i =exp(-d(c, c simi ) / τ), where τ is the temperature parameter, which controls the smoothness of the similarity distribution and obtains the conditional similarity vector.
[0122] S366. Normalize the conditional similarity vector and calculate the similarity weight β i = s i / (s i + α), where α is a balance parameter that controls the trade-off between historical information and current information. A larger α value reduces the influence of historical information, and the similarity weight vector is obtained.
[0123] S367. Retrieve the historical hash code corresponding to the similar historical condition set {h history1 , h history2 , ...,h historyk}, and calculate the weighted average historical hash code h according to the similarity weight vector history-avg = ∑β i ·h historyi / ∑β i , get the weighted historical hash code.
[0124] S368. Applying history matching correction formula h corrected = (1-γ)·h calibrated + γ·β·h history-avg , where γ is the global mixing coefficient and β is the overall historical information weight. γ and β are dynamically adjusted to balance current information and historical experience, and the historical correction hash code is output.
[0125] S369. Based on the historically corrected hash code, the node representation and edge weights of the relationship graph are updated, the similarities between nodes are recalculated, and the adjacency matrix is updated to generate the final dynamic fusion relationship graph.
[0126] According to one aspect of the present application, S41, graph convolution feature extraction refinement, is specifically:
[0127] S411. Receive a dynamic fusion relationship graph G = (V, E, A), where V is the node set, E is the edge set, A is the adjacency matrix, and a node feature matrix X, where each row represents a feature vector of a node, constructed based on the historically corrected hash code, to obtain graph input data.
[0128] S412. Design a multi-head graph attention layer and calculate the attention coefficient α ij = softmax(LeakyReLU(a T [Wh i ||Wh j ])), where W is the weight matrix, a is the attention vector, h i and h j is the node feature, and the attention weight matrix is obtained.
[0129] S413. Construct a graph convolution operation to aggregate neighbor information h' based on the attention weight matrix i = σ(∑α ij Wh j), where σ is the activation function, which realizes feature propagation and conversion and obtains the first-order graph convolution feature.
[0130] S414. Design a residual connection mechanism to combine the original node features with the graph convolution features h res = h + h', reducing the gradient vanishing problem and retaining the original information to obtain the residual graph convolution feature.
[0131] S415. Construct a multi-layer graph convolution structure, stacking L layers of graph convolution operations to capture high-order relational features within an L-hop neighborhood. Apply batch normalization and ReLU activation function after each layer to obtain multi-layer graph convolution features.
[0132] S416. Design a temporal attention mechanism to perform weighted aggregation on graph convolution features of different time windows and calculate the temporal attention weight β t = softmax(v T tanh(W t ·h t )), where v and W t is a learnable parameter, h t is the feature at time t, and the time-weighted feature is obtained.
[0133] S417. We fuse the feature representations of spatial and temporal dimensions, concatenating multi-layer graph convolutional features with temporal weighted features and mapping them through a fully connected layer to obtain spatiotemporal fusion features.
[0134] S418. Design the output prediction layer to map the spatiotemporal fusion features to the prediction target space, adapt to the requirements of different prediction time domains, and generate the final graph convolution features for subsequent power prediction.
[0135] In this embodiment, unified representation learning for heterogeneous data is achieved, ensuring information equivalence for different physical quantities such as wind speed, temperature, and load within the same hash space, thereby eliminating type bias in data fusion. Structural adaptability is achieved through cosine similarity calculation and historical matching correction based on calibrated hash codes. When wind conditions fluctuate dramatically, the historical matching mechanism extracts experience from similar historical conditions, adjusting the hash representation toward reliable historical samples and dynamically updating the graph structure. Dynamic adaptability enables the model to automatically adjust the association weights and topological structure between data based on the specific environmental conditions at each prediction moment, effectively handling non-stationary scenarios such as sudden changes in grid load and shifts in weather systems. This provides a stable and reliable structural foundation for wind power forecasting and avoids the prediction failure problem of traditional fixed graph structures under complex meteorological conditions. Perturbation-immune training automatically identifies key features by calculating a feature sensitivity matrix and specifically enhances their robustness, making the model insensitive to small perturbations of non-critical features. The adaptive regularization strength is dynamically adjusted based on the hash distribution evaluation report, achieving an automatic optimization process from λ = 0.1 to λ = 0.21. The physical laws of the wind power system (such as wind speed-power curve constraints, cut-in and cut-out wind speed constraints, and power rate of change constraints) are directly integrated into the hash representation learning process. An adaptive projection step-size strategy ensures greater correction for samples with high violation scores. Ablation experiments show that removing the physical constraint gradient projection results in a 2.3 percentage point increase in the MAPE, the largest impact of all components. This physical perception capability is particularly evident under extreme conditions, such as high wind speeds (>20 m / s), where the proposed solution achieves a MAPE of 5.7%, compared to 17.8% for purely data-driven approaches. The deep integration of physical perception ensures that prediction results strictly conform to wind turbine characteristic curves and grid operating specifications, avoiding common non-physical prediction issues with traditional models (such as high power at low wind speeds and positive power at cut-out wind speeds). This provides more reliable prediction support for the safe operation of wind farms and significantly reduces wind curtailment and turbine losses caused by prediction errors.
[0136] Example 1: Demonstration using actual data from a wind farm. The data includes meteorological data, wind turbine operation data, grid load data, and historical power data. For example, wind turbine operation data includes parameters such as the speed, yaw angle, pitch angle, and generator torque of five wind turbines. The sampling frequency is 10 minutes per time, with a total of 720 time points (5 days of data). Meteorological data includes wind speed (0-25m / s), wind direction (0-359°), temperature (-10°C-40°C), humidity (0-100%), and air pressure (990-1030hPa). The sampling frequency is also 10 minutes per time. Historical power data includes the actual power output in the corresponding time period, in MW. Grid load data includes the total load demand (50-200 MW) of the grid area where the wind farm is located, load change rate (-15 MW / h to +15 MW / h), day-ahead load forecast, real-time load deviation (-10% to +10%), and exchange power in neighboring areas (-30 MW to +30 MW). The sampling frequency is 10 minutes / time and is aligned with other data timestamps.
[0137] The data processing process is as follows:
[0138] S1. Multi-source data acquisition and time series feature extraction
[0139] Example of fan operation data (part of the raw data at 10-minute sampling points):
[0140] Speed at time (rpm) Yaw angle (°) Pitch angle (°) Generator torque (kN·m)
[0141] 2023-06-01 00:00 15.2 85.3 2.5 32.1
[0142] 2023-06-01 00:10 14.7 87.1 3.1 29.8
[0143] Apply the minimum-maximum normalization method for normalization: X_normalized = (X_original - X_min) / (X_max - X_min), for example: minimum speed = 5.3 rpm; maximum speed = 22.7 rpm; for the speed of 15.2 rpm at the time point 2023-06-01 00:00: X_normalized = (15.2 - 5.3) / (22.7 - 5.3) = 9.9 / 17.4 = 0.569;
[0144] The standardized data is:
[0145] Time point Speed Yaw angle Pitch angle Generator torque
[0146] 2023-06-01 00:00 0.569 0.237 0.125 0.458
[0147] 2023-06-01 00:10 0.539 0.242 0.155 0.425
[0148] ...; obtain standardized fan operating data.
[0149] The other data were processed through similar data cleaning and time alignment to finally construct a multi-source fusion dataset.
[0150] Then, the adaptive multi-scale spectrum analysis method is applied to decompose the time series data into different frequency components. Specifically, X_time series data = X 低频趋势 + X 中频周期 + X 高频波动 ; Among them: X 低频趋势 To reflect the long-term changes in the components; X 中频周期 To reflect the components of daily cycle, hourly cycle, etc.; X 高频波动 To reflect the components of short-term disturbances, the frequency domain decomposition data and the original multi-source fusion data set are combined to extract comprehensive features and finally obtain a time series feature vector set. The feature vector structure is as follows:
[0151] Wind speed eigenvector, temperature eigenvector, power eigenvector at a time point...
[0152] 2023-06-01 00:00 [0.35,0.12,0.21] [0.42,0.15,0.03] [0.31,0.14,0.22] ...
[0153] 2023-06-01 00:10 [0.34,0.13,0.22] [0.42,0.15,0.02] [0.30,0.15,0.23] ... ...
[0154] S2. Adversarial Hash Representation Generation and Enhancement
[0155] According to the adversarial hash generator structure, which includes a feature extractor, an environmental condition encoder, and a hash map layer, the original hash code is initially generated based on the temporal feature vector set and the environmental conditions.
[0156] Specifically, the hash generation function H gen (x, c) = P(M(E x (x), E c (c))); where: x is the time series feature vector; c is the environmental condition vector; E x is the feature extraction function; Ec is the environmental condition encoding function; M is the feature fusion function; P is the projection mapping function.
[0157] For example, the feature vector calculation for the time point 2023-06-01 00:00 is:
[0158] Feature extraction: E x ([0.35,0.12,0.21, ...]) = [0.28,0.16,0.32,0.45];
[0159] Environment code: E c ([0.42,0.15,0.03, ...]) = [0.35,0.22,0.41];
[0160] Feature fusion: M([0.28, 0.16, 0.32, 0.45], [0.35, 0.22, 0.41]) = [0.31, 0.19, 0.36, 0.43, 0.38, 0.25];
[0161] Hash map: P([0.31,0.19,0.36,0.43,0.38,0.25]) = [0.42,0.38,0.51,0.29];
[0162] The type recognition discriminator is introduced for adversarial training, where the adversarial loss function L 对抗 = E x [log(D(h))] +E x ,c[log(1-D(H gen (x,c)))]; where: D is the type discriminator function; h is the hash code; E x represents the expectation about x; E x ,c represents the joint expectation of x and c.
[0163] By minimizing the accuracy of the discriminator, the hash generator produces a type-independent unified representation, resulting in a type-neutral hash code. The output of the type discriminator (the probability of discriminating the data type) can be:
[0164] Original hash code [0.42, 0.38, 0.51, 0.29] -> Wind speed type probability: 0.85, Temperature type probability: 0.12, Other: 0.03; After adversarial training [0.45, 0.32, 0.48, 0.35] -> Wind speed type probability: 0.42, Temperature type probability: 0.39, Other: 0.19; After adversarial training, the type discriminator has difficulty distinguishing the data source, achieving a unified representation regardless of type.
[0165] Calculate the covariance matrix of the type-neutral hash code and design the diversity regularization term, where the diversity loss value L diversity = -log(det(Σ) + ε); where Σ is the hash code covariance matrix, and the calculation formula is Σ = 1 / n·∑(h i - μ)(h i - μ)^T; μ is the hash code mean vector, calculated as μ = 1 / n·∑h i ; det(Σ) is the determinant of the matrix Σ; ε is a small constant to prevent numerical instability, set to 10^(-6); h i is the hash code of the i-th sample; n is the number of samples. In this embodiment, the hash dimension is 4 and the number of samples is 100:
[0166] Calculate the mean hash code vector μ = [0.43, 0.36, 0.47, 0.32]; calculate the covariance matrix Σ = [[0.053, -0.012, 0.008, 0.004], [-0.012, 0.048, 0.003, -0.005], [ 0.008, 0.003,0.061, 0.002], [ 0.004, -0.005, 0.002, 0.057]]; calculate the determinant det(Σ) = 0.000834; calculate the diversity loss L diversity = -log(0.000834 + 10^(-6)) = 7.083.
[0167] The diversity loss is incorporated into the optimization objective of the hash generator, and the network parameters are updated through gradient descent to make the hash code distribution more uniform and avoid the hash collapse problem.
[0168] Comparison of hash distribution before and after optimization (t-SNE dimensionality reduction visualization results): Before optimization, clustering = 0.78, coverage = 0.45. After optimization, clustering = 0.32, coverage = 0.83.
[0169] Hash codes after diversity enhancement: [0.47, 0.28, 0.52, 0.38], [0.22, 0.45, 0.31,0.54], [0.36, 0.58, 0.19, 0.42], ….
[0170] Analyze feature sensitivity and design adaptive perturbations, where the robustness loss value L_robust = 1 / n·∑||H gen (x+δ, c+ε) - H gen (x, c)||2 2 ; Among them: H genis the hash generation function; x is the time series feature vector; c is the environmental condition vector; δ is the feature disturbance vector, and the calculation formula is δ i = (1 / S i )·r·σ i ;ε is the environmental condition disturbance vector; S i is the feature sensitivity, and the calculation formula is S i = dh / dx i ; r is a random factor, uniformly distributed in the range of [-0.1, 0.1]; σ i is the characteristic standard deviation; n is the number of samples; ||·||2 represents the L2 norm (Euclidean distance).
[0171] The calculation process is: Calculate feature sensitivity (partial example): S 风速 = 0.85, S 温度 = 0.42, S 湿度 = 0.31,S 功率 = 0.76;
[0172] Generate a perturbation vector (assuming r = 0.05 and the standard deviation is known): δ 风速 = (1 / 0.85)·0.05·0.12 =0.007; δ 温度 = (1 / 0.42)·0.05·0.08 = 0.010; δ 湿度 = (1 / 0.31)·0.05·0.06 = 0.010; δ 功率 = (1 / 0.76)·0.05·0.15 = 0.010.
[0173] Original feature vector: [0.35, 0.42, 0.28, 0.31]; perturbed feature vector: [0.357, 0.430, 0.290, 0.320]; Calculate the hash codes before and after perturbation: Original hash codes: [0.47, 0.28, 0.52, 0.38]; Perturbed hash codes: [0.48, 0.27, 0.53, 0.39]. Calculate the L2 distance: 0.0173. Repeat the above process for all samples and calculate the average L_robust.
[0174] By minimizing L_robust, the robustness of the hash representation to input variations is improved.
[0175] Comparison before and after perturbation immunity training: Before training, the average perturbation sensitivity = 0.082; after training, the average perturbation sensitivity = 0.023 (a decrease of 72%); the final enhanced hash code set is obtained.
[0176] S3. Physical Constraint Fusion and Relationship Graph Construction
[0177] Construct a physical constraint model of the wind power system, including wind speed-power curve constraints, cut-in and cut-out wind speed constraints, etc.
[0178] Hash code h after constraint constrained = h - η·▽ h V(h); where h is the enhanced hash code; η is the projection step length, and the calculation formula is η = η0·min(1, V(h) / V threshold );▽ h V(h) is the gradient of the physical violation with respect to h; V(h) is the comprehensive physical violation, calculated as V(h) = w1·V_power(h) + w2·V c utoff(h) + w3·V ramp (h,h prev ); V_power(h) is the power curve violation; V c utoff(h) is the cut-in and cut-out violation degree; V ramp (h, h prev ) is the rate of change violation; w1, w2, w3 are weight parameters; η0 is the basic step size, set to 0.05; V threshold is the threshold parameter, set to 0.8.
[0179] The calculation process example is as follows:
[0180] Hash code h = [0.47, 0.28, 0.52, 0.38], corresponding violation degree: V_power(h) = 0.45 (power curve violation degree); V c utoff(h) = 0.12 (cut-in and cut-out violation); V ramp (h, h prev ) = 0.28 (rate of change violation);
[0181] Weight parameters w1 = 0.5, w2 = 0.3, w3 = 0.2; comprehensive physical violation V(h) = 0.5 0.45 + 0.3 0.12 + 0.2 0.28 = 0.225 + 0.036 + 0.056 = 0.317; adaptive step size η = 0.05 min(1, 0.317 / 0.8) = 0.05 0.396 = 0.0198; physical violation gradient (calculated by automatic differentiation) ▽ h V(h) =[0.38, -0.15, 0.42, 0.21]; gradient projection h constrained= [0.47, 0.28, 0.52, 0.38] -0.0198 [0.38, -0.15, 0.42, 0.21] = [0.462, 0.283, 0.512, 0.376];
[0182] Comparison of physical constraint before and after projection: the physical violation degree before projection was 0.317; the physical violation degree after projection was 0.182 (a decrease of 42.6%).
[0183] The distribution calibration method is applied to adjust the hash distribution characteristics, and the calibrated hash code h calibrated = (h - μ h (c)) / σ h (c) * σ t arget + μ t arget; where h is the physical constraint hash code; μ h (c) is the mean value of the hash code under the current environmental conditions; σ h (c) is the standard deviation of the hash code under the current environmental conditions; μ t arget is the target distribution mean, set to 0; σ t arget is the standard deviation of the target distribution, set to 1.
[0184] The calibration calculation example is as follows: The hash statistic μ under the current environmental conditions h (c) = [0.45, 0.31, 0.49,0.36], σ h (c) = [0.08, 0.06, 0.09, 0.07]; physical constraint hash code h constrained = [0.462, 0.283, 0.512, 0.376]; calibrated hash code h calibrated = [(0.462-0.45) / 0.08, (0.283-0.31) / 0.06, (0.512-0.49) / 0.09, (0.376-0.36) / 0.07] = [0.15, -0.45, 0.24, 0.23]; Construct the initial relationship graph based on the calibration hash code, and then perform history matching correction.
[0185] History revision hash code h corrected = h calibrated + β·(h history -h calibrated ); where h calibrated is the calibration hash code; h history is the weighted historical hash code, and the calculation formula is h history = ∑β i ·h historyi / ∑βi ; β is the similarity weight, calculated as β = s / (s + α); s is the conditional similarity, calculated as s = exp(-d(c, c sim ) / τ); d(c, c sim ) is the conditional distance; τ is the temperature parameter, set to 0.2; α is the equilibrium parameter, set to 0.3; c is the current environmental condition; c sim Similar historical conditions.
[0186] An example of historical matching calculation is as follows: current environmental conditions c = [0.42, 0.15, 0.28, 0.65] (wind speed, temperature, humidity, air pressure);
[0187] Find similar historical conditions (assuming 3 most similar conditions are found): c sim1 = [0.40, 0.16, 0.30,0.64], d1= 0.033, h history1 = [0.12, -0.48, 0.22, 0.21]; c sim2 = [0.43, 0.18, 0.25,0.67], d2= 0.048, h history2 = [0.18, -0.42, 0.26, 0.25]; c sim3 = [0.38, 0.13, 0.32,0.62], d3= 0.078, h history3 = [0.09, -0.52, 0.18, 0.19].
[0188] Calculate similarity: s1= exp(-0.033 / 0.2) = 0.848, β1= 0.848 / (0.848+0.3) = 0.739; s2= exp(-0.048 / 0.2) = 0.786, β2= 0.786 / (0.786+0.3) = 0.724; s3= exp(-0.078 / 0.2)= 0.677, β3= 0.677 / (0.677+0.3) = 0.693;
[0189] Calculate the weighted historical hash code h history = (0.739·[0.12,-0.48,0.22,0.21] + 0.724·[0.18,-0.42,0.26,0.25]+ 0.693·[0.09,-0.52,0.18,0.19]) / (0.739+0.724+0.693); h history = [0.131, -0.471, 0.221, 0.219];
[0190] Calculate the overall similarity weight (assuming β = 0.65): historical correction h corrected = [0.15,-0.45,0.24,0.23] + 0.65·([0.131,-0.471,0.221,0.219]- [0.15,-0.45,0.24,0.23]) = [0.138,-0.464, 0.228, 0.223];
[0191] The relationship graph is updated based on the historical revised hash code to obtain a dynamic fusion relationship graph.
[0192] S4. Graph Convolution Prediction and Output Generation
[0193] Apply graph convolutional neural network to extract features on the dynamic fusion relationship graph: graph convolution feature h' of the i-th node i = σ(∑α ij Wh j ); where σ is the activation function, using ReLU; α ij is the attention coefficient, and the calculation formula is α ij =softmax(LeakyReLU(a T [Wh i || Wh j ])); W is the weight matrix; a is the attention vector; h i 、h j is the node hash feature; || represents the splicing operation.
[0194] An example of graph convolution calculation (partial nodes) is as follows: node hash features: h1= [0.138, -0.464, 0.228, 0.223]; h2= [0.152, -0.438, 0.245, 0.218]; h3= [0.125, -0.472, 0.217, 0.232]; ...
[0195] Calculate the attention coefficient (some examples): α12 = 0.28, α13 = 0.16, α21 = 0.31, α23 = 0.22, ...
[0196] Perform graph convolution operation (W is known): h'1 = ReLU(0.28·W·h2+ 0.16·W·h3+ ...) =[0.432, 0.156, 0.345, 0.278]; h'2 = ReLU(0.31·W·h1+ 0.22·W·h3+ ...) =[0.416, 0.182, 0.328, 0.291]; ....
[0197] Through multi-layer graph convolution and time attention mechanism, graph convolution features are generated:
[0198] Time point t: [0.432, 0.156, 0.345, 0.278, ...]; Time point t-1: [0.428, 0.162, 0.339, 0.285, ...]; Time point t-2: [0.415, 0.171, 0.332, 0.296, ...]; .... Power prediction for the next 24 hours based on graph convolution features.
[0199] Predicted power value P pred = PredictionModel(h_GC); where PredictionModel is the prediction model and h_GC is the graph convolution feature.
[0200] Example of the final output wind power forecast results (partial time period):
[0201] Time prediction power (MW) Prediction interval lower bound Prediction interval upper bound
[0202] 2023-06-01 06:00 25.8 24.2 27.4
[0203] 2023-06-01 06:10 26.2 24.5 27.9
[0204] 2023-06-01 06:20 26.7 25.0 28.4 ...
[0205] Method performance comparison (compared with three existing methods):
[0206] Mean RMSE: This method is 3.2%; comparison method 1 (fixed weight fusion) is 5.6%; comparison method 2 (dynamic graph convolution) is 4.5%; comparison method 3 (classic time series prediction) is 7.8%.
[0207] Forecast error under extreme meteorological conditions: proposed method 7.5%; comparison method 115.2%; comparison method 212.8%; comparison method 318.4%.
[0208] Forecast stability evaluation (average volatility of forecast values at adjacent moments): 4.2% for this method; 11.5% for comparison method 1; 8.3% for comparison method 2; and 13.7% for comparison method 3.
[0209] This example demonstrates that the proposed short-term wind power forecasting method, which integrates dynamic time series from multiple sources of heterogeneous data, significantly outperforms existing methods in terms of prediction accuracy, stability, and adaptability to extreme conditions through techniques such as adversarial hashing, projection diversity regularization, disturbance-immune training, physically constrained gradient projection, and history matching correction. In particular, under extreme weather conditions, the forecast error was reduced by approximately 41%, significantly improving the reliability of wind farm scheduling.
[0210] Example 2: A relationship diagram based on a calibration hash code, the construction process of which includes:
[0211] Get the calibration hash code set {h calibrated1 , h calibrated2 , ..., h calibrated _n}, design the cosine similarity calculation function sim(h i , h j ) = (h i · h j ) / (||h i || · ||h j ||), where h i represents the calibration hash code of the i-th sample, h j represents the calibration hash code of the jth sample, h i · h j represents the inner product of two hash codes, ||h i || represents the hash code h i The L2 norm of sim(h i , h j ) represents the cosine similarity between two hash codes, and its value range is [-1, 1]. The larger the value, the higher the similarity.
[0212] Calculate the cosine similarity between all sample pairs and construct the similarity matrix S, where S ij = sim(h calibratedi ,h calibratedj ), S ij The element in the i-th row and j-th column of the similarity matrix corresponds to the similarity between the i-th sample and the j-th sample.
[0213] Set the similarity threshold τ sim = 0.75, construct the adjacency matrix A based on the threshold, where A ij = 1 if S ij >τ sim else 0,A ij Represents the element in the i-th row and j-th column of the adjacency matrix. A value of 1 indicates that there is a connection between the two nodes, and a value of 0 indicates that there is no connection between the two nodes. sim Represents the similarity threshold.
[0214] In order to improve the connectivity of the relationship graph, the K nearest neighbor strategy is introduced, and K is set to 5. For each node i, the K nodes with the highest similarity {j1, j2, ..., j k}, set the corresponding adjacency matrix element to 1: A i,jk = 1, k ∈ {1,2, ..., K}, where K represents the minimum number of connections for each node.
[0215] Use the similarity value as the weight of the edge to construct the weighted adjacency matrix W, where W ij = S ij if A ij = 1 else0, W ij Represents the element in the i-th row and j-th column of the weighted adjacency matrix.
[0216] Construct the initial relationship graph G based on the weighted adjacency matrix W and the node feature matrix X (composed of calibrated hash codes) i nit= (V, E, W, X), where V represents the node set, containing n data points, E represents the edge set, determined by the adjacency matrix A, W represents the edge weight matrix, and X represents the node feature matrix.
[0217] In this embodiment, the calculation process is as follows:
[0218] Assume there are three sample calibration hash codes: h calibrated1 = [0.15, -0.45, 0.24, 0.23];h calibrated2 = [0.12, -0.48, 0.22, 0.21]; h calibrated3 = [0.18, -0.42, 0.26, 0.25];
[0219] Calculate cosine similarity: sim(h1, h2) = (0.15×0.12 + (-0.45)×(-0.48) + 0.24×0.22 + 0.23×0.21) / (√(0.15² + (-0.45)² + 0.24² + 0.23²) × √(0.12² + (-0.48)² + 0.22² + 0.21²)) = (0.018 + 0.216 + 0.0528 + 0.0483) / (0.5830 ×0.5796) = 0.3351 / 0.3379 = 0.9916; sim(h1, h3) = (0.15×0.18 + (-0.45)×(-0.42) + 0.24×0.26 + 0.23×0.25) / (√(0.15² + (-0.45)² + 0.24² + 0.23²) ×√(0.18² + (-0.42)² + 0.26² + 0.25²)) = (0.027 + 0.189 + 0.0624 + 0.0575) / (0.5830 × 0.5798) = 0.3359 / 0.3380 = 0.9938; sim(h2, h3) = (0.12×0.18 + (-0.48)×(-0.42) + 0.22×0.26 + 0.21×0.25) / (√(0.12² + (-0.48)² + 0.22² +0.21²) × √(0.18² + (-0.42)² + 0.26² + 0.25²)) = (0.0216 + 0.2016 + 0.0572 +0.0525) / (0.5796 × 0.5798) = 0.3329 / 0.3361 = 0.9905.
[0220] Construct similarity matrix S = [[1.0000, 0.9916, 0.9938], [0.9916, 1.0000,0.9905], [0.9938, 0.9905, 1.0000]]; apply threshold τ sim = 0.75Construct the adjacency matrix A = [[1, 1,1], [1, 1, 1], [1, 1, 1]]; construct the weighted adjacency matrix W = [[1.0000, 0.9916, 0.9938],[0.9916, 1.0000, 0.9905], [0.9938, 0.9905, 1.0000]].
[0221] Example 3: Graph Convolutional Neural Network (GCN), specifically:
[0222] Receive the dynamic fusion relationship graph G = (V, E, W, X), design a graph convolutional neural network with L = 3 layers, and input node feature dimension d i n = 4 (hash code dimension), hidden layer dimension d hidden = 64, output feature dimension d_out = 32, where V represents the node set, E represents the edge set, W represents the edge weight matrix, and X represents the node feature matrix.
[0223] Construct the first layer of graph convolution layer and input feature dimension d i n = 4, output feature dimension d hidden = 64, weight matrix W^(1) ∈ R^(d i n×d hidden ) Initialized to Xavier method: W^(1) ij ~ U(-√(6 / (d i n+d hidden )), √(6 / (d i n+d hidden ))), where W^(1) represents the weight matrix of the first graph convolutional layer, W^(1) ij represents the i-th row and j-th column element of the weight matrix, U represents uniform distribution, and d i n represents the input feature dimension, d hidden Represents the hidden layer feature dimension.
[0224] Design a multi-head graph attention mechanism with H = 8 heads and the output dimension of each attention head d head = d hidden / H = 8, attention vector a^(h) ∈ R^(2×d head ) is initialized to a uniform distribution U(-0.1, 0.1), h ∈ {1, 2, ..., H}, where H represents the number of attention heads, d head represents the output dimension of each attention head, and a^(h) represents the attention vector of the h-th attention head.
[0225] For each attention head h, calculate the attention coefficient α^(h) ij = softmax j (LeakyReLU(a^(h)^T ·[W^(h) · h i || W^(h) · h j ])), where α^(h) ij represents the attention coefficient of node i to node j in the h-th attention head, softmax jIndicates the softmax operation on index j, LeakyReLU represents the leaky ReLU activation function with a negative semi-axis slope of 0.2, a^(h) represents the attention vector of the h-th attention head, W^(h) represents the weight matrix of the h-th attention head, and h i and h j represents the feature vector of nodes i and j, and || represents the concatenation operation.
[0226] Aggregate neighbor information based on attention coefficient: h' (h) i = σ(∑ j ∈N(i) α^(h) ij · W^(h) · h j ), where h' (h) i represents the feature of node i output by the h-th attention head, σ represents the activation function, and ELU(x) = x if x>0else α·(e x - 1), α = 1.0, N(i) represents the set of neighbors of node i.
[0227] Concatenate the outputs of all attention heads: h' i = Concat(h'^(1) i , h'^(2) i , ..., h'^(H) i )∈ R^d hidden , and apply batch normalization: h' i _norm = BatchNorm(h' i ), where h' i Represents the splicing result of multi-head attention, Concat represents the splicing operation, BatchNorm represents the batch normalization operation, and its moving average decay rate is 0.9, ε =10^(-5).
[0228] Add residual connection and first layer output: h^(1) i = h' i _norm + MLP(h i ), where MLP represents a multi-layer perceptron, which contains one hidden layer and has a Linear(d i n, d hidden / 2) ->ReLU ->Linear(d hidden / 2,d hidden ), h^(1) i Represents the features of node i after the first layer of graph convolution.
[0229] Similarly, the second and third graph convolution layers are constructed with an input dimension of dhidden = 64, the output dimensions are d hidden = 64 and d_out = 32, and apply batch normalization and residual connection after each layer to get the final node representation h^(3) i ∈ R^(d_out), which is the final graph convolution feature.
[0230] The calculation process is as follows: Assume that there are node features h1= [0.138, -0.464, 0.228, 0.223], and some neighbor nodes h2= [0.152, -0.438, 0.245, 0.218] and h3= [0.125, -0.472, 0.217, 0.232].
[0231] For attention head h=1, assume that some values of the weight matrix W^(1) are:
[0232] W^(1) = [[0.12, 0.08, -0.15, 0.09, 0.11, -0.07, 0.10, 0.14], [-0.13,0.11, 0.09, -0.12, 0.08, 0.15, -0.10, 0.07], [0.14, -0.09, 0.13, 0.08, -0.11,0.12, 0.07, -0.10], [0.10, 0.13, 0.08, -0.14, 0.09, 0.11, -0.08, 0.12]]
[0233] Compute feature transformation: W (1) · h1= [0.12×0.138 + (-0.13)×(-0.464) + 0.14×0.228+ 0.10×0.223, ...] = [0.1657, 0.0970, -0.0177, 0.0615, 0.1110, 0.0980,0.0726, 0.1196]; W^(1) · h2= [...] = [0.1676, 0.0897, -0.0250, 0.0595,0.1134, 0.0956, 0.0703, 0.1157]; W^(1) · h3= [...] = [0.1632, 0.1019, -0.0110, 0.0630, 0.1092, 0.0996, 0.0743, 0.1223];
[0234] Assume that the partial value of the attention vector a^(1) is: a (1)= [0.06, -0.08, 0.05, -0.07, 0.09, -0.05, 0.08, -0.06, 0.07, -0.09, 0.04, -0.08, 0.05, -0.07, 0.09, -0.05];
[0235] Calculate the attention coefficient (part): e12 = LeakyReLU(a^(1)^T · [W^(1) · h1|| W^(1) · h2]) = 0.0412; e13 = LeakyReLU(a^(1)^T · [W^(1) · h1|| W^(1) · h3]) = 0.0386; α12 = exp(0.0412) / (exp(0.0412) + exp(0.0386)) = 0.5065; α13 = exp(0.0386) / (exp(0.0412) + exp(0.0386)) = 0.4935;
[0236] Aggregate neighbor information (partial, only the first dimension): h'^(1)1[0] = ELU(0.5065 × 0.1676 +0.4935 × 0.1632) = ELU(0.0849 + 0.0805) = ELU(0.1654) = 0.1654;
[0237] Assume that the batch normalized values are h'1_norm = [0.5342, 0.2897, -0.0523, 0.1974, 0.3568, 0.3156, 0.2336, 0.3852, ...];
[0238] Assume MLP(h1) = [0.2534, 0.1356, -0.0789, 0.1258, 0.1789, 0.1523,0.1125, 0.1856, ...];
[0239] Calculate the output of the first layer: h^(1)1= [0.5342 + 0.2534, 0.2897 + 0.1356, -0.0523 +(-0.0789), 0.1974 + 0.1258, ...] = [0.7876, 0.4253, -0.1312, 0.3232, ...].
[0240] Embodiment 4: Power prediction post-processing and confidence interval estimation refinement may also be:
[0241] The time series prediction layer is constructed based on the graph convolution feature h^(3), and a three-layer fully connected network structure is adopted: FC1: Linear(d_out, 128) ->ReLU ->Dropout(0.2), FC2: Linear(128, 64) ->ReLU ->Dropout(0.2), FC3: Linear(64, T pred ), where T pred = 24 indicates the prediction time domain (hours), Dropout indicates the random inactivation operation with a dropout rate of 0.2, and d_out indicates the output feature dimension of the graph convolution.
[0242] The input graph convolution features pass through the time series prediction layer to generate the original power prediction value sequence P_raw = [p1, p2,..., p tpred ], where p t Represents the power prediction value (normalized value) at the t-th prediction moment, with a value range of [0, 1]. pred Represents the prediction time domain.
[0243] Combined with the wind farm parameters, denormalization is performed to obtain the actual power value P_actual = P_raw × P max , where P max It represents the maximum installed capacity of the wind farm, which is set to 100MW. P_actual represents the actual power forecast value sequence, in MW.
[0244] Apply physical constraint correction and use wind speed-power curve model to constrain power prediction value: P correctedt =min(max(P_actual t , P min (WS t )), P max (WS t )), where P correctedt represents the power prediction value at time t after correction, P min (WS t ) and P max (WS t ) represent the given wind speed WS t The minimum and maximum possible power under the condition of fan is determined by the fan characteristic curve, P_actual t It represents the power prediction value at time t after denormalization.
[0245] Consider the power change rate constraint: P correctedt = min(max(P correctedt , P corrected _(t-1) - R max ×Δt), Pcorrected _(t-1) + R max ×Δt), where R max It represents the maximum allowable power change rate, which is set to 10MW / hour. Δt represents the time interval in hours. P corrected _(t-1) represents the corrected power value at the previous moment.
[0246] The Monte Carlo Dropout method is used to estimate the prediction uncertainty. The Dropout activation is kept during the test phase, and M = 100 forward propagations are performed to obtain the power prediction set {P^(1) corrected , P^(2) corrected , ..., P^(M) corrected}, where P^(m) corrected represents the corrected power prediction sequence obtained by the mth Monte Carlo sampling.
[0247] Calculate the mean of the Monte Carlo samples as the final prediction value: P_final = (1 / M)×∑_(m=1)^MP^(m) corrected , where P_final represents the final power prediction sequence.
[0248] Calculate the 95% confidence interval: Sort the M predicted values at each time t {P^(1) correctedt , P^(2) correctedt ,..., P^(M) correctedt}, take the 2.5th percentile and the 97.5th percentile as the lower bound P_lower t and upper bound P_upper t , forming the confidence interval [P_lower t , P_upper t ], where P_lower t Indicates the lower bound of the confidence interval, P_upper t Represents the upper bound of the confidence interval.
[0249] Output the final prediction results, including the predicted value sequence P_final and the corresponding confidence interval [P_lower, P_upper].
[0250] The calculation process is as follows: Assume that the graph convolution feature h^(3) passes through the time series prediction layer to obtain the original power prediction value (partial time): P_raw = [0.258, 0.262, 0.267, 0.275, ...];
[0251] After denormalization, we obtain the actual power value P_actual = [0.258 × 100, 0.262 × 100, 0.267 × 100, 0.275 × 100, ...] = [25.8, 26.2, 26.7, 27.5, ...] MW.
[0252] Assuming the wind speed at the corresponding time is [8.3, 8.5, 8.7, 9.0, ...] m / s, query the wind turbine characteristic curve to obtain the power constraint: P min (8.3) = 15.6 MW, P max (8.3) = 30.2 MW; P min (8.5) = 16.2 MW, P max (8.5) = 31.5 MW; P min (8.7) = 16.8 MW, P max (8.7) = 32.8 MW; P min (9.0) = 17.5 MW,P max (9.0) = 35.0 MW;
[0253] Apply physical constraint correction: P corrected1 = min(max(25.8, 15.6), 30.2) = 25.8 MW; P corrected2 = min(max(26.2, 16.2), 31.5) = 26.2 MW; P corrected3 = min(max(26.7, 16.8),32.8) = 26.7 MW; P corrected _4 = min(max(27.5, 17.5), 35.0) = 27.5 MW.
[0254] Apply power change rate constraint (Δt = 1 / 6 hour): P corrected1 = 25.8 MW (initial value unchanged); P corrected2 = min(max(26.2, 25.8 - 10 × 1 / 6), 25.8 + 10 × 1 / 6) = min(max(26.2,24.1), 27.5) = 26.2 MW; P corrected3 = min(max(26.7, 26.2 - 10 × 1 / 6), 26.2 + 10× 1 / 6) = min(max(26.7, 24.5), 27.9) = 26.7 MW; P corrected_4 = min(max(27.5, 26.7- 10 × 1 / 6), 26.7 + 10 × 1 / 6) = min(max(27.5, 25.0), 28.4) = 27.5 MW.
[0255] Perform 100 Monte Carlo samplings (partial result example, first moment): P^(1) corrected1 = 25.2 MW,P^(2) corrected1 = 26.1 MW, ..., P^(100) corrected1 = 25.5 MW;
[0256] Calculate the final prediction value (first moment): P_final1 = (25.2 + 26.1 + ... + 25.5) / 100 = 25.8 MW;
[0257] Calculate the 95% confidence interval (at the first moment): Sort the 100 samples, take the 2.5th percentile value P_lower1 = 24.2 MW, and the 97.5th percentile value P_upper1 = 27.4 MW; the confidence interval is [24.2, 27.4] MW.
[0258] Example 5: Adaptive diversity regularization strength adjustment can also be:
[0259] Receive hash distribution evaluation report, including the distribution uniformity index U of the hash code set h ash and coverage metric C h ash, where U h ash = 1 - (∑ i ∑ j exp(-||h i -h j ||² / σ²)) / (n(n-1)), the larger the value, the more uniform the distribution. h ash = (1 / n)×∑ i min j ≠i ||h i -h j ||, the larger the value, the wider the coverage. i and h j represents the hash code, σ is the kernel width parameter, set to 0.5, and n is the number of samples.
[0260] Set the target uniformity index U t arget = 0.8 and target coverage metric C t arget = 0.5, calculate the current uniformity gap ΔU = Ut arget - U h Ash and coverage gap ΔC = C t arget - C h ash, where U t arget represents the target uniformity index, C t arget represents the target coverage index, ΔU represents the uniformity gap, and ΔC represents the coverage gap.
[0261] Design an adaptive regularization strength adjustment function f(λ, ΔU, ΔC) = λ × (1 + α_U×ΔU + α c ×ΔC), where λ represents the current regularization strength, the initial value is set to 0.1, α_U and α c is the adjustment coefficient, all set to 2.0, and f represents the adaptive adjustment function.
[0262] Set the upper and lower limits of regularization strength: λ_new = max(min(f(λ, ΔU, ΔC), λ max ), λ min ), where λ max = 1.0 means maximum regularization strength, λ min = 0.01 indicates the minimum regularization strength, and λ_new indicates the adjusted regularization strength.
[0263] Apply the adjusted regularization strength λ_new to the diversity loss calculation for the next round of training: L diversity = λ_new × (-log(det(Σ) + ε)), where L diversity represents the diversity loss value, Σ represents the hash code covariance matrix, det(Σ) represents the determinant of the matrix Σ, and ε represents a small constant to prevent numerical instability, which is set to 10^(-6).
[0264] During training, the hash distribution is evaluated every T_adjust = 50 batches and the regularization strength is adjusted until the distribution indicators meet the conditions: |ΔU|<ε_U and |ΔC|<ε c , where ε_U = 0.05 represents the uniformity tolerance, ε c =0.05 represents the coverage tolerance, and T_adjust represents the adjustment period.
[0265] Calculation process example: Assume the current hash distribution evaluation index: U h ash = 0.65 (uniformity index); C h ash = 0.35 (coverage metric);
[0266] Calculate the indicator gap: ΔU = 0.8 - 0.65 = 0.15; ΔC = 0.5 - 0.35 = 0.15;
[0267] Assuming the current regularization strength λ = 0.1, calculate the adjusted strength: f(0.1, 0.15, 0.15) = 0.1× (1 + 2.0 × 0.15 + 2.0 × 0.15) = 0.1 × (1 + 0.3 + 0.3) = 0.1 × 1.6 = 0.16; λ_new = max(min(0.16, 1.0), 0.01) = 0.16; use λ_new = 0.16 in the next round of training to calculate the diversity loss.
[0268] After 50 batches, the distribution index is evaluated again and adjusted. Assume that the new index is: U h ash = 0.72; C h ash =0.42;
[0269] Calculate the new indicator gap: ΔU = 0.8 - 0.72 = 0.08; ΔC = 0.5 - 0.42 = 0.08;
[0270] Calculate the new adjustment strength: f(0.16, 0.08, 0.08) = 0.16 × (1 + 2.0 × 0.08 + 2.0× 0.08) = 0.16 × (1 + 0.16 + 0.16) = 0.16 × 1.32 = 0.2112; λ_new = max(min(0.2112, 1.0), 0.01) = 0.2112.
[0271] Example 6, S248-S249. The anti-disturbance training process can also be:
[0272] Initialize the maximum number of iterations I max = 10, step size η adv = 0.01, perturbation size constraint ε max = 0.1, where I max represents the maximum number of iterations, η adv represents the adversarial optimization step size, ε max Indicates the maximum permissible disturbance size.
[0273] For each sample (x, c), where x is the time series feature vector and c is the environmental condition, the initialization perturbation vector δ0=0 and the environmental condition perturbation vector ε0=0 are initialized. The perturbation vector has the same dimension as the original feature vector. δ0 represents the initial perturbation vector and ε0 represents the initial environmental condition perturbation vector.
[0274] Calculate the original hash code h = H gen (x, c), where H gen represents the hash generation function, and h represents the original hash code.
[0275] Adversarial perturbation iterative optimization: For iteration step i from 1 to I max , perform the following steps: a) Calculate the perturbed hash code h'i = H gen (x + δ(i-1), c + ε_(i-1)), where h' i represents the perturbation hash code of the i-th iteration; b) calculate the perturbation loss L dist = ||h' i - h||2^2, represents the L2 distance square of the hash code before and after perturbation, L dist represents the perturbation loss; c) calculate the gradient of the loss with respect to the input: ▽_δL dist = dL dist / dδ,▽_εL dist = dL dist / dε, obtained by automatic differentiation, ▽_δL dist represents the gradient of loss with respect to feature perturbation, ▽_εL dist represents the gradient of the loss to the environmental condition perturbation; d) Update the perturbation vector: δ i = δ(i-1) + η adv · ▽_δL dist / ||▽_δL dist ||2,ε i = ε(i-1) + η adv · ▽_εL dist / ||▽_εL dist ||2, where ||·||2 represents the L2 norm; e) Apply the perturbation size constraint: δ i = clip(δ i , -ε max , ε max ), ε i = clip(ε i , -ε max , ε max ), where clip represents the clipping function, which limits the value to a specified range; f) If the convergence condition is met: ||δ i - δ(i-1)||2<ε c onv and ||ε i - ε(i-1)||2<ε c onv, the iteration is terminated early, where ε conv = 10^(-4) represents the convergence threshold.
[0276] Get the final adversarial perturbation vector δ adv = δ i and ε adv = ε i , where I is the actual number of iterations, δ adv represents the final feature adversarial perturbation vector, ε adv represents the final environmental condition adversarial perturbation vector.
[0277] Calculate the adversarial sample (x + δ adv , c + ε adv ) corresponds to the hash code h adv = H gen (x + δ adv , c +ε adv ), where h adv Represents the hash code of the adversarial example.
[0278] Constructing adversarial perturbation training loss: L adv = (1 / n)∑||H gen (x j + δ adv j , c j + ε adv j ) - H gen (x j ,c j )||2^2, where n represents the batch size, x j and c j represents the feature vector and environmental conditions of the jth sample, δ adv j and ε adv j represents the adversarial perturbation vector of the jth sample, L adv represents the adversarial training loss.
[0279] Combining the original training loss and the adversarial training loss: L total = L_original + λ adv · L adv +λ diversity · L diversity , where L_original represents the original training loss, including adversarial generation loss, etc., λ adv represents the adversarial training weight, set to 0.5, λ diversity represents the diversity regularization weight, L total Indicates the total loss.
[0280] The Adam optimizer is used to perform gradient descent on the total loss with a learning rate lr = 0.001, β1 = 0.9, β2 = 0.999, and ε = 10^(-8), where lr represents the learning rate, β1 and β2 are momentum parameters, and ε is a numerical stability constant.
[0281] Implementation example:
[0282] Assume that the sample feature vector x = [0.35, 0.12, 0.21, 0.42], the environmental condition c = [0.42, 0.15, 0.28, 0.65], the initial perturbation δ0 = [0, 0, 0, 0], ε0 = [0, 0, 0, 0];
[0283] Calculate the original hash code h = H gen (x, c) = [0.47, 0.28, 0.52, 0.38];
[0284] First iteration: Calculate the perturbed hash code h'1 = H gen (x + δ0, c + ε0) = H gen (x, c) =[0.47, 0.28, 0.52, 0.38]; calculate the perturbation loss L dist = ||[0.47, 0.28, 0.52, 0.38] -[0.47, 0.28, 0.52, 0.38]||2^2 = 0; because the initial perturbation is 0, the hash code before and after the perturbation is the same, and the loss is 0; assuming that the gradient calculated by automatic differentiation is ▽_δL dist = [0.01, -0.02, 0.015, 0.008], ▽_εL dist = [0.005, -0.01, 0.012, 0.003]; normalized gradient ▽_δL dist / ||▽_δL dist ||2= [0.4, -0.8,0.6, 0.32], ▽_εL dist / ||▽_εL dist ||2= [0.38, -0.77, 0.92, 0.23];
[0285] Update the perturbation vector δ1 = [0, 0, 0, 0] + 0.01 × [0.4, -0.8, 0.6, 0.32] = [0.004, -0.008, 0.006, 0.0032]; ε1 = [0, 0, 0, 0] + 0.01 × [0.38, -0.77, 0.92,0.23] = [0.0038, -0.0077, 0.0092, 0.0023];
[0286] Clipping δ1 = [0.004, -0.008, 0.006, 0.0032], ε1 = [0.0038, -0.0077, 0.0092, 0.0023] (both within ±0.1) is applied.
[0287] Continue iterating until the convergence condition is met or the maximum number of iterations is reached. Assume that we finally get: adv = [0.038,-0.062, 0.045, 0.027];ε adv = [0.031, -0.058, 0.067, 0.019];
[0288] Calculate the adversarial sample hash code: h adv = H gen (x + δ adv , c + ε adv ) = H gen ([0.388, 0.058,0.255, 0.447], [0.451, 0.092, 0.347, 0.669]) = [0.52, 0.24, 0.57, 0.41];
[0289] Calculate the adversarial training loss (assuming batch size n=1): L adv = ||[0.52, 0.24, 0.57, 0.41] -[0.47, 0.28, 0.52, 0.38]||2^2 = (0.52-0.47)² + (0.24-0.28)² + (0.57-0.52)² +(0.41-0.38)² = 0.0025 + 0.0016 + 0.0025 + 0.0009 = 0.0075;
[0290] Assume L_original = 0.12, L diversity = 7.083, calculate the total loss: L total= 0.12 + 0.5 × 0.0075 + 0.16 × 7.083 = 0.12 + 0.00375 + 1.13328 = 1.25703.
[0291] According to one aspect of the present application, S3. The environmental condition encoding function is specifically:
[0292] Receive environment condition vector c = [c1, c2, ..., c_d c ], including time factors, meteorological factors and system status, where d c represents the environmental condition dimension, c i represents the i-th environmental condition feature, and c represents the environmental condition vector.
[0293] Environmental conditions are divided into three categories: a) Continuous characteristics c c ont = [c1, c2, ..., c k ], such as wind speed, temperature, air pressure, etc.; b) Periodic characteristics c cyclic = [c k+1 , c k+2 , ..., c m ], such as hour, date, wind direction, etc.; c) Discrete feature c discrete = [c m+1 , c m+2 , ..., c dc ], such as scheduling strategy, unit status, etc. Among them, c cont represents a continuous feature vector, c cyclic represents the periodic eigenvector, c discrete Represents a discrete feature subvector, k represents the number of continuous features, and m represents the total number of continuous features and periodic features.
[0294] Apply normalization to continuous features: c c ont_norm = (c c ont - μ c ont) / σ c ont, where μ cont and σ cont Represent the mean vector and standard deviation vector of continuous features, respectively, obtained through historical data statistics, c cont_norm Represents the normalized continuous features.
[0295] Apply sine-cosine transform to periodic features: For feature c j ∈c cyclic , calculate c j_sin = sin(2π ×c j / Tj ) and c jcos = cos(2π × c j / T j ), where T j Represents feature c j The cycle of the hour, such as T = 24, the date T = 365, the wind direction T = 360, c j_sin Represents feature c j The sine transform of jcos Represents feature c j The cosine transform of .
[0296] The sine-cosine transform results of all periodic features are spliced together to obtain the periodic feature code c cyclic_enc = [c k+ 1 sin, c k+1 cos, c k+2 sin, c (k+2) cos , ..., c m_sin , c mcos ], where c cyclic_enc The encoding result representing the periodic feature.
[0297] Apply one-hot encoding to discrete features: For feature c j ∈c_ discrete , if c j There are n j possible values, then convert to n j dimensional one-hot vector c j _onehot, where c j _onehot represents feature c j One-hot encoding.
[0298] Concatenate the one-hot encoding results of all discrete features to obtain the discrete feature encoding c_discrete_enc = [c_(m+1) onehot, c (m+2)_onehot, ..., c_d c _onehot], where c_discrete_enc represents the encoding result of discrete features.
[0299] Design an environmental condition encoding network with two hidden layers: MLP cont : Linear(d c ont_norm, 32) ->ReLU ->Linear(32, 16) is used to encode continuous features, MLP cyclic : Linear(d cyclic_enc, 24) ->ReLU->Linear(24, 12) is used to encode periodic features, MLP_discrete: Linear(d_discrete_enc, 20) ->ReLU ->Linear(20, 10) is used to encode discrete features, where d cont_norm Represents the normalized continuous feature dimension, d cyclic_enc It represents the periodic feature encoding dimension, and d_discrete_enc represents the discrete feature encoding dimension.
[0300] Encode three types of features respectively: h cont =MLP c ont(c c ont_norm), h cyclic =MLP cyclic (c cyclic _enc), h_discrete = MLP_discrete(c_discrete_enc), where h cont Represents the encoding result of continuous features, h cyclic It represents the encoding result of periodic features, and h_discrete represents the encoding result of discrete features.
[0301] S310. Concatenate the three encoding results and pass them through the final fusion layer: E c (c) = MLP_fusion(Concat(h c ont, h c yclic, h_discrete)), where MLP_fusion: Linear(38, 24) ->ReLU ->Linear(24, d c _enc), d c _enc = 16 is the final environmental condition encoding dimension, E c Represents the environmental condition encoding function, and Concat represents the concatenation operation.
[0302] The calculation process is as follows: Assume that the environmental condition vector c = [0.42, 0.15, 0.28, 0.65, 13,180, 2], where the first four are continuous features (wind speed, temperature, humidity, and air pressure), the fifth is a periodic feature (hours), the sixth is a periodic feature (wind direction), and the seventh is a discrete feature (scheduling strategy, with three possible values).
[0303] By type: c cont = [0.42, 0.15, 0.28, 0.65]; c cyclic = [13, 180]; c_discrete = [2];
[0304] Normalized continuous features (assuming statistically obtained mean and standard deviation): μ cont = [0.38, 0.20, 0.30,0.60], σ cont = [0.08, 0.05, 0.06, 0.07]; c cont_norm = ([0.42, 0.15, 0.28, 0.65] -[0.38, 0.20, 0.30, 0.60]) / [0.08, 0.05, 0.06, 0.07] = [0.5, -1.0, -0.33,0.71];
[0305] Periodic feature transformation: For hourly features (T=24): c_5_sin = sin(2π × 13 / 24) = sin(3.40) = -0.22, c_5 c os = cos(2π × 13 / 24) = cos(3.40) = -0.98; For wind direction characteristics (T=360): c_6_sin = sin(2π × 180 / 360) = sin(π) = 0, c_6 cos = cos(2π × 180 / 360) =cos(π) = -1; c cyclic_enc = [-0.22, -0.98, 0, -1];
[0306] Discrete feature one-hot encoding: c_7_onehot = [0, 0, 1] (third scheduling strategy); c_discrete_enc = [0, 0, 1];
[0307] Encode various features (assuming the network parameters have been trained): h c ont = MLP c ont([0.5, -1.0, -0.33, 0.71]) = [0.35, 0.22, 0.41, ..., 0.28] (16-dimensional vector); h c yclic = MLP cyclic([-0.22, -0.98, 0, -1]) = [0.15, 0.08, 0.25, ..., 0.12] (12-dimensional vector); h_discrete =MLP_discrete([0, 0, 1]) = [0.31, 0.18, 0.22, ..., 0.15] (10-dimensional vector).
[0308] Splicing and passing through the fusion layer: Concat(h cont , h cyclic , h_discrete) = [0.35, 0.22, ...,0.15] (38-dimensional vector); E c (c) = MLP_fusion([0.35, 0.22, ..., 0.15]) = [0.42, 0.38,0.45, ..., 0.31] (16-dimensional vector).
[0309] According to one aspect of the present application, the hash parameter generation process can also be briefly described as:
[0310] Generate initial hash code: h = H gen (x, T(c));
[0311] Apply projection diversity regularization, including: computing the covariance matrix of the hash code set Σ = Cov({h i}); Calculate the diversity loss L diversity = -log(det(Σ));
[0312] Perform perturbation immune training, including: generating perturbation data x' = x + δ, c' = c + ε; calculating the perturbation hash code h' = H gen (x', T(c')); Calculate the robustness loss L_robust = ||h' - h||^2;
[0313] Apply distribution calibration, including: calculating the hash statistic μ under the current conditions h (c), σ h (c); Perform calibration h calibrated = (h - μ h (c)) / σ h (c) * σ t arget + μ t arget.
[0314] Apply energy constraints, including: calculating the energy E(h calibrated ) = EnergyFunction(hcalibrated ).
[0315] Build a graph G' = BuildGraph(X, {h constrained}).
[0316] Perform graph convolution prediction P pred = GraphConvPredictor(G', X).
[0317] Update the hash generator parameters, taking into account prediction error, diversity and robustness L total = L pred + λ1*L diversity + λ2* L_robust. Update parameters: θ = Optimizer(θ, ▽_θ L total ).
[0318] The preferred embodiments of the present invention are described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the scope of protection of the present invention.
Claims
1. A short-term wind power forecasting method based on dynamic time series fusion of multi-source heterogeneous data, characterized by: include: Read and preprocess multi-source data, extract time series features from it, and generate a time series feature vector set; Based on the time series feature vector set and preset environmental conditions, an adversarial hash generator is applied to construct a unified feature representation space, and projection diversity regularization and perturbation immunity training are performed to generate an enhanced hash code set; The enhanced hash code is integrated with the physical laws and data distribution characteristics of the wind power system, and constraint projection and distribution calibration are performed. A heterogeneous relationship graph is constructed based on the processed hash code, and historical similar condition data is used for correction to generate a dynamic fusion relationship graph. Apply GCN on the dynamic fusion relationship graph to perform short-term wind power forecasting and obtain the wind power forecast value; The steps to generate an enhanced hash code set include: The temporal feature vector set and environmental conditions are input into the adversarial hash generator, and a type-neutral hash code is generated through the type recognition discriminator and adversarial training; The covariance matrix of the type-neutral hash code is calculated, and projection diversity regularization is applied to make the hash code distribution uniform, thus generating diversity-enhanced hash codes. Apply perturbation immunity training to the diversity-enhanced hash codes and minimize the difference between the hash codes before and after perturbation to generate an enhanced hash code set; The steps for generating a dynamic fusion relationship graph include: Apply physical constraint gradient projection to the enhanced hash code set, adjust the hash code to meet the physical constraints, generate the physical constraint hash code and analyze its distribution characteristics under the current environmental conditions, perform distribution calibration, and obtain the calibrated hash code and the initial relationship graph; Retrieve the historical conditions most similar to the current environmental conditions and their corresponding hash representations from the historical database, perform historical information correction on the calibration hash code, and generate a historical correction hash code; The node representation and edge weights of the relationship graph are updated based on the historical revised hash code to generate a dynamic fusion relationship graph.
2. The method according to claim 1, characterized in that The steps to generate a type-neutral hash code are: Applying a feature extraction function to the time series feature vector set to generate a feature extraction result; Applying an environmental condition encoding function to the environmental condition to generate an environmental condition encoding result; The feature extraction results and the environmental condition encoding results are fused to generate the feature fusion results and pass them through the hash mapping layer to generate the original hash code; Based on the original hash code, the type identification discriminator is used to distinguish the hash representations of different data types, generate the discriminator output and minimize the discriminator accuracy, so as to encourage the hash generator to produce a type-independent unified representation and generate a type-neutral hash code.
3. The method according to claim 1, characterized in that The steps to generate a diversity-enhanced hash code include: Perform distribution statistics analysis on the type-neutral hash code set, calculate the hash code mean vector, and generate hash distribution statistics; Based on the hash distribution statistics, the covariance matrix of the hash code set is calculated to generate the hash covariance matrix; Calculate the eigenvalues of the hash covariance matrix, design the diversity loss function based on it, and calculate the diversity loss value; The diversity loss value is back-propagated to the hash generator network, the gradient is calculated and the network parameters are updated to generate diversity-enhanced hash codes.
4. The method according to claim 1, characterized in that Applying perturbation immune training to the diversity-enhanced hash codes, the steps to generate the enhanced hash code set include: Analyze the time series feature vector set corresponding to the diversity-enhanced hash code, calculate the sensitivity index of each dimension feature, and generate a feature sensitivity matrix. Based on this, adopt an adaptive perturbation generation strategy to generate perturbations for high- and low-sensitivity dimensions respectively, and obtain adaptive perturbation vectors and environmental condition perturbation vectors. Add the adaptive perturbation vector to the time series feature vector set and the environmental condition perturbation vector to the environmental condition to generate a perturbation feature vector set and perturbation environmental condition respectively. Generate a perturbation hash code based on the perturbation vector and calculate its perturbation distance from the original hash code. Through the robustness loss function, the difference between the hash codes before and after perturbation is minimized to generate an enhanced hash code set.
5. The method according to claim 1, characterized in that The steps to generate a physical constraint hash code include: Based on the physical constraint rule library, a comprehensive physical constraint function is constructed, including the wind speed-power curve constraint function, the cut-in and cut-out wind speed constraint function, and the power change rate constraint function. The weights of each constraint are dynamically adjusted to generate a comprehensive physical violation degree. Calculate the gradient of the comprehensive physical violation degree with respect to the hash code to generate the physical violation gradient; Design an adaptive step-size control strategy based on the physical violation degree to generate an adaptive projection step-size; Applying the gradient projection formula and combining the projection step size, the hash code is adjusted in the direction of satisfying the physical constraints to generate a physical constraint hash code.
6. The method according to claim 1, characterized in that Corrections using historical similar conditions data include: According to the environmental conditions, the environmental condition feature vector is constructed, including time factors, meteorological factors and system status; Based on the weighted environmental condition distance measurement function and the historical condition index structure, multiple historical conditions that are most similar to the current environmental condition are queried to obtain a set of similar historical conditions; Calculate the similarity between each condition in the similar historical condition set and the current condition, and normalize them to obtain the similarity weight vector; Retrieve the historical hash code corresponding to the similar historical condition set, and calculate the weighted historical hash code based on the similarity weight vector; The weighted historical hash code is adjusted toward the historical experience by applying the historical matching correction formula, and the node representation and edge weight of the updated relationship graph based on the historical corrected hash code are obtained to generate a dynamic fusion relationship graph.
7. The method according to claim 1, characterized in that Distribution calibration includes: Analyze the distribution characteristics of the physical constraint hash code under the current environmental conditions, calculate the mean vector and standard deviation vector of the hash code under the current conditions, and obtain the hash distribution statistics; Applying a distribution calibration formula to adjust the hash distribution to a predefined target distribution; A relationship graph is constructed based on the cosine similarity between the calibrated hash codes. Each data point is used as a node in the graph and the similarity is used as the edge weight to form an initial relationship graph that represents the intrinsic relationship of multi-source data.
8. The method according to claim 1, characterized in that Applying graph convolutional neural networks on dynamic fusion relationship graphs for short-term wind power forecasting includes: Apply multi-layer graph convolution operations on the dynamic fusion relationship graph, combine the attention mechanism to fuse node features and graph structure information, and generate graph convolution features; A time series prediction layer is constructed based on graph convolution features, and the original power prediction value is output for the prediction time domain; Combined with the wind farm power curve model and current operating status, the original power forecast value is corrected by physical constraints and the corrected power forecast value is output; The confidence interval estimation method is applied to calculate the prediction uncertainty of the corrected power prediction value, and the wind power prediction result including the prediction value and confidence interval is output.
9. The method according to claim 5, characterized in that Generates comprehensive physical violations, including: Construct a wind speed-power curve constraint function, calculate the deviation between the predicted power corresponding to the hash code and the allowable power range under a given wind speed, and generate the power curve violation degree; Construct a cut-in and cut-out wind speed constraint function, calculate the power output violation when the wind speed is lower than the cut-in wind speed or higher than the cut-out wind speed, and generate the cut-in and cut-out violation degree; Design a power change rate constraint function, calculate the degree to which the power change at adjacent moments exceeds the maximum allowable change rate, and generate the change rate violation degree; Integrate the above constraint functions, construct a comprehensive physical violation function, dynamically adjust the weights of each constraint, and generate a comprehensive physical violation.
Citation Information
Patent Citations
Short message sending channel intelligent scheduling method based on multi-source data fusion
CN120151781A