A source-load multi-modal prediction method and system based on space-time graph and diffusion model
Patent Information
- Application Number
- CN202611082436.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-13
AI Technical Summary
第一,现有的源荷预测模型未能构建考虑多能耦合与气象演变要素的动态时空拓扑,无法精准捕捉源侧与荷侧在多时间尺度下的非线性动态时空依从关系,导致在气象突变时的预测精度大幅下降
1、本发明通过构建静态地理-物理空间图与基于改进多元动态时间规整距离的实时状态拓扑图,并采用可学习门控网络对二者进行加权融合,得到自适应综合动态邻接矩阵,从而实现了对源荷节点间动态时空耦合关系的精准捕捉,解决了现有固定拓扑图卷积方法无法反映气象突变下节点相关性变化的问题。
Smart Images

Figure CN122908128A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system prediction technology, and particularly relates to a source-load multimodal prediction method and system based on spatiotemporal diagrams and diffusion models. Background Technology
[0002] With the escalating global energy crisis and the deepening trend of clean energy transition, the penetration rate of renewable energy sources, represented by wind and solar power, in new power systems has been increasing year by year. Meanwhile, on the demand side, the widespread integration of electric vehicles (EVs), temperature-controlled loads (TCLs), and energy storage devices has resulted in end-user loads exhibiting not only high randomness and volatility but also multi-energy coupling characteristics strongly correlated with meteorological conditions, user behavior, and electricity pricing mechanisms. Against this backdrop, both the source side (wind and solar power output) and the load side (electricity, heat, and cooling loads) of Integrated Energy Systems (IES) exhibit extremely strong non-stationarity and complex spatiotemporal dynamic correlations.
[0003] For example, patent document CN115983448B discloses a multi-energy load prediction method based on spatiotemporal graph neural networks. It constructs a static graph adjacency matrix using a fixed power grid topology and extracts spatial features through graph convolution. It then uses a recurrent neural network to extract temporal dependencies. Probabilistic prediction is based on a Gaussian distribution assumption to output confidence intervals, and a synchronous federated average algorithm is used for multi-node model aggregation. Another example is patent document CN116432861A, which discloses a multi-task joint prediction method for source-load prices in integrated energy systems. It utilizes channel attention and temporal attention mechanisms to extract features. Source-load uncertainty prediction still uses quantile regression or a Gaussian assumption for probability output, and training deployment employs a synchronous federated learning framework. All of these existing technologies suffer from the problems of fixed graph topologies failing to reflect dynamic source-load coupling, probabilistic prediction being limited by a preset distribution, and federated training being constrained by the synchronous "weakest link" effect.
[0004] Accurate source-load forecasting is fundamental for integrated energy systems to achieve economic dispatch, safety early warning, and multi-energy complementarity optimization. However, traditional forecasting methods (such as ARIMA and Support Vector Machines (SVM)) struggle to handle high-dimensional nonlinear data. While deep learning-based methods (such as LSTM and Transformer) have made significant progress in time series forecasting in recent years, existing source-load forecasting techniques still face significant challenges: insufficient extraction of spatiotemporal coupling features: distributed power sources and diverse loads exhibit complex topological connections in geographic space, and their spatial correlations dynamically evolve over time due to factors such as real-time meteorological frontal movement. Existing research often employs static graph convolution or independent time series forecasts, neglecting the complex dynamic spatiotemporal coupling network between sources and loads. Lack of high-precision uncertainty quantification: the intermittent nature of wind and solar power output and the frequent occurrence of extreme weather events (such as cold waves and typhoons) prevent point forecasting from providing reliable risk assessments for power dispatch. Existing probabilistic prediction methods (such as quantile regression, Bayesian neural networks, and Gaussian mixture models) often presuppose specific probability distribution functions, making it difficult to fit the highly non-Gaussian, multimodal source-load joint probability density distribution in real-world scenarios, and thus prone to mode collapse. Data privacy and communication barriers: As system scale increases, the massive "source-load" data from smart meters and distributed sensors contains a significant amount of user privacy information. Traditional centralized training models require uploading all edge data to cloud data centers, which not only faces extremely high privacy risks but is also susceptible to high latency in edge networks with limited communication.
[0005] In summary, existing source-load forecasting technologies for integrated energy systems still have many shortcomings: First, existing source-load prediction models fail to construct a dynamic spatiotemporal topology that considers multi-energy coupling and meteorological evolution factors, and cannot accurately capture the nonlinear dynamic spatiotemporal dependence relationship between the source side and the load side at multiple time scales, resulting in a significant decrease in prediction accuracy during meteorological abrupt changes.
[0006] Second, given the high uncertainty on both sides of the source and load, there is a lack of a generative prediction model that does not require a pre-defined prior distribution and can generate a high-fidelity multimodal probability distribution, which makes it impossible to provide the system with reliable confidence intervals and extreme scenario boundaries. Third, it does not consider privacy protection and communication latency issues in multi-micronet / multi-region collaborative prediction, and lacks a decentralized federated learning algorithm that can converge efficiently in heterogeneous devices and asynchronous communication environments.
[0007] Therefore, there is an urgent need for a new forecasting method that can overcome the above challenges in order to improve the accuracy, reliability and practicality of source-load forecasting for integrated energy systems. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a source-load multimodal prediction method and system based on spatiotemporal graphs and diffusion models. First, a dynamic multivariate spatiotemporal graph is constructed. This is achieved by fusing a static geographic-physical spatial graph with a real-time state topology graph based on improved multivariate dynamic time warping via a learnable gating network, resulting in an adaptive comprehensive dynamic adjacency matrix. Then, adaptive spectral graph convolution is applied to the adjacency matrix to extract spatial features, and a temporal multi-head relative attention mechanism with causal masking is applied to extract temporal features, fusing these features to obtain a spatiotemporal guided conditional feature matrix. Finally, using this feature matrix as a condition, a non-Gaussian joint probability distribution of the multivariate source-load power in the system within future multi-step intervals is generated through the inverse denoising process of a conditional denoising diffusion probability model. This invention also introduces an asynchronous federated learning framework for distributed training. This invention can accurately capture the dynamic spatiotemporal coupling relationship between source and load, achieve high-fidelity uncertainty quantification, and balance data privacy protection with communication efficiency. The present invention adopts the following technical solution.
[0009] This invention proposes to acquire historical power data and meteorological data of each source-load node in an integrated energy system, construct a node set, and construct a static geophysical spatial map based on the power grid physical connection topology and geographical distance between nodes; Calculate the improved multivariate dynamic time warping distance between the multivariate historical feature sequences of any two source load nodes, and map the improved multivariate dynamic time warping distance into a real-time state topology graph; Calculate the gate weight matrix, and use the gate weight matrix to perform weighted fusion of the static geographic-physical spatial map and the real-time state topology map to obtain an adaptive comprehensive dynamic adjacency matrix; The spatial features of the source load nodes are extracted from the adaptive synthetic dynamic adjacency matrix; Based on the spatial features, the temporal features of the source load power are extracted, and the spatiotemporal guidance condition feature matrix is obtained based on the spatial features and the temporal features. Based on the spatiotemporal guidance condition feature matrix, a reverse denoising process is performed to generate a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multi-step processes. The model training of the reverse denoising process is deployed as an asynchronous federated learning framework. In the asynchronous federated learning framework, each edge client uses local private data to iteratively update the local model. The cloud server performs weighted aggregation based on the data lag information between the local model parameters uploaded by each edge client and the global model parameters to obtain the updated global model parameters.
[0010] More preferably, the calculation of the improved multivariate dynamic time warping distance includes: Obtain the covariance matrix of the full sample features of the multivariate historical feature sequence; Calculate the maximum mutual information coefficient between each feature and the multimodal prediction target, and construct an adaptive feature weight matrix based on the maximum mutual information coefficient; The local multivariate Mahalanobis distance is calculated using the covariance matrix of the full sample features and the adaptive feature weight matrix. Based on the local multivariate Mahalanobis distance, the improved multivariate dynamic time warping distance is calculated using a dynamic time warping recursive formula. The dynamic time warping recursive formula includes a time warping path jump penalty term, which is used to suppress excessive time warping.
[0011] More preferably, the construction of the static geophysical spatial map includes: Obtain the geographical distance between all source-load node pairs that have physically connected branches; The ratio of the rated voltage level of each branch to the system reference voltage is obtained as the electrical weighting coefficient; The spatial electrical-geographic correlation scale factor is calculated based on the geographical distance, the electrical weighting coefficient, and the adjustable empirical constant. The connection weights between physical connection source-load node pairs are calculated based on the geographical distance, the spatial electrical geographic correlation scale factor, and the branch impedance angle.
[0012] More preferably, a temporal multi-head relative attention mechanism with causal masking is applied to the spatial features to extract the temporal features of the source charge power; the temporal multi-head relative attention mechanism with causal masking includes: Calculate the temporal relative distance between the query position and the key position; The relative temporal distance is limited to a preset range through boundary truncation. The truncated temporal relative distance is converted into a non-negative integer index using an offset mapping operator; The learnable relative position bias vector is mapped by the non-negative integer index to obtain a two-dimensional temporal relative position bias matrix; The two-dimensional temporal relative position deviation matrix and the causal mask matrix are superimposed on the attention score matrix, and the causal mask matrix is used to mask information from future moments.
[0013] More preferably, using the spatiotemporal guidance condition feature matrix as a condition, a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multi-step intervals is generated through the inverse denoising process of the conditional denoising diffusion probability model. The forward diffusion process of the conditional denoising diffusion probability model adopts a nonlinear cosine variance scheduling strategy, and the reverse denoising process of the conditional denoising diffusion probability model adopts a denoising diffusion implicit model for accelerated sampling.
[0014] More preferably, the loss function of the conditional denoising diffusion probability model includes a maximum mean difference distribution constraint term and a high-order scene quantile penalty term, wherein the high-order scene quantile penalty term is used to enhance the fitting of extreme source-load power scenarios.
[0015] More preferably, in the asynchronous federated learning framework, each edge client receives global model parameters from the cloud server and iteratively updates its local model using local private source payload data; Each edge client uploads the updated local model parameters to the cloud server; The cloud server calculates the latency penalty weight based on the data lag order between the local model parameters uploaded by each edge client and the global model parameters, and then performs weighted aggregation on the local model parameters of each edge client based on the latency penalty weight to obtain the updated global model parameters.
[0016] More preferably, during the local iterative update process, each edge client adds a proximal variational constraint term to the local loss function, wherein the proximal variational constraint term is the square of the L2 distance between the current local model parameters and the global model parameters.
[0017] More preferably, when calculating the latency penalty weight, the cloud server also obtains the sample variance of the historical model update volume of each edge client as a stability prior evaluation index, and calculates a composite latency tolerance compensation function based on the data lag order and the stability prior evaluation index.
[0018] More preferably, before uploading the local model parameters, each edge client performs L2 norm pruning on the update amount of the local model parameters and adds Gaussian noise to the pruned update amount to achieve local differential privacy protection.
[0019] This invention also proposes a source-charge multimodal prediction system based on spatiotemporal graphs and diffusion models, including a dynamic graph construction module, a spatial domain feature extraction module, a temporal domain feature extraction module, a probability prediction generation module, and an asynchronous federated training module. The dynamic graph construction module is used to acquire historical power data and meteorological data of each source-load node in the integrated energy system, construct a node set, and construct a static geographic-physical spatial graph based on the power grid physical connection topology and geographical distance between nodes; calculate the improved multivariate dynamic time warping distance between any two source-load nodes' multivariate historical feature sequences, and map the improved multivariate dynamic time warping distance to a real-time state topology graph; calculate the gating weight matrix through a learnable gating network, and use the gating weight matrix to perform weighted fusion of the static geographic-physical spatial graph and the real-time state topology graph to obtain an adaptive integrated dynamic adjacency matrix; The spatial feature extraction module is used to perform adaptive spectral graph convolution on the adaptive comprehensive dynamic adjacency matrix to extract the spatial features of the source load nodes. The temporal feature extraction module is used to apply a temporal multi-head relative attention mechanism with causal masking to the spatial features, extract the temporal features of the source load power, and perform residual connection and layer normalization on the spatial features and the temporal features to obtain the spatiotemporal guidance condition feature matrix. The probability prediction generation module is used to generate a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multiple steps, based on the spatiotemporal guiding condition feature matrix and through the reverse denoising process of the conditional denoising diffusion probability model. The asynchronous federated training module deploys the model training of the reverse denoising process as an asynchronous federated learning framework. In the asynchronous federated learning framework, each edge client uses local private data to iteratively update the local model. The cloud server performs weighted aggregation based on the data lag information between the local model parameters uploaded by each edge client and the global model parameters to obtain the updated global model parameters.
[0020] More preferably, the system further includes: An accelerated sampling module, connected to the probability prediction generation module, is used to perform skip-step sampling using a denoising diffusion implicit model during the reverse denoising process of the conditional denoising diffusion probability model, so as to reduce the number of sampling steps. The privacy protection module, connected to the asynchronous federated training module, is used to perform L2 norm pruning on the update amount of the local model parameters before each edge client uploads the local model parameters, and add Gaussian noise to the pruned update amount to achieve local differential privacy protection.
[0021] The present invention also proposes a terminal, including a processor and a storage medium: The storage medium is used to store instructions; The processor is used to perform the steps of the above method according to the instructions.
[0022] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0023] The present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0024] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention constructs a static geographic-physical spatial map and a real-time state topology map based on an improved multivariate dynamic time warping distance, and uses a learnable gating network to weight and fuse the two to obtain an adaptive comprehensive dynamic adjacency matrix. This enables the accurate capture of the dynamic spatiotemporal coupling relationship between source and load nodes, and solves the problem that existing fixed topology map convolution methods cannot reflect the changes in node correlation under meteorological changes.
[0025] 2. This invention uses a spatiotemporal guided feature matrix to drive a conditional denoising diffusion probability model for inverse denoising, directly generating a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multi-step cycles. It does not require pre-setting Gaussian, Beta, or other distribution forms, achieving high-fidelity uncertainty quantification and effectively characterizing edge risk scenarios such as wind and solar steep slopes and load peaks.
[0026] 3. This invention deploys model training as an asynchronous federated learning framework. Each edge client uses local private data for iterative updates, and the cloud server performs weighted aggregation based on data lag information. At the same time, a local differential privacy mechanism is introduced, which balances data privacy protection and communication efficiency in Non-IID data and high-latency communication environments. Attached Figure Description
[0027] Figure 1 This is a flowchart of a source-load multimodal prediction method based on spatiotemporal diagrams and diffusion models according to the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.
[0029] like Figure 1 As shown, this invention proposes a source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models, specifically including the following steps: Historical power data and meteorological data of each source-load node in the integrated energy system are obtained, a node set is constructed, and a static geophysical spatial map is constructed based on the power grid physical connection topology and geographical distance between nodes; Calculate the improved multivariate dynamic time warping distance between the multivariate historical feature sequences of any two source load nodes, and map the improved multivariate dynamic time warping distance into a real-time state topology graph; The calculation of the improved multivariate dynamic time warping distance includes: Obtain the covariance matrix of the full sample features of the multivariate historical feature sequence; Calculate the maximum mutual information coefficient between each feature and the multimodal prediction target, and construct an adaptive feature weight matrix based on the maximum mutual information coefficient; The local multivariate Mahalanobis distance is calculated using the covariance matrix of the full sample features and the adaptive feature weight matrix. Based on the local multivariate Mahalanobis distance, the improved multivariate dynamic time warping distance is calculated using a dynamic time warping recursive formula. The dynamic time warping recursive formula includes a time warping path jump penalty term, which is used to suppress excessive time warping.
[0030] Calculate the gate weight matrix, and use the gate weight matrix to perform weighted fusion of the static geographic-physical spatial map and the real-time state topology map to obtain an adaptive comprehensive dynamic adjacency matrix; The construction of the static geophysical spatial map includes: Obtain the geographical distance between all source-load node pairs that have physically connected branches; The ratio of the rated voltage level of each branch to the system reference voltage is obtained as the electrical weighting coefficient; The spatial electrical-geographic correlation scale factor is calculated based on the geographical distance, the electrical weighting coefficient, and the adjustable empirical constant. The connection weights between physical connection source-load node pairs are calculated based on the geographical distance, the spatial electrical geographic correlation scale factor, and the branch impedance angle.
[0031] The spatial features of the source load nodes are extracted from the adaptive synthetic dynamic adjacency matrix; Based on the spatial features, the temporal features of the source load power are extracted, and the spatiotemporal guidance condition feature matrix is obtained based on the spatial features and the temporal features. A temporal multi-head relative attention mechanism with causal masking is applied to the spatial features to extract the temporal features of the source charge power; the temporal multi-head relative attention mechanism with causal masking includes: Calculate the temporal relative distance between the query position and the key position; The relative temporal distance is limited to a preset range through boundary truncation. The truncated temporal relative distance is converted into a non-negative integer index using an offset mapping operator; The learnable relative position bias vector is mapped by the non-negative integer index to obtain a two-dimensional temporal relative position bias matrix; The two-dimensional temporal relative position deviation matrix and the causal mask matrix are superimposed on the attention score matrix, and the causal mask matrix is used to mask information from future moments.
[0032] Based on the spatiotemporal guidance condition feature matrix, a reverse denoising process is performed to generate a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multi-step processes. Using the spatiotemporal guidance condition feature matrix as a condition, a non-Gaussian joint probability distribution of the power of multiple source loads in the future multi-step system is generated through the reverse denoising process of the conditional denoising diffusion probability model. The forward diffusion process of the conditional denoising diffusion probability model adopts a nonlinear cosine variance scheduling strategy, and the reverse denoising process of the conditional denoising diffusion probability model adopts a denoising diffusion implicit model for accelerated sampling.
[0033] The loss function of the conditional denoising diffusion probability model includes a maximum mean difference distribution constraint term and a high-order scene quantile penalty term, which is used to enhance the fitting of extreme source-load power scenarios.
[0034] The model training of the reverse denoising process is deployed as an asynchronous federated learning framework. In the asynchronous federated learning framework, each edge client uses local private data to iteratively update the local model. The cloud server performs weighted aggregation based on the data lag information between the local model parameters uploaded by each edge client and the global model parameters to obtain the updated global model parameters.
[0035] In the asynchronous federated learning framework, each edge client receives global model parameters from the cloud server and iteratively updates its local model using local private source payload data. Each edge client uploads the updated local model parameters to the cloud server; The cloud server calculates the latency penalty weight based on the data lag order between the local model parameters uploaded by each edge client and the global model parameters, and then performs weighted aggregation on the local model parameters of each edge client based on the latency penalty weight to obtain the updated global model parameters.
[0036] During the local iterative update process, each edge client adds a proximal variational constraint term to the local loss function. The proximal variational constraint term is the square of the L2 distance between the current local model parameters and the global model parameters.
[0037] When calculating the latency penalty weight, the cloud server also obtains the sample variance of the historical model update volume of each edge client as a stability prior evaluation index, and calculates a composite latency tolerance compensation function based on the data lag order and the stability prior evaluation index.
[0038] Before uploading local model parameters, each edge client performs L2 norm pruning on the update amount of the local model parameters and adds Gaussian noise to the pruned update amount to achieve local differential privacy protection.
[0039] This invention also proposes a source-charge multimodal prediction system based on spatiotemporal graphs and diffusion models, including a dynamic graph construction module, a spatial domain feature extraction module, a temporal domain feature extraction module, a probability prediction generation module, and an asynchronous federated training module. The dynamic graph construction module is used to acquire historical power data and meteorological data of each source-load node in the integrated energy system, construct a node set, and construct a static geographic-physical spatial graph based on the power grid physical connection topology and geographical distance between nodes; calculate the improved multivariate dynamic time warping distance between any two source-load nodes' multivariate historical feature sequences, and map the improved multivariate dynamic time warping distance to a real-time state topology graph; calculate the gating weight matrix through a learnable gating network, and use the gating weight matrix to perform weighted fusion of the static geographic-physical spatial graph and the real-time state topology graph to obtain an adaptive integrated dynamic adjacency matrix; The spatial feature extraction module is used to perform adaptive spectral graph convolution on the adaptive comprehensive dynamic adjacency matrix to extract the spatial features of the source load nodes. The temporal feature extraction module is used to apply a temporal multi-head relative attention mechanism with causal masking to the spatial features, extract the temporal features of the source load power, and perform residual connection and layer normalization on the spatial features and the temporal features to obtain the spatiotemporal guidance condition feature matrix. The probability prediction generation module is used to generate a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multiple steps, based on the spatiotemporal guiding condition feature matrix and through the reverse denoising process of the conditional denoising diffusion probability model. The asynchronous federated training module deploys the model training of the reverse denoising process as an asynchronous federated learning framework. In the asynchronous federated learning framework, each edge client uses local private data to iteratively update the local model. The cloud server performs weighted aggregation based on the data lag information between the local model parameters uploaded by each edge client and the global model parameters to obtain the updated global model parameters.
[0040] More preferably, the system further includes: An accelerated sampling module, connected to the probability prediction generation module, is used to perform skip-step sampling using a denoising diffusion implicit model during the reverse denoising process of the conditional denoising diffusion probability model, so as to reduce the number of sampling steps. The privacy protection module, connected to the asynchronous federated training module, is used to perform L2 norm pruning on the update amount of the local model parameters before each edge client uploads the local model parameters, and add Gaussian noise to the pruned update amount to achieve local differential privacy protection.
[0041] The present invention also proposes a terminal, including a processor and a storage medium: The storage medium is used to store instructions; The processor is used to perform the steps of the above method according to the instructions.
[0042] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0043] The present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0044] Example 1 This invention proposes a source-charge multimodal prediction method based on spatiotemporal diagrams and diffusion models. The specific technical means and methods are as follows: 1. Dynamic Multivariate Spatiotemporal Graph Network Topology Construction Model In order to deeply capture the strong coupling and dynamic evolution characteristics of distributed new energy (wind and solar) output and diverse heterogeneous loads (electricity, heat, cooling, and electric vehicles) in geospatial and physical networks, this invention constructs a dynamic multi-dimensional spatiotemporal graph topology that is updated in real time.
[0045] In the integrated energy system scenario addressed by this invention, each node in the diagram corresponds to a specific physical entity, including wind turbines, photovoltaic arrays, substation buses, electrical load nodes, heat load nodes, and cooling load nodes. The physical connection edges between nodes are determined by the topology of the power grid lines, heating pipelines, and cooling pipelines, while the dynamic connection edges are driven by real-time factors such as the movement of meteorological fronts and the evolution of user electricity consumption behavior.
[0046] Let the dynamic multivariate spatiotemporal diagram of the integrated energy system at the current analysis time t be: .in, This represents the set of N source load nodes within the system. Let be the set of time-varying edges; Let be the adaptive integrated dynamic adjacency matrix at time t.
[0047] Each node The historical observable feature tensor at time t is defined as ,in The historical backtracking time step is F, and the feature dimension (including historical active power, reactive power, real-time ambient temperature, solar irradiance, wind speed, real-time electricity price, and weekday type indicator variables).
[0048] Among them, the integrated dynamic adjacency matrix The mathematical construction process is as follows: (1) Static geographic-physical spatial map
[0049] By combining the electrical connections of the power grid's physical topology with the actual Euclidean distances between nodes, a static topology baseline map with physical constraints is constructed:
[0050] In the formula, This represents the actual geographical distance between node i and node j. For spatial electrical geography correlation scale factor; Let be the impedance angle of branch ij, used to characterize the inherent physical and electrical characteristics of the power grid.
[0051] Among them, the spatial electrical geographic correlation scale factor The specific steps for determining the value of the spatial distance between nodes during the topological feature aggregation process are as follows: The first step is to obtain all node pairs with physically connected branches within the integrated energy system and calculate the average geographical distance between all physically connected node pairs. The second step is to obtain the rated voltage level of branch ij. With system reference voltage The ratio of to is used as the electrical weighting coefficient for that branch, denoted as . ,Right now The third step is to calculate the spatial electrical geography correlation scale factor. The calculation formula is:
[0052] In the formula, An adjustable empirical constant for controlling the intensity of spatial distance attenuation penalty is set to a value range of [0.5, 2.0]. Dimensions and Maintain consistency.
[0053] The static geographic-physical spatial map is constructed based on the actual topology and electrical parameters of the power grid, ensuring the physical interpretability of spatial adjacency relationships and avoiding spurious connections that may be generated by purely data-driven methods.
[0054] (2) Real-time state topology based on improved multivariate dynamic time warping (MDTW)
[0055] Traditional spatiotemporal networks use fixed topologies, which cannot reflect the transient impact of meteorological frontal movement or sudden large load shifts on spatiotemporal correlations. This invention proposes a multivariate adaptive DTW metric method.
[0056] For any two nodes i and j, the historical observable feature tensor The local multivariate Mahalanobis distance at time alignment steps p and q is defined as follows:
[0057] In the formula, It is the covariance matrix of all sample features, including all historical observable feature tensors; The adaptive feature weight matrix is expressed in diagonal matrix form, i.e. ,in Indicates the first f Adaptive weights corresponding to each feature.
[0058] To accurately characterize the driving contribution of heterogeneous features to the multimodal prediction target, the adaptive feature weight matrix... Each weight element in The maximum mutual information coefficient is updated online on a rolling basis, and the specific steps for determining it are as follows: The first step is to define the target vector for multimodal prediction. Y In this invention, the prediction target includes... M A prediction mode is defined as follows: Specifically, this includes wind power output and photovoltaic power output on the source side, as well as electrical load, heat load and cooling load on the load side; The second step is to extract the first historical time frame of all nodes in the entire system within the currently online sliding historical time window. f The feature data sequence, denoted as Simultaneously, extract the corresponding multimodal prediction target data sequence, denoted as... (in ); The third step is to use the MIC algorithm to calculate the feature sequences respectively. With each predicted mode sequence Nonlinear correlation coefficient between ; Step 4, calculate the... f The average maximum mutual information coefficient of each feature across all prediction modes. The calculation formula is:
[0059] Step 5, for allF The average maximum mutual information coefficient of the i-th feature is normalized to obtain the i-th feature. f Adaptive weights of each feature :
[0060] This allows us to construct a diagonal matrix that adaptively maps the importance of each feature to the multimodal joint prediction of the source payload in the current time period. .
[0061] Construct the cumulative normalized distance matrix The solution is obtained using the following nonlinear programming recursive operator:
[0062] In the formula, The time warping path jump penalty term is empirically set and adaptively adjusted based on the local distance mean of historical system data. In a preferred embodiment of the invention, the typical value range for the time warping path jump penalty term is [0.01, 0.5]. When the historical system data fluctuates gently (e.g., typical days in spring and autumn), a smaller value (e.g., 0.05) can be used to encourage more flexible time alignment paths; when the system is in a period of drastic weather changes (e.g., typhoon passage) or a period of steep load increases, a larger value (e.g., 0.2) can be used to suppress excessive time distortion and prevent incorrect alignment of time points with different physical meanings. In actual deployment, adaptive adjustments can be made every few time steps based on the statistical distribution of the local distance mean within the sliding window.
[0063] Finally, the dynamic temporal evolution distance between the two nodes is expressed as: .
[0064] The distance matrix is dynamically normalized using a logarithmic softmax structure to obtain the real-time state topology matrix:
[0065] in, Let be the nonlinear state-related topological weights between nodes i and j in the dynamic state topology matrix at time t. These weights are globally normalized using the Softmax function, taking values between (0,1), and satisfying the condition that for any node i, . ; This represents the historical backtracking time window of node i and node j at the current analysis time t. Multivariate historical feature sequences extracted from within, among which For historical retrospective time steps; denoted as the multivariate dynamic time-warped distance between the multivariate historical feature sequences of node i and node j; N is the total number of source load nodes covered in the system. The smoothing variance (or kernel width parameter) of the dynamic topology mapping is used to control the nonlinear decay scale and mapping sensitivity when converting temporally regularized distances into spatial topological similarity.
[0066] The real-time state topology graph based on improved multivariate dynamic time warping can dynamically capture changes in the correlation between nodes caused by factors such as the movement of meteorological fronts and sudden changes in load, making the graph structure adaptive in the time dimension.
[0067] (3) Adaptive time-varying topology gating fusion mechanism To adaptively balance the transient impacts of changes in the power grid's physical topology and the external meteorological environment, this invention designs a multi-feature learnable gating network:
[0068] In the formula, For activation functions; The completion operator is a matrix concatenation operator. For Hadamah accumulation; It is the identity matrix; These are the learnable weight tensor parameters and learnable bias tensor parameters of the gating network, respectively.
[0069] By using a learnable gating network to weight and fuse static and dynamic graphs, the model can autonomously adjust the contribution ratio of physical topology and data-driven topology according to the current operating state of the system, thereby maintaining stable feature extraction capabilities under both steady-state and extreme weather conditions.
[0070] 2. Adaptive Spectral Graph Convolution and Causal Attention Spatiotemporal Encoder Model The goal of a spatiotemporal encoder is to encode complex, evolving multidimensional features and topological structures into high-dimensional latent spatiotemporal conditional feature vectors. .
[0071] (1) Spatial feature extraction: Adaptive time-varying Chebyshev graph convolutional network (ChebNet) First, calculate the adaptive synthetic dynamic adjacency matrix. Normalized Laplace matrix :
[0072] Reconstruct the Laplacian matrix by scaling: ,in for The largest eigenvalue is obtained by using the power iteration method to quickly approximate it in each step.
[0073] This invention introduces adaptive multi-order Chebyshev polynomial spectral graph convolution to achieve adaptive convergence of local and wide-area features in the complex space domain:
[0074] In the formula, K is the maximum kernel order of the Chebyshev convolution; This is a trainable time-dependent complex spectral feature transformation matrix; Here is the Chebyshev polynomial operator determined by the following recursive formula:
[0075] Adaptive spectral graph convolution uses Chebyshev polynomials to aggregate multi-order neighborhood features in the complex space domain, which can capture the wide-area spatial coupling relationship between source and load nodes while maintaining computational efficiency.
[0076] (2) Temporal feature extraction: Causal Multi-Head Attention mechanism with causal mask In integrated energy systems, the temporal evolution of source and load power exhibits distinct periodic characteristics: wind power output is affected by intraday wind speed variations and seasonal monsoons, photovoltaic output follows sunrise and sunset patterns, while electricity, heat, and cooling loads are strongly correlated with residents' work and rest schedules, ambient temperature, and cooling / heating demands, respectively. This invention's temporal attention mechanism captures these multi-timescale periodic dependencies to achieve deep modeling of source and load evolution patterns. Spatial features extracted from each historical time step are concatenated along the temporal dimension to form a high-dimensional spatiotemporal feature matrix. .
[0077] To prevent future prediction information from penetrating forward and to deeply capture multi-scale time periodic compliance, an attention mechanism is constructed that includes a two-dimensional temporal relative position deviation matrix R.
[0078] Wherein, the two-dimensional temporal relative position deviation matrix The generation method and steps are as follows: The first step is to calculate the time-series relative distance. For any query position (row index) i and key position j (where... ), calculate its relative distance deviation on the time axis. :
[0079] The relative distance deviation The range of values is ; The second step is to perform boundary truncation. To limit the maximum parameter range of long-term temporal dependencies and enable the model to merge long-distance dependencies exceeding a certain time span, a maximum relative distance truncation threshold K is introduced (where K is the maximum relative distance threshold). Using a truncation function to represent the relative distance. Mapped to Within the closed interval:
[0080] The third step is to construct the bias index mapping. This is to truncate the relative distances that contain negative values. Converting to non-negative integers that can be directly indexed by a matrix, we introduce a one-dimensional bias mapping operator and linearly shift it to... The interval is used to obtain the index matrix elements. :
[0081] The fourth step is to adaptively look up a table to generate the bias matrix. A learnable relative position bias vector (or lookup table) is pre-initialized. Through the index matrix For bias vector By performing a lookup table mapping, the values of each element in the two-dimensional temporal relative position deviation matrix R are finally assembled:
[0082] For the m-th self-attention head, its query, key, and value matrix expression is:
[0083] in, Indicates the first m A query with a self-attention head can learn a linear projective weight matrix. Indicates the first m The keys of a self-attention head can learn a linear projective weight matrix. Indicates the first m The values of a self-attention head can be learned to form a linear projection weight matrix.
[0084] The global causal fusion result of temporal attention is calculated as follows:
[0085] In the formula, This is a scaling factor for the attention dimension; For a strictly time-causal control mask matrix, its matrix elements satisfy:
[0086] The temporal multi-head relative attention mechanism with causal masking encodes the relative distance on the time axis through a two-dimensional temporal relative position deviation matrix and combines it with a causal masking matrix to shield future information, so that the model strictly follows the temporal causality law during training and inference, while capturing multi-scale periodic compliance.
[0087] The global causal fusion results of all heads are concatenated to obtain the attention fusion result. The attention fusion result is then passed through a multi-layer feedforward network (FFN) and layer normalization (LayerNorm) to extract the spatiotemporal guidance condition feature matrix containing multivariate high-order nonlinear dynamic information. :
[0088] in, It is a learnable linear projection weight matrix.
[0089] Spatiotemporal guidance condition feature matrix It integrates multiple driving information from the integrated energy system, including: historical source-load power sequences of each node, real-time meteorological elements (wind speed, irradiance, temperature), electricity price signals, and spatiotemporal correlation features between nodes extracted by a dynamic graph network. This conditional information provides physical constraints for the inverse denoising process of the diffusion model, enabling its generated prediction curves to conform to the actual evolution of source-load power, rather than simply statistical fitting.
[0090] The spatiotemporal guidance feature matrix, obtained by residual concatenation and layer normalization of spatial and temporal features, integrates multiple driving information such as spatial topological associations between nodes, temporal evolution patterns, and external factors like meteorology and electricity prices. This provides physically constrained guidance for the subsequent reverse denoising process of the diffusion model. 3. Non-Gaussian Joint Probabilistic Generation Prediction Model Based on Conditional Denoising Diffusion Probability Model (CDDPM) Traditional probabilistic prediction algorithms (such as quantile regression) typically assume a predefined error distribution. This invention proposes a method based on spatiotemporal conditions... The driven diffusion model directly approximates the generative future. Arbitrary non-Gaussian, multimodal real joint distribution curves of power from multiple sources in an intra-step system (Includes the future active and reactive power sequences of each node).
[0091] (1) Forward diffusion (noise-adding) Markov chain process The forward process iteratively injects Gaussian white noise into the real source payload data over S steps. This invention employs a nonlinear cosine variance scheduling strategy to avoid the loss of micro-temporal features due to variance collapse in the later stages of noise addition. A continuous noise accumulation control factor is used. Defined as:
[0092] in, This is a small initial variance truncation bias. The variance change during a single-step noise addition is... .
[0093] The joint conditional probability distribution expression for the forward diffusion process at any noise step size s is:
[0094] Equivalent to the analytical noise operator: ,in .
[0095] in, This represents the original noiseless source load characteristic state.
[0096] By adopting a nonlinear cosine variance scheduling strategy, the loss of micro-temporal features caused by variance collapse in the later stages of noise addition in traditional linear scheduling is avoided, so that the model can still retain detailed evolution information of source load power in long-sequence prediction.
[0097] (2) Reverse generation (denoising) of Markov chains The reverse denoising process starts from Gaussian noise. Initially, precise noise removal is performed using the spatiotemporal condition matrix c extracted by the spatiotemporal conditional encoder. The parameterized description of the inverse Markov transition conditional probability distribution is as follows:
[0098] This invention designs a multi-time-topology interaction network as a noise predictor. The current noise-adding step s is subjected to a high-frequency sinusoidal embedding transformation to generate a position embedding matrix. Its characteristics with spatiotemporal conditions Deep fusion yields a comprehensive guiding operator , , These are the learnable linear projection weight matrices for spatiotemporal condition features and the learnable linear projection weight matrices for location embedding matrices, respectively.
[0099] After rigorous derivation, its reverse transition mean vector The analytical design is as follows:
[0100] in , It is a comprehensive guidance operator obtained by deep fusion of spatiotemporal condition features and the location of noise-adding steps.
[0101] To balance the accuracy of the generated distribution with the fullness of the uncertainty interval, the inverse variational variance matrix... An adaptive hybrid interpolation learning model based on the boundary logarithmic space is adopted:
[0102] In the formula, The theoretical lower bound variance of the posterior distribution of the forward process; This is the interval adaptive variance adjustment weight vector output by the denoising network.
[0103] By using the spatiotemporal guiding feature matrix as a condition for inverse denoising generation, the prediction results not only depend on the statistical regularity of historical data, but are also constrained by multi-source information such as power grid physical topology and meteorological evolution, thereby improving the physical interpretability of the prediction curve.
[0104] (3) Customized loss function that integrates source load ramping and extreme scenario constraints To avoid the tendency of traditional diffusion models to average and smooth out data under extreme load peaks or ramp scenarios, this invention proposes a comprehensive objective loss function that integrates maximum mean difference (MMD) and higher-order quantile regularization, based on variational bounded loss. :
[0105] in, For the noisy time step s, the original noiseless source load characteristic state and injected standard Gaussian random noise The joint mathematical expectation operator; These are the balanced weighting coefficients for the variance learning term in the reverse denoising process; To enable the denoising network to perform comprehensive guiding conditions at the current step s Predict the reconstructed noiseless source load feature state vector; , These are the adaptive regularization weight coefficients for the maximum mean difference distribution constraint term and the higher-order scene quantile penalty term, respectively; the higher-order scene quantile penalty term... Defined as:
[0106]
[0107] in, This indicates the set target quantile level (the range of values satisfies) ) The introduction of this feature can significantly enhance the robustness of the prediction model in capturing uncertainties in severe risk scenarios at the system's edge.
[0108] The loss function introduces a maximum mean difference distribution constraint term and a higher-order scenario quantile penalty term. The former constrains the similarity between the generated distribution and the real distribution in overall shape, while the latter strengthens the fitting ability for extreme source load power scenarios (such as steep slope climbing and peak load), effectively overcoming the tendency of traditional diffusion models to average and smooth out in edge risk scenarios.
[0109] 4. An adaptive asynchronous federated learning optimization model considering communication latency and data heterogeneity. In practical integrated energy systems, distributed energy nodes (such as microgrids, industrial parks, and substations) belong to different operating entities, and their source-load data contains user privacy and commercially sensitive information, making centralized uploading to the cloud impossible. Furthermore, the communication link quality varies among nodes, and some remote photovoltaic power plants or wind farms may face high-latency, low-bandwidth network environments. The asynchronous federated learning mechanism proposed in this invention is designed specifically for these multi-entity, weak communication deployment conditions. Since the massive source-load monitoring data from different regions (such as grid operators at various levels) involves highly secure commercial privacy, this invention designs an adaptive asynchronous federated learning training model (Async-AdaFL) to perform highly decoupled, decentralized, distributed, and collaborative solving of the aforementioned graph diffusion prediction network.
[0110] (1) Edge Client Local Near-End Optimization Model Due to the significant data heterogeneity (Non-IID characteristic) of distributed edge nodes, traditional federated aggregation is prone to causing local model drift. This invention introduces a proximal regularization term during the client-side local training phase:
[0111] In the formula, For the client Local network weight parameters; This refers to the latest global public parameters issued from the cloud server. Dynamic proximal penalty damping to offset the degree of local heterogeneous divergence.
[0112] Introducing a proximal variational constraint term during the local training phase on the client side, by adding a L2 distance penalty between the current local model parameters and the global model parameters to the local loss function, effectively suppresses the local model drift problem caused by the non-independent and identically distributed nature of the data.
[0113] (2) The server has an asynchronous aggregation mechanism with time lag compensation and pseudo-Hessian gradient correction. Suppose that when the cloud-based master server is at global iteration time t, it receives any completed calculation from a distributed client. Asynchronous upload of local weight parameters Due to differences in client computing power and uneven bandwidth in information transmission networks, this parameter is based on historical global timestamps. Generated during training. The current data's time lag order is defined as... .
[0114] To completely eliminate the directional contamination effect caused by outdated gradients due to asynchronous updates, this invention constructs an adaptive asynchronous aggregation operator that comprehensively considers the data contribution ratio, exponential timeliness penalty, and second-order Taylor pseudo-Hessian matrix correction: The first step is to calculate the timing delay penalty operator. :
[0115] In the formula, and For network dynamic delay hedging control coefficient, where The engineering value range is set to [0.1, 0.5]. If this value is too large, it will severely weaken the data contribution of slightly delayed nodes, resulting in a waste of edge heterogeneous computing power; if this value is too small, it will not be able to effectively suppress the pollution of the convergence direction of the global server model by severely outdated gradients. The engineering value range is set to [0.5, 2.0]. This parameter is used to control the shape of the decay tail of the penalty function under extreme delays. When the underlying communication network of the integrated energy system is extremely poor, it is advisable to take [0.5, 2.0]. To maintain a relatively smooth latency tolerance; when communication conditions are good and fast model convergence is required, it is advisable to take... To strengthen the penalties for delayed information.
[0116] The second step is to introduce a globally inverse Hessian approximation matrix that is maintained online using the BFGS secant criterion. Second-order curvature correction is applied to the direction of the evolution trend of outdated model parameters:
[0117] In the formula, This is a gradient curvature correction proportional adjustment operator for second-order Taylor expansion.
[0118] The third step involves efficiently and adaptively updating the server's global model parameter weights asynchronously.
[0119] In the formula, This refers to the cloud-based adaptive aggregation step size adjustment coefficient. The adaptive contribution weight allocation ratio of the local feature sample volume of the client m to the total system.
[0120] Under this mechanism, the server does not need to wait for computation feedback from any other heterogeneous nodes. Once it receives information from a single point, it can complete the self-evolution and readjustment of the global prediction model weights, completely eliminating the defects of data loss and time delay caused by communication degradation and node failure, and ensuring the real-time and continuous generation of prediction streams by the system source and load.
[0121] 5. Source-charge multimodal joint evolution and fast sampling mechanism based on Conditional Denoising Diffusion Probability Model (CDDPM) To address the strong nonlinearity and multimodal distribution characteristics exhibited by integrated energy systems under extreme weather conditions, traditional discrete long-range diffusion models suffer from long sampling times and low generation efficiency in long-sequence prediction. Therefore, this invention proposes a conditional diffusion architecture based on continuous-time stochastic differential equations (SDEs) and integrates a denoising diffusion implicit model (DDIM) to accelerate sampling.
[0122] (1) Continuous-time forward evolution model based on stochastic differential equations (SDE) To capture the dynamic, continuous, abrupt changes in source load power within an infinitesimally small theoretical limit, this invention extends the discrete Markov noise-adding process into a continuous-time process. Ito stochastic differential equations (Ito SDEs):
[0123] In the formula, It is the system state feature tensor in the continuous time dimension; This is the standard Wiener process. A linear drift coefficient matrix that reflects the inherent power dissipation characteristics of the source load; is the scalar diffusion coefficient.
[0124] For the variance-preserving (VP) continuous diffusion process used in this invention, the drift and diffusion coefficients are precisely parameterized as follows:
[0125] in, For continuous noise scheduling functions, satisfying ,in, , These are the initial minimum noise variance lower bound and the final maximum noise variance upper bound of the continuous noise scheduling function, respectively.
[0126] At this moment, at any time The marginal condition transition probability is precisely analyzed as follows:
[0127] (2) Construction of a conditional score network incorporating cross-attention mechanism In the reverse denoising generation stage, the inverse-time evolution equation of continuous-time SDE is given by Anderson's Theorem:
[0128] In the formula, This is the reverse Wiener process; These are the high-dimensional spatiotemporal conditional features extracted by the aforementioned spatiotemporal encoder; This is the conditional score function.
[0129] To accurately fit this fractional function, this invention designs a conditional U-Net model that incorporates a spatio-temporal cross-attention mechanism. In the deep feature decoding stage of U-Net, the noisy state is... Mapped to query vector Condition-guided features Mapped to key-value vector :
[0130] in, , , These are the learnable linear projection weight matrices for the query, key, and value in the cross-attention mechanism, respectively. Their function is to transform the current continuous noisy system state tensor... Mapped to query vectors, and spatiotemporal conditional features The mapping is performed as key vectors and value vectors to achieve alignment of different modal features within a unified latent space; Let be the feature dimension of the implicit feature space.
[0131] This mechanism forces the denoising network to dynamically align meteorological constraints with network physical topology features in each step of inverse evolution, ensuring that the generated source-load curves strictly follow physical laws. The objective functional of the model is defined as the continuous score-matching loss:
[0132] in, For continuous time t, noiseless original source-charge state and the corresponding noisy state at that time The joint mathematical expectation operator; This indicates that the evolution time t follows a uniform sampling distribution on the interval [0,T]. A positive continuous-time adaptive weighting function is used to balance the numerical weights of the fractional matching error of the model at different diffusion depths; A conditional score network incorporating a space-time cross-attention mechanism, used to determine spatiotemporal conditional features. Fitting the continuous dynamic state of the system; For the forward diffusion process from the initial source charge state Evolution to state The true logarithmic gradient of the transition probability distribution is the theoretical true fraction of the system evolution. By minimizing this objective functional, the conditional fractional network can be driven to accurately capture the complex dynamical boundaries of the multimodal joint evolution of source and load in the continuous time domain.
[0133] (3) DDIM Accelerated Probabilistic Sampling Algorithm Based on Non-Markov Mechanism To meet the real-time requirements of day-ahead / intra-day scheduling in integrated energy systems, this invention replaces the standard Langevin Dynamics sampling with a non-Markov skip sampling strategy. Let the discretized sampling step size subsequence be... The recursive formula for reverse single-step jump is:
[0134] in, and These are the indices of the current time step and the next target time step span in the denoised diffusion implicit model (DDIM) during the discretization accelerated skip sampling process; and At the corresponding time steps and The cumulative signal retention rate (i.e., the cumulative variance control factor) under the step state is used to characterize the evolution depth. In the formula, Hyperparameters Used to control the level of randomness in the sampling process. When set When the model degenerates into an implicit ordinary differential equation (ODE), it achieves a smooth transition from purely random generation to deterministic evolution, enabling the model to maintain extremely high probability distribution fitting accuracy while improving prediction sampling efficiency by 10 to 50 times.
[0135] 6. Adaptive Asynchronous Federated Cooperative Optimization and Privacy Enhancement Algorithm Considering Communication Delay and Data Heterogeneity Due to the strong non-independent and identically distributed (Non-IID) characteristics of data from different distributed transformer areas, wind and solar power plants, and microgrid operators, and the severe asymmetry between the computing power and communication bandwidth of edge computing devices, this invention proposes a high-order asynchronous federated learning algorithm that integrates local differential privacy (LDP), dynamic hysteresis adaptive compensation, and momentum aggregation mechanisms to address the resulting "straggler" effect and privacy leakage risks.
[0136] (1) Local Differential Privacy (LDP) Gradient Perturbation Based on Gaussian Mechanism To completely defend against potential membership inference attacks launched from cloud servers, the edge client m uses a local loss function... Calculated parameter update amount Before uploading, implement based on Dynamic adaptive clipping and noise addition based on norm: First, calculate the dynamic clipping threshold. ,in is the elastic relaxation coefficient.
[0137] Then perform parameter trimming and Gaussian noise injection:
[0138] In the formula, This is a privacy budget scalar. Through rigorous proof of the Rényi Differential Privacy (RDP) theorem, this mechanism guarantees that the entire process satisfies... Strictly differential privacy lower bound.
[0139] (2) Adaptive asynchronous aggregation server model based on polynomial exponential decay and momentum correction In an asynchronous communication environment, the central server receives a noisy update from client m. At this point, the current global communication round has progressed to t. Define the absolute delay round number as... Traditional federated learning in Sometimes, the convergence may collapse due to misalignment of the gradient direction.
[0140] This invention constructs a composite delay-tolerant compensation function. ,in For the client Prior evaluation metrics for the stability of historical model variance:
[0141] In the formula, The exponential decay rate; This is a polynomial mitigation factor. The composite function exhibits a smoother convergence curvature than a single exponential decay under extreme delays.
[0142] The stability prior evaluation index is used to quantify the consistency and reliability of the client's local model update direction during historical federated learning. It is calculated as follows: the cloud server caches the client's most recent successfully uploaded local model parameter updates, calculates the vector length of each update, and then calculates the sample variance of these lengths. A smaller variance indicates a more stable and reliable historical update direction for the client; a larger variance indicates more volatile updates, requiring stronger attenuation during aggregation. In a preferred embodiment, the number of historical cache entries ranges from 5 to 20.
[0143] To further counteract the oscillation caused by asynchronous updates, a second-order Nesterov acceleration momentum operator is introduced on the server side. :
[0144]
[0145] in, and These represent the global first-order momentum vectors maintained by the cloud server in the current global iteration round t and the previous round t-1, respectively. and Let represent the global second-order momentum vectors maintained by the cloud server in the current round t and the previous round t-1, respectively; and These are the exponentially decaying control laws of first-order momentum and second-order momentum, respectively. This is the delay tolerance compensation function; This refers to the local model parameter update quantity that the edge client m asynchronously uploads to the cloud server after training and calculation based on its local historical outdated timestamps. Ultimately, the asynchronous model parameter update rule on the server side is reconstructed as follows:
[0146] In the formula, The global annealing learning rate to satisfy the Robbins-Monro convergence condition; Weighting ratios based on the amount of effective data; A numerical stability constant used to prevent division by zero overflow.
[0147] A composite latency tolerance compensation function is constructed on the server side, which comprehensively considers the order of data lag and the stability of historical model updates on the client side. The outdated updates are adaptively weighted and decayed. At the same time, a second-order Nesterov acceleration momentum operator is introduced to counteract the directional oscillations caused by asynchronous updates, so that the model can still maintain a stable convergence trajectory in a high-latency and highly heterogeneous communication environment.
[0148] Theoretical convergence explanation: By constructing a non-convex Lyapunov potential function It can be rigorously derived that this algorithm satisfies the upper bound of delay. Under the condition that (where L is the Lipschitz smoothing constant), it is possible to achieve... The convergence rate reaches the first-order stationary point, thus demonstrating the absolute effectiveness of the invention in harsh heterogeneous communication environments on a mathematical foundation.
[0149] in, This refers to the global model parameter weight matrix that is aggregated and maintained by the cloud server during the asynchronous federated learning process. The system's global objective loss function is evaluated based on the current global model parameters; A non-convex Lyapunov potential function is constructed for the global model parameters and the global loss function, which is used to analyze and prove the global convergence trajectory in an asynchronous high-latency environment from a mathematical perspective. The auxiliary scalar positive constant introduced to construct the potential function for convergence delimitation is determined by the Lipschitz smoothness constant of the global loss function and the upper bound of the maximum communication delay of the system network. The L2 norm squared of the gradient obtained by differentiating the global loss function with respect to the model parameters is used to quantify the convergence evolution gradient energy of the current global model.
[0150] Theoretical convergence analysis proves that the algorithm can reach a first-order stationary point with a sublinear convergence rate when the upper delay bound condition is met, providing a rigorous mathematical guarantee for the engineering deployment of the algorithm in harsh communication environments.
[0151] Example 2 This invention also proposes a comprehensive energy system based on a dynamic spatiotemporal graph and a conditional diffusion model, including a dynamic graph construction module, a spatial feature extraction module, a temporal feature extraction module, a probability prediction generation module, an asynchronous federated training module, an accelerated sampling module, and a privacy protection module. The dynamic graph construction module is used to acquire historical power data and meteorological data of each source-load node in the integrated energy system, construct a node set, and construct a static geographic-physical spatial graph based on the power grid physical connection topology and geographical distance between nodes; calculate the improved multivariate dynamic time warping distance between any two source-load nodes' multivariate historical feature sequences, and map the improved multivariate dynamic time warping distance to a real-time state topology graph; calculate the gating weight matrix through a learnable gating network, and use the gating weight matrix to perform weighted fusion of the static geographic-physical spatial graph and the real-time state topology graph to obtain an adaptive integrated dynamic adjacency matrix; The spatial feature extraction module, connected to the dynamic graph construction module, is used to receive the adaptive comprehensive dynamic adjacency matrix, perform adaptive spectral graph convolution on the adaptive comprehensive dynamic adjacency matrix, and extract the spatial features of the source load nodes. The temporal feature extraction module, connected to the spatial feature extraction module, is used to receive the spatial features, apply a temporal multi-head relative attention mechanism with causal masking to the spatial features, extract the temporal features of the source load power, and perform residual connection and layer normalization on the spatial features and the temporal features to obtain the spatiotemporal guidance condition feature matrix. The probability prediction generation module is connected to the time domain feature extraction module and is used to receive the spatiotemporal guidance condition feature matrix. Using the spatiotemporal guidance condition feature matrix as a condition, it generates a non-Gaussian joint probability distribution of the power of multiple source loads in the system in the future multi-step process through the inverse denoising process of the conditional denoising diffusion probability model. An asynchronous federated training module, connected to the dynamic graph construction module, the spatial feature extraction module, the temporal feature extraction module, and the probability prediction generation module, is used to deploy the training process of the conditional denoising diffusion probability model as an asynchronous federated learning framework. In this framework, each edge client receives global model parameters from the cloud server and iteratively updates its local model using local private source payload data. Each edge client uploads its updated local model parameters to the cloud server. The cloud server calculates a latency penalty weight based on the data lag order between the local model parameters uploaded by each edge client and the global model parameters, and then performs a weighted aggregation of the local model parameters of each edge client based on the latency penalty weight to obtain the updated global model parameters. An accelerated sampling module, connected to the probability prediction generation module, is used to perform skip-step sampling using a denoising diffusion implicit model during the reverse denoising process of the conditional denoising diffusion probability model, so as to reduce the number of sampling steps. The privacy protection module, connected to the asynchronous federated training module, is used to perform L2 norm pruning on the update amount of the local model parameters before each edge client uploads the local model parameters, and add Gaussian noise to the pruned update amount to achieve local differential privacy protection.
[0152] The dynamic graph construction module transmits the adaptive integrated dynamic adjacency matrix to the spatial feature extraction module; the spatial feature extraction module transmits the extracted spatial features to the temporal feature extraction module; the temporal feature extraction module transmits the extracted spatiotemporal guided condition feature matrix to the probability prediction generation module; the probability prediction generation module outputs the generated non-Gaussian joint probability distribution as the prediction result; the asynchronous federated training module interacts with the dynamic graph construction module, the spatial feature extraction module, the temporal feature extraction module, and the probability prediction generation module respectively during the training phase, and collaboratively optimizes the network parameters of each module through the asynchronous federated learning framework; the accelerated sampling module interacts with the probability prediction generation module during the inference phase, and accelerates the generation process through a denoising diffusion implicit model; the privacy protection module interacts with the asynchronous federated training module during the training phase, and implements differential privacy perturbation before uploading updates to the client.
[0153] Example 3 The present invention also proposes a terminal, including a processor and a storage medium: The storage medium stores instructions; the processor operates according to the instructions to execute the steps of the integrated energy system source-load multimodal joint prediction method based on dynamic spatiotemporal diagrams and conditional diffusion models in Embodiment 1 of the present invention. Specifically, when executing instructions, the processor implements the following logic: Historical power and meteorological data of each source-load node in the integrated energy system are acquired to construct a node set. A static geographic-physical spatial map is constructed based on the power grid physical connection topology and geographical distance between nodes. An improved multivariate dynamic time warping distance between the multivariate historical feature sequences of any two source-load nodes is calculated and mapped to a real-time state topology map. A gating weight matrix is calculated through a learnable gating network. The gating weight matrix is used to perform weighted fusion of the static geographic-physical spatial map and the real-time state topology map to obtain an adaptive integrated dynamic adjacency matrix. An adaptive spectral graph convolution is performed on the adaptive integrated dynamic adjacency matrix to extract the spatial features of the source-load nodes. A time-multi-head relative attention mechanism with causal masking is applied to the spatial features to extract the temporal features of the source-load power. The spatial features and the temporal features are then residually connected and layer-normalized to obtain a spatiotemporal guidance condition feature matrix. Using the spatiotemporal guidance condition feature matrix as a condition, a non-Gaussian joint probability distribution of the multivariate source-load power in the future multi-step system is generated through the inverse denoising process of the conditional denoising diffusion probability model.
[0154] It should be understood that the terminal in this embodiment can be an electronic device with data processing capabilities, such as a server, industrial control computer, edge computing node, tablet computer, or smartphone, as long as it includes a processor and storage medium and can execute the above method steps. This embodiment does not limit the specific physical form of the terminal.
[0155] Example 4 The present invention also proposes a computer-readable storage medium and a computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above method.
[0156] When executed by a processor, this computer program implements the steps of the integrated energy system source-load multimodal joint prediction method based on dynamic spatiotemporal diagrams and conditional diffusion models in Embodiment 1 of the present invention. Specifically, computer-readable storage media include, but are not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks. When the processor reads and executes this computer program, it will trigger the terminal to execute the same method flow as in Embodiment 1, thereby realizing the integrated energy system source-load multimodal joint prediction function based on dynamic spatiotemporal diagrams and conditional diffusion models.
[0157] By using the aforementioned terminal and computer-readable storage medium, the method steps of this invention are solidified into processor-executable instructions or program code, enabling the method to be deployed and run on various hardware platforms. This improves the applicability and portability of the solution and provides a reliable hardware carrier and software distribution path for the intelligent and continuous optimization of source-load prediction in integrated energy systems.
[0158] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0159] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0160] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0161] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models, characterized in that, include: Historical power data and meteorological data of each source-load node in the integrated energy system are obtained, a node set is constructed, and a static geophysical spatial map is constructed based on the power grid physical connection topology and geographical distance between nodes; Calculate the improved multivariate dynamic time warping distance between the multivariate historical feature sequences of any two source load nodes, and map the improved multivariate dynamic time warping distance into a real-time state topology graph; Calculate the gate weight matrix, and use the gate weight matrix to perform weighted fusion of the static geographic-physical spatial map and the real-time state topology map to obtain an adaptive comprehensive dynamic adjacency matrix; The spatial features of the source load nodes are extracted from the adaptive synthetic dynamic adjacency matrix; Based on the spatial features, the temporal features of the source load power are extracted, and the spatiotemporal guidance condition feature matrix is obtained based on the spatial features and the temporal features. Based on the spatiotemporal guidance condition feature matrix, a reverse denoising process is performed to generate a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multi-step processes. The model training of the reverse denoising process is deployed as an asynchronous federated learning framework. In the asynchronous federated learning framework, each edge client uses local private data to iteratively update the local model. The cloud server performs weighted aggregation based on the data lag information between the local model parameters uploaded by each edge client and the global model parameters to obtain the updated global model parameters.
2. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 1, characterized in that: The calculation of the improved multivariate dynamic time warping distance includes: Obtain the covariance matrix of the full sample features of the multivariate historical feature sequence; Calculate the maximum mutual information coefficient between each feature and the multimodal prediction target, and construct an adaptive feature weight matrix based on the maximum mutual information coefficient; The local multivariate Mahalanobis distance is calculated using the covariance matrix of the full sample features and the adaptive feature weight matrix. Based on the local multivariate Mahalanobis distance, the improved multivariate dynamic time warping distance is calculated using a dynamic time warping recursive formula. The dynamic time warping recursive formula includes a time warping path jump penalty term, which is used to suppress excessive time warping.
3. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 1, characterized in that: The construction of the static geophysical spatial map includes: Obtain the geographical distance between all source-load node pairs that have physically connected branches; The ratio of the rated voltage level of each branch to the system reference voltage is obtained as the electrical weighting coefficient; The spatial electrical-geographic correlation scale factor is calculated based on the geographical distance, the electrical weighting coefficient, and the adjustable empirical constant. The connection weights between physical connection source-load node pairs are calculated based on the geographical distance, the spatial electrical geographic correlation scale factor, and the branch impedance angle.
4. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 1, characterized in that: A temporal multi-head relative attention mechanism with causal masking is applied to the spatial features to extract the temporal features of the source charge power; the temporal multi-head relative attention mechanism with causal masking includes: Calculate the temporal relative distance between the query position and the key position; The relative temporal distance is limited to a preset range through boundary truncation. The truncated temporal relative distance is converted into a non-negative integer index using an offset mapping operator; The learnable relative position bias vector is mapped by the non-negative integer index to obtain a two-dimensional temporal relative position bias matrix; The two-dimensional temporal relative position deviation matrix and the causal mask matrix are superimposed on the attention score matrix, and the causal mask matrix is used to mask information from future moments.
5. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 1, characterized in that: Using the spatiotemporal guidance condition feature matrix as a condition, a non-Gaussian joint probability distribution of the power of multiple source loads in the future multi-step system is generated through the reverse denoising process of the conditional denoising diffusion probability model. The forward diffusion process of the conditional denoising diffusion probability model adopts a nonlinear cosine variance scheduling strategy, and the reverse denoising process of the conditional denoising diffusion probability model adopts a denoising diffusion implicit model for accelerated sampling.
6. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 5, characterized in that: The loss function of the conditional denoising diffusion probability model includes a maximum mean difference distribution constraint term and a high-order scene quantile penalty term, which is used to enhance the fitting of extreme source-load power scenarios.
7. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 1, characterized in that: In the asynchronous federated learning framework, each edge client receives global model parameters from the cloud server and iteratively updates its local model using local private source payload data. Each edge client uploads the updated local model parameters to the cloud server; The cloud server calculates the latency penalty weight based on the data lag order between the local model parameters uploaded by each edge client and the global model parameters, and then performs weighted aggregation on the local model parameters of each edge client based on the latency penalty weight to obtain the updated global model parameters.
8. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 7, characterized in that: During the local iterative update process, each edge client adds a proximal variational constraint term to the local loss function. The proximal variational constraint term is the square of the L2 distance between the current local model parameters and the global model parameters.
9. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 7, characterized in that: When calculating the latency penalty weight, the cloud server also obtains the sample variance of the historical model update volume of each edge client as a stability prior evaluation index, and calculates a composite latency tolerance compensation function based on the data lag order and the stability prior evaluation index.
10. The source-charge multimodal prediction method based on spatiotemporal graphs and diffusion models according to claim 7, characterized in that: Before uploading local model parameters, each edge client performs L2 norm pruning on the update amount of the local model parameters and adds Gaussian noise to the pruned update amount to achieve local differential privacy protection.
11. A source-load multimodal prediction system based on spatiotemporal graphs and diffusion models using the method described in any one of claims 1-10, comprising a dynamic graph construction module, a spatial domain feature extraction module, a temporal domain feature extraction module, a probability prediction generation module, and an asynchronous federated training module, characterized in that: The dynamic graph construction module is used to acquire historical power data and meteorological data of each source-load node in the integrated energy system, construct a node set, and construct a static geographic-physical spatial map based on the power grid physical connection topology and geographical distance between nodes; calculate the improved multivariate dynamic time warping distance between any two source-load nodes' multivariate historical feature sequences, and map the improved multivariate dynamic time warping distance into a real-time state topology map; A gating weight matrix is calculated by a learnable gating network, and the gating weight matrix is used to perform weighted fusion of the static geographic-physical spatial map and the real-time state topology map to obtain an adaptive comprehensive dynamic adjacency matrix. The spatial feature extraction module is used to perform adaptive spectral graph convolution on the adaptive comprehensive dynamic adjacency matrix to extract the spatial features of the source load nodes. The temporal feature extraction module is used to apply a temporal multi-head relative attention mechanism with causal masking to the spatial features, extract the temporal features of the source load power, and perform residual connection and layer normalization on the spatial features and the temporal features to obtain the spatiotemporal guidance condition feature matrix. The probability prediction generation module is used to generate a non-Gaussian joint probability distribution of the power of multiple source loads in the system within future multiple steps, based on the spatiotemporal guiding condition feature matrix and through the reverse denoising process of the conditional denoising diffusion probability model. The asynchronous federated training module deploys the model training of the reverse denoising process as an asynchronous federated learning framework. In the asynchronous federated learning framework, each edge client uses local private data to iteratively update the local model. The cloud server performs weighted aggregation based on the data lag information between the local model parameters uploaded by each edge client and the global model parameters to obtain the updated global model parameters.
12. The source-load multimodal prediction system based on spatiotemporal graphs and diffusion models according to claim 11, characterized in that, The system also includes: An accelerated sampling module, connected to the probability prediction generation module, is used to perform skip-step sampling using a denoising diffusion implicit model during the reverse denoising process of the conditional denoising diffusion probability model, so as to reduce the number of sampling steps. The privacy protection module, connected to the asynchronous federated training module, is used to perform L2 norm pruning on the update amount of the local model parameters before each edge client uploads the local model parameters, and add Gaussian noise to the pruned update amount to achieve local differential privacy protection.
13. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-10.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-10.
15. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-10.
Citation Information
Patent Citations
A Multi-Energy Load Forecasting Method Based on Spatiotemporal Graph Neural Network
CN115983448B
Comprehensive energy system source load price multi-task joint prediction method and system
CN116432861A