Cross-regional energy demand collaborative prediction method based on federated learning

CN123014322APending Publication Date: 2026-10-30NANJING KONGCHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611261195.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

本发明具备特征解耦无冗余、拓扑关联挖掘深、漂移感知响应快等优点,特别是通过引入图拉普拉斯矩阵替换原生欧氏距离约束以重构Moreau包络正则化项,结合漂移强度动态调节权重,能够显著提升模型在流形空间约束下的个性化适配与抗漂移纠偏能力,从而有效解决现有方法中区域个性表达受限与概念漂移应对迟缓等问题

Benefits of technology

本发明通过同步采集历史能源负荷数据及关联影响参数并进行正交投影分解计算,针对跨区域能源数据共性特征与个性特征耦合交织的问题,生成表征跨区域共性的全局共享特征和表征区域个性的局部私有特征;通过计算全局共享特征的皮尔逊相似度与欧氏距离赋权构建自适应局部邻接矩阵,经联邦服务器加权平均生成全局动态拓扑图,以局部私有特征为查询向量对全局动态拓扑图中的邻居全局共享特征执行注意力聚合,输出初步预测特征;在漂移感知阶段,结合初步预测特征与真实能源负荷数据计算残差与滑动平均值,判定概念漂移并量化漂移强度系数上传至联邦服务器;进一步将漂移强度系数和全局动态拓扑图输入改进的pFedMe模型,通过引入图拉普拉斯矩阵替换原生欧氏距离约束以重构Moreau包络正则化项,结合漂移强度系数动态调节正则化权重,输出全局底座参数梯度与个性化顶层参数梯度;最终基于时空标识生成正交水印向量叠加至全局底座参数梯度,并对个性化顶层参数梯度添加拉普拉斯噪声完成安全聚合与本地前向推理。最终实现对跨区域能源需求的特征解耦协同预测、时空关联隐式挖掘与概念漂移自适应响应的闭环智能优化,有效提升特征表达的针对性、拓扑聚合的精准性与联邦模型抗漂移的鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014322A_ABST
    Figure CN123014322A_ABST
Patent Text Reader

Abstract

The application discloses a cross-regional energy demand collaborative prediction method based on federal learning, comprising the following steps: S1, collecting data, extracting features and performing orthogonal decomposition to obtain global shared and local private features; S2, constructing an adjacency matrix based on the shared features, and obtaining a global dynamic topology graph through federal weighted average; S3, taking the private features as a query vector and the adjacent shared features as a key value vector, calculating attention to obtain preliminary prediction features; S4, calculating a prediction residual moving average value, and if drift is triggered, obtaining a drift intensity coefficient according to a difference ratio; S5, inputting the coefficient and the topology graph into an improved pFedMe model, introducing a graph Laplacian reconstruction Moreau envelope term to generate a base and a top layer gradient; S6, superimposing orthogonal watermark on the base gradient and adding Laplacian noise to the top layer gradient, and aggregating and updating reasoning to obtain a prediction result. The application realizes feature decoupling, enhances anti-drift and privacy protection, and improves prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of artificial intelligence and energy, and in particular to a cross-regional collaborative forecasting method for energy demand based on federated learning. Background Technology

[0002] Federated learning, with its data privacy protection and cross-domain knowledge sharing capabilities in distributed collaborative computing, has been widely applied in recent years in areas such as regional power grid load forecasting, renewable energy output assessment, and integrated energy management, becoming an important development direction for cross-regional energy collaborative forecasting. However, in practical applications, energy demand forecasting scenarios face many challenges, including significant regional differences, implicit spatiotemporal correlations, and dynamic evolution of data distribution, and the deployment effectiveness of federated learning is still constrained by many factors.

[0003] Most current cross-regional energy forecasting methods rely on globally shared models for feature extraction, making it difficult to fully separate common features such as cross-regional meteorological and economic conditions from individual features such as regional electricity consumption behavior. This results in a lack of specificity in modeling regional energy demand. Some systems only use static graph structures or isolated nodes to model inter-node relationships, ignoring the combined effects of implicit topological connections and spatial manifold constraints between regions. This limits the forecasting model's ability to adaptively aggregate cross-regional spatiotemporal coupled information. Furthermore, traditional federated optimization processes lack a mechanism for sensing time-varying data distribution, making it difficult to provide clear quantitative evidence of conceptual drift to servers or nodes, affecting the model's robustness and usability in scenarios of data mutation.

[0004] Furthermore, most of the existing federated learning personalized regularization mechanisms in energy forecasting are based on static Euclidean distance constraints. They fail to dynamically adjust the manifold penalty weights according to the concept drift intensity of regional nodes. This results in some nodes with strong drift being excessively stretched by global parameters for a long time and unable to effectively correct their deviations. Consequently, they are unable to adapt to the continuous changes and evolution of energy demand scenarios, which seriously affects the practical value and stability of the model in real-world scenarios.

[0005] Therefore, how to provide a collaborative forecasting method for cross-regional energy demand based on federated learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] One objective of this invention is to propose a collaborative energy demand prediction method for cross-regional areas based on federated learning. This invention fully integrates key steps such as orthogonal projection feature decoupling, dynamic topology mapping, attention feature aggregation, concept drift quantification, improved pFedMe model optimization, and gradient watermarking noise protection. It constructs an energy collaborative prediction process with common and individual feature extraction, cross-regional implicit association mining, time-varying drift adaptive perception, and privacy-secure aggregation, achieving comprehensive perception, accurate prediction, and dynamic optimization of energy demand in a distributed heterogeneous data environment. This invention possesses advantages such as feature decoupling without redundancy, deep topology association mining, and fast drift perception response. In particular, by introducing a graph Laplacian matrix to replace the original Euclidean distance constraint to reconstruct the Moreau envelope regularization term, combined with dynamically adjusting weights based on drift intensity, it can significantly improve the model's personalized adaptation and anti-drift correction capabilities under manifold space constraints, thereby effectively solving problems such as limited regional individuality expression and slow concept drift response in existing methods.

[0007] The cross-regional collaborative energy demand forecasting method based on federated learning according to embodiments of the present invention includes the following steps: S1. Synchronously collect historical energy load data and related impact parameters of each region, extract high-dimensional dynamic features and perform orthogonal projection decomposition calculation to obtain global shared features and local private features; S2. After constructing an adaptive local adjacency matrix using the local features of each regional node and the global shared features of other regional nodes, the matrix is ​​uploaded to the federation server, weighted averaged, and the global dynamic topology graph is obtained and distributed to each regional node. S3. Each regional node uses local private features as query vectors and global shared features corresponding to adjacent nodes with edge connections in the global dynamic topology graph as key vectors and value vectors. The attention coefficient is calculated to obtain the preliminary prediction features of local energy demand. S4. Each regional node calculates the residual between the preliminary prediction characteristics and the actual energy load data to obtain the moving average of the local prediction error. When concept drift is triggered, the ratio of the difference between the current moving average and the preset drift threshold is used as the calculation result to obtain the drift intensity coefficient of the region. S5. The federated server inputs the drift intensity coefficient and the global dynamic topology graph into the improved pFedMe model to generate the global base parameter gradient and the personalized top-level parameter gradient. The improved pFedMe model includes a bottom gradient receiving module, a topology-aware regularization module, a graph manifold near-end optimization module, and a personalized parameter output module. The graph manifold near-end optimization module introduces a graph Laplacian matrix to replace the original Euclidean distance constraint and reconstructs the Moreau envelope regularization term. S6. Each regional node generates an orthogonal watermark vector, which is superimposed on the gradient of the global base parameter. Laplace noise is added to the gradient of the personalized top-level parameter to obtain mixed gradient data, which is then uploaded to the federated server for aggregation. Each regional node receives the aggregated mixed gradient data, replaces its original local parameters, and performs forward inference to obtain the final cross-regional energy demand prediction result.

[0008] Optionally, S1 specifically includes: S11. The smart meters and sensors deployed in various areas are simultaneously triggered by the synchronous acquisition system to collect historical energy load data and meteorological and economic factor data as related impact parameters. S12. Based on the preset time delay parameters, the historical energy load data is gradually delayed and offset. The offset data sequence is arranged and combined according to the preset embedding dimension to construct the trajectory matrix of the historical energy load data in the multi-dimensional delay coordinate. The singular value decomposition calculation is performed on the trajectory matrix to extract the feature vectors corresponding to the main singular values. The extracted feature vectors are projected onto the trajectory matrix to obtain the high-dimensional dynamic features. S13. The high-dimensional dynamic features and associated influence parameters are spliced ​​along the feature channel direction to obtain the joint feature matrix. The overall covariance matrix of the joint feature matrix is ​​calculated. The overall covariance matrix is ​​decomposed into eigenvalues ​​to obtain the eigenvector matrix and the corresponding eigenvalues. S14. Reorder the column vectors in the eigenvector matrix according to the order of their eigenvalues, select the first preset number of eigenvectors to construct a globally shared projection matrix, and construct a local private projection matrix from the remaining eigenvectors. S15. Perform matrix multiplication with the global shared projection matrix and the local private projection matrix respectively to obtain the global shared features and the local private features.

[0009] Optionally, S2 specifically includes: S21. Each region node calculates the Pearson similarity between its local global shared features and the global shared features of all other region nodes, and obtains the similarity value between the local region and other regions. S22. Compare the similarity value with the preset similarity threshold. When the similarity value is greater than the preset similarity threshold, set the corresponding matrix element to 1. When the similarity value is less than or equal to the preset similarity threshold, set the corresponding matrix element to 0. Combine all matrix elements to construct the initial adjacency matrix. S23. In the initial adjacency matrix, the region node corresponding to the element value of 1 is taken as the neighbor node. The Euclidean distance between the local region node and each neighbor node’s global shared features is calculated. The reciprocal of the Euclidean distance is used as the weight value and assigned to the corresponding matrix element. The matrix element corresponding to the element value of 0 is kept as 0. After the replacement is completed, the adaptive local adjacency matrix is ​​obtained and uploaded to the federated server. S24. The federation server receives the adaptive local adjacency matrix uploaded by each regional node, performs a weighted average calculation on the corresponding matrix position elements of the same regional node in each adaptive local adjacency matrix, obtains the global dynamic topology graph, and distributes it to each regional node.

[0010] Optionally, S3 specifically includes: S31. Each regional node extracts its local private features and transforms them through a linear mapping matrix to obtain a query vector. Each regional node searches for all adjacent nodes with edge connections to its local regional node in the global dynamic topology graph, extracts the global shared features corresponding to each adjacent node, and transforms the extracted global shared features through a linear mapping matrix to obtain the key vector and value vector respectively. S32. Calculate the dot product between the query vector and each key vector to obtain the unnormalized attention score. Divide all the unnormalized attention scores by the square root of the key vector dimension and input them into the softmax function. After normalization, the attention coefficients are obtained. S33. Perform a multiplication calculation on each attention coefficient and its corresponding value vector, sum all the multiplied value vectors, and obtain a weighted sum. Input the weighted sum into the fully connected layer to perform a linear transformation to obtain the preliminary prediction characteristics of local energy demand.

[0011] Optionally, S4 specifically includes: S41. Each regional node calculates the difference between the preliminary prediction characteristics and the actual energy load data at the same time step, obtains the residual of the current time step, establishes a sliding time window with a length of a preset window size, sums up the residuals of all time steps within the sliding time window and divides them by the preset window size to obtain the sliding average of the local prediction error. S42. Compare the moving average of the local prediction error with the preset drift threshold. If the moving average of the local prediction error is less than or equal to the preset drift threshold, it is determined that concept drift has not been triggered, and the drift intensity coefficient is set to zero. If the moving average of the local prediction error exceeds the preset drift threshold, it is determined that concept drift has been triggered. Calculate the difference between the current moving average and the preset drift threshold, divide the difference by the preset drift threshold to obtain the difference ratio, and assign the difference ratio as the calculation result to the drift intensity coefficient to obtain the drift intensity coefficient of this region and upload it to the federated server.

[0012] Optionally, S5 specifically includes: S51. The bottom gradient receiving module locates the storage address of the local forward inference parameters of each regional node in memory and reads them into the computing unit. It performs mean square error calculation on the preliminary prediction characteristics of local energy demand and the actual energy load data to obtain the local prediction loss function. It calculates the local parameter gradient vector by taking the partial derivative of the forward inference parameters in the local prediction loss function. S52. Divide the local parameter gradient vector into the bottom gradient vector of the corresponding bottom shared network and the top gradient vector of the corresponding top personalized network according to the preset network level. Add the bottom gradient vectors of all nodes element by element and divide by the total number of nodes to obtain the global base parameter gradient. S53. The topology-aware regularization module reads the global dynamic topology graph, extracts the connection relationships between all nodes in the global dynamic topology graph to construct an adjacency matrix A, calculates the sum of the elements in each row of the adjacency matrix A to construct a diagonal matrix D, performs a matrix subtraction operation between the diagonal matrix D and the adjacency matrix A to obtain the graph Laplacian matrix L, reads the drift intensity coefficient of each region node, performs a scalar multiplication operation between the drift intensity coefficient and the preset regularization base to obtain the dynamic regularization weight. S54. The graph manifold near-end optimization module locates and extracts the top-level gradient vector and global base parameter gradient of each region node, and concatenates them along the feature dimension to form a local complete parameter vector. The federated server extracts the global base parameter vector of the previous round, performs element-wise addition with the global base parameter gradient calculated in the current round to obtain the global base parameter vector of the current round, and performs element-wise subtraction with the local complete parameter vector to obtain the parameter deviation vector. S55. Perform matrix multiplication on the graph Laplacian matrix L and the parameter deviation vector to obtain a first projection vector. Perform matrix multiplication on the first projection vector and the transpose of the parameter deviation vector to obtain the manifold space constraint term. Perform scalar multiplication on the manifold space constraint term and the dynamic regularization weight to obtain the weighted manifold penalty term. S56. In the improved pFedMe model, the Moreau envelope regularization term is removed, and a weighted manifold penalty term is introduced to obtain the global optimization objective function. The gradients of the global base parameters and the personalized top-level parameters are then calculated and output.

[0013] Optionally, S56 specifically includes: S561. Locate and read the memory address of the Moreau envelope regularization term to be reconstructed in the improved pFedMe model. Perform scalar multiplication and addition operations on the local prediction loss function, the Moreau envelope regularization term and the preset personalized balance hyperparameter to form the native global optimization objective function. S562. Remove the Moreau envelope regularization term from the original global optimization objective function, retain the product term of the local prediction loss function and the preset personalized balance hyperparameter as the basic objective term, perform a scalar multiplication operation on the weighted manifold penalty term and the preset personalized balance hyperparameter to obtain the weighted topological constraint term, and perform a scalar addition operation on the basic objective term and the weighted topological constraint term to obtain the global optimization objective function. S563. Calculate the partial derivative of the local complete parameter vector in the reconstructed global optimization objective function to obtain the parameter gradient vector. Perform element-wise multiplication of the parameter gradient vector with the preset learning rate to obtain the gradient update step size. Subtract the gradient update step size from the local complete parameter vector to obtain the local approximate optimal parameter vector. Perform element-wise subtraction of the local approximate optimal parameter vector with the local complete parameter vector to obtain the personalized parameter update step size. S564. The personalized parameter output module performs an element-wise multiplication operation between the personalized parameter update step size and the dynamic regularization weight to obtain the personalized top-level parameter offset. Based on the preset top-level network layer index table, it locates and reads the memory storage address of the parameter sub-vector of the corresponding top-level network layer in the local complete parameter vector. It then performs an element-wise addition operation between the personalized top-level parameter offset and the parameter sub-vector to obtain the personalized top-level parameter gradient. Finally, it combines and outputs the global base parameter gradient and the personalized top-level parameter gradient.

[0014] Optionally, S6 specifically includes: S61. Each regional node reads the local geographic region code and the current timestamp as a spatiotemporal identifier, concatenates the geographic region code and the current timestamp into a string and inputs it into the pseudo-random number generator to generate a set of initial random vectors with the same gradient dimension as the global base parameter. The current processing vector is extracted from the initial random vectors column by column, and the inner product between the current processing vector and all the orthogonalized vectors before the current processing vector is calculated to obtain the projection scalar. S62. Multiply the current processing vector with the projection scalar to obtain the projection vector. Subtract all projection vectors from the current processing vector to obtain the orthogonalized intermediate vector. Divide the orthogonalized intermediate vector by its own magnitude to obtain the unit orthogonal vector as the currently completed orthogonalized vector. Iterate through all column vectors in the initial random vector and perform the above operations. Combine all unit orthogonal vectors to obtain the orthogonal random vector as the orthogonal watermark vector. S63. Read the global base parameter gradient of each region node, and perform element-wise addition of the orthogonal watermark vector and the global base parameter gradient to obtain the global base parameter gradient after watermarking. S64. Read the personalized top-level parameter gradient of each region node, generate a random noise vector that follows a Laplace distribution, and perform element-wise addition of the random noise vector and the personalized top-level parameter gradient to obtain the personalized top-level parameter gradient after adding noise. S65. The gradient of the global base parameters after watermarking is combined with the gradient of the personalized top-level parameters after noise is added along the feature dimension to obtain mixed gradient data. Each regional node uploads the mixed gradient data to the federated server. S66. The federation server receives the mixed gradient data uploaded by all regional nodes, performs cumulative summation on the elements at the same matrix position in all mixed gradient data and divides it by the total number of nodes to obtain the aggregated mixed gradient data and sends it to each regional node. S67. Each regional node receives the aggregated mixed gradient data, locates the storage address of the original local parameters in memory, replaces the original local parameters with the aggregated mixed gradient data, inputs the replaced parameters into the local model to perform forward inference calculation, and obtains the final cross-regional energy demand prediction result.

[0015] The beneficial effects of this invention are: This invention addresses the problem of the coupling and intertwining of common and unique features in cross-regional energy data by synchronously collecting historical energy load data and related impact parameters and performing orthogonal projection decomposition calculations. It generates globally shared features representing cross-regional commonalities and locally private features representing regional unique characteristics. An adaptive local adjacency matrix is ​​constructed by weighting the Pearson similarity and Euclidean distance of the globally shared features. This matrix is ​​then weighted and averaged by a federated server to generate a global dynamic topology graph. Using the locally private features as query vectors, attention aggregation is performed on the globally shared features of neighbors in the global dynamic topology graph to output preliminary predicted features. In the drift perception stage, these preliminary predicted features are combined with... The residuals and moving averages are calculated against real energy load data to determine concept drift and quantify the drift intensity coefficient, which is then uploaded to the federated server. Further, the drift intensity coefficient and the global dynamic topology graph are input into the improved pFedMe model. The Moreau envelope regularization term is reconstructed by introducing a graph Laplacian matrix to replace the original Euclidean distance constraint. The regularization weights are dynamically adjusted based on the drift intensity coefficient, outputting the global base parameter gradient and the personalized top-level parameter gradient. Finally, orthogonal watermark vectors generated based on spatiotemporal identifiers are superimposed on the global base parameter gradient, and Laplacian noise is added to the personalized top-level parameter gradient to complete secure aggregation and local forward inference. Ultimately, this achieves closed-loop intelligent optimization of feature decoupling and collaborative prediction of cross-regional energy demand, implicit mining of spatiotemporal correlations, and adaptive response to concept drift, effectively improving the specificity of feature representation, the accuracy of topology aggregation, and the robustness of the federated model against drift. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the cross-regional collaborative energy demand forecasting method based on federated learning proposed in this invention. Figure 2 This is a flowchart of the cross-regional energy demand characteristic decoupling and dynamic topology sensing construction proposed in this invention; Figure 3 This is a flowchart of the federated collaborative optimization and gradient privacy protection based on the improved pFedMe model proposed in this invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0018] refer to Figures 1-3 A cross-regional collaborative energy demand forecasting method based on federated learning includes the following steps: S1. Synchronously collect historical energy load data and related impact parameters of each region, extract high-dimensional dynamic characteristics from the historical energy load data and perform orthogonal projection decomposition calculation with the related impact parameters to obtain global shared characteristics that characterize cross-regional commonalities and local private characteristics that characterize regional individualities. S2. Each regional node calculates the Pearson similarity between its local global shared features and the global shared features of other regional nodes and constructs an adjacency matrix. After obtaining the adaptive local adjacency matrix, it is uploaded to the federation server. The adaptive local adjacency matrix uploaded by each node is weighted and averaged to obtain a global dynamic topology map that reflects the implicit correlation of cross-regional energy demand and is then distributed to each regional node. S3. Each regional node uses local private features as query vectors and global shared features corresponding to adjacent nodes with edge connections in the global dynamic topology graph as key vectors and value vectors. The dot product of the query vector and the key vector is calculated and normalized to obtain the attention coefficient. The attention coefficient is then calculated by weighted summation with the value vector to obtain the preliminary prediction features of local energy demand. S4. Each regional node calculates the residual between the preliminary prediction characteristics and the actual energy load data, and calculates the average value of the residual within the sliding time window to obtain the local prediction error sliding average value. When the sliding average value exceeds the preset drift threshold, it is determined that concept drift is triggered. The ratio of the difference between the current sliding average value and the preset drift threshold is used as the calculation result to obtain the drift intensity coefficient of the region. S5. The federated server inputs the drift intensity coefficient and the global dynamic topology graph into the improved pFedMe model to generate the global base parameter gradient and the personalized top-level parameter gradient. The improved pFedMe model includes a bottom gradient receiving module, a topology-aware regularization module, a graph manifold near-end optimization module, and a personalized parameter output module. The graph manifold near-end optimization module introduces a graph Laplacian matrix to replace the original Euclidean distance constraint to reconstruct the Moreau envelope regularization term. S6. Each regional node generates an orthogonal random vector based on its local spatiotemporal identifier as an orthogonal watermark vector. The orthogonal watermark vector is superimposed with the gradient of the global base parameter, and Laplace noise is added to the gradient of the personalized top-level parameter to obtain mixed gradient data carrying watermark and noise. The mixed gradient data is uploaded to the federated server for aggregation. Each regional node receives the aggregated mixed gradient data, replaces its original local parameters, and performs forward inference to obtain the final cross-regional energy demand prediction result.

[0019] This invention significantly improves the accuracy and robustness of cross-regional energy demand forecasting. Through orthogonal projection decomposition, it effectively decouples features, accurately separating common cross-regional features from regionally specific ones, avoiding coupling interference from multi-source heterogeneous data, and greatly enhancing the ability to express complex energy characteristics. When facing cross-regional supply and demand fluctuations, it constructs a global dynamic topology graph using Pearson similarity, enabling in-depth mining and quantification of implicit spatiotemporal relationships between cross-regional nodes, allowing the model to accurately capture the synergistic and complementary effects between regions. The introduction of an attention mechanism to integrate topological relationships and private features achieves efficient focusing and preliminary accurate forecasting of personalized demands. For load distribution shifts caused by meteorological abrupt changes, it quantifies the intensity of concept drift in real time through residual moving average, giving the model a keen sense of dynamic environment and adaptive correction capabilities. In federated collaborative optimization, the improved pFedMe model introduces a graph Laplacian matrix to reconstruct the Moreau envelope regularization term, replacing the traditional Euclidean distance constraint, ensuring the directionality and topological consistency of personalized parameter optimization in the manifold space, and effectively suppressing local optima. Meanwhile, by superimposing orthogonal watermarking and Laplace noise mechanism, gradient inverse reasoning attacks are completely blocked without compromising model aggregation performance. This achieves dual protection of collaborative optimization and data privacy security, demonstrating strong practical value and intelligence in complex and ever-changing energy scheduling scenarios.

[0020] In this embodiment, S1 specifically includes: S11. The smart meters and sensors deployed in various areas are simultaneously triggered by the synchronous acquisition system to collect historical energy load data and meteorological and economic factor data as related impact parameters. S12. Based on the preset time delay parameter, the historical energy load data is gradually delayed and offset. The offset data sequence is arranged and combined according to the preset embedding dimension to construct the trajectory matrix of the historical energy load data in the multi-dimensional delay coordinate. Singular value decomposition is performed on the trajectory matrix to extract the feature vectors corresponding to the main singular values. The extracted feature vectors are projected onto the trajectory matrix to obtain the high-dimensional dynamic features. The preset time delay parameter is the time delay value corresponding to the first minimum point calculated using the mutual information method. The preset embedding dimension is the dimension value corresponding to the false nearest neighbor ratio being less than 5% calculated using the false nearest neighbor method. S13. The high-dimensional dynamic features and associated influence parameters are spliced ​​along the feature channel direction to obtain the joint feature matrix. The overall covariance matrix of the joint feature matrix is ​​calculated. The overall covariance matrix is ​​decomposed into eigenvalues ​​to obtain the eigenvector matrix and the corresponding eigenvalues. S14. Reorder the column vectors in the eigenvector matrix according to the size of the eigenvalues, select the first preset number of eigenvectors to construct a global shared projection matrix, and construct a local private projection matrix with the remaining eigenvectors. The preset number is the number of eigenvectors corresponding to when the total eigenvalues ​​account for 80%. S15. Perform matrix multiplication with the global shared projection matrix and the local private projection matrix respectively to obtain the global shared features representing cross-regional commonalities and the local private features representing regional individualities.

[0021] In this embodiment, S2 specifically includes: S21. Each region node calculates the Pearson similarity between its local global shared features and the global shared features of all other region nodes, and obtains the similarity value between the local region and other regions. S22. Compare the similarity value with a preset similarity threshold. When the similarity value is greater than the preset similarity threshold, set the corresponding matrix element to 1. When the similarity value is less than or equal to the preset similarity threshold, set the corresponding matrix element to 0. Combine all matrix elements to construct an initial adjacency matrix. The preset similarity threshold is 0.75. S23. In the initial adjacency matrix, the region node corresponding to the element value of 1 is taken as the neighbor node. The Euclidean distance between the local region node and each neighbor node’s global shared features is calculated. The reciprocal of the Euclidean distance is used as the weight value and assigned to the corresponding matrix element. The matrix element corresponding to the element value of 0 is kept as 0. After the replacement is completed, the adaptive local adjacency matrix is ​​obtained and uploaded to the federated server. S24. The federated server receives the adaptive local adjacency matrix uploaded by each regional node, performs a weighted average calculation on the corresponding matrix position elements of the same regional node in each adaptive local adjacency matrix, and obtains a global dynamic topology map reflecting the implicit correlation of cross-regional energy demand and distributes it to each regional node. The weight of the weighted average calculation is the proportion of the amount of historical energy load data of each regional node to the total amount of data of all regional nodes.

[0022] In this embodiment, S3 specifically includes: S31. Each regional node extracts its local private features and transforms them through a linear mapping matrix to obtain a query vector. Each regional node searches for all adjacent nodes with edge connections to its local regional node in the global dynamic topology graph, extracts the global shared features corresponding to each adjacent node, and transforms the extracted global shared features through a linear mapping matrix to obtain the key vector and value vector respectively. S32. Calculate the dot product between the query vector and each key vector to obtain the unnormalized attention score. Divide all the unnormalized attention scores by the square root of the key vector dimension and input them into the softmax function. After normalization, the attention coefficients are obtained. S33. Perform a multiplication calculation on each attention coefficient and its corresponding value vector, sum all the multiplied value vectors, and obtain a weighted sum. Input the weighted sum into the fully connected layer to perform a linear transformation to obtain the preliminary prediction characteristics of local energy demand.

[0023] In this embodiment, S4 specifically includes: S41. Each regional node calculates the difference between the preliminary prediction features and the actual energy load data at the same time step, obtains the residual of the current time step, establishes a sliding time window with a length of a preset window size, sums up the residuals of all time steps within the sliding time window and divides them by the preset window size to obtain the sliding average of the local prediction error. The preset window size is 24. S42. Compare the moving average of the local prediction error with a preset drift threshold. When the moving average of the local prediction error is less than or equal to the preset drift threshold, it is determined that concept drift has not been triggered, and the drift intensity coefficient is set to zero. When the moving average of the local prediction error exceeds the preset drift threshold, it is determined that concept drift has been triggered. Calculate the difference between the current moving average and the preset drift threshold, divide the difference by the preset drift threshold to obtain the difference ratio, and assign the difference ratio as the calculation result to the drift intensity coefficient to obtain the drift intensity coefficient of this region and upload it to the federated server. The preset drift threshold is 0.15.

[0024] In this embodiment, S5 specifically includes: S51. The bottom gradient receiving module locates the storage address of the local forward inference parameters of each regional node in memory and reads them into the computing unit. It performs mean square error calculation on the preliminary prediction characteristics of local energy demand and the actual energy load data to obtain the local prediction loss function. It calculates the local parameter gradient vector by taking the partial derivative of the forward inference parameters in the local prediction loss function. S52. Divide the local parameter gradient vector into the bottom gradient vector of the corresponding bottom shared network and the top gradient vector of the corresponding top personalized network according to the preset network level. Add the bottom gradient vectors of all nodes element by element and divide by the total number of nodes to obtain the global base parameter gradient. The preset network level is the boundary level between the bottom shared network layer and the top personalized network layer of the model. S53. The topology-aware regularization module reads the global dynamic topology graph, extracts the connection relationships between all nodes in the global dynamic topology graph to construct an adjacency matrix A, calculates the sum of the elements in each row of the adjacency matrix A to construct a diagonal matrix D, performs a matrix subtraction operation between the diagonal matrix D and the adjacency matrix A to obtain the graph Laplacian matrix L, reads the drift intensity coefficient of each region node, performs a scalar multiplication operation between the drift intensity coefficient and the preset regularization base to obtain the dynamic regularization weight, wherein the preset regularization base is 0.01; S54. The graph manifold near-end optimization module locates and extracts the top-level gradient vector and global base parameter gradient of each region node, and concatenates them along the feature dimension to form a local complete parameter vector. The federated server extracts the global base parameter vector of the previous round, performs element-wise addition with the global base parameter gradient calculated in the current round to obtain the global base parameter vector of the current round, and performs element-wise subtraction with the local complete parameter vector to obtain the parameter deviation vector. S55. Perform matrix multiplication on the graph Laplacian matrix L and the parameter deviation vector to obtain a first projection vector. Perform matrix multiplication on the first projection vector and the transpose of the parameter deviation vector to obtain the manifold space constraint term. Perform scalar multiplication on the manifold space constraint term and the dynamic regularization weight to obtain the weighted manifold penalty term. S56. In the improved pFedMe model, the Moreau envelope regularization term is removed, and a weighted manifold penalty term is introduced to obtain the global optimization objective function. The gradients of the global base parameters and the personalized top-level parameters are then calculated and output.

[0025] In this embodiment, S56 specifically includes: S561. Locate and read the memory address of the Moreau envelope regularization term to be reconstructed in the improved pFedMe model. Perform scalar multiplication and addition operations on the local prediction loss function, the Moreau envelope regularization term and the preset personalized balance hyperparameter to form the native global optimization objective function. The preset personalized balance hyperparameter is 0.1. S562. Remove the Moreau envelope regularization term from the original global optimization objective function, retain the product term of the local prediction loss function and the preset personalized balance hyperparameter as the basic objective term, perform a scalar multiplication operation on the weighted manifold penalty term and the preset personalized balance hyperparameter to obtain the weighted topological constraint term, and perform a scalar addition operation on the basic objective term and the weighted topological constraint term to obtain the reconstructed global optimization objective function composed of the local prediction loss function, the preset personalized balance hyperparameter and the weighted manifold penalty term. S563. Calculate the partial derivative of the local complete parameter vector in the reconstructed global optimization objective function to obtain the parameter gradient vector. Perform element-wise multiplication of the parameter gradient vector with the preset learning rate to obtain the gradient update step size. Subtract the gradient update step size from the local complete parameter vector to obtain the local approximate optimal parameter vector. Perform element-wise subtraction of the local approximate optimal parameter vector with the local complete parameter vector to obtain the personalized parameter update step size. The preset learning rate is 0.001. S564. The personalized parameter output module performs an element-wise multiplication operation on the personalized parameter update step size and the dynamic regularization weight to obtain the personalized top-level parameter offset. According to the preset top-level network layer index table, it locates and reads the memory storage address of the parameter sub-vector of the corresponding top-level network layer in the local complete parameter vector. It performs an element-wise addition operation on the personalized top-level parameter offset and the parameter sub-vector to obtain the personalized top-level parameter gradient. It combines and outputs the global base parameter gradient and the personalized top-level parameter gradient. The preset top-level network layer index table is a data table that records the start and end index positions of the parameters of each layer of the top-level personalized network.

[0026] This invention achieves manifold constraint optimization and personalized, precise adaptation for cross-regional energy federation forecasting by introducing a graph Laplacian matrix and a dynamically drift-aware Moreau envelope regularization term. The bottom-level receiving module extracts the local loss gradient, segments it into levels, and aggregates it to generate a global base gradient. The topology-aware module constructs a graph Laplacian matrix based on the global topology graph and generates dynamically regularized weights in conjunction with drift intensity coefficients. The graph manifold near-end optimization module calculates the deviation vector between local parameters and the global base, combines it with the Laplacian matrix projection to derive the manifold space constraint term, and then generates a weighted manifold penalty term. Finally, the original Moreau envelope term is removed, and this penalty term is integrated into the global optimization objective to solve and output the personalized top-level and global base gradients. This invention overcomes the limitations of traditional Euclidean distance constraints under conditions of dynamic data distribution drift and complex regional supply-demand relationships. It guides parameter optimization along the manifold space, significantly suppresses local optima and feature shifts, and ensures high accuracy of personalized forecasts and global topological consistency.

[0027] The improved pFedMe model of this invention is similar to the original pFedMe model in that both retain the core architecture of personalized federated learning, namely, by decomposing the local parameters into shared base parameters and personalized top-level parameters, both adopt Moreau envelope regularization as a constraint bridge between local optimization and global aggregation, and both solve for the local approximate optimal parameters through the proximal gradient descent mechanism to balance global convergence and personalized adaptation.

[0028] The difference lies in that this invention breaks away from the limitations of the original pFedMe model, which uses static hyperparameters to adjust regularization weights and relies solely on the native Euclidean distance to construct the Moreau envelope term. Instead, it introduces a dynamic drift awareness and graph Laplacian manifold constraint system. Building upon the original model's direct calculation of the Euclidean deviation between local and global parameters, this invention pre-implements a topology-aware regularization module. This module extracts the global dynamic topology graph to construct the graph Laplacian matrix L and innovatively multiplies the drift intensity coefficient of each region with the regularization cardinality to generate dynamic regularization weights. Next, the deviation vector between the local parameters and the global base is projected onto the graph Laplacian matrix L to derive the manifold space constraint term, which is then combined with the dynamic weights to generate a weighted manifold penalty term. Subsequently, the native Moreau envelope term is completely removed, and this weighted manifold penalty term is introduced to reconstruct the global optimization objective function. Finally, the dynamic weights are used to scale the step size for personalized gradient updates.

[0029] Based on the aforementioned improvements, the beneficial effects of this invention lie in replacing the Euclidean distance constraint with a graph Laplacian projection. This improved pFedMe model extends the parameter optimization constraint from the flat space to the manifold space, forcing local parameters to evolve along the cross-regional topological manifold, thus overcoming the limitation of the original model that ignores implicit connections between nodes. Simultaneously, by dynamically adjusting the regularization weights based on drift intensity, the model automatically strengthens topological constraints and suppresses feature shifts when concept drift is severe, while appropriately relaxing them to preserve individuality when the situation is stable, achieving adaptive dynamic adaptation of the constraint strategy. This design significantly enhances the model's robustness to complex time-varying energy distributions, effectively suppresses local optima, and improves the accuracy of cross-regional prediction.

[0030] In this embodiment, S6 specifically includes: S61. Each regional node reads the local geographic region code and the current timestamp as a spatiotemporal identifier, concatenates the geographic region code and the current timestamp into a string and inputs it into the pseudo-random number generator to generate a set of initial random vectors with the same gradient dimension as the global base parameter. The current processing vector is extracted from the initial random vectors column by column, and the inner product between the current processing vector and all the orthogonalized vectors before the current processing vector is calculated to obtain the projection scalar. S62. Multiply the current processing vector with the projection scalar to obtain the projection vector. Subtract all projection vectors from the current processing vector to obtain the orthogonalized intermediate vector. Divide the orthogonalized intermediate vector by its own magnitude to obtain the unit orthogonal vector as the currently completed orthogonalized vector. Iterate through all column vectors in the initial random vector and perform the above operations. Combine all unit orthogonal vectors to obtain the orthogonal random vector as the orthogonal watermark vector. S63. Read the global base parameter gradient of each region node, and perform element-wise addition of the orthogonal watermark vector and the global base parameter gradient to obtain the global base parameter gradient after watermarking. S64. Read the personalized top-level parameter gradient of each region node, generate a random noise vector that follows a Laplace distribution, and perform element-wise addition of the random noise vector and the personalized top-level parameter gradient to obtain the personalized top-level parameter gradient after adding noise. S65. The gradient of the global base parameters after watermarking is combined with the gradient of the personalized top-level parameters after noise is added along the feature dimension to obtain mixed gradient data. Each regional node uploads the mixed gradient data to the federated server. S66. The federation server receives the mixed gradient data uploaded by all regional nodes, performs cumulative summation on the elements at the same matrix position in all mixed gradient data and divides it by the total number of nodes to obtain the aggregated mixed gradient data and sends it to each regional node. S67. Each regional node receives the aggregated mixed gradient data, locates the storage address of the original local parameters in memory, replaces the original local parameters with the aggregated mixed gradient data, inputs the replaced parameters into the local model to perform forward inference calculation, and obtains the final cross-regional energy demand prediction result.

[0031] Example 1: To verify the feasibility of this invention in the field of cross-regional energy demand collaborative forecasting, it was deployed in the multi-source heterogeneous collaborative scheduling platform of a large provincial-level integrated energy group in East my country. This group processes over 2.4TB of multi-dimensional energy data daily, covering electricity, gas, heat, and cooling. Traditional collaborative forecasting systems mainly rely on single-modal time-series models and static weight allocation mechanisms. Each regional node forecasts independently, and the data is simply summed, resulting in large forecast deviations and an inability to dynamically adapt to sudden weather changes and regional production capacity fluctuations. This is particularly problematic in scenarios involving frequent extreme weather events and cross-provincial supply and demand coordination, often leading to severe forecast distortion and scheduling mismatches.

[0032] In practical deployment, the method of this invention transforms the aforementioned multi-source heterogeneous energy data into a time-series structured input. First, it extracts globally shared features representing cross-regional commonalities and locally private features representing regional individualities through orthogonal projection decomposition, thus removing feature coupling interference between different regions. Then, it calculates Pearson similarity and Euclidean distance weights to construct an adaptive local adjacency matrix, which is then weighted and averaged by a federated server to generate a global dynamic topology graph, accurately uncovering implicit spatiotemporal associations between nodes across provinces and cities. Furthermore, it compares the preliminary predicted features with the actual load residuals to quantify the concept of drift intensity coefficient, inputting it into the improved pFedMe model. By introducing a graph Laplacian matrix to replace the original Euclidean distance constraint to reconstruct the Moreau envelope regularization term, and dynamically adjusting the regularization weights based on drift intensity, it achieves adaptive correction of the personalized model under spatiotemporal manifold constraints. Simultaneously, during the gradient aggregation stage, it superimposes orthogonal watermark vectors based on spatiotemporal identifiers and Laplacian noise to ensure data privacy and security in federated collaborative optimization. Table 1 below shows the comparison data between the method of this invention and existing traditional federated forecasting methods in typical regional energy demand forecasting tasks: Table 1. Multidimensional performance comparison data between the present invention and traditional federated forecasting methods.

[0033] Based on the comparative data shown in Table 1, it can be seen that the prediction method based on feature decoupling and improved federated learning proposed in this invention shows significant performance advantages over traditional federated methods in cross-regional energy demand identification, especially in key indicators such as prediction accuracy, concept drift recovery, feature decoupling and redundancy removal, topological association mining, and privacy and security protection.

[0034] In terms of prediction accuracy and error control, this invention maintains a high level of over 95% in all four typical fluctuation scenarios, far exceeding the average accuracy of traditional methods (approximately 85%). For example, in the scenario of "cross-provincial heat exchange scheduling during winter cold waves," traditional methods rely on a globally shared model and have a single feature representation, failing to capture the asymmetric changes in heat demand across different provinces and cities, resulting in a root mean square error as high as 79.6 MW. In contrast, this invention achieves an accuracy of 95.7% and reduces the root mean square error to 19.4 MW by decoupling and reconstructing the Moreau envelope regularization term through orthogonal projection feature decoupling and reconstruction, effectively improving the ability to accurately identify drastic load fluctuations under extreme conditions.

[0035] In addressing concept drift and feature decoupling, this invention demonstrates significant adaptive advantages. Traditional methods, when faced with drift caused by a surge in cooling demand during extreme summer temperatures, require up to 14.5 hours for passive model readjustment, and feature decoupling redundancy reaches as high as 23.8%. In contrast, this invention quantifies drift intensity in real-time using residual moving averages and dynamically adjusts regularization weights, reducing drift recovery time to 3.2 hours and keeping feature redundancy below 4.5%, ensuring agile model response and accurate mapping under sudden weather changes.

[0036] In terms of topological association mining and privacy protection, this invention also possesses irreplaceable advantages. Traditional methods achieve a recall rate of only around 60% for mining implicit cross-regional associations, and gradient interactions pose a high risk of data leakage. This invention constructs a dynamic topological graph through dual weighting, boosting the recall rate to 92.7% and fully activating the synergistic and complementary effects between regions. Simultaneously, by leveraging orthogonal watermarking and Laplace noise mechanisms, the privacy leakage risk index is significantly reduced from 0.42 to 0.03, achieving a perfect balance between collaborative optimization and data security.

[0037] Overall, this invention achieves efficient, accurate, robust, and secure cross-regional demand forecasting in key energy scenarios such as "extreme high temperatures," "cold wave mutual assistance," "sudden drop in photovoltaic power," and "holiday fluctuations" by deeply integrating feature decoupling, dynamic topology, and anti-drift federation mechanisms. It completely fills the technical shortcomings of traditional methods in terms of dynamic manifold constraints and adaptive drift correction.

[0038] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A cross-regional collaborative energy demand forecasting method based on federated learning, characterized in that, Includes the following steps: S1. Synchronously collect historical energy load data and related impact parameters of each region, extract high-dimensional dynamic features and perform orthogonal projection decomposition calculation to obtain global shared features and local private features; S2. After constructing an adaptive local adjacency matrix using the local features of each regional node and the global shared features of other regional nodes, the matrix is ​​uploaded to the federation server, weighted averaged, and the global dynamic topology graph is obtained and distributed to each regional node. S3. Each regional node uses local private features as query vectors and global shared features corresponding to adjacent nodes with edge connections in the global dynamic topology graph as key vectors and value vectors. The attention coefficient is calculated to obtain the preliminary prediction features of local energy demand. S4. Each regional node calculates the residual between the preliminary prediction characteristics and the actual energy load data to obtain the moving average of the local prediction error. When concept drift is triggered, the ratio of the difference between the current moving average and the preset drift threshold is used as the calculation result to obtain the drift intensity coefficient of the region. S5. The federated server inputs the drift intensity coefficient and the global dynamic topology graph into the improved pFedMe model to generate the global base parameter gradient and the personalized top-level parameter gradient. The improved pFedMe model includes a bottom gradient receiving module, a topology-aware regularization module, a graph manifold near-end optimization module, and a personalized parameter output module. The graph manifold near-end optimization module introduces a graph Laplacian matrix to replace the original Euclidean distance constraint and reconstructs the Moreau envelope regularization term. S6. Each regional node generates an orthogonal watermark vector, which is superimposed on the gradient of the global base parameter. Laplace noise is added to the gradient of the personalized top-level parameter to obtain mixed gradient data, which is then uploaded to the federated server for aggregation. Each regional node receives the aggregated mixed gradient data, replaces its original local parameters, and performs forward inference to obtain the final cross-regional energy demand prediction result.

2. The cross-regional collaborative energy demand forecasting method based on federated learning according to claim 1, characterized in that, S1 specifically includes: S11. The smart meters and sensors deployed in various areas are simultaneously triggered by the synchronous acquisition system to collect historical energy load data and meteorological and economic factor data as related impact parameters. S12. Based on the preset time delay parameters, the historical energy load data is gradually delayed and offset. The offset data sequence is arranged and combined according to the preset embedding dimension to construct the trajectory matrix of the historical energy load data in the multi-dimensional delay coordinate. The singular value decomposition calculation is performed on the trajectory matrix to extract the feature vectors corresponding to the main singular values. The extracted feature vectors are projected onto the trajectory matrix to obtain the high-dimensional dynamic features. S13. The high-dimensional dynamic features and associated influence parameters are spliced ​​along the feature channel direction to obtain the joint feature matrix. The overall covariance matrix of the joint feature matrix is ​​calculated. The overall covariance matrix is ​​decomposed into eigenvalues ​​to obtain the eigenvector matrix and the corresponding eigenvalues. S14. Reorder the column vectors in the eigenvector matrix according to the order of their eigenvalues, select the first preset number of eigenvectors to construct a globally shared projection matrix, and construct a local private projection matrix from the remaining eigenvectors. S15. Perform matrix multiplication calculations with the global shared projection matrix and the local private projection matrix respectively to obtain the global shared features and the local private features.

3. The cross-regional collaborative energy demand forecasting method based on federated learning according to claim 1, characterized in that, S2 specifically includes: S21. Each regional node calculates the Pearson similarity between its local global shared features and the global shared features of all other regional nodes, and obtains the similarity value between the local region and other regions. S22. Compare the similarity value with the preset similarity threshold. When the similarity value is greater than the preset similarity threshold, set the corresponding matrix element to 1. When the similarity value is less than or equal to the preset similarity threshold, set the corresponding matrix element to 0. Combine all matrix elements to construct the initial adjacency matrix. S23. In the initial adjacency matrix, the region node corresponding to the element value of 1 is taken as the neighbor node. The Euclidean distance between the local region node and each neighbor node’s global shared features is calculated. The reciprocal of the Euclidean distance is used as the weight value and assigned to the corresponding matrix element. The matrix element corresponding to the element value of 0 is kept as 0. After the replacement is completed, the adaptive local adjacency matrix is ​​obtained and uploaded to the federated server. S24. The federation server receives the adaptive local adjacency matrix uploaded by each regional node, performs a weighted average calculation on the corresponding matrix position elements of the same regional node in each adaptive local adjacency matrix, obtains the global dynamic topology graph, and distributes it to each regional node.

4. The cross-regional collaborative energy demand forecasting method based on federated learning according to claim 1, characterized in that, S3 specifically includes: S31. Each regional node extracts its local private features and transforms them through a linear mapping matrix to obtain a query vector. Each regional node searches for all adjacent nodes with edge connections to its local regional node in the global dynamic topology graph, extracts the global shared features corresponding to each adjacent node, and transforms the extracted global shared features through a linear mapping matrix to obtain the key vector and value vector respectively. S32. Calculate the dot product between the query vector and each key vector to obtain the unnormalized attention score. Divide all the unnormalized attention scores by the square root of the key vector dimension and input them into the softmax function. After normalization, the attention coefficients are obtained. S33. Perform a multiplication calculation on each attention coefficient and its corresponding value vector, sum all the multiplied value vectors, and obtain a weighted sum. Input the weighted sum into the fully connected layer to perform a linear transformation to obtain the preliminary prediction characteristics of local energy demand.

5. The cross-regional collaborative energy demand forecasting method based on federated learning according to claim 1, characterized in that, S4 specifically includes: S41. Each regional node calculates the difference between the preliminary prediction characteristics and the actual energy load data at the same time step, obtains the residual of the current time step, establishes a sliding time window with a length of a preset window size, sums up the residuals of all time steps within the sliding time window and divides them by the preset window size to obtain the sliding average of the local prediction error. S42. Compare the moving average of the local prediction error with the preset drift threshold. If the moving average of the local prediction error is less than or equal to the preset drift threshold, it is determined that concept drift has not been triggered, and the drift intensity coefficient is set to zero. If the moving average of the local prediction error exceeds the preset drift threshold, it is determined that concept drift has been triggered. Calculate the difference between the current moving average and the preset drift threshold, divide the difference by the preset drift threshold to obtain the difference ratio, and assign the difference ratio as the calculation result to the drift intensity coefficient to obtain the drift intensity coefficient of this region and upload it to the federated server.

6. The cross-regional collaborative energy demand forecasting method based on federated learning according to claim 1, characterized in that, S5 specifically includes: S51. The bottom gradient receiving module locates the storage address of the local forward inference parameters of each regional node in memory and reads them into the computing unit. It performs mean square error calculation on the preliminary prediction characteristics of local energy demand and the actual energy load data to obtain the local prediction loss function. It calculates the local parameter gradient vector by taking the partial derivative of the forward inference parameters in the local prediction loss function. S52. Divide the local parameter gradient vector into the bottom gradient vector of the corresponding bottom shared network and the top gradient vector of the corresponding top personalized network according to the preset network level. Add the bottom gradient vectors of all nodes element by element and divide by the total number of nodes to obtain the global base parameter gradient. S53. The topology-aware regularization module reads the global dynamic topology graph, extracts the connection relationships between all nodes in the global dynamic topology graph to construct an adjacency matrix A, calculates the sum of the elements in each row of the adjacency matrix A to construct a diagonal matrix D, performs a matrix subtraction operation between the diagonal matrix D and the adjacency matrix A to obtain the graph Laplacian matrix L, reads the drift intensity coefficient of each region node, performs a scalar multiplication operation between the drift intensity coefficient and the preset regularization base to obtain the dynamic regularization weight. S54. The graph manifold near-end optimization module locates and extracts the top-level gradient vector and global base parameter gradient of each region node, and concatenates them along the feature dimension to form a local complete parameter vector. The federated server extracts the global base parameter vector of the previous round, performs element-wise addition with the global base parameter gradient calculated in the current round to obtain the global base parameter vector of the current round, and performs element-wise subtraction with the local complete parameter vector to obtain the parameter deviation vector. S55. Perform matrix multiplication on the graph Laplacian matrix L and the parameter deviation vector to obtain a first projection vector. Perform matrix multiplication on the first projection vector and the transpose of the parameter deviation vector to obtain the manifold space constraint term. Perform scalar multiplication on the manifold space constraint term and the dynamic regularization weight to obtain the weighted manifold penalty term. S56. In the improved pFedMe model, the Moreau envelope regularization term is removed, and a weighted manifold penalty term is introduced to obtain the global optimization objective function. The gradients of the global base parameters and the personalized top-level parameters are then calculated and output.

7. The cross-regional collaborative energy demand forecasting method based on federated learning according to claim 6, characterized in that, Specifically, S56 includes: S561. Locate and read the memory address of the Moreau envelope regularization term to be reconstructed in the improved pFedMe model. Perform scalar multiplication and addition operations on the local prediction loss function, the Moreau envelope regularization term and the preset personalized balance hyperparameter to form the native global optimization objective function. S562. Remove the Moreau envelope regularization term from the original global optimization objective function, retain the product term of the local prediction loss function and the preset personalized balance hyperparameter as the basic objective term, perform a scalar multiplication operation on the weighted manifold penalty term and the preset personalized balance hyperparameter to obtain the weighted topological constraint term, and perform a scalar addition operation on the basic objective term and the weighted topological constraint term to obtain the global optimization objective function. S563. Calculate the partial derivative of the local complete parameter vector in the reconstructed global optimization objective function to obtain the parameter gradient vector. Perform element-wise multiplication of the parameter gradient vector with the preset learning rate to obtain the gradient update step size. Subtract the gradient update step size from the local complete parameter vector to obtain the local approximate optimal parameter vector. Perform element-wise subtraction of the local approximate optimal parameter vector with the local complete parameter vector to obtain the personalized parameter update step size. S564. The personalized parameter output module performs an element-wise multiplication operation between the personalized parameter update step size and the dynamic regularization weight to obtain the personalized top-level parameter offset. Based on the preset top-level network layer index table, it locates and reads the memory storage address of the parameter sub-vector of the corresponding top-level network layer in the local complete parameter vector. It then performs an element-wise addition operation between the personalized top-level parameter offset and the parameter sub-vector to obtain the personalized top-level parameter gradient. Finally, it combines and outputs the global base parameter gradient and the personalized top-level parameter gradient.

8. The cross-regional collaborative energy demand forecasting method based on federated learning according to claim 1, characterized in that, S6 specifically includes: S61. Each regional node reads the local geographic region code and the current timestamp as a spatiotemporal identifier, concatenates the geographic region code and the current timestamp into a string and inputs it into the pseudo-random number generator to generate a set of initial random vectors with the same gradient dimension as the global base parameter. The current processing vector is extracted from the initial random vectors column by column, and the inner product between the current processing vector and all the orthogonalized vectors before the current processing vector is calculated to obtain the projection scalar. S62. Multiply the current processing vector with the projection scalar to obtain the projection vector. Subtract all projection vectors from the current processing vector to obtain the orthogonalized intermediate vector. Divide the orthogonalized intermediate vector by its own magnitude to obtain the unit orthogonal vector as the currently completed orthogonalized vector. Iterate through all column vectors in the initial random vector and perform the above operations. Combine all unit orthogonal vectors to obtain the orthogonal random vector as the orthogonal watermark vector. S63. Read the global base parameter gradient of each region node, and perform element-wise addition of the orthogonal watermark vector and the global base parameter gradient to obtain the global base parameter gradient after watermarking. S64. Read the personalized top-level parameter gradient of each region node, generate a random noise vector that follows a Laplace distribution, and perform element-wise addition of the random noise vector and the personalized top-level parameter gradient to obtain the personalized top-level parameter gradient after adding noise. S65. The gradient of the global base parameters after watermarking is combined with the gradient of the personalized top-level parameters after noise is added along the feature dimension to obtain mixed gradient data. Each regional node uploads the mixed gradient data to the federated server. S66. The federation server receives the mixed gradient data uploaded by all regional nodes, performs cumulative summation on the elements at the same matrix position in all mixed gradient data and divides it by the total number of nodes to obtain the aggregated mixed gradient data and sends it to each regional node. S67. Each regional node receives the aggregated mixed gradient data, locates the storage address of the original local parameters in memory, replaces the original local parameters with the aggregated mixed gradient data, inputs the replaced parameters into the local model to perform forward inference calculation, and obtains the final cross-regional energy demand prediction result.