Carbon emission data management method based on distributed storage
By using distributed storage-based collinearity testing and an improved CNN model to decompose building carbon emission factors, the multi-source heterogeneity and collinearity problems of building carbon emission data were solved, and efficient carbon emission prediction and graded early warning were achieved.
Patent Information
- Application Number
- CN202510708833.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies cannot effectively deal with the multi-source heterogeneity and collinearity problems of building carbon emission data, resulting in low carbon emission prediction accuracy and insufficient early warning capabilities, making it difficult to achieve efficient distributed storage and dynamic management.
A distributed storage-based method is used to decompose the building carbon emission factors into collinear and non-collinear factors through collinearity test and improved CNN prediction model. Combined with linear regression and deep learning algorithms, carbon emissions are predicted and graded early warning is carried out.
It achieves efficient prediction and dynamic management of building carbon emission data, improves prediction accuracy and computing efficiency, and ensures the timely early warning capability of multi-source heterogeneous data.
Smart Images

Figure CN120611287A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of carbon emission data management, and in particular to a carbon emission data management method based on distributed storage. Background Art
[0002] As global climate change intensifies, the building sector, as one of the major sources of carbon emissions, requires accurate management and prediction of carbon emission data, which has become a key link in achieving the goal. Traditional carbon emission management methods mostly rely on centralized data storage architectures, which are difficult to cope with the real-time collection and efficient analysis of massive, multi-source and heterogeneous building carbon emission data. At the same time, the existing STIRPAT-based carbon emission dynamics model has significant limitations in building scenario applications: First, the widespread multicollinearity problem between building carbon emission-related factors such as energy type, equipment efficiency, and space utilization leads to distortion of model parameter estimation and affects prediction accuracy; second, traditional linear regression methods are difficult to effectively capture the implicit multicollinearity relationships in building systems, such as transportation structure and transportation intensity, resulting in insufficient early warning capabilities for sudden carbon emission fluctuations.
[0003] Existing research attempts to improve carbon emission prediction models by introducing machine learning algorithms, but the following issues remain: 1. The storage architecture is not optimized for the data distribution characteristics of building carbon emission factors, resulting in inefficient cross-regional and multi-dimensional data collaborative analysis; 2. A mechanism for identifying collinearity and modeling differentiation between factors has not been established, and mixed modeling of collinear and non-collinear characteristics can easily lead to model overfitting. Therefore, existing technologies are unable to adapt to the distributed storage and dynamic evolution of carbon emission drivers during building operations, resulting in poor predictive management capabilities for carbon emission data.
[0004] Therefore, how to achieve accurate prediction and graded early warning of building carbon emissions through multicollinearity factor classification modeling strategies combined with a hybrid algorithm of deep learning and linear regression is a technical problem that needs to be solved. Summary of the Invention
[0005] To this end, the present invention provides a carbon emission data management method based on distributed storage. Through collinearity testing, it is possible to avoid the distortion of the regression elasticity coefficient caused by the presence of collinear data in the distributed storage data. Through the prediction model based on the improved CNN, it is possible to better adapt to the dynamic changes of the building operation scenario for collinear data, and realize the high-timeliness early warning management of carbon emissions based on distributed storage of multi-source heterogeneous building data.
[0006] To achieve the above objectives, the present invention proposes a carbon emission data management method based on distributed storage, comprising:
[0007] Obtain distributed storage of multiple building carbon emission related factors and building carbon emission data;
[0008] A comprehensive carbon emission kinetic model is constructed based on the plurality of building carbon emission related factors and the building carbon emission data, and the carbon emission kinetic model is tested for collinearity, the building carbon emission related factors are divided into collinear factors and non-collinear factors, and the carbon emission kinetic model is decomposed into collinear sub-carbon emission kinetic models and non-collinear sub-carbon emission kinetic models;
[0009] Substituting the non-collinearity factor and the building carbon emission data into the non-collinear sub-carbon emission dynamics model, and calculating the first elasticity coefficient of the collinear sub-carbon emission dynamics model by a linear regression algorithm;
[0010] Substituting the collinearity factor and the building carbon emission data into the collinear sub-carbon emission dynamics model, and determining the second elasticity coefficient of the non-collinear sub-carbon emission dynamics model through the prediction model based on the improved CNN;
[0011] The comprehensive predicted building carbon emissions of the current building are determined by the collinear sub-carbon emission kinetic model and the non-collinear sub-carbon emission kinetic model, and a graded warning is given to the building based on a comparison result between the comprehensive predicted building carbon emissions and the warning value.
[0012] Furthermore, the prediction model includes an input data preprocessing layer, a feature extraction layer, a channel attention layer, a feature fusion prediction layer, and a constraint layer. The process of determining the second elastic coefficient includes:
[0013] The collinearity factor is subjected to principal component extraction through the data preprocessing layer to generate dimension-reduced time series data;
[0014] Performing multi-scale temporal convolution on the dimension-reduced time series data through a feature extraction layer to generate multi-scale features;
[0015] Calculate the weight coefficient of the multi-scale features through the channel attention layer;
[0016] Splicing and mapping the multi-scale features and the weight coefficients in a feature fusion prediction layer to determine a second temporary elastic coefficient;
[0017] The second temporary elastic coefficient is subjected to activation function logic constraints and time series smoothing constraints through the constraint layer to determine the second elastic coefficient.
[0018] Furthermore, the process of generating dimensionality-reduced time series data includes:
[0019] Performing mean normalization processing on the collinearity factors to generate a dimensionless time series matrix;
[0020] Performing covariance calculation on the dimensionless matrix data to generate a covariance matrix;
[0021] Performing eigendecomposition calculation on the covariance matrix to generate an eigenvector matrix;
[0022] Filter out elements in the eigenvector matrix that are greater than a set value to generate principal components;
[0023] The dimensionless time series matrix and the principal component are multiplied to determine the reduced-dimensional time series data.
[0024] Furthermore, the constraint layer includes a Sigmoid activation function, a negative ReLU activation function, and a temporal convolution. The process of determining the second elastic coefficient by performing activation function logic constraints and temporal smoothing constraints on the second temporary elastic coefficient through the constraint layer includes:
[0025] The second temporary elastic coefficient, which is positively correlated with the building carbon emission-related factor, is positively constrained by a Sigmoid activation function to generate a positive constraint term;
[0026] The second elastic coefficient, which is negatively correlated with the building carbon emission-related factor, is negatively constrained by a negative ReLU activation function to generate a negative constraint term;
[0027] splicing the positive constraint term and the negative constraint term to generate a spliced second elastic coefficient;
[0028] The adjacent time steps of the spliced second elastic coefficient are subjected to proportional constraints with the adjacent time steps of the dimension-reduced time series data through time series convolution to determine the second elastic coefficient.
[0029] Furthermore, the feature fusion prediction layer includes a carbon emission prediction output branch and an elasticity coefficient prediction output branch, and the training optimization process of the prediction model includes:
[0030] The prediction model generates a predicted value of a second elastic coefficient through an elastic coefficient prediction output branch;
[0031] Substituting the predicted value of the second elastic coefficient into the non-collinear sub-carbon emission kinetic model with set learning parameters to determine a carbon emission model predicted value, wherein the learning parameters are determined by carbon emission prediction output branch fitting;
[0032] Constructing a carbon emission prediction loss term based on the mean square error between the carbon emission model prediction value and the actual carbon emission;
[0033] constructing an elastic coefficient loss term based on a mean square error between a predicted value and a true value of the second elastic coefficient;
[0034] Constructing a first regularization term based on the learning parameters of the input data preprocessing layer, the feature extraction layer, and the channel attention layer, constructing a second regularization term based on the learning parameters, constructing a third regularization term based on the parameters of the elastic coefficient prediction output branch, and dynamically weighting and adding the first regularization term, the second regularization term, and the third regularization term to construct a regularization loss term;
[0035] The elastic coefficient loss term, the carbon emission prediction loss term and the regularization loss term are weightedly added to construct a comprehensive loss function, and the prediction model is trained and optimized using the loss function.
[0036] Furthermore, the process of dynamically weighting and adding the first regularization term, the second regularization term, and the third regularization term to construct the regularization loss term includes:
[0037] Calculating a first dynamic weighting coefficient based on the current carbon emission prediction loss term, the current elasticity coefficient loss term, the initial carbon emission prediction loss term, and the initial elasticity coefficient loss term;
[0038] Calculating a second dynamic weighting coefficient based on the current carbon emission prediction loss item and the initial carbon emission prediction loss item;
[0039] Calculating a third dynamic weighting coefficient based on the current elastic coefficient loss term and the initial elastic coefficient loss term;
[0040] The first regularization term and the first dynamic weighting coefficient, the second regularization term and the second dynamic weighting coefficient, and the third regularization term and the third dynamic weighting coefficient are weighted and summed to construct the regularization loss term.
[0041] In the above scheme, channel attention weighting, temporal convolution and principal component analysis dimensionality reduction are used in the improved CNN to eliminate the redundant information of collinearity factors while retaining the temporal characteristics of the data, improving computational efficiency, and reducing the error of the output data through the constraint layer. The prediction accuracy of the model is guaranteed through the collaborative training optimization of the dual output branches.
[0042] Furthermore, the process of determining the collinearity factor and the non-collinearity factor includes:
[0043] Performing logarithmic processing on the comprehensive carbon emission kinetic model to generate a logarithmic carbon emission kinetic model;
[0044] Calculating the coefficient of determination, the adjusted coefficient of determination, and the statistical value of the logarithmic carbon emission kinetic model, eliminating factors for which at least one of the coefficient of determination, the adjusted coefficient of determination, and the statistical value is less than a corresponding threshold, and generating a fitted logarithmic carbon emission kinetic model;
[0045] The variance inflation coefficient of the fitted logarithmic carbon emission kinetic model is calculated. If the variance inflation coefficient is greater than the collinearity limit, the factor corresponding to the variance inflation coefficient is used as the collinearity factor; otherwise, the factor corresponding to the variance inflation coefficient is used as the non-collinearity factor.
[0046] Furthermore, the process of calculating the first elastic coefficient by using a linear regression algorithm includes:
[0047] using the portion of the fitted logarithmic carbon emission kinetic model corresponding to the collinear sub-item as the collinear sub-carbon emission kinetic model;
[0048] A ridge regression analysis is performed on the collinear sub-carbon emission kinetic model to determine the first elastic coefficient.
[0049] Furthermore, the comprehensive carbon emission kinetic model, the collinear sub-carbon emission kinetic model and the non-collinear sub-carbon emission kinetic model are all constructed based on the STIRPAT carbon emission kinetic model, and the building carbon emission related factors include at least industrial structure, public building area, building electricity, building heat and carbon emission quota.
[0050] Furthermore, the InfluxDB time series database is used to store industrial structure, the TimescaleDB time series database is used to store building electricity and building heat, and Redis is used to access and cache carbon emission quotas.
[0051] In the above solution, distributed storage of building carbon emission data, factor screening, model prediction, and multi-database collaborative early warning management are realized.
[0052] Compared with the prior art, the present invention has the following advantages:
[0053] 1. Through collinearity testing, we can avoid the distortion of the regression elasticity coefficient caused by the presence of collinear data in distributed storage. Through the prediction model based on the improved CNN, we can better adapt to the dynamic changes of building operation scenarios for collinear data, and realize the high-timeliness early warning management of carbon emissions based on distributed storage of multi-source heterogeneous building data.
[0054] 2. In the improved CNN, channel attention weighting, temporal convolution and principal component analysis dimensionality reduction are used to eliminate redundant information of collinear factors while retaining the temporal characteristics of the data, improving computational efficiency. The error of the output data is reduced through the constraint layer, and the prediction accuracy of the model is guaranteed through the collaborative training optimization of the dual output branches.
[0055] 3. Realize the distributed storage, factor screening, model prediction and multi-database collaborative early warning management of building carbon emission data. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 Schematic diagram of the process of a carbon emission data management method based on distributed storage according to an embodiment of the present invention;
[0057] Figure 2 Schematic diagram of the use of a prediction model in a carbon emission data management method based on distributed storage according to an embodiment of the present invention;
[0058] Figure 3 Schematic diagram of the training optimization process of the prediction model of the carbon emission data management method based on distributed storage according to an embodiment of the present invention;
[0059] Figure 4 This is a schematic diagram of the process of dividing collinearity factors and non-collinearity factors in the carbon emission data management method based on distributed storage according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.
[0061] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0062] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside", and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0063] Furthermore, it should be noted that, in the description of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0064] like Figures 1 to 4As shown, the present invention provides a carbon emission data management method based on distributed storage, which avoids the distortion of the regression elasticity coefficient due to the presence of collinear data in the distributed storage data through collinearity test, and realizes that the collinear data can better adapt to the dynamic changes of building operation scenarios through the prediction model based on the improved CNN, and realizes the high-timeliness early warning management of carbon emissions based on distributed storage of multi-source heterogeneous building data.
[0065] like Figures 1 to 4 As shown, this embodiment proposes a carbon emission data management method based on distributed storage, including:
[0066] Obtain distributed storage of multiple building carbon emission related factors and building carbon emission data;
[0067] A comprehensive carbon emission kinetic model is constructed based on the plurality of building carbon emission related factors and the building carbon emission data, and the carbon emission kinetic model is tested for collinearity, the building carbon emission related factors are divided into collinear factors and non-collinear factors, and the carbon emission kinetic model is decomposed into collinear sub-carbon emission kinetic models and non-collinear sub-carbon emission kinetic models;
[0068] Substituting the non-collinearity factor and the building carbon emission data into a non-collinear sub-carbon emission dynamics model, and calculating a first elasticity coefficient of the non-collinear sub-carbon emission dynamics model by a linear regression algorithm;
[0069] Substituting the collinearity factor and the building carbon emission data into the collinear sub-carbon emission dynamics model, and determining the second elasticity coefficient of the non-collinear sub-carbon emission dynamics model through the prediction model based on the improved CNN;
[0070] The comprehensive predicted building carbon emissions of the current building are determined by the collinear sub-carbon emission kinetic model and the non-collinear sub-carbon emission kinetic model, and a graded warning is given to the building based on a comparison result between the comprehensive predicted building carbon emissions and the warning value.
[0071] Furthermore, the comprehensive carbon emission kinetic model, the collinear sub-carbon emission kinetic model and the non-collinear sub-carbon emission kinetic model are all constructed based on the STIRPAT carbon emission kinetic model, and the building carbon emission related factors include at least industrial structure, public building area, building electricity, building heat and carbon emission quota.
[0072] Specifically, the comprehensive carbon emission kinetic model, collinear sub-carbon emission kinetic model and non-collinear sub-carbon emission kinetic model based on STIRPAT are as follows:
[0073] Y1=α1X1 β1 X2 β2 …X kβk
[0074] Y2=α2X1 β1 X2 β2 …X m βm
[0075]
[0076] Where Y, Y1, and Y2 represent the comprehensive carbon emission dynamics model, the collinear sub-carbon emission dynamics model, and the non-collinear sub-carbon emission dynamics model, respectively; α1 and α2 represent the model coefficients, respectively; X1, X2…X k Represents collinearity factors, X1, X2…X m Represents non-collinear factors, X1, X2…X n They represent the first to nth building carbon emission related factors, β1…βn represent the elasticity coefficients corresponding to the first to nth building carbon emission related factors, n is preferably 18, X1-X 18 These indicators include GDP, GDP growth, industrial structure, output value of the tertiary industry, population, public building area, public building area, public energy-saving awareness, coal carbon emissions, natural gas carbon emissions, thermal carbon emissions, electricity carbon emissions, electricity consumption, thermal consumption, energy-saving technology progress index, CCER (Chinese Certified Emission Reduction) offset ratio limit, and carbon emission free quota ratio. The building electricity consumption includes electricity carbon emissions and electricity consumption, and the building thermal consumption includes coal carbon emissions, natural gas carbon emissions, thermal carbon emissions, and thermal consumption.
[0077] It is understandable that the aforementioned multiple building carbon emission-related factors are discovered through summarizing relevant research on the STIRPAT model. This embodiment decomposes the elements (economic, social, energy, and technological) in the STIRPAT model based on the actual situation of the research object building and introduces relevant indicators for expansion and determination.
[0078] It is understandable that the aforementioned multiple building carbon emission-related factors are distributedly stored in different databases or have different storage methods. Therefore, this embodiment establishes a technology stack and uses the API gateway layer of the technology stack to obtain multiple building carbon emission-related factors. For example, GDP, GDP increase, industrial structure, and tertiary industry output value in the InfluxDB time series database are obtained through the REST / gRPC interface. The technology stack uses Kubernetes container orchestration to construct a comprehensive carbon emission dynamics model, a collinear sub-carbon emission dynamics model, and a non-collinear sub-carbon emission dynamics model. The deep learning framework TensorFlow is integrated into the technology stack's computing layer, and the improved CNN-based prediction model described in this embodiment is set in TensorFlow. Therefore, this embodiment can achieve efficient acquisition of more than one piece of distributedly stored carbon emission-related data and high-timeliness early warning management.
[0079] Furthermore, the InfluxDB time series database is used to store industrial structure, the TimescaleDB time series database is used to store building electricity and building heat, and Redis is used to access and cache carbon emission quotas.
[0080] Specifically, the collinear sub-carbon emission kinetic model and the non-collinear sub-carbon emission kinetic model are preferably used to predict the carbon emissions of public buildings based on current building carbon emission related factors, determine the first predicted carbon emissions through the collinear sub-carbon emission kinetic model, determine the second predicted carbon emissions through the non-collinear sub-carbon emission kinetic model, weight the first predicted carbon emissions and the second predicted carbon emissions to determine the comprehensive predicted building carbon emissions, and perform graded warnings based on the comparison results of the comprehensive predicted building carbon emissions and the warning value.
[0081] like Figure 2 As shown, further, the prediction model includes an input data preprocessing layer, a feature extraction layer, a channel attention layer, a feature fusion prediction layer and a constraint layer, and the process of determining the second elastic coefficient includes:
[0082] The collinearity factor is subjected to principal component extraction through the data preprocessing layer to generate dimension-reduced time series data;
[0083] Performing multi-scale temporal convolution on the dimension-reduced time series data through a feature extraction layer to generate multi-scale features;
[0084] Calculate the weight coefficient of the multi-scale features through the channel attention layer;
[0085] Splicing and mapping the multi-scale features and the weight coefficients in a feature fusion prediction layer to determine a second temporary elastic coefficient;
[0086] The second temporary elastic coefficient is subjected to activation function logic constraints and time series smoothing constraints through the constraint layer to determine the second elastic coefficient.
[0087] It can be understood that the multi-scale time convolution of the prediction model focuses on the local feature combination of the data rather than the global linear relationship, extracts the features of different positions in the data sequence, reduces the dependence on a single variable, and introduces nonlinear data through the activation function. Therefore, it can solve the impact of collinearity factors on the comprehensive prediction of building carbon emissions. However, for collinear data that is highly correlated with the predicted building carbon emissions, targeted optimization training is required through the loss function of this embodiment to avoid it causing model convergence difficulties or redundant calculations.
[0088] Specifically, the multi-scale time convolution includes a first-branch one-dimensional convolution operation and a second-branch one-dimensional convolution operation. The first-branch one-dimensional convolution operation uses 32 3x3 convolution kernels and ReLU activation functions, and the second-branch one-dimensional convolution operation uses 32 5x5 convolution kernels and ReLU activation functions. The convolution directions are all performed along the time dimension to ensure that during the entire convolution calculation process, the weight of each convolution corresponds to the same collinearity factor, thereby more effectively extracting the features of the time series.
[0089] Specifically, a global average pooling layer and two fully connected layers are sequentially set in the channel attention layer.
[0090] Specifically, the process of splicing and mapping the multi-scale features and the weight coefficients in the feature fusion prediction layer to determine the second temporary elastic coefficient is expressed as:
[0091]
[0092] Where, represents the second temporary elastic coefficient, se(H) represents the weight coefficient output by the channel attention mechanism, Represents multi-scale features, which are the multi-scale features generated by the first collinearity factor through the first branch one-dimensional convolution operation (3 represents the size of the convolution kernel), the multi-scale features generated by the first collinearity factor through the second branch one-dimensional convolution operation (5 represents the size of the convolution kernel), the multi-scale features generated by the second collinearity factor through the first branch one-dimensional convolution operation, and the multi-scale features generated by the second collinearity factor through the second branch one-dimensional convolution operation. Indicates the splicing operation for multi-scale features, Indicates the mapping of perceptron and ReLU activation function for the multi-scale features after the splicing operation.
[0093] Furthermore, the process of generating dimensionality-reduced time series data includes:
[0094] Performing mean normalization processing on the collinearity factors to generate a dimensionless time series matrix;
[0095] Performing covariance calculation on the dimensionless matrix data to generate a covariance matrix;
[0096] Performing eigendecomposition calculation on the covariance matrix to generate an eigenvector matrix;
[0097] Filter out elements in the eigenvector matrix that are greater than a set value to generate principal components;
[0098] The dimensionless time series matrix and the principal component are multiplied to determine the reduced-dimensional time series data.
[0099] Specifically, the above-mentioned standardization process is zero mean (Z-score) standardization. The process of generating dimensionality-reduced time series data adopts the principal component analysis (PCA) process. The process of generating the covariance matrix is expressed as follows:
[0100]
[0101] Where ∑ represents the covariance matrix, N represents the number of samples in the dimensionless time series matrix, T represents the number of time steps in the dimensionless time series matrix, X represents the dimensionless time series matrix, X T Represents the matrix transpose of the dimensionless time series matrix.
[0102] Specifically, the set value is 85% of the cumulative explained variance, and the cumulative explained variance is determined by summing the eigenvalues of all time steps corresponding to the elements of the eigenvector matrix.
[0103] like Figure 2 As shown, further, the constraint layer includes a Sigmoid activation function, a negative ReLU activation function, and a temporal convolution, and the process of determining the second elastic coefficient by performing activation function logic constraints and temporal smoothing constraints on the second temporary elastic coefficient through the constraint layer includes:
[0104] The second temporary elastic coefficient, which is positively correlated with the building carbon emission-related factor, is positively constrained by a Sigmoid activation function to generate a positive constraint term;
[0105] The second elastic coefficient, which is negatively correlated with the building carbon emission-related factor, is negatively constrained by a negative ReLU activation function to generate a negative constraint term;
[0106] splicing the positive constraint term and the negative constraint term to generate a spliced second elastic coefficient;
[0107] The adjacent time steps of the spliced second elastic coefficient are subjected to proportional constraints with the adjacent time steps of the dimension-reduced time series data through time series convolution to determine the second elastic coefficient.
[0108] Specifically, the process of generating negative constraints can be expressed as:
[0109]
[0110] In the formula, β′ represents the negative constraint term, represents the second temporary elastic coefficient, and ReLU represents the ReLU activation function.
[0111] Specifically, the process of generating the second elastic coefficient can be expressed as:
[0112]
[0113] Where β represents the second elastic coefficient, β″ t ,β″ t+1 They represent the concatenated second elastic coefficients at the t-th time step and the t+1-th time step, Cov represents the covariance operation, and ∝ represents the proportional constraint between the covariance on the left and the weighted sum on the right. Represents the weight value generated by the mth temporal convolution (conv), Corr(Z t ,Z t+1 ) represents the correlation value of the reduced-dimensional time series data between the t-th time step and the t+1-th time step, which is calculated by the Pearson Correlation Coefficient.
[0114] like Figure 3 As shown, further, the feature fusion prediction layer includes a carbon emission prediction output branch and an elasticity coefficient prediction output branch, and the training optimization process of the prediction model includes:
[0115] The prediction model generates a predicted value of a second elastic coefficient through an elastic coefficient prediction output branch;
[0116] Substituting the predicted value of the second elastic coefficient into the non-collinear sub-carbon emission kinetic model with set learning parameters to determine a carbon emission model predicted value, wherein the learning parameters are determined by carbon emission prediction output branch fitting;
[0117] Constructing a carbon emission prediction loss term based on the mean square error between the carbon emission model prediction value and the actual carbon emission;
[0118] constructing an elastic coefficient loss term based on a mean square error between a predicted value and a true value of the second elastic coefficient;
[0119] Constructing a first regularization term based on the learning parameters of the input data preprocessing layer, the feature extraction layer, and the channel attention layer, constructing a second regularization term based on the learning parameters, constructing a third regularization term based on the parameters of the elastic coefficient prediction output branch, and dynamically weighting and adding the first regularization term, the second regularization term, and the third regularization term to construct a regularization loss term;
[0120] The elastic coefficient loss term, the carbon emission prediction loss term and the regularization loss term are weightedly added to construct a comprehensive loss function, and the prediction model is trained and optimized using the loss function.
[0121] In the above process, the prediction model can output the carbon emission model prediction value through the carbon emission prediction output branch, ensuring that the prediction result of the elasticity coefficient is consistent with the actual situation.
[0122] Specifically, the comprehensive loss function can be expressed as:
[0123]
[0124] In the formula, L represents the comprehensive loss function, λ1, λ2, and λ3 represent weighted values, represents the carbon emission prediction loss term, Y t 、 Represent the carbon emission model prediction value and actual carbon emission at the tth time step, represents the elastic coefficient loss term, β t 、 They represent the predicted value and true value of the second elastic coefficient at the t-th time step, and R(θ) represents the regularization loss term.
[0125] like Figure 3 As shown, further, the process of dynamically weighting and adding the first regularization term, the second regularization term, and the third regularization term to construct the regularization loss term includes:
[0126] Calculating a first dynamic weighting coefficient based on the current carbon emission prediction loss term, the current elasticity coefficient loss term, the initial carbon emission prediction loss term, and the initial elasticity coefficient loss term;
[0127] Calculating a second dynamic weighting coefficient based on the current carbon emission prediction loss item and the initial carbon emission prediction loss item;
[0128] Calculating a third dynamic weighting coefficient based on the current elastic coefficient loss term and the initial elastic coefficient loss term;
[0129] The first regularization term and the first dynamic weighting coefficient, the second regularization term and the second dynamic weighting coefficient, and the third regularization term and the third dynamic weighting coefficient are weighted and summed to construct the regularization loss term.
[0130] Specifically, the regularization loss term can be expressed as:
[0131] R(θ)=λ s ||θ s || 2 +λ c ||θ c || 2 +λ e ||θ e || 2
[0132] Where R(θ) represents the regularization loss term, ||θ s || 2 、||θ c || 2 、||θ e || 2 Represent the first regularization term, the second regularization term and the third regularization term respectively, λ s ,λ c ,λ e Represent the first dynamic weighting coefficient, the second regularization term and the second dynamic weighting coefficient respectively, θ s ,θ c ,θ e Respectively represent the learning parameters of the input data preprocessing layer, feature extraction layer and channel attention layer, the learning parameters, the learning parameters of the elastic coefficient prediction output branch, || || 2 represents the L2 norm.
[0133] Specifically, the calculation process of the first dynamic weighting coefficient, the second regularization term and the second dynamic weighting coefficient is:
[0134]
[0135] Where λ s ,λ c ,λ e Represent the first dynamic weighting coefficient, the second regularization term and the second dynamic weighting coefficient respectively, L c , L e , L 0 c , L 0 e They represent the current carbon emission prediction loss term, the current elasticity coefficient loss term, the initial carbon emission prediction loss term, and the initial elasticity coefficient loss term, respectively. The initial carbon emission prediction loss term and the initial elasticity coefficient loss term are determined by pre-training with a small amount of data for 5 epochs.
[0136] In the above scheme, channel attention weighting, temporal convolution and principal component analysis dimensionality reduction are used in the improved CNN to eliminate the redundant information of collinearity factors while retaining the temporal characteristics of the data, improving computational efficiency, and reducing the error of the output data through the constraint layer. The prediction accuracy of the model is guaranteed through the collaborative training optimization of the dual output branches.
[0137] like Figure 4 As shown, further, the process of determining the collinearity factor and the non-collinearity factor includes:
[0138] Performing logarithmic processing on the comprehensive carbon emission kinetic model to generate a logarithmic carbon emission kinetic model;
[0139] Calculating the coefficient of determination, the adjusted coefficient of determination, and the statistical value of the logarithmic carbon emission kinetic model, eliminating factors for which at least one of the coefficient of determination, the adjusted coefficient of determination, and the statistical value is less than a corresponding threshold, and generating a fitted logarithmic carbon emission kinetic model;
[0140] The variance inflation coefficient of the fitted logarithmic carbon emission kinetic model is calculated. If the variance inflation coefficient is greater than the collinearity limit, the factor corresponding to the variance inflation coefficient is used as the collinearity factor; otherwise, the factor corresponding to the variance inflation coefficient is used as the non-collinearity factor.
[0141] Specifically, the logarithmic carbon emission kinetic model
[0142] lnY1=lnα1+β1lnX1+β2lnX2+βklnX k
[0143] Where lnY1 represents the logarithmic carbon emission kinetic model, α1 represents the model coefficient, X1, X2…X k represents the collinearity factor, and β1…βk represent the elasticity coefficients corresponding to the first to kth collinearity factors, respectively.
[0144] Specifically, the coefficient of determination (R 2 ) is used to measure the degree to which the model explains the variation of the dependent variable, and the adjusted coefficient of determination (Adjusted R 2 ) is used to avoid falsely increasing the coefficient of determination due to too many dependent variables. The statistical value is preferably Sig.(F). It is used to test whether the model as a whole is significant. The corresponding thresholds are preferably 0.3, 0.3, and 0.5, respectively. Therefore, the coefficient of determination, adjusted coefficient of determination, and statistical value that exceed the threshold can indicate that the model has good predictive ability.
[0145] Specifically, the variance inflation factor (VIF) is used to measure the severity of multicollinearity between independent variables, and the collinearity limit is preferably 0.8.
[0146] Furthermore, the process of calculating the first elastic coefficient by using a linear regression algorithm includes:
[0147] using the portion of the fitted logarithmic carbon emission kinetic model corresponding to the collinear sub-item as the collinear sub-carbon emission kinetic model;
[0148] A ridge regression analysis is performed on the collinear sub-carbon emission kinetic model to determine the first elastic coefficient.
[0149] It should be noted that the combination of the collinear factors has an approximate linear relationship with the building carbon emission data, and the non-collinear factors do not have a linear relationship with the building carbon emission data, such as the square and trigonometric function values of the non-collinear factors. The non-collinear factors cannot be directly detected by traditional linear statistical methods, such as VIF, which will have a negative impact on the linear regression algorithm, resulting in inaccurate prediction data obtained by the linear regression algorithm.
[0150] In this embodiment, collinearity testing is used to avoid distortion of the regression elasticity coefficient caused by the presence of collinear data in distributed storage. The prediction model based on the improved CNN is used to better adapt to the dynamic changes in building operation scenarios for collinear data, and to achieve high-timeliness early warning management of carbon emissions based on distributed storage of multi-source heterogeneous building data. In the improved CNN, channel attention weighting, time series convolution, and principal component analysis dimensionality reduction are used to eliminate redundant information of collinear factors while retaining the time series characteristics of the data, improving computational efficiency. The constraint layer is used to reduce the error of the output data. The dual-output branch collaborative training optimization ensures the prediction accuracy of the model. This realizes the distributed storage, factor screening, model prediction, and early warning generation of multi-database collaborative early warning management of building carbon emission data.
[0151] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
[0152] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A carbon emission data management method based on distributed storage, characterized in that: include: Obtain distributed storage of multiple building carbon emission related factors and building carbon emission data; A comprehensive carbon emission kinetic model is constructed based on the plurality of building carbon emission related factors and the building carbon emission data, and the carbon emission kinetic model is tested for collinearity, the building carbon emission related factors are divided into collinear factors and non-collinear factors, and the carbon emission kinetic model is decomposed into collinear sub-carbon emission kinetic models and non-collinear sub-carbon emission kinetic models; Substituting the non-collinearity factor and the building carbon emission data into the non-collinear sub-carbon emission dynamics model, and calculating the first elasticity coefficient of the collinear sub-carbon emission dynamics model by a linear regression algorithm; Substituting the collinearity factor and the building carbon emission data into the collinear sub-carbon emission dynamics model, and determining the second elasticity coefficient of the non-collinear sub-carbon emission dynamics model through the prediction model based on the improved CNN; The comprehensive predicted building carbon emissions of the current building are determined by the collinear sub-carbon emission kinetic model and the non-collinear sub-carbon emission kinetic model, and a graded warning is given to the building based on a comparison result between the comprehensive predicted building carbon emissions and the warning value.
2. The carbon emission data management method based on distributed storage according to claim 1 is characterized in that: The prediction model includes an input data preprocessing layer, a feature extraction layer, a channel attention layer, a feature fusion prediction layer, and a constraint layer. The process of determining the second elastic coefficient includes: The collinearity factor is subjected to principal component extraction through the data preprocessing layer to generate dimension-reduced time series data; Performing multi-scale temporal convolution on the dimension-reduced time series data through a feature extraction layer to generate multi-scale features; Calculate the weight coefficient of the multi-scale features through the channel attention layer; Splicing and mapping the multi-scale features and the weight coefficients in a feature fusion prediction layer to determine a second temporary elastic coefficient; The second temporary elastic coefficient is subjected to activation function logic constraints and time series smoothing constraints through the constraint layer to determine the second elastic coefficient.
3. The carbon emission data management method based on distributed storage according to claim 2 is characterized in that: The process of generating dimensionality-reduced time series data includes: Performing mean normalization processing on the collinearity factors to generate a dimensionless time series matrix; Performing covariance calculation on the dimensionless matrix data to generate a covariance matrix; Performing eigendecomposition calculation on the covariance matrix to generate an eigenvector matrix; Filter out elements in the eigenvector matrix that are greater than a set value to generate principal components; The dimensionless time series matrix and the principal component are multiplied to determine the reduced-dimensional time series data.
4. The carbon emission data management method based on distributed storage according to claim 2 is characterized in that: The constraint layer includes a Sigmoid activation function, a negative ReLU activation function, and a temporal convolution. The process of determining the second elastic coefficient by performing activation function logic constraints and temporal smoothing constraints on the second temporary elastic coefficient through the constraint layer includes: The second temporary elastic coefficient, which is positively correlated with the building carbon emission-related factor, is positively constrained by a Sigmoid activation function to generate a positive constraint term; The second elastic coefficient, which is negatively correlated with the building carbon emission-related factor, is negatively constrained by a negative ReLU activation function to generate a negative constraint term; splicing the positive constraint term and the negative constraint term to generate a spliced second elastic coefficient; The adjacent time steps of the spliced second elastic coefficient are subjected to proportional constraints with the adjacent time steps of the dimension-reduced time series data through time series convolution to determine the second elastic coefficient.
5. The carbon emission data management method based on distributed storage according to claim 2 is characterized in that: The feature fusion prediction layer includes a carbon emission prediction output branch and an elasticity coefficient prediction output branch. The training optimization process of the prediction model includes: The prediction model generates a predicted value of a second elastic coefficient through an elastic coefficient prediction output branch; Substituting the predicted value of the second elastic coefficient into the non-collinear sub-carbon emission kinetic model with set learning parameters to determine a carbon emission model predicted value, wherein the learning parameters are determined by carbon emission prediction output branch fitting; Constructing a carbon emission prediction loss term based on the mean square error between the carbon emission model prediction value and the actual carbon emission; constructing an elastic coefficient loss term based on a mean square error between a predicted value and a true value of the second elastic coefficient; Constructing a first regularization term based on the learning parameters of the input data preprocessing layer, the feature extraction layer, and the channel attention layer, constructing a second regularization term based on the learning parameters, constructing a third regularization term based on the parameters of the elastic coefficient prediction output branch, and dynamically weighting and adding the first regularization term, the second regularization term, and the third regularization term to construct a regularization loss term; The elastic coefficient loss term, the carbon emission prediction loss term and the regularization loss term are weightedly added to construct a comprehensive loss function, and the prediction model is trained and optimized using the loss function.
6. The carbon emission data management method based on distributed storage according to claim 5 is characterized in that: The process of dynamically weighting and adding the first regularization term, the second regularization term, and the third regularization term to construct the regularization loss term includes: Calculating a first dynamic weighting coefficient based on the current carbon emission prediction loss term, the current elasticity coefficient loss term, the initial carbon emission prediction loss term, and the initial elasticity coefficient loss term; Calculating a second dynamic weighting coefficient based on the current carbon emission prediction loss item and the initial carbon emission prediction loss item; Calculating a third dynamic weighting coefficient based on the current elastic coefficient loss term and the initial elastic coefficient loss term; The first regularization term and the first dynamic weighting coefficient, the second regularization term and the second dynamic weighting coefficient, and the third regularization term and the third dynamic weighting coefficient are weighted and summed to construct the regularization loss term.
7. The carbon emission data management method based on distributed storage according to claim 1 is characterized in that: The process of determining the collinearity factor and the non-collinearity factor includes: Performing logarithmic processing on the comprehensive carbon emission kinetic model to generate a logarithmic carbon emission kinetic model; Calculating the coefficient of determination, the adjusted coefficient of determination, and the statistical value of the logarithmic carbon emission kinetic model, eliminating factors for which at least one of the coefficient of determination, the adjusted coefficient of determination, and the statistical value is less than a corresponding threshold, and generating a fitted logarithmic carbon emission kinetic model; The variance inflation coefficient of the fitted logarithmic carbon emission kinetic model is calculated. If the variance inflation coefficient is greater than the collinearity limit, the factor corresponding to the variance inflation coefficient is used as the collinearity factor; otherwise, the factor corresponding to the variance inflation coefficient is used as the non-collinearity factor.
8. The carbon emission data management method based on distributed storage according to claim 7 is characterized in that: The process of calculating the first elastic coefficient by using a linear regression algorithm includes: using the portion of the fitted logarithmic carbon emission kinetic model corresponding to the collinearity factor as the collinear sub-carbon emission kinetic model; A ridge regression analysis is performed on the collinear sub-carbon emission kinetic model to determine the first elastic coefficient.
9. The carbon emission data management method based on distributed storage according to any one of claims 1 to 8, characterized in that: The comprehensive carbon emission kinetic model, the collinear sub-carbon emission kinetic model and the non-collinear sub-carbon emission kinetic model are all constructed based on the STIRPAT carbon emission kinetic model, and the building carbon emission related factors include at least industrial structure, public building area, building electricity, building heat and carbon emission quota.
10. The carbon emission data management method based on distributed storage according to claim 9 is characterized in that: The InfluxDB time series database is used to store industrial structure, the TimescaleDB time series database is used to store building electricity and building heat, and Redis is used to access and cache carbon emission quotas.