Urban carbon emission regression prediction method

By employing gridding and multi-directional projection methods in urban carbon emission prediction, high-dimensional spatial embedding features are generated and distance-gated masks are introduced, which solves the problems of insufficient spatial representation and insufficient autocorrelation in existing technologies, and achieves high-precision and robust carbon emission prediction.

CN121809781APending Publication Date: 2026-04-07JIANGNAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-09
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing urban carbon emission prediction methods suffer from insufficient spatial representation, inability to effectively characterize spatial anisotropy and spatial nonstationarity, inadequate modeling of spatial autocorrelation, and weak model interpretability, resulting in low prediction accuracy and poor robustness.

Method used

By dividing the study area into uniform grids, constructing spatial relationships based on the grid center point, calculating the coordinate deviation vector from the city's latitude and longitude coordinates to the grid center point and performing multi-directional projection, high-dimensional spatial embedding features are generated. Combining spatial distance gating masks and attention mechanisms, the influence differences between nearest and distant neighbors are explicitly reflected. Fully connected layers and convolutional neural networks are used for model training.

Benefits of technology

It achieves a complete representation of the spatial characteristics of the entire domain, improves the prediction stability and accuracy of sparse sample regions, significantly improves the prediction accuracy and robustness of urban carbon emissions, and maintains the interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809781A_ABST
    Figure CN121809781A_ABST
Patent Text Reader

Abstract

The invention relates to the cross technical field of geographic information science and environmental science, in particular to an urban carbon emission regression prediction method, which comprises the following steps: acquiring urban annual statistical data as original characteristics, and acquiring corresponding carbon dioxide emission; dividing a city latitude and longitude extreme value range into uniform grids, and calculating a coordinate deviation vector and an Euclidean distance from the city to a grid center point; carrying out vector projection on the deviation vector along three unit directions which form 120 degrees with one another, and combining geometric progression spatial frequency coding to generate a spatial embedded feature map; flattening the feature map, obtaining an original attention score through a full connection layer, and combining with spatial distance gating mask screening and merging to obtain a weighted feature; and splicing the weighted features and the original features to obtain an enhanced feature map, training the model, obtaining a carbon emission prediction model, inputting the enhanced feature map of the city to be predicted, and obtaining a carbon emission prediction value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of geographic information science and environmental science, and in particular to a method for predicting urban carbon emissions based on regression. Background Technology

[0002] Existing technologies for predicting urban carbon emissions still have many limitations and cannot meet the needs of practical applications. Specifically, these limitations include: Spatial representation limitations due to uneven sample distribution: Existing point-based neural network models typically calculate spatial proximity directly based on discrete observation sample points. However, real-world observation data (such as weather stations and city centers) are often unevenly distributed. Relying solely on a limited and unevenly distributed set of sample points to construct spatial relationships cannot fully represent the global spatial characteristics of the entire study area, leading to highly unstable predictions in sparsely populated regions.

[0003] Ignoring prediction bias caused by spatial anisotropy: Traditional geographic weighted regression (GWR) typically uses isotropic kernel functions, such as Gaussian kernels, whose inputs depend only on Euclidean distance. Since distance is a scalar, the model cannot distinguish between "5 kilometers due north" and "5 kilometers due east." However, influenced by physical geographical factors such as topography, road network alignment, and monsoon direction, as well as socio-economic factors such as the distribution of economic zones, the spatial diffusion and correlation of carbon emissions often exhibit significant directionality. Traditional methods fail to capture this anisotropy, leading to prediction bias.

[0004] Difficulty in handling spatial nonstationarity: The relationship between carbon emissions and influencing factors (such as GDP and population) varies with spatial location. Existing deep learning methods often lack high-frequency feature mapping mechanisms for geographic coordinates when handling such geographic regression tasks. Due to the "spectral bias" inherent in neural networks, without specific frequency encoding, the model tends to fit low-frequency smooth functions, making it difficult to accurately capture the spatial nonstationar features of high-frequency sharp changes at coordinate points, resulting in insufficient fitting ability for local emission hotspots.

[0005] Insufficient spatial autocorrelation modeling: Existing "black box" deep learning models often fail to explicitly incorporate the first law of geography, that is, they cannot accurately distinguish the essential difference in the influence weight of "near neighbors" and "distant neighbors" on the current node within the deep network, resulting in a lack of interpretability in a geographical sense.

[0006] Weak interpretability of model parameters: Many deep learning models adopt a "black box" prediction mode and cannot provide specific contribution coefficients of each driving factor to carbon emissions like traditional regression models.

[0007] In summary, existing urban carbon emission prediction methods generally suffer from insufficient spatial representation, inability to effectively characterize spatial anisotropy and spatial nonstationarity, inadequate modeling of spatial autocorrelation, and weak model interpretability, making it difficult to achieve high-precision and robust urban carbon emission predictions. Therefore, there is an urgent need in the industry for an urban carbon emission regression prediction method that can fully integrate spatial geographical features, enhance the ability to express spatial features, and combine prediction accuracy with interpretability. Summary of the Invention

[0008] Therefore, the technical problem to be solved by the present invention is to overcome the problem that the prediction accuracy and robustness of urban carbon emissions are low due to insufficient spatial representation of features in the prior art.

[0009] To address the aforementioned technical problems, this invention provides a method for predicting urban carbon emissions regression, comprising: Obtain various urban statistical data for each city within a preset annual range, as the original characteristics of each city, and obtain the corresponding urban carbon dioxide emissions for each original characteristic. The area enclosed by the extreme values ​​of the latitude and longitude coordinates of each city is divided into uniform grid regions, and the coordinates of the center point of each grid are obtained; the coordinate deviation vector and Euclidean distance of the latitude and longitude coordinates of each city to the center point of each grid are calculated. Project the coordinate deviation vectors of the latitude and longitude coordinates of each city to the center point of each grid along three unit direction vectors that are 120° apart, and obtain the corresponding three projection modulus scalars. Multiple spatial frequencies with geometrical distribution are preset. Based on sine and cosine functions, the three projection modulus scalars are encoded into a high-dimensional feature to generate spatial embedding feature vectors of each city in each grid, forming spatial embedding feature maps of each city. These are flattened and converted into feature sequences, which are then input into a fully connected layer and mapped to query vectors, key vectors, and value vectors to obtain the original attention scores of each city. Based on the Euclidean distance from the latitude and longitude coordinates of each city to the center point of each grid and the preset distance threshold, a spatial distance gating mask matrix for each city is generated. The original attention scores are filtered and merged to obtain a comprehensive attention score, which is then normalized and weighted to obtain the attention weighted features of each city. The attention-weighted features of each city are concatenated with the original features along the channel dimension and then fused to obtain an enhanced spatial context feature map. Using the original features and enhanced spatial context feature maps of each city as input, and their corresponding carbon dioxide emissions as the true labels, the model is trained to obtain a carbon emission prediction model. The original features and enhanced spatial context feature maps of the city to be predicted are input to obtain the corresponding carbon emission prediction values.

[0010] Preferably, the urban statistical data includes: total urban population, per capita GDP, passenger volume, freight volume, per capita electricity, gas, LPG consumption and per capita green space area.

[0011] Preferably, after obtaining various urban statistical data for each city within a preset annual range, the statistical data for each city is Z-Score standardized to obtain the corresponding standardized urban statistical data, which constitutes the original features of each city.

[0012] Preferably, the calculation of the coordinate deviation vector and Euclidean distance between the latitude and longitude coordinates of each city and the center point of each grid includes: No. The latitude and longitude coordinates of each city to the first Line 1 The coordinate deviation vector of the center point of the column grid , represented as: ; No. The latitude and longitude coordinates of each city to the first Line 1 Euclidean distance of the center point of the column grid , represented as: ; in, Indicates the first The latitude and longitude coordinates of each city to the first Line 1 The longitude and latitude coordinate deviations of the center point of the grid column. Indicates the first The latitude and longitude coordinates of each city Indicates the first Line 1 The latitude and longitude coordinates of the center point of the grid in the column; , Indicates the total number of cities; , This represents the total number of rows in a uniform grid region; , This indicates the total number of columns in a uniform grid region.

[0013] Preferably, the coordinate deviation vectors of the latitude and longitude coordinates of each city from the center point of each grid are projected along three unit direction vectors that are 120° apart, respectively, to obtain the corresponding three projection modulus scalars, including: Obtain three unit direction vectors that are 120° apart, represented as follows: , , ; No. The latitude and longitude coordinates of each city to the first Line 1 The coordinate deviation vector of the center point of the column grid In the Unit direction vector Projection scalar on , represented as: ; in, This represents the direction index of the unit direction vector. ; This represents the dot product of vectors.

[0014] Preferably, multiple spatial frequencies distributed geometrically are preset, and based on sine and cosine functions, the three projection modulus scalars are encoded into a high-dimensional feature to generate spatial embedding feature vectors for each city in each grid, represented as: ; in, Indicates the first The city in the Line 1 The spatial embedding feature vector of the grid in the column; The first term in the set of spatial frequencies that exhibits a geometrical series distribution Spatial frequency, , This represents the total number of frequencies in a spatial frequency set that exhibits a geometrical series distribution. This indicates a splicing operation along the channel. Represents the sine function. This represents the cosine function.

[0015] Preferably, spatial embedding feature maps for each city are generated, flattened into feature sequences, input into a fully connected layer, and mapped to query vectors, key vectors, and value vectors to obtain the original attention scores for each city, including: The first The spatial embedding feature maps of each city are flattened in the spatial dimension to obtain feature sequences; The feature sequence is input to the fully connected layer and mapped to a query vector. Key vector AND value vector , construct the first Original attention scores for each city , represented as: ; in, This represents the feature dimension of the attention head in a fully connected layer; , This indicates the total number of cities.

[0016] Preferably, based on the Euclidean distance from the latitude and longitude coordinates of each city to the center point of each grid and a preset distance threshold, a spatial distance gating mask matrix for each city is generated. The original attention scores are then filtered and merged to obtain a comprehensive attention score, including: If the first The latitude and longitude coordinates of each city to the first Line 1 If the Euclidean distance between the center points of the grid in a column is less than a preset distance threshold, then its local mask value is set. =1, otherwise =0; Based on the The local mask values ​​of each city for all grid center points form the first... Local mask matrix of a city ; If the first The latitude and longitude coordinates of each city to the first Line 1 If the Euclidean distance between the center points of the grid in a column and a preset distance threshold is not less than the global mask value, then set its global mask value. =1, otherwise =0; Based on the The global mask values ​​of each city for all grid center points form the first... Global mask matrix of each city ; Using local and global mask matrices, the original attention score is adjusted. Perform a weighted summation to obtain the first... The city's overall attention score , represented as: ; in, This indicates element-wise multiplication. This indicates matrix addition.

[0017] Preferably, a comprehensive attention score is obtained, and then normalized and weighted to obtain the attention weighted features of each city, including: For the The comprehensive attention scores of each city are normalized to obtain an attention weight matrix with values ​​in the range of [0,1]. The value vector is weighted and aggregated using the attention weight matrix to obtain the first... Attention-weighted characteristics of individual cities , represented as: ; in, Indicates the first The weight matrix corresponding to each attention head Indicates the first The value vector corresponding to each attention head , This represents the total number of attention heads in the fully connected layer.

[0018] Preferably, the original features and enhanced spatial context feature maps of each city are used as input, and their corresponding city carbon dioxide emissions are used as the true labels to train the model and obtain a carbon emission prediction model, including: Based on the original characteristics of each city and the corresponding urban carbon dioxide emissions, the benchmark global regression coefficient vector is pre-calculated using the ordinary least squares method. With global truncation ; For each city, the enhanced spatial context feature map is input into the CNN to obtain the corresponding global spatial context vector. and with original features Concatenate the vectors to obtain the combined feature vectors; The combined feature vector is input into a fully connected layer network to predict the residual between the global regression coefficient vector and the global cutoff, which is expressed as: ; Global regression coefficient vector based on benchmark With global truncation By superimposing the predicted global regression coefficient vector with the globally truncated residuals, the effective regression parameters can be obtained. With effective cutoff parameters , represented as: , ; A linear regression calculation is performed based on the effective regression parameters and the effective cutoff parameters to obtain the carbon emission prediction model, which is expressed as follows: ; in, This represents the residual of the global regression coefficient vector. Indicates the global truncation residual. This represents a multilayer perceptron. This indicates a splicing operation along the channel; This represents the predicted carbon emissions.

[0019] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:

[0020] The urban carbon emission regression prediction method described in this invention divides the study area into uniform grids and constructs spatial relationships based on the grid center points, thereby eliminating the dependence on the distribution of discrete urban sample points, eliminating the impact of sampling bias on model stability, eliminating the negative impact of uneven distribution of original data on model stability, fully characterizing the spatial features of the entire domain, improving the prediction stability of sparse sample areas, and achieving balanced capture of the impact of the entire domain space.

[0021] Meanwhile, this invention abandons the traditional approach of using only distance scalars, maps irregular sample points onto regular grids, calculates the coordinate deviation vector between the point to be predicted and all grid center points, and accurately identifies the anisotropic characteristics of carbon emissions distributed along specific directions through vector projection. It constructs a matrix-like input feature suitable for convolutional neural network processing and introduces directional information, laying a physical foundation for subsequent model recognition of spatial anisotropy.

[0022] This invention enhances the ability to capture local spatially drastic features through multi-scale spatial frequency coding and spatial embedding feature maps, overcoming the shortcomings of traditional deep learning models that are prone to learning low-frequency smooth features and are insufficient for fitting local emission hotspots. It also solves the problem of neural networks struggling to fit coefficients of large spatial variations. Furthermore, by using spatial distance gating masks and attention mechanisms, it explicitly reflects the difference in the impact of nearest and distant neighbors on carbon emissions, ensuring that the model's internal weights conform to geographical laws, improving the rationality of spatial relationship modeling, and further guaranteeing the robustness of urban carbon emission prediction. Attached Figure Description

[0023] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:

[0024] Figure 1 This is a flowchart of the steps in the urban carbon emission regression prediction method of the present invention. Detailed Implementation

[0025] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0026] Reference Figure 1 The flowchart of the urban carbon emission regression prediction method of the present invention is shown below, and the specific process is shown in steps S101 to S107.

[0027] S101: Obtain various urban statistical data for each city within a preset annual range, as the original characteristics of each city, and obtain the corresponding urban carbon dioxide emissions for each original characteristic.

[0028] Specifically, various urban statistical data of the target region within a preset annual period are collected to construct a set of independent variables. ,in The indicators include total population, GDP per capita, passenger traffic, freight traffic, electricity, gas, LPG consumption per capita, and green space per capita; the dependent variable is selected. This represents the total carbon dioxide emissions of the city.

[0029] All input features corresponding to each city are Z-Score standardized to eliminate the influence of units, and are expressed as follows: ; in, Indicates the first of the input features The standardized feature values ​​of each feature; Indicates the first of the input features The original features of each feature; Indicates the first of the input features The mean of each feature across all samples; Indicates the first of the input features The standard deviation of each feature.

[0030] This embodiment mixes data from different years to construct an observation dataset. , The total number of samples, For the first The city geographic coordinates corresponding to each sample .

[0031] S102: Divide the area bounded by the extreme values ​​of the latitude and longitude coordinates of each city into a uniform grid region, and obtain the coordinates of the center point of each grid; calculate the coordinate deviation vector and Euclidean distance between the latitude and longitude coordinates of each city and the center point of each grid, including: S102-1: Based on the extreme latitude and longitude ranges of each city, the specifications are divided as follows: Given a uniform grid, calculate the coordinates of the center point of each grid cell. ; S102-2: The The latitude and longitude coordinates of each city to the first Line 1 The coordinate deviation vector of the center point of the column grid , represented as: ; S102-3: The The latitude and longitude coordinates of each city to the first Line 1 Euclidean distance of the center point of the column grid , represented as: ; in, Indicates the first The latitude and longitude coordinates of each city to the first Line 1 The longitude and latitude coordinate deviations of the center point of the grid column. Indicates the first The latitude and longitude coordinates of each city Indicates the first Line 1 The latitude and longitude coordinates of the center point of the grid in the column; , Indicates the total number of cities; , This represents the total number of rows in a uniform grid region; , This indicates the total number of columns in a uniform grid region.

[0032] This embodiment constructs a dimension of The vectorized spatial position matrix.

[0033] This invention addresses the limitations of spatial representation caused by the uneven spatial distribution of observed samples in existing technologies. It abandons the traditional approach of constructing spatial weights using only the scalar distance between discrete sample points, and instead adopts a gridded global mapping strategy. At the same time, it establishes a standardized uniform grid covering the entire study area, and performs uniform full-coverage sampling of the study area through the grid center point. No matter how sparse or unevenly distributed the original observation data is, this gridded structure ensures that the expression of spatial proximity has global representativeness, effectively eliminating the impact of sampling bias on model stability.

[0034] This invention abandons the traditional approach of using only distance scalars. Through gridded resampling, it eliminates sample distribution bias and the negative impact of uneven original data distribution on model stability, achieving balanced capture of the global spatial influence. It maps irregular sample points onto a regular grid and calculates the coordinate deviation vector between the point to be predicted and all grid center points. This constructs a matrix-like input feature suitable for convolutional neural network processing and introduces directional information, laying a physical foundation for subsequent models to identify spatial anisotropy.

[0035] S103: Project the coordinate deviation vectors of the latitude and longitude coordinates of each city to the center point of each grid along three unit direction vectors that are 120° apart, and obtain the corresponding three projection modulus scalars.

[0036] Specifically, spatial anisotropy and non-stationarity features are extracted using a multi-directional, multi-scale Fourier feature encoder; defining... Unit direction vectors that are 120 degrees apart ( ), respectively represented as: ; ; ; Calculate the coordinate deviation vector scalar projection modulus in the above three directions , represented as: , ; in, Represents the vector dot product; subscript Indicates the sample number. Represents grid coordinates, Indicates the direction index.

[0037] This invention utilizes multiple unit direction vectors at specific angles to project the input coordinate deviation vector onto different directions. This enables the model to distinguish spatial dependencies with the same distance but different orientations, perceiving the differences in spatial influence from different orientations, thereby accurately modeling anisotropy. This invention introduces Fourier feature mapping, using the frequency of a geometric series distribution to perform sine / cosine encoding on the coordinate projection, mapping low-dimensional coordinates to a high-dimensional frequency space. This overcomes the spectral bias of neural networks, enabling them to accurately fit local abrupt changes in regression coefficients in space and addressing non-stationarity.

[0038] S104: Preset multiple spatial frequencies distributed in a geometric series. Based on the sine and cosine functions, encode the three projection modulus scalars into a high-dimensional feature, generate spatial embedding feature vectors of each city in each grid, form spatial embedding feature maps of each city, flatten them into feature sequences, input them into a fully connected layer, map them into query vectors, key vectors and value vectors, and obtain the original attention scores of each city.

[0039] Specifically, in order to capture spatial nonstationarity, a setting is defined that includes The set of spatial frequencies of a geometric series distribution Using sine and cosine functions to determine the projection modulus The feature vector is expanded to a high-dimensional feature and encoded to generate a spatially embedded feature vector. The calculation formula is as follows: ; in, Indicates the first A sample in the grid Spatial embedding feature vector at the location; This indicates a channel splicing operation; This represents the number of projection directions. This represents the number of frequencies.

[0040] Based on the spatial embedding feature vectors of each city across all grid points, a spatial embedding feature map is constructed for each city; at this point, the feature channel dimension of each grid point is... Expanded to The final output is a spatial embedding feature map. The dimension is .

[0041] Specifically, the spatially embedded feature map is flattened in the spatial dimension and reshaped into a feature sequence. , dimension , where the sequence length ;Will Input fully connected layer mapped to query vector Key vector AND value vector , feature dimensions Split into There are 1 attention head, and each head has 1 dimension. .at this time The dimension becomes .

[0042] Among them, constructing the first Original attention scores for each city , represented as: ; in, This represents the feature dimension of the attention head in the fully connected layer.

[0043] S105: Based on the Euclidean distance from the latitude and longitude coordinates of each city to the center point of each grid and a preset distance threshold, a spatial distance gating mask matrix for each city is generated. The original attention scores are filtered and merged to obtain a comprehensive attention score, which is then normalized and weighted to obtain the attention weighted features of each city, including: S105-1: Based on observed sample points latitude and longitude coordinates to the grid center point Euclidean distance and preset distance threshold Generate a spatial distance gate mask matrix, including: Local mask matrix :when At that time, the elements in the matrix It is 1 if it is true, otherwise it is 0; Global mask matrix :when At that time, the elements in the matrix It is 1 if it is true, otherwise it is 0; S105-2: Using local and global mask matrices to adjust the original attention score Perform a weighted sum to filter out invalid connections, and add the scores of the local flow and the global flow to obtain the result. The overall attention score of each city is expressed as: ; in, This indicates element-wise multiplication; S105-3: Regarding the first The comprehensive attention scores of each city are normalized to obtain an attention weight matrix with values ​​in the range of [0,1]. S105-4: Use the attention weight matrix to perform weighted aggregation on the value vector to obtain the first... Attention-weighted characteristics of individual cities , represented as: ; in, Indicates the first The weight matrix corresponding to each attention head Indicates the first The value vector corresponding to each attention head , This represents the total number of attention heads in the fully connected layer.

[0044] After this step, the feature dimension is changed from... Restore to The overall dimension of the output sequence is .

[0045] To implement the principle of spatial autocorrelation, this invention designs a dual masking mechanism based on a distance threshold; the local mask only activates nearest neighbor nodes whose geographical distance is less than the threshold to extract strong autocorrelation features; the global mask activates distant nodes to extract background heterogeneity features; through this mechanism, the model follows the first law of geography when aggregating features.

[0046] S106: The attention-weighted features of each city are concatenated with the original features along the channel dimension and then fused to obtain an enhanced spatial context feature map.

[0047] Specifically, in order to preserve the original spatial coding information, the original feature sequence is... With attention-weighted features The channels are concatenated along the channel dimension and then fused using a linear layer and activation function to reduce the dimensionality of the channels back to... The enhanced spatial context feature map is obtained. Its dimensions are .

[0048] S107: Using the original features and enhanced spatial context feature maps of each city as input, and their corresponding city carbon dioxide emissions as the true labels, the model is trained to obtain a carbon emission prediction model. The original features and enhanced spatial context feature maps of the city to be predicted are input to obtain the corresponding predicted carbon emission values, including: S107-1: Before model training, utilize the previously constructed training set data (raw features) and tags The global regression coefficient vector is pre-computed using ordinary least squares (OLS). and global intercept These two parameters remain fixed during subsequent neural network training, serving as a benchmark for physical statistical laws. S107-2: Enhance the spatial context feature map The input is a three-layer convolutional neural network (CNNEncoder); each layer contains convolution, batch normalization, and activation functions, and performs max pooling downsampling to extract deep spatial features. Global average pooling is then applied to the feature map of the last layer to reduce the spatial dimension. Compress to This yields the global space context vector. , dimension This vector aggregates the spatial impact information of the entire grid region on the current prediction point; S107-3: Transfer the global space context vector Compared with the original features of the sample The combined feature vector is concatenated and input into a fully connected layer network to predict the residuals of the regression coefficients. The calculation formula is as follows: ; in, Represents the residuals of the regression coefficients for each feature; The residual represents the intercept; Represents a multilayer perceptron; S107-4: Using pre-calculated global OLS coefficients and intercept Using this as a baseline, the predicted residuals are superimposed to obtain location-specific dynamic parameters, expressed as: ; ; in, This represents the effective regression coefficient that incorporates spatial location information; Indicates the effective intercept; S107-5: Using dynamic coefficients to perform linear regression calculations to obtain the final carbon emission prediction value. , represented as: .

[0049] This invention employs an architecture combining a global OLS benchmark with CNN correction. It utilizes a multi-layer convolutional network to extract deep spatial features, compresses them into spatial context vectors using global average pooling, and predicts the residual terms of regression coefficients through a fully connected network. Using the global OLS coefficients as a benchmark, the residual terms are superimposed to obtain dynamic regression coefficients, achieving high-precision and interpretable predictions. This invention balances deep learning with interpretability, leveraging the efficiency of CNNs in processing grid data while retaining the interpretability of geographically weighted regression (GWR) for factor contributions.

[0050] This invention addresses the problems of existing carbon emission prediction models neglecting spatial directional differences and failing to capture high-frequency spatial variations. First, it constructs an urban spatial carbon emission dataset. Then, using a multi-directional, multi-scale Fourier feature encoder, it calculates the coordinate difference vector between the point to be predicted and a reference grid point and performs multi-directional projection to preserve spatial directional information and extract spatial anisotropy features. Simultaneously, it utilizes multi-frequency Fourier mapping to overcome spectral bias and capture spatial non-stationarity. A distance-aware spatial attention mechanism is introduced, explicitly modeling spatial autocorrelation based on geographic distance masks. Finally, a neurogeographically weighted regression architecture is employed, combining global OLS priors with local weights generated by deep learning for prediction. This invention, through vectorization of multi-source data and innovative deep learning spatial coding techniques, coupled with deep learning and spatial statistics theory, effectively solves the problem of traditional models neglecting directional differences and high-frequency spatial variations, significantly improving prediction accuracy while ensuring model interpretability.

[0051] Based on the above embodiments, in this embodiment of the invention, the mean squared error (MSE) is used as the loss function, and the Adam optimizer and learning rate decay strategy are used to train the model until the loss function converges, thus obtaining the urban carbon emission prediction model.

[0052] This embodiment uses the prediction model proposed in this invention, traditional OLS prediction, traditional GWR model prediction, and GNNWR neural network prediction model to predict carbon emission datasets and compares the predictions with the actual values. To quantitatively evaluate the predictive performance of the model proposed in this invention, this embodiment selects four common evaluation metrics: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), and Coefficient of Determination. .

[0053] The definitions and calculation formulas for each indicator are as follows: Mean Absolute Error (MAE): Reflects the average level of error between predicted and actual values. The formula is: ; Root Mean Square Error (RMSE): This measure squares the error, amplifying the impact of larger errors and better reflecting the model's robustness. The formula is: ; Mean Absolute Percentage Error (MAPE): Reflects the magnitude of relative error, and is expressed by the formula: ; Coefficient of determination This reflects the model's ability to explain data variation; a value closer to 1 indicates a better fit. The formula is: ;

[0054] in, The number of samples in the test set. For the first The actual carbon emissions of each sample For model predictions, This is the average of the true values.

[0055] Table 1. Prediction Comparison Results

[0056] Table 1 presents the performance evaluation metrics of the traditional OLS model, the traditional GWR model, the GNNWR geographic neural network weighted regression model, and the method of this invention in the target prediction task. As shown in Table 1, the method proposed in this invention achieves the best performance on all evaluation metrics. In summary, the method of this invention has more accurate prediction performance and stronger fitting ability in this prediction task, and can more accurately predict the spatial distribution characteristics of urban carbon emissions.

[0057] The urban carbon emission regression prediction method described in this invention divides the study area into uniform grids and constructs spatial relationships based on the grid center points. This eliminates the dependence on the distribution of discrete urban sample points, removes the impact of sampling bias on model stability, and eliminates the negative impact of uneven distribution of original data on model stability. It can fully characterize the spatial features of the entire domain, improve the prediction stability of sparse sample areas, and achieve a balanced capture of the spatial influence of the entire domain. Simultaneously, this invention abandons the traditional approach of using only distance scalars. It maps irregular sample points onto a regular grid, calculates the coordinate deviation vector between the point to be predicted and all grid center points, and accurately identifies the anisotropic features of carbon emissions distributed along specific directions through vector projection. This constructs a matrix-like input feature suitable for convolutional neural network processing and introduces directional information, laying a physical foundation for subsequent model recognition of spatial anisotropy. Furthermore, this invention enhances the ability to capture local spatially drastic features through multi-scale spatial frequency encoding and spatial embedding feature maps. This overcomes the shortcomings of traditional deep learning models, such as their susceptibility to learning low-frequency smooth features and insufficient fitting of local emission hotspots, and solves the problem of neural networks struggling to fit spatially drastic change coefficients. Furthermore, by using spatial distance gating masks and attention mechanisms, the differences in the impact of nearest and far neighbors on carbon emissions are explicitly reflected, making the weights within the model conform to geographical laws, improving the rationality of spatial relationship modeling, and further ensuring the robustness of urban carbon emission prediction.

[0058] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0059] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0060] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0061] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0062] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for predicting urban carbon emissions based on regression, characterized in that, include: Obtain various urban statistical data for each city within a preset annual range, as the original characteristics of each city, and obtain the corresponding urban carbon dioxide emissions for each original characteristic. The area enclosed by the extreme values ​​of the latitude and longitude coordinates of each city is divided into uniform grid regions, and the coordinates of the center point of each grid are obtained; the coordinate deviation vector and Euclidean distance of the latitude and longitude coordinates of each city to the center point of each grid are calculated. Project the coordinate deviation vectors of the latitude and longitude coordinates of each city to the center point of each grid along three unit direction vectors that are 120° apart, and obtain the corresponding three projection modulus scalars. Multiple spatial frequencies with geometrical distribution are preset. Based on sine and cosine functions, the three projection modulus scalars are encoded into a high-dimensional feature to generate spatial embedding feature vectors of each city in each grid, forming spatial embedding feature maps of each city. These are flattened and converted into feature sequences, which are then input into a fully connected layer and mapped to query vectors, key vectors, and value vectors to obtain the original attention scores of each city. Based on the Euclidean distance from the latitude and longitude coordinates of each city to the center point of each grid and the preset distance threshold, a spatial distance gating mask matrix for each city is generated. The original attention scores are filtered and merged to obtain a comprehensive attention score, which is then normalized and weighted to obtain the attention weighted features of each city. The attention-weighted features of each city are concatenated with the original features along the channel dimension and then fused to obtain an enhanced spatial context feature map. Using the original features and enhanced spatial context feature maps of each city as input, and their corresponding carbon dioxide emissions as the true labels, the model is trained to obtain a carbon emission prediction model. The original features and enhanced spatial context feature maps of the city to be predicted are input to obtain the corresponding carbon emission prediction values.

2. The urban carbon emission regression prediction method according to claim 1, characterized in that, The city's statistical data includes: total urban population, per capita GDP, passenger volume, freight volume, per capita electricity, gas, LPG consumption, and per capita green space area.

3. The urban carbon emission regression prediction method according to claim 1, characterized in that, After obtaining various urban statistical data for each city within a preset annual range, Z-Score standardization is performed on the statistical data of each city to obtain the corresponding standardized urban statistical data, which constitutes the original features of each city.

4. The urban carbon emission regression prediction method according to claim 1, characterized in that, Calculate the coordinate deviation vector and Euclidean distance between the latitude and longitude coordinates of each city and the center point of each grid, including: No. The latitude and longitude coordinates of each city to the first Line 1 The coordinate deviation vector of the center point of the column grid , represented as: ; No. The latitude and longitude coordinates of each city to the first Line 1 Euclidean distance of the center point of the column grid , represented as: ; in, Indicates the first The latitude and longitude coordinates of each city to the first Line 1 The longitude and latitude coordinate deviations of the center point of the grid column. Indicates the first The latitude and longitude coordinates of each city Indicates the first Line 1 The latitude and longitude coordinates of the center point of the grid in the column; , Indicates the total number of cities; , This represents the total number of rows in a uniform grid region; , This indicates the total number of columns in a uniform grid region.

5. The urban carbon emission regression prediction method according to claim 4, characterized in that, Project the coordinate deviation vectors of each city's latitude and longitude coordinates to the center point of each grid along three unit direction vectors that are 120° apart, and obtain the corresponding three projection modulus scalars, including: Obtain three unit direction vectors that are 120° apart, represented as follows: , , ; No. The latitude and longitude coordinates of each city to the first Line 1 The coordinate deviation vector of the center point of the column grid In the Unit direction vector Projection scalar on , represented as: ; in, This represents the direction index of the unit direction vector. ; This represents the dot product of vectors.

6. The urban carbon emission regression prediction method according to claim 5, characterized in that, Multiple spatial frequencies distributed geometrically are preset. Based on sine and cosine functions, the three projection modulus scalars are encoded into a high-dimensional feature, generating spatial embedding feature vectors for each city in each grid, represented as: ; in, Indicates the first The city in the Line 1 The spatial embedding feature vector of the grid in the column; The first term in the set of spatial frequencies that exhibits a geometrical series distribution Spatial frequency, , This represents the total number of frequencies in a spatial frequency set that exhibits a geometrical series distribution. This indicates a splicing operation along the channel. Represents the sine function. This represents the cosine function.

7. The urban carbon emission regression prediction method according to claim 1, characterized in that, Spatial embedding feature maps for each city are generated, flattened into feature sequences, and input into a fully connected layer. These sequences are mapped to query vectors, key vectors, and value vectors. The raw attention scores for each city are then obtained, including: The first The spatial embedding feature maps of each city are flattened in the spatial dimension to obtain feature sequences; The feature sequence is input to the fully connected layer and mapped to a query vector. Key vector AND value vector , construct the first Original attention scores for each city , represented as: ; in, This represents the feature dimension of the attention head in a fully connected layer; , This indicates the total number of cities.

8. The urban carbon emission regression prediction method according to claim 7, characterized in that, Based on the Euclidean distance from the latitude and longitude coordinates of each city to the center point of each grid and a preset distance threshold, a spatial distance gating mask matrix for each city is generated. The original attention scores are then filtered and merged to obtain a comprehensive attention score, including: If the first The latitude and longitude coordinates of each city to the first Line 1 If the Euclidean distance between the center points of the grid in a column is less than a preset distance threshold, then its local mask value is set. =1, otherwise =0; Based on the The local mask values ​​of each city for all grid center points form the first... Local mask matrix of a city ; If the first The latitude and longitude coordinates of each city to the first Line 1 If the Euclidean distance between the center points of the grid in a column and a preset distance threshold is not less than the global mask value, then set its global mask value. =1, otherwise =0; Based on the The global mask values ​​of each city for all grid center points form the first... Global mask matrix of each city ; Using local and global mask matrices, the original attention score is adjusted. Perform a weighted summation to obtain the first... The city's overall attention score , represented as: ; in, This indicates element-wise multiplication. This indicates matrix addition.

9. The urban carbon emission regression prediction method according to claim 7, characterized in that, Obtain a comprehensive attention score, and then normalize and weight it to obtain the attention weighted features for each city, including: For the The comprehensive attention scores of each city are normalized to obtain an attention weight matrix with values ​​in the range of [0,1]. The value vector is weighted and aggregated using the attention weight matrix to obtain the first... Attention-weighted characteristics of individual cities , represented as: ; in, Indicates the first The weight matrix corresponding to each attention head Indicates the first The value vector corresponding to each attention head , This represents the total number of attention heads in the fully connected layer.

10. The urban carbon emission regression prediction method according to claim 1, characterized in that, Using the original features and enhanced spatial context feature maps of each city as input, and their corresponding city carbon dioxide emissions as the ground truth, a carbon emission prediction model is trained to obtain the model, including: Based on the original characteristics of each city and the corresponding urban carbon dioxide emissions, the benchmark global regression coefficient vector is pre-calculated using the ordinary least squares method. With global truncation ; For each city, the enhanced spatial context feature map is input into the CNN to obtain the corresponding global spatial context vector. and with original features Concatenate the vectors to obtain the combined feature vectors; The combined feature vector is input into a fully connected layer network to predict the residual between the global regression coefficient vector and the global cutoff, which is expressed as: ; Global regression coefficient vector based on benchmark With global truncation By superimposing the predicted global regression coefficient vector with the globally truncated residuals, the effective regression parameters can be obtained. With effective cutoff parameters , represented as: , ; A linear regression calculation is performed based on the effective regression parameters and the effective cutoff parameters to obtain the carbon emission prediction model, which is expressed as follows: ; in, This represents the residual of the global regression coefficient vector. Indicates the global truncation residual. This represents a multilayer perceptron. This indicates a splicing operation along the channel; This represents the predicted carbon emissions.

Citation Information

Patent Citations

  • Urban road network emission dynamic evaluation method for large-scale road section scale

    CN119783983A

  • Urban traffic flow space-time distribution prediction method based on multistage road operation information

    CN120088990A

  • Urban people flow prediction method based on urban interest point spatio-temporal data set

    CN120821893A