Carbon dioxide distribution prediction method and system
By performing spectral clustering and integrating geographical attributes on the power grid topology map, and combining spatial component models and temporal component models, the accuracy issues of time series and spatial distribution in carbon dioxide distribution prediction were solved, achieving high-precision carbon dioxide distribution prediction.
Patent Information
- Application Number
- CN202511098499.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-21
AI Technical Summary
Existing methods for predicting carbon dioxide distribution are inadequate in terms of handling the complexity of time series data, the accuracy of spatial distribution modeling, and the effectiveness of multimodal data fusion, making it difficult to accurately predict the distribution of carbon dioxide.
By acquiring a power grid topology map with integrated geographic attributes, performing spectral clustering, and utilizing spatial and temporal component models, combined with graph attention networks and multi-scale temporal convolutional layers, the fusion of time-series data and graph structure data is achieved to predict carbon dioxide distribution.
It improves the accuracy of carbon dioxide distribution prediction and the model's generalization ability, enabling it to better capture spatiotemporal characteristics, adapt to different power grid topologies and dynamic changes, and ensure that the prediction results conform to the power grid diffusion law.
Smart Images

Figure CN120996831A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of environmental monitoring, and particularly relates to a carbon dioxide distribution prediction method and system. BACKGROUND
[0002] With the acceleration of global industrialization, the emission of greenhouse gases such as carbon dioxide is increasing, which has a profound impact on climate change and the ecological environment. Accurate prediction of carbon dioxide distribution is of great significance for developing effective emission reduction strategies, assessing climate change risks, and optimizing energy structure. However, existing carbon dioxide distribution prediction methods have many limitations and are difficult to meet actual needs.
[0003] Traditional time series analysis methods, such as autoregressive moving average model (ARMA), autoregressive integrated moving average model (ARIMA), etc., often have difficulty in effectively capturing long-term trends and complex periodic changes in carbon dioxide time series data when processing carbon dioxide time series data. These methods usually assume that data is linear and stationary, but in reality, carbon dioxide emission data is influenced by various factors such as economic development, energy consumption structure, policy regulation, etc., and presents nonlinear and non-stationary characteristics, resulting in limited prediction accuracy of traditional time series models.
[0004] In terms of spatial distribution modeling, traditional geographic information systems (GIS) and spatial interpolation methods, such as Kriging interpolation, can reflect the spatial distribution characteristics of carbon dioxide to some extent, but they cannot fully utilize the spatial correlation information in the power grid topology structure. The power grid topology structure, as a complex spatial network structure, contains rich information of nodes and edges, which is important for understanding the transmission and diffusion of carbon dioxide in space. However, traditional spatial modeling methods cannot effectively integrate these topological information, thus limiting the accurate prediction of carbon dioxide spatial distribution.
[0005] In recent years, Graph Neural Networks (GNNs) have emerged as a powerful deep learning method, demonstrating strong capabilities in processing graph-structured data. GNNs effectively capture spatial dependencies between nodes by propagating information and updating node features on the graph. In predicting carbon dioxide distribution related to power grid topology, GNNs can utilize the topological information of the power grid to enhance the model's spatial perception, thereby better understanding the spatial distribution patterns of carbon dioxide. However, existing GNN models still face challenges in handling such tasks: (1) they primarily model static spatial relationships, making it difficult to effectively integrate temporal dynamic information; (2) when dealing with complex high-dimensional geometric relationships between power grid nodes, the computational complexity is high, and the model's generalization ability (such as adapting to different power grid topologies) needs improvement.
[0006] Attention mechanisms, especially self-attention mechanisms in the Transformer architecture, are highly effective at capturing long-distance dependencies in sequences. However, they are designed for processing sequential data (such as text), and when directly applied to graph-structured data (such as power grids), they struggle to adequately model the inherent spatial topology and geometric relationships between nodes. To address this shortcoming, geometric algebraic attention mechanisms have been proposed. These mechanisms represent nodes in a graph as elements in geometric algebra and calculate attention weights through geometric algebraic operations, aiming to more naturally encode and process complex geometric relationships (such as direction and distance) in high-dimensional spaces. This characteristic makes them theoretically well-suited for scenarios with well-defined spatial structures, such as power grids. However, applying them to carbon dioxide prediction also presents unique challenges: (1) geometric algebraic operations themselves may introduce high computational overhead; (2) how to effectively integrate this powerful geometric representation capability with the topology learning capability of graph neural networks (such as GNNs or STGNNs) remains an open question.
[0007] Spatial-Temporal Graph Neural Network (STGNN) is developed based on GNN and is specifically designed to simultaneously model spatial topological dependencies and temporal dynamic evolution in data. In predicting the distribution of carbon dioxide in power grids, STGNN can enhance spatial perception by utilizing topological information and capture the fluctuation patterns of emissions over time, theoretically giving it a significant advantage. However, existing STGNN models still have shortcomings in this application: (1) The complexity of spatiotemporal modeling: Simultaneously handling high-dimensional spatial relationships (power grid topology) and complex time series (emission dynamics) greatly increases the difficulty of model design and training, easily leading to excessive computational burden and potential spatiotemporal drift problems (i.e., insufficient generalization ability of the model on long-term series or new spatial patterns); (2) Bottleneck in geometric relationship representation: Although superior to pure sequence models (such as Transformer), the standard graph convolution or attention mechanisms used in many STGNNs still have limitations in accurately capturing and utilizing complex high-dimensional geometric relationships between nodes. (3) Integration challenges of advanced mechanisms: As mentioned above, when trying to introduce advanced mechanisms such as geometric algebraic attention to improve the ability to model geometric relationships, there are still dual challenges of how to integrate them efficiently and control the additional computational complexity brought about by them.
[0008] Furthermore, fusing time-series data and graph-structured data is a crucial issue. Time-series data typically exhibits temporal continuity and periodicity, while graph-structured data emphasizes spatial topological relationships. Effectively fusing these two modalities to fully leverage their respective advantages is an important approach to improving the accuracy of carbon dioxide distribution prediction. Existing multimodal data fusion methods still have shortcomings in terms of fusion strategies, model architecture, and computational efficiency, requiring further research and improvement.
[0009] In related technologies, patent application CN117132129A proposes using a GraphRNN model to construct a graph structure from the park's topological data, employing the BigClam clustering algorithm to generate a subgraph structure network and reconstructing the park's graph structure network, acquiring carbon emission and weather data to create a dataset, and building two STGCN models for training to achieve carbon emission prediction for the park's subgraphs and the overall park. However, this scheme does not fully consider the topological structure under similar geographical conditions, cannot fully construct a topological structure based on fixed geographical attributes, and lacks robustness. Patent application CN120106369A proposes a method for retrieving electricity carbon emission data based on sequence matching and a bidirectional attention mechanism, combined with distance metric queries. This method discovers target electricity carbon entities and their attributes from the electricity carbon domain knowledge graph, generates a corresponding computation graph, and calls relevant formulas from the electricity carbon formula library based on the topological sorting of the computation graph to complete the calculation and obtain the regional direct carbon emission factor. The paper "A Review of the Application of Spatiotemporal Graph Neural Networks in PM2.5 Concentration Prediction, Tang Boyuan et al., First Paper Published in Computer Science" mainly discusses the application of spatiotemporal graph neural networks in PM2.5 concentration prediction, including different architecture models such as spatiotemporal graph neural networks based on recurrent, convolutional, and attention mechanisms, as well as the corresponding spatiotemporal fusion architecture.
[0010] In summary, existing carbon dioxide distribution prediction methods have shortcomings in handling the complexity of time series data, the accuracy of spatial distribution modeling, and the effectiveness of multimodal data fusion. Therefore, there is an urgent need for a method that can fully utilize power grid topology information, effectively fuse time series data and graph structure data, and accurately predict carbon dioxide distribution. Summary of the Invention
[0011] The technical problem to be solved by this invention is how to effectively integrate time series data and graph structure data to improve the accuracy of carbon dioxide concentration distribution prediction.
[0012] The present invention solves the above-mentioned technical problems through the following technical means:
[0013] In a first aspect, the present invention proposes a method for predicting carbon dioxide distribution, the method comprising:
[0014] Obtain a power grid topology map with geographic attributes, and perform spectral clustering on the power grid topology map to obtain several sub-maps with geographic attributes-topology coupling.
[0015] The spatial component model is used to perform intra-cluster enhancement on each subgraph to obtain the node spatial features. The node spatial features are then dynamically projected onto the time series space and fused with the historical dynamic CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes.
[0016] A time component model is used to process the spatiotemporal joint features of each node to predict the CO2 distribution value of each node in the future time step.
[0017] Furthermore, the power grid topology diagram V represents the set of power grid nodes, E represents the set of transmission paths, and A represents the set of transmission paths. G Represents the adjacency matrix;
[0018] Among them, the power grid nodes include geographical coordinates, altitude, land use type, population density, industrial emission coefficient, and dynamic CO2 concentration time series vector;
[0019] The transmission path is represented by geographical constraints as E = {e ij |v i ∈V,v j ∈V,GeoConnect(v i ,v j )}, e ij For the power transmission path between node i and node j, GeoConnect(v i ,v j ) represents the geographic join function, and its formula is expressed as:
[0020]
[0021] In the formula, d ij D represents geographical distance. max TerrainCost(v) represents the distance threshold. i ,v j ) represents the terrain cost, θ represents the terrain complexity threshold, and LandUse i LandUse represents the land use type of the i-th type. j This represents the land use type of the j-th type. Used to determine whether a land use type allows connection. The symbol for the empty set;
[0022] Adjacency matrix A G The adjacency matrix with geographical weights is expressed in the following formula:
[0023]
[0024] In the formula, τ ij φ is the terrain transmission coefficient. ij For land use correlation.
[0025] Furthermore, the spectral clustering processing of the power grid topology map yields several geographic attribute-topology coupled sub-graphs, including:
[0026] Based on the static geographic features contained in the power grid nodes in the power grid topology diagram, a static geographic feature sub-vector is constructed, wherein the static geographic features include geographic coordinates, altitude and land use type;
[0027] Based on the static geographic feature sub-vectors corresponding to each node, the geographic similarity between nodes is calculated using the Gaussian kernel function;
[0028] A normalized Laplacian matrix is constructed based on the geographical similarity between nodes. The normalized Laplacian matrix is then subjected to eigenvalue decomposition, and the top K smallest eigenvalues from the decomposed features are selected to form an eigenvector U.
[0029] K-means clustering is performed on the row vectors of feature vector U to obtain K geographic attribute-topologically coupled subgraphs.
[0030] Furthermore, the spatial component model includes a graph attention network, which is used to perform intra-cluster enhancement on each subgraph to obtain node spatial features, including:
[0031] A linear transformation is performed on the geographic features of nodes in each subgraph, and a dual-modal attention mechanism based on geographic distance and intra-cluster similarity is used to calculate the attention weights between nodes on the linearly transformed features.
[0032] The attention weights are normalized to obtain normalized attention weights;
[0033] Multi-head information aggregation is performed on the normalized attention weights to obtain node space features.
[0034] Furthermore, the bimodal attention mechanism employing geographical distance and intra-cluster similarity calculates the attention weights between nodes for the linearly transformed features, expressed by the formula:
[0035]
[0036] In the formula, W is the shared parameter matrix, a is the attention vector, and h i and h j Let be the geographic feature vectors of node i and node j, respectively, and λ be the intra-cluster enhancement intensity control coefficient. Here, β is the cluster indicator function, d is the distance attenuation coefficient, and d is the distance attenuation coefficient. ij Represents geographical distance, LeakyReLU represents linear transformation, and exp represents exponential function. This represents the influence weight of node j on node i.
[0037] Furthermore, the spatial component model also includes a first adaptive gating, wherein the dynamic projection of node spatial features onto the time series space and subsequent fusion with historical CO2 concentration sequences to obtain spatiotemporal joint features corresponding to the nodes includes:
[0038] The node spatial features are transposed to obtain the transpose vector;
[0039] The transposed vector is projected onto the time series space and aligned with the feature dimensions of the historical dynamic CO2 concentration series to obtain the features. The formula is expressed as:
[0040]
[0041] In the formula, W time Generate the time basis vector generation matrix, h′ i_tanspose Let b be the transpose vector. time Here, 'Bias' represents the bias value, and 't' represents the time position encoding. This is a historical dynamic CO2 concentration sequence.
[0042] Furthermore, the feature is subjected to a first adaptive gating. and historical dynamic CO2 concentration sequence By performing fusion, the spatiotemporal joint features corresponding to each node are obtained, and the formula is expressed as:
[0043]
[0044] In the formula, W represents the intermediate state obtained after the spatial dimension fusion features at time t are passed through a gating unit. g h′ is the fusion ratio control coefficient. i For the node space features, b g The added bias value, where σ represents the Sigmoid function. It is a spatiotemporal joint feature.
[0045] Furthermore, the step of using a time component model to process the spatiotemporal joint features corresponding to each node and predicting the CO2 distribution value of each node at future time steps includes:
[0046] The spatiotemporal joint feature tensor, composed of the spatiotemporal joint features corresponding to each node, is renormalized to obtain a 2D matrix;
[0047] Multi-scale temporal convolutional layers are used to process the 2D matrix to obtain features at different time scales;
[0048] Local features are obtained by concatenating features from different time scales, and global self-attention mechanism is used to process the local features to obtain global features.
[0049] A second adaptive gating method is used to fuse local and global features to obtain fused features;
[0050] A multi-step predictive decoder is used to decode the fused features, and the prediction step size is gradually expanded to obtain the CO2 distribution value of each node in the future time step.
[0051] Furthermore, the spatiotemporal joint feature tensor composed of the spatiotemporal joint features corresponding to each node is renormalized to obtain a 2D matrix, which is expressed by the formula:
[0052]
[0053] In the formula, X seq Let Z represent a 2D matrix, T represent the spatiotemporal joint feature tensor, N represent the time step, and d represent the total number of nodes in the power grid. Let T represent a vector space with dimensions T×(N·d).
[0054] Furthermore, the multi-scale temporal convolutional layer employs several sets of parallel dilated convolutions.
[0055] Furthermore, the multi-step prediction decoder employs several anticausal convolutional layers.
[0056] Furthermore, before predicting the CO2 distribution value for each node's future time step, the method also includes:
[0057] To construct a dataset, historical observation sequence data, predicted actual CO2 concentration values for all nodes at the predicted time step, and a power grid topology map with geographic attributes are obtained. The observation sequence data includes historical dynamic feature sequences and historical CO2 concentration sequences.
[0058] The spatial component model and the temporal component model are trained using the dataset to obtain trained spatial component models and temporal component models, which can be used to predict CO2 distribution values.
[0059] Furthermore, the historical CO2 concentration sequence includes CO2 concentration vectors for all nodes at each historical time step;
[0060] The historical dynamic feature sequence includes a node feature matrix for each historical time step, and the node feature matrix includes the node's temperature feature, humidity feature, power grid load rate, and industrial activity intensity.
[0061] Wherein, the industrial activity intensity I of node i i The formula for calculating (t) is:
[0062]
[0063] In the formula, λ i Q is the node type coefficient. i (t) represents the grid load factor, E i (t) represents the current hourly electricity consumption, Ebase This serves as the regional benchmark electricity consumption.
[0064] Furthermore, the total loss function used during training is:
[0065]
[0066] In the formula, For the total loss function, For node-level prediction loss, Let λ be the spatiotemporal consistency loss, λ be the spatial consistency weight, ∈ be the L2 regularization coefficient, and Θ be all trainable parameters. The L2 norm squared; N is the number of grid nodes, T is the input time step during training, α is the hyperparameter, and c i,t Let be the actual value of the i-th power grid node at time t. Let be the predicted value of the i-th power grid node at time t; E represents the set of transmission paths. Let be the predicted value of the j-th power grid node at time t, where t is the time.
[0067] Secondly, the present invention also proposes a carbon dioxide distribution prediction system, the system comprising:
[0068] The topology processing module is used to obtain a power grid topology map that incorporates geographical attributes, and to perform spectral clustering on the power grid topology map to obtain several sub-maps that are coupled with geographical attributes and topology.
[0069] The spatial modeling module is used to perform intra-cluster enhancement on each subgraph using a spatial component model to obtain node spatial features. The node spatial features are then dynamically projected onto the time series space and fused with the historical dynamic CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes.
[0070] The time dynamic modeling and prediction module is used to process the spatiotemporal joint features of each node using a time component model, and predict the CO2 distribution value of each node in the future time step.
[0071] Thirdly, the present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the carbon dioxide distribution prediction method as described above.
[0072] The advantages of this invention are:
[0073] (1) This invention obtains a power grid topology map with integrated geographical attributes and performs spectral clustering on the power grid topology map to cluster power grid nodes with similar geographical information, making spatial information more obvious. This facilitates further aggregation of information in the graph network after clustering during the intra-cluster enhancement process of each subgraph using the spatial component model, which can capture important information and is conducive to subsequent information interaction and model analysis of potential information. By projecting the spatial features of nodes onto the time series space and fusing them with the historical dynamic CO2 concentration series, features in various dimensions of time and space can be better captured. The features are fused together to generate spatiotemporal joint features, which facilitates information interaction. Since the spatial component model has already embedded spatial information into the time information, the spatiotemporal joint features after adding spatial information are processed by the time component model to predict the CO2 distribution value of future time steps. This invention can effectively integrate time series data and graph structure data, accurately predict carbon dioxide distribution, improve prediction accuracy and model generalization ability, and help to formulate emission reduction strategies, assess climate change risks, and optimize energy structure.
[0074] (2) In this scheme, the multi-scale temporal convolution layer specifically adopts multiple sets of dilated convolution parallel processing, which can make the granular processing more refined, and the parallel processing can speed up the processing speed.
[0075] (3) The loss function set in this invention adopts a three-element combination of weighted prediction loss, topology-driven spatial constraints and regularization. By transforming the physical attributes of the power grid (topology connection, diffusion continuity) into differentiable mathematical constraints, the model is guided to learn a spatiotemporal pattern that conforms to the laws of reality. This balances point-level error and outlier robustness, ensuring that the prediction results conform to the diffusion law of the power grid and can adapt to different power grid topologies and dynamic changes.
[0076] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0077] Figure 1 This is a flowchart illustrating a carbon dioxide distribution prediction method proposed in one embodiment of the present invention.
[0078] Figure 2 This is a schematic diagram illustrating the principle of carbon dioxide distribution prediction in one embodiment of the present invention;
[0079] Figure 3 This is a schematic diagram of the graph attention network in a spatial component model according to an embodiment of the present invention;
[0080] Figure 4 This is a schematic diagram of the structure of a time component model in one embodiment of the present invention;
[0081] Figure 5 This is a schematic diagram of a carbon dioxide distribution prediction system proposed in one embodiment of the present invention. Detailed Implementation
[0082] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0083] like Figures 1 to 2 As shown, the first embodiment of the present invention proposes a method for predicting carbon dioxide distribution, the method comprising the following steps:
[0084] S10. Obtain the power grid topology map with geographic attributes, and perform spectral clustering on the power grid topology map to obtain several sub-maps with geographic attributes-topology coupling.
[0085] It should be noted that this embodiment acquires a power grid topology map with integrated geographical attributes and performs spectral clustering on the map to cluster power grid nodes with similar geographical information, making spatial information more apparent. This facilitates the capture of important information and full utilization of power grid topology information during intra-cluster enhancement of each sub-map using a spatial component model.
[0086] S20. Use a spatial component model to perform intra-cluster enhancement on each subgraph to obtain node spatial features. Then, dynamically project the node spatial features onto the time series space and fuse them with the historical dynamic CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes.
[0087] It should be noted that this embodiment, by projecting the node spatial features onto the time series space and fusing them with the historical dynamic CO2 concentration sequence, can better capture features in various spatiotemporal dimensions, embedding spatial information into temporal information to generate spatiotemporal joint features, and facilitating information interaction.
[0088] S30. Use a time component model to process the spatiotemporal joint features corresponding to each node and predict the CO2 distribution value of each node in the future time step.
[0089] It should be noted that, since the spatial component model has already embedded spatial information into the temporal information, and the temporal component model further processes the spatiotemporal joint features after adding spatial information to predict the CO2 distribution value for future time steps, this invention can effectively fuse time series data and graph structure data to accurately predict carbon dioxide distribution, improve prediction accuracy and model generalization ability, and help formulate emission reduction strategies, assess climate change risks, and optimize energy structure. This embodiment achieves accuracy in spatial distribution modeling by using a large amount of real topological information and introducing various dimensions closely related to the power system; and deeply fuses spatial and temporal information through neural network processing.
[0090] As a further preferred technical solution, the power grid topology diagram V represents the set of power grid nodes, E represents the set of transmission paths, and A represents the set of transmission paths. G Let the adjacency matrix be denoted as:
[0091] (1) Node set N represents the number of power grid monitoring nodes (such as substations, industrial area monitoring points), and d represents the feature dimension of each node. v =6, including and geographical attributes:
[0092]
[0093] In the formula, Coord i For geographic coordinates, Elev i For altitude, LandUse i For land use type, PopDens i For population density, IndCoeff i Industrial emission coefficient, This is a historical dynamic CO2 concentration sequence. This embodiment, by setting up geographical features with a large amount of information, enables full interaction across various dimensions.
[0094] (2) The set of transmission paths is represented by geographical constraints as E = {e ij |v i ∈V,v j ∈V,GeoConnect(v i ,v j )}, e ij For the power transmission path between node i and node h, GeoConnect(v i ,v j ) represents the geographic join function, and its formula is expressed as:
[0095]
[0096] In the formula, d ij d represents the spherical distance between nodes. ij =Haversine(Coord) i Coord j ), Coord i and Coord j Represents the geographic coordinates of nodes i and j; Haversine represents the node spherical distance calculation operation; D max This represents the distance threshold (unit: km), indicating that the spherical distance between two nodes is ≤ D only if the distance between them is ≤ D. max Only then can a power grid connection be established; TerrainCost(v i ,v j The ) represents the terrain cost. The specific calculation method for TerrainCost is ∝ElevDiff. ij +α·SurfaceComplexity represents the terrain cost (elevation difference + surface complexity); θ is the terrain complexity threshold, representing the upper limit of the terrain cost tolerance: local formation cost TerrainCost(v i ,v j When θ ≤ 0, the connection is feasible in engineering; LandUse i LandUse represents the land use type of the i-th type. j This represents the land use type of the j-th type. The land use compatibility operator is used to determine whether land use types are allowed to be joined (e.g., industrial zones and commercial zones can be joined, but are mutually exclusive with ecological protection zones). If the result is a non-empty set... This indicates that two types of land use are allowed to be connected; if it is an empty set... Then the connection is prohibited (e.g., in industrial areas). Ecological protection zone); The symbol for the empty set;
[0097] (3) Adjacency matrix A G The adjacency matrix with geographical weights is expressed in the following formula:
[0098]
[0099] In the formula, τ ij For terrain transmission coefficient, β is the distance attenuation coefficient, ElevDiff ij φ represents the absolute value of the elevation difference between nodes (unit: meters), directly reflecting the degree of terrain undulation and affecting the difficulty and cost of power grid construction; ij For land use correlation, φ ij =cos(LandUse) i LandUsej ).
[0100] It should be noted that the distance attenuation coefficient is a sensitivity parameter to elevation difference and is used to calculate the terrain attenuation factor τ. ij =e ∧ (-β·ElevDiff ij The larger β is, the stronger the impact of altitude difference.
[0101] It should be noted that, compared with traditional geographic connections which are usually based solely on Euclidean distance, this embodiment adds terrain cost constraints and land use compatibility constraints to enhance the realism of geographic connections, reflect the boundary effects of land use, and optimize the sparsity of the network structure.
[0102] As a further preferred technical solution, in step S10: spectral clustering is performed on the power grid topology map to obtain several sub-maps with geographic attribute-topology coupling, specifically including the following steps:
[0103] S11. Construct static geographic feature sub-vectors based on the static geographic features contained in the power grid nodes in the power grid topology diagram. The static geographic features include geographic coordinates, altitude, and land use type.
[0104] Specifically, from node v i The static geographic features (geographic coordinates, altitude, and land use type) are separated to form static geographic feature sub-vectors.
[0105]
[0106] It should be noted that this embodiment only considers static geographic information that remains unchanged over a long period of time, such as geographic coordinates, altitude, and land use type. Population density and industrial emission coefficients are affected by human activities and have weak spatial topological robustness, so they were not used to construct static geographic feature sub-vectors.
[0107] S12. Based on the static geographic feature sub-vectors corresponding to each node, the Gaussian kernel function is used to calculate the geographic similarity between nodes;
[0108] Specifically, this embodiment defines the geographical similarity S between nodes based on the Gaussian kernel function. ij for:
[0109]
[0110] Where γ is a parameter controlling the spatial decay rate, and η is a topological weight coefficient (hyperparameter). Inherited from the power grid topology diagram The adjacency matrix, Let be the static geographic feature sub-vector of node j.
[0111] S13. Construct a normalized Laplace matrix based on the geographical similarity between nodes, perform eigenvalue decomposition on the normalized Laplace matrix, and select the top K smallest eigenvalues from the decomposed features to form an eigenvector U.
[0112] Specifically, the normalized Laplace matrix is constructed as follows:
[0113]
[0114] Where L is a symmetric positive semi-definite matrix used to describe the connectivity structure and node similarity relationships of the graph; D is a diagonal matrix used to describe the total similarity of each node (a measure of "connection strength"); S represents the connection matrix; S ij D represents the fusion similarity (geographical + topological) between node i and node j in matrix S. ii Let D be the sum of the similarities between node i and all other nodes. ii Let be the value in the i-th row and i-th column of matrix D.
[0115] S14. Perform K-means clustering on the row vectors of the feature vector U to obtain K geographic attribute-topologically coupled subgraphs.
[0116] Specifically, in this embodiment, eigenvalue decomposition is performed on matrix L, and the first K smallest eigenvalues are used to construct eigenvectors. Then, K-means clustering is performed on the row vectors of feature vector D to obtain K sub-graphs. This yields K geographic-topologically coupled subgraphs. in
[0117] As a further preferred technical solution, such as Figure 3 As shown, the spatial component model includes a graph attention network. In step S20, the graph attention network is used to perform intra-cluster enhancement on each subgraph to obtain node spatial features. Specifically, this includes the following steps:
[0118] S21. Perform a linear transformation on the geographic features of the nodes in each subgraph, and use a dual-modal attention mechanism based on geographic distance and intra-cluster similarity to calculate the attention weights between nodes for the linearly transformed features.
[0119] Specifically, from the matrix composed of eigenvectors U, the i-th eigenvector h is selected. i As a node feature, subgraph G c Node features First, analyze the node features h i Perform a linear transformation, which uses a shared parameter matrix. d hIndicates the feature dimension of the hidden layer. Let be the dimensional space of the linear transformation matrix; then, a dual-modal attention mechanism based on geographic distance and intra-cluster similarity is used to calculate the attention weights between nodes for the linearly transformed features:
[0120]
[0121] In the formula, W is the shared parameter matrix. h is the attention vector. i and j j Let be the geographic feature vectors of node i and node j, respectively, and λ be the intra-cluster enhancement intensity control coefficient. Here, is the cluster indicator function (1 for members of the same cluster, 0 otherwise), LeakyReLU represents the linear transformation, and exp represents the exponential function. The influence weight of node j on node i is represented by the bimodal attention coefficient between i and j in the c-th category.
[0122] S22. Normalize the attention weights to obtain the normalized attention weights:
[0123]
[0124] In the formula, As a mask matrix, only the original topology connection nodes are retained; This represents the neighboring nodes of a point within a cluster. Let be the bimodal attention coefficients of i and k in the c-th category.
[0125] S23. Perform multi-head information aggregation on the normalized attention weights to obtain node space features.
[0126] Specifically, this embodiment utilizes multi-head information aggregation (taking 3 heads as an example) to aggregate the normalized attention weights to obtain:
[0127]
[0128] In the formula, ‖ represents vector concatenation. For the m-th head parameter, The superscript m in the text represents the sequence number of the attention head, and h represents the sequence number of the attention head. j Let h′ be the node feature of node j. i The attention vector, composed of three attention heads, is the node space feature after attention calculation. By enhancing all nodes within the subgraph, we obtain the intra-cluster enhanced node representation. Dimension d′ h =3d h .
[0129] As a further preferred technical solution, the spatial component model also includes a first adaptive gating. In step S20, the node spatial features are dynamically projected onto the time series space and then fused with the historical CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes. This specifically includes the following steps:
[0130] S24. After transposing the node spatial features, project them into the time series space and align them with the feature dimensions of the historical dynamic CO2 concentration series to obtain the features.
[0131] It should be noted that the data processed in this step is the node spatial feature h′. i and historical dynamic CO2 concentration time series (At time step T), first, the spatial features of the nodes are transposed to obtain the transpose vector h′. i_tanspose Then, the transposed vector is projected onto the time series space and aligned with the feature dimensions of the historical dynamic CO2 concentration series to obtain:
[0132]
[0133] In the formula, b is the time basis vector generating matrix. time Bias is the bias in the time dimension. Encoding for time location, This is a historical dynamic CO2 concentration sequence.
[0134] S25. Features are processed through the first adaptive gating. and historical dynamic CO2 concentration sequence By performing fusion, the spatiotemporal joint features corresponding to the nodes are obtained, and the formula is expressed as:
[0135]
[0136] In the formula, The intermediate state is obtained by passing the spatial dimension fusion features at time t through the gated unit. h′ is the fusion ratio control coefficient. i For the node space features, b g The added bias value, where σ represents the Sigmoid function. It is a spatiotemporal joint feature.
[0137] It should be noted that in practical applications, b time With b g The values may differ.
[0138] As a further preferred technical solution, such as Figure 4As shown, step S30 involves processing the spatiotemporal joint features corresponding to each node using a time component model to predict the CO2 distribution value of each node at future time steps. This specifically includes the following steps:
[0139] S31. Renormalize the spatiotemporal joint feature tensor composed of the spatiotemporal joint features corresponding to each node to obtain a 2D matrix;
[0140] Specifically, the spatiotemporal joint features corresponding to each node are combined into a spatiotemporal joint feature tensor. T is the time step, and d is the feature dimension (including spatial-temporal interaction features). A renormalization operation is performed on the spatiotemporal joint feature tensor, merging the node dimension and feature dimension to construct the 2D matrix required for time series processing:
[0141]
[0142] In the formula, X seq Represents a 2D matrix. Let T represent a vector space with dimensions T×(N·d).
[0143] Specifically, each time step of the 2D matrix contains the joint features of all nodes, which facilitates subsequent time series modeling.
[0144] S32. Use multi-scale temporal convolutional layers to process the 2D matrix to obtain features at different time scales;
[0145] Specifically, this embodiment employs dilated causal convolution to capture patterns at different temporal granularities, where dilated convolution is defined as:
[0146] For the dilation rate d and the kernel size k sizeof The output of the l-th layer of the conv layer is:
[0147]
[0148] in, These are learnable parameters; Let be the 2D matrix after renormalization of the i-th dimension at time t, with an inflation rate of d, and ensured by causality that td·i≥0 (no future information leakage), where h is the dimension of the hidden layer.
[0149] In this embodiment, the multi-scale temporal convolutional layer employs three sets of parallel dilated causal convolutions (l = 1, 2, 3):
[0150] l = 1, d = 1, k = 3 (fine-grained)
[0151] l = 2: d = 4, k = 3 (mesoscale)
[0152] l = 3, d = 12, k = 3 (coarse grain)
[0153] Then, features at different time scales are obtained through nonlinear transformation:
[0154]
[0155] Where GELU is the activation function, expressed as:
[0156]
[0157] Where Φ(x) is the cumulative function of the standard normal distribution.
[0158] S33. After concatenating features from different time scales, local features are obtained, and a global self-attention mechanism is used to process the local features to obtain global features;
[0159] Specifically, the local feature H is obtained by splicing features from different time scales through a splicing operation. local for:
[0160]
[0161] Then the local feature H local The input is fed into the global self-attention layer to obtain the Query / Key / Value projection:
[0162]
[0163] in, This is the projection matrix.
[0164] During the scaling dot product attention calculation:
[0165]
[0166] Finally, the global features are obtained through residual connection and normalization:
[0167]
[0168] LayerNorm represents the layer normalization operation.
[0169] S34. Use the second adaptive gating to fuse local and global features to obtain fused features;
[0170] Specifically, this embodiment dynamically fuses local and global features through a designed second adaptive gating mechanism:
[0171]
[0172] H fusion=g⊙H local +(1-g)⊙H global
[0173] Where σ represents the Sigmoid function, and ⊙ represents the Hadamard product (element-by-element multiplication). Let H represent the gate weight matrix, g represent the local features before fusion, and H represent the gating weight matrix. fusion This represents the global features after fusion.
[0174] S35. A multi-step predictive decoder is used to decode the fused features, and the prediction step size is gradually expanded to obtain the CO2 distribution value of each node in the future time step.
[0175] It should be noted that since the sensor does not monitor in real time, but rather collects data every few minutes, historical dynamic carbon dioxide data are used here. The obtained gating features are fused together to predict the carbon dioxide concentration at a certain time step in the future.
[0176] As a further preferred technical solution, the multi-step prediction decoder is composed of anti-causal convolutional layers to progressively expand the prediction step size and obtain the CO2 distribution value of each node at future time steps:
[0177] D (1) =ReLU(Conv1D(H fusion k=3, stride=1))
[0178] D (2) =ReLU(Conv1D(G (1) k=3, stride=2))
[0179]
[0180] In the formula, the prediction stride = H, where H can specifically represent the next 3 hours; ReLU represents the activation function, Conv1D represents one-dimensional convolution, and D... (1) and D (2) As an intermediate variable, This is the CO2 distribution sequence for future time steps.
[0181] It should be noted that the spatiotemporal graph network designed in this embodiment is decoupled. It realizes spatial modeling based on power grid topology through spatial component model, realizes temporal dynamic modeling and prediction through temporal component model, and realizes end-to-end spatiotemporal joint prediction of power grid CO2 distribution through graph attention mechanism, temporal convolution, self-attention, gating fusion and other modules.
[0182] It should be noted that both the spatial component model and the temporal component model need to be pre-trained and have parameters to be learned. During the training process, the parameters to be learned are determined by continuously performing forward propagation and calculating the loss. In the testing phase, simply setting the model to test mode will freeze the parameters to be learned, preventing them from being updated. Thus, after inputting the corresponding data, the prediction results can be directly output.
[0183] Therefore, before predicting the CO2 distribution value for each node's future time step, this embodiment further includes the following steps:
[0184] To construct a dataset, historical observation sequence data, predicted actual CO2 concentration values for all nodes at the predicted time step, and a power grid topology map with geographic attributes are obtained. The observation sequence data includes historical dynamic feature sequences and historical CO2 concentration sequences.
[0185] The spatial component model and the temporal component model are trained using the dataset to obtain trained spatial component models and temporal component models, which can be used to predict CO2 distribution values.
[0186] It should be noted that this embodiment formally describes the problem of predicting CO2 distribution values in a power grid topology scenario as predicting the CO2 concentration distribution over the next H time steps based on historical data of power grid monitoring nodes and topological relationships:
[0187]
[0188] in, This represents the CO2 concentration vector (instantaneous value) for all nodes at time step t. Indicates the concentration at node i. This represents the dynamically changing CO2 concentration value over a historical period. The node feature matrix (instantaneous values) represents time step t, where D is the feature dimension; Characteristic values that represent dynamic changes within a historical period; This represents the power grid topology diagram, where N represents the number of power grid monitoring nodes (e.g., substations, industrial area monitoring points), M represents the historical observation time step length (e.g., the past 6 hours), and H represents the prediction time step length (e.g., the future 3 hours). C represents the predicted CO2 concentration at future time step H, as output by the model. t+1 ,…,C t+H Let arg maxP(∣) represent the actual CO2 concentration values of all nodes at each time step from t+1 to t+H (used as ground truth in training and evaluation), and let arg maxP(∣) represent the conditional probability.
[0189] Specifically, the data samples in the dataset constructed in this embodiment are in the format of training data pairs. Each training sample is a tuple, including input and output parts, wherein:
[0190] (1) The input part consists of historical observation data and static topology map.
[0191] Historical observation data includes historical dynamic characteristic sequences and historical CO2 concentration sequences: the sequence from time step k = t - M + 1 to t, with a length M (historical window size).
[0192] Historical dynamic feature sequence:
[0193] Historical concentration sequence: C hist =[C t-M+1 C t-M+2 ,…,C t ]∈R M×N ;
[0194] Static topology graph: G (shared, does not change with samples).
[0195] Therefore, historical observation is represented as
[0196] (2) Output section: Future concentration sequence C future =[C k+1 C t+2 ,…,C t+H ]∈R H×N , length H (prediction window size).
[0197] The training samples are generated as follows:
[0198] For time indices t, from M to TH (ensuring historical and future windows are within the time series range), each sample corresponds to a start time t, generating an independent data pair. Example: If T = 100, M = 6, H = 3, then the number of samples is 100 - 6 - 3 + 1 = 92.
[0199] The standardized representation of training data pairs is: (input, output), where input = (X... hist C hist ,G),output=C future The dataset is in the form of
[0200] As a further preferred technical solution, the historical CO2 concentration sequence includes the CO2 concentration vector of all nodes at each historical time step;
[0201] The historical dynamic feature sequence includes node feature matrices for each historical time step, and the node feature matrices include the node's temperature features, humidity features, power grid load rate, and industrial activity intensity.
[0202]
[0203] Among them, T i (t) represents the temperature (°C) at node i, H i (t) represents the humidity (%) at node i, Q i (t) represents the grid load factor (%, reflecting the power transmission intensity), I i (t) represents the intensity of industrial activity (calculated from electricity consumption, load factor, and region type);
[0204] Wherein, the industrial activity intensity I of node i i The formula for calculating (t) is:
[0205]
[0206] In the formula, λ i q represents the node type coefficient (industrial area = 1.2, commercial area = 0.8, residential area = 0.5). i (t) represents the grid load factor, E i (t) represents the current hourly electricity consumption (kWh), E base This is the regional benchmark electricity consumption (average over the past 30 days).
[0207] It should be noted that this embodiment uses the grid load rate to reflect the nonlinear relationship between grid load and industrial activities (the higher the load rate, the slower the growth trend of activity intensity). The node type coefficient distinguishes between industrial areas (1.2), commercial areas (0.8), and residential areas (0.5) to reflect the carbon emission contribution weight of different regional types. The industrial activity intensity weight is quantified according to the node type (industrial area > commercial area > residential area) to achieve regional differentiation. Used to suppress numerical expansion under high load rates and reflect the grid saturation effect. Baseline electricity consumption normalization. It is used to eliminate regional scale differences, highlight the dynamic fluctuations in electricity consumption, avoid the interference of the absolute value of electricity consumption in large areas, and make the intensity of industrial activities in regions of different sizes comparable.
[0208] Industrial activity intensity I i (t) is one of the model input features (see node feature matrix X) t This directly affects CO2. j Concentration prediction of high λ in industrial areas i A value of (1.2) would amplify the intensity of its activity, as carbon emissions per unit of electricity used in industrial areas are much higher than those in residential areas. Q i(t) Associated power grid topology (G=(V,E,A) G When the load rate is too high, the power grid may rely on high-carbon energy sources (such as coal-fired power for peak shaving), which will increase CO2 concentration; therefore, this embodiment will adjust the power grid status (load rate) and regional type (λ). i It is coupled with energy consumption data (electricity consumption) for dynamic calculation, which strengthens the physical correlation with carbon emissions and is more in line with the generation logic of carbon emissions (energy structure + industrial scale + grid efficiency) from a physical mechanism perspective.
[0209] As a further preferred technical solution, this embodiment considers multi-scale spatiotemporal error characteristics and defines the composite loss function used during training as a three-element combination of node-level prediction loss, spatiotemporal consistency constraint, and regularization, wherein:
[0210] (1) The node-level prediction loss is a weighted combination of MAE and MSE, used to balance robustness to outliers and smoothness:
[0211]
[0212] In the formula, The node-level prediction loss is denoted by α∈[0,1], which is a hyperparameter (0.7 is recommended), N is the number of power grid nodes, T is the input time step during training, and c is the time step. i,t Let be the actual value of the i-th power grid node at time t. Let be the predicted value of the i-th power grid node at time t, where t is the time.
[0213] (2) Spatiotemporal consistency constraints are used to penalize prediction differences between adjacent nodes and force the prediction results of adjacent nodes to conform to physical connectivity constraints:
[0214]
[0215] In the formula, For spatiotemporal consistency loss, E represents the set of transmission paths. Let be the predicted value of the j-th power grid node at time t. Represents the square of the L2 norm;
[0216] (3) Construct a composite loss function:
[0217]
[0218] In the formula, Let be the total loss function, λ be the spatial consistency weight (recommended value: 0.1–0.3), ∈ be the L2 regularization coefficient, and Θ be all trainable parameters. The sign for finding the magnitude of a vector.
[0219] It should be noted that while utilizing historical observation data, historical carbon dioxide concentration is one of the six-dimensional features of the nodes. During training, a sliding window training method is used based on historical information. The designed loss function, through weighted prediction loss, topology-driven spatial constraints, and regularization, transforms the physical properties of the power grid (topology connectivity, diffusion continuity) into differentiable mathematical constraints, guiding the model to learn spatiotemporal patterns that conform to real-world laws. By leveraging the balance point level error and robustness to outliers through weighted prediction loss, high-precision prediction can be achieved. The topology-driven spatial constraints ensure that the prediction results conform to the diffusion laws of the power grid, ensuring physical rationality. Furthermore, it can adapt to different power grid topologies and dynamic changes, exhibiting strong generalization ability.
[0220] In addition, such as Figure 5 As shown, the second embodiment of the present invention also proposes a carbon dioxide distribution prediction system, the system comprising:
[0221] The topology processing module 10 is used to obtain a power grid topology map that incorporates geographical attributes, and to perform spectral clustering processing on the power grid topology map to obtain several sub-maps that are coupled with geographical attributes and topology.
[0222] The spatial modeling module 20 is used to perform intra-cluster enhancement on each subgraph using a spatial component model to obtain node spatial features. The node spatial features are then dynamically projected onto the time series space and fused with the historical dynamic CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes.
[0223] The time dynamic modeling and prediction module 30 is used to process the spatiotemporal joint features corresponding to each node using a time component model, and predict the CO2 distribution value of each node in the future time step.
[0224] As a further preferred technical solution, the topology processing module 10 specifically includes:
[0225] The feature selection unit is used to construct static geographic feature sub-vectors based on the static geographic features contained in the power grid nodes in the power grid topology diagram. The static geographic features include geographic coordinates, altitude, and land use type.
[0226] The similarity calculation unit is used to calculate the geographical similarity between nodes based on the static geographic feature sub-vectors corresponding to each node and using the Gaussian kernel function.
[0227] The matrix construction unit is used to construct a normalized Laplacian matrix based on the geographical similarity between nodes, perform eigenvalue decomposition on the normalized Laplacian matrix, and select the top K smallest eigenvalues from the decomposed features to form the eigenvector U.
[0228] Clustering units are used to perform K-means clustering on the row vectors of feature vector U to obtain K geographic attribute-topologically coupled subgraphs.
[0229] As a further preferred technical solution, the spatial modeling module 20 specifically includes:
[0230] The attention calculation unit is used to perform linear transformation on the geographic features of nodes in each subgraph, and to calculate the attention weights between nodes of the linearly transformed features using a bimodal attention mechanism of geographic distance and intra-cluster similarity.
[0231] The normalization unit is used to normalize the attention weights to obtain normalized attention weights.
[0232] The aggregation unit is used to aggregate multi-head information on the normalized attention weights to obtain node space features.
[0233] As a further preferred technical solution, the spatial modeling module 20 further includes:
[0234] The feature projection unit is used to transpose the node spatial features and project them onto the time series space, aligning them with the feature dimensions of the historical dynamic CO2 concentration series to obtain the features.
[0235] The spatiotemporal fusion unit is specifically used to perform feature processing through a first adaptive gating. and historical dynamic CO2 concentration sequence By fusing the data, we obtain the spatiotemporal joint features corresponding to the nodes.
[0236] As a further preferred technical solution, the feature projection unit includes:
[0237] The transpose subunit is used to transpose the node spatial features to obtain the transpose vector.
[0238] The projection subunit is used to project the transposed vector onto the time series space and align it with the feature dimensions of the historical dynamic CO2 concentration series to obtain the features. The formula is expressed as:
[0239]
[0240] In the formula, W time Generate the time basis vector generation matrix, h′ i_tanspose Let b be the transpose vector. time Here, 'Bias' represents the bias value, and 't' represents the time position encoding. This is a historical dynamic CO2 concentration sequence.
[0241] As a further preferred technical solution, the spatiotemporal fusion unit is specifically used to achieve spatiotemporal fusion using the following formula:
[0242]
[0243] In the formula, W represents the intermediate state obtained after the spatial dimension fusion features at time t are passed through a gating unit. g h′ is the fusion ratio control coefficient. i For the node space features, b g The added bias value, where σ represents the Sigmoid function and || represents the eigenvector concatenation operation. It is a spatiotemporal joint feature.
[0244] As a further preferred technical solution, the time dynamic modeling and prediction module 30 specifically includes:
[0245] The renormalization unit is used to renormalize the spatiotemporal joint feature tensor composed of the spatiotemporal joint features corresponding to each node to obtain a 2D matrix;
[0246] Multi-scale processing units are used to process 2D matrices using multi-scale temporal convolutional layers to obtain features at different time scales;
[0247] The feature processing unit is used to concatenate features from different time scales to obtain local features, and then use a global self-attention mechanism to process the local features to obtain global features.
[0248] The feature fusion unit is used to fuse local and global features using a second adaptive gating mechanism to obtain fused features.
[0249] The decoding unit is used to decode the fused features using a multi-step predictive decoder, gradually expanding the prediction step size to obtain the CO2 distribution value of each node at future time steps.
[0250] It should be noted that other embodiments or specific implementation methods of the carbon dioxide distribution prediction system described in this invention can refer to the above-described method embodiments, and will not be repeated here.
[0251] Furthermore, the third embodiment of the present invention also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the carbon dioxide distribution prediction method as described in the first embodiment above.
[0252] It should be noted that the computer-readable medium disclosed in this embodiment may be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0253] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform a zero-sample image anomaly detection method according to the above embodiments.
[0254] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed 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.
[0255] In cases involving remote computers, the remote computer can 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 it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0256] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0257] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0258] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" or "several" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0259] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for predicting carbon dioxide distribution, characterized in that, include: Obtain a power grid topology map with geographic attributes, and perform spectral clustering on the power grid topology map to obtain several sub-maps with geographic attributes-topology coupling. The spatial component model is used to perform intra-cluster enhancement on each subgraph to obtain the node spatial features. The node spatial features are then dynamically projected onto the time series space and fused with the historical dynamic CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes. A time component model is used to process the spatiotemporal joint features of each node to predict the CO2 distribution value of each node in the future time step.
2. The carbon dioxide distribution prediction method as described in claim 1, characterized in that, The power grid topology diagram V represents the set of power grid nodes, E represents the set of transmission paths, and A represents the set of transmission paths. G Represents the adjacency matrix; Among them, the power grid nodes include geographical coordinates, altitude, land use type, population density, industrial emission coefficient and real-time CO2 concentration time series; The transmission path is represented by geographical constraints as E = {e ij |v i ∈V,v j ∈V,GeoConnect(v i ,v j )}, e ij For the power transmission path between node i and node j, GeoConnect(v i ,v j ) represents the geographic join function, and its formula is expressed as: In the formula, d ij D represents geographical distance. max TerrainCost(v) represents the distance threshold. i ,v j ) represents the terrain cost, θ represents the terrain complexity threshold, and LandUse i LandUse represents the land use type of the i-th type. j This represents the land use type j, and ⊕ is used to determine whether land use types are allowed to be connected. The symbol for the empty set; Adjacency matrix A G The adjacency matrix with geographical weights is expressed in the following formula: In the formula, τ ij φ is the terrain transmission coefficient. ij For land use correlation.
3. The carbon dioxide distribution prediction method as described in claim 1, characterized in that, The spectral clustering process performed on the power grid topology map yields several geographic attribute-topology coupled sub-maps, including: Based on the static geographic features contained in the power grid nodes in the power grid topology diagram, a static geographic feature sub-vector is constructed, wherein the static geographic features include geographic coordinates, altitude and land use type; Based on the static geographic feature sub-vectors corresponding to each node, the geographic similarity between nodes is calculated using the Gaussian kernel function; A normalized Laplace matrix is constructed based on the geographical similarity between nodes. The normalized Laplace matrix is then decomposed into features, and the top K smallest eigenvalues from the decomposed features are selected to form the feature vector U. K-means clustering is performed on the row vectors of feature vector U to obtain K geographic attribute-topologically coupled subgraphs.
4. The carbon dioxide distribution prediction method as described in claim 1, characterized in that, The spatial component model includes a graph attention network, which is used to perform intra-cluster enhancement on each subgraph to obtain node spatial features, including: A linear transformation is performed on the geographic features of nodes in each subgraph, and a dual-modal attention mechanism based on geographic distance and intra-cluster similarity is used to calculate the attention weights between nodes on the linearly transformed features. The attention weights are normalized to obtain normalized attention weights; Multi-head information aggregation is performed on the normalized attention weights to obtain node space features.
5. The carbon dioxide distribution prediction method as described in claim 4, characterized in that, The dual-modal attention mechanism, which employs both geographical distance and intra-cluster similarity, calculates the attention weights between nodes for the linearly transformed features. The formula is as follows: In the formula, W is the shared parameter matrix, a is the attention vector, and h i and h j Let be the geographic feature vectors of node i and node j, respectively, and λ be the intra-cluster enhancement intensity control coefficient. Here, β is the cluster indicator function, d is the distance attenuation coefficient, and d is the distance attenuation coefficient. ij Represents geographical distance, LeakyReLU represents linear transformation, and exp represents exponential function. This represents the influence weight of node j on node i.
6. The carbon dioxide distribution prediction method as described in claim 1, characterized in that, The spatial component model further includes a first adaptive gating, wherein the dynamic projection of node spatial features onto the time series space and fusion with the historical CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes includes: After transposing the node spatial features, project them into the time series space and align them with the feature dimensions of the historical dynamic CO2 concentration series to obtain the features. Features are processed through the first adaptive gating. and historical dynamic CO2 concentration sequence By fusing the data, we obtain the spatiotemporal joint features corresponding to the nodes.
7. The carbon dioxide distribution prediction method as described in claim 6, characterized in that, The node spatial features are transposed and projected into the time series space, then aligned with the feature dimensions of the historical dynamic CO2 concentration series to obtain the features. include: The node spatial features are transposed to obtain the transpose vector; The transposed vector is projected onto the time series space and aligned with the feature dimensions of the historical dynamic CO2 concentration series to obtain the features. The formula is expressed as: In the formula, W time Generate the time basis vector generation matrix, h′ i_tanspose Let b be the transpose vector. time Here, 'Bias' represents the bias value, and 't' represents the time position encoding. This is a historical dynamic CO2 concentration sequence.
8. The carbon dioxide distribution prediction method as described in claim 6, characterized in that, The features are accessed through a first adaptive gating. and historical dynamic CO2 concentration sequence By performing fusion, the spatiotemporal joint features corresponding to each node are obtained, and the formula is expressed as: In the formula, W represents the intermediate state obtained after the spatial dimension fusion features at time t are passed through a gating unit. g h′ is the fusion ratio control coefficient. i For the node space features, b g The added bias value, where σ represents the Sigmoid function. It is a spatiotemporal joint feature.
9. The carbon dioxide distribution prediction method as described in claim 1, characterized in that, The process of using a time component model to process the spatiotemporal joint features corresponding to each node and predicting the CO2 distribution value of each node at future time steps includes: The spatiotemporal joint feature tensor, composed of the spatiotemporal joint features corresponding to each node, is renormalized to obtain a 2D matrix; Multi-scale temporal convolutional layers are used to process the 2D matrix to obtain features at different time scales; Local features are obtained by concatenating features from different time scales, and global self-attention mechanism is used to process the local features to obtain global features. A second adaptive gating method is used to fuse local and global features to obtain fused features; A multi-step predictive decoder is used to decode the fused features, and the prediction step size is gradually expanded to obtain the CO2 distribution value of each node in the future time step.
10. The carbon dioxide distribution prediction method as described in claim 9, characterized in that, The spatiotemporal joint feature tensor, composed of the spatiotemporal joint features corresponding to each node, is reorganized to obtain a 2D matrix, expressed by the formula: In the formula, X seq Let Z represent a 2D matrix, T represent the spatiotemporal joint feature tensor, N represent the time step, and d represent the total number of nodes in the power grid. Let T represent a vector space with dimensions T×(N·d).
11. The carbon dioxide distribution prediction method according to any one of claims 1 to 10, characterized in that, Before predicting the CO2 distribution value for each node's future time step, the method further includes: To construct a dataset, historical observation sequence data, predicted actual CO2 concentration values for all nodes at the predicted time step, and a power grid topology map with geographic attributes are obtained. The observation sequence data includes historical dynamic feature sequences and historical CO2 concentration sequences. The spatial component model and the temporal component model are trained using the dataset to obtain trained spatial component models and temporal component models, which can be used to predict CO2 distribution values.
12. The carbon dioxide distribution prediction method as described in claim 11, characterized in that, The historical CO2 concentration sequence includes the CO2 concentration vectors of all nodes at each historical time step; The historical dynamic feature sequence includes a node feature matrix for each historical time step, and the node feature matrix includes the node's temperature feature, humidity feature, power grid load rate, and industrial activity intensity. Wherein, the industrial activity intensity I of node i i The formula for calculating (t) is: In the formula, λ i Q is the node type coefficient. i (t) represents the grid load factor, E i (t) represents the current hourly electricity consumption, E base This serves as the regional benchmark electricity consumption.
13. The carbon dioxide distribution prediction method as described in claim 11, characterized in that, The total loss function used during training is: In the formula, For the total loss function, For node-level prediction loss, Let λ be the spatiotemporal consistency loss, λ be the spatial consistency weight, ∈ be the L2 regularization coefficient, and Θ be all trainable parameters. The L2 norm squared; N is the number of grid nodes, T is the input time step during training, α is the hyperparameter, and c i,t Let be the actual value of the i-th power grid node at time t. Let be the predicted value of the i-th power grid node at time t; E represents the set of power transmission paths. Let be the predicted value of the j-th power grid node at time t, where t is the time.
14. A carbon dioxide distribution prediction system, characterized in that, include: The topology processing module is used to obtain a power grid topology map that incorporates geographical attributes, and to perform spectral clustering on the power grid topology map to obtain several sub-maps that are coupled with geographical attributes and topology. The spatial modeling module is used to perform intra-cluster enhancement on each subgraph using a spatial component model to obtain node spatial features. The node spatial features are then dynamically projected onto the time series space and fused with the historical dynamic CO2 concentration series to obtain the spatiotemporal joint features corresponding to the nodes. The time dynamic modeling and prediction module is used to process the spatiotemporal joint features of each node using a time component model, and predict the CO2 distribution value of each node in the future time step.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the carbon dioxide distribution prediction method as described in any one of claims 1-13.
Citation Information
Patent Citations
Park carbon emission diagram neural network prediction method and system considering weather factors
CN117132129A
High-temporal-spatial-resolution electric power carbon emission factor calculation method and system and readable storage medium
CN120106369A