Park building scene-oriented carbon emission data prediction method
By adopting the carbon emission prediction method of multi-head attention mechanism and improved slime mold algorithm in building park scenarios, the problem of long training time and easy to fall into local minimums in traditional methods is solved, and more efficient and accurate prediction of carbon emission data is achieved.
Patent Information
- Application Number
- CN202510055227.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-02
AI Technical Summary
Traditional carbon emission prediction methods have problems such as long training time, low learning efficiency, slow algorithm convergence speed and easy to fall into local minimum values in building park scenarios, and have failed to effectively comprehensively consider the multiple impact factors of carbon emissions.
A carbon emission prediction model based on a multi-head attention mechanism is adopted, and the optimal parameters of the model are determined through an improved slime mold algorithm, combining chaotic mapping, random inertia weights and flight strategies to optimize the training efficiency and prediction performance of the model.
It significantly improves the accuracy and efficiency of carbon emission data prediction, avoids the problem of local minimum value, and better considers multiple impact factors, and optimizes the carbon data emission prediction effect of building parks.
Smart Images

Figure CN119919155A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of carbon emission management, and is particularly applicable to a carbon emission data prediction method for park building scenarios. Background Art
[0002] Low-carbon and zero-carbon buildings are gradually emerging. The first step to achieve zero-carbon management of buildings is to predict the carbon emissions of buildings, plan and manage green carbon reduction measures based on the predicted carbon emissions, and achieve zero-carbon emissions in buildings. Traditional internal carbon emission predictions for enterprises or buildings often use methods such as linear regression and long short-term memory neural networks. The training time is relatively long and the learning efficiency is low, and the algorithm convergence speed is often too slow. At the same time, due to the complexity of the model, traditional methods are prone to fall into local minima and cannot reach the global optimum, affecting the performance of the model.
[0004] For example, patent CN115860173A, based on the construction and prediction method of the carbon emission prediction model and medium of the Stacking algorithm, uses the XGBoost algorithm to analyze the characteristics that affect carbon emissions, obtains the target characteristics, uses the Stacking algorithm to fuse the meta-model and multiple base models, and trains the model based on the training set and the target characteristics to comprehensively improve the prediction accuracy. However, the patent uses multiple models for training and fusion, with many model parameters, and the overall training time and space-time consumption are large. The algorithm also does not comprehensively consider the multiple influencing factors of carbon emissions. Summary of the invention
[0005] The present invention aims to provide a carbon emission data prediction method for park building scenarios, aiming to solve the problem of accurate prediction of carbon emissions from park buildings.
[0006] To achieve the above object, the present invention adopts the following technical solutions: The carbon emission data prediction method for park building scenarios described in the present invention comprises the following steps: S1, dividing the historical carbon emissions and influencing factors of the building park into a training set, a test set and a validation set, and completing the normalization of the historical carbon emissions; S2, establish a carbon emission prediction model based on multi-head attention mechanism; S3, using chaos mapping, random inertia weight and flight strategy to improve the slime mold algorithm and determine the optimal parameters of the carbon emission prediction model; S4, use the optimal parameters and the S1 step data set to train, test and validate the carbon emission prediction model.
[0007] Furthermore, the historical carbon emissions of the building park include industrial carbon emissions CE 工业 , Building Carbon Emissions CE 建筑 , Transportation Carbon Emissions CE交通 and the carbon sink value of the park green space C 绿地碳汇 .
[0008] Furthermore, the influencing factors include regional GDP Q, cumulative employment population P, energy intensity ES, energy structure EI, industrial structure IS, fixed asset investment LI, and the proportion of science and technology investment in regional GDP RD; the relationship between carbon emissions C and the influencing factors is: ln C=ln a+bln P+cln Q+dln LI+αln RD+βln ES+γln EI+ρln IS+lne; among which, a, b, c, d, α, β, γ, ρ are the elasticity coefficients of each influencing factor; ln e is the error term.
[0009] Furthermore, the n represents the type of energy consumed, including coal and natural gas; EA i NCV represents the consumption of the i-th energy in each field. i represents the average low calorific value of the i-th energy source, CEF i Indicates the carbon content of the ith unit calorific value, COF i represents the carbon oxidation factor of the i-th energy source, ER i Indicates the energy consumption reduced by energy-saving measures such as photovoltaic power generation, CF i represents the carbon emission factor / plant carbon fixation factor, j represents the type of vehicle, t represents the type of transport, including passenger and freight transport, E j,t represents the carbon emissions of the ith transportation type of the ith mode of transport, x j,t represents the unit turnover energy consumption of the jth transportation vehicle and the tth transportation type, v j,t A represents the turnover of the t-th mode of transport in the j-th vehicle, i Represents the area of the i-th type of green space.
[0010] Furthermore, step S3 specifically includes: S3.1, initializing the parameters of the carbon emission prediction model; S3.2, using the chaotic sequence generated by the chaotic mapping to initialize the slime mold population, initialize the positions of n slime molds, set the weight coefficient and parameters of each slime mold, calculate the fitness of each slime mold position, and obtain the first optimal position and the first optimal fitness of the n slime molds; S3.3, updating the positions of n slime molds according to the update formula improved by random inertia weight and flight strategy, calculating the fitness of each slime mold position, and obtaining the second optimal position and the second optimal fitness of the n slime molds; S3.4, comparing the first optimal position and the second optimal position of each slime mold, and selecting the optimal position of each slime mold to form the optimal position of n slime molds; S3.5, calculate the degree of fit of each slime mold position under the optimal position. If the degree of fit meets the preset threshold, the global optimal position is output to obtain the optimal parameters of the carbon emission prediction model; otherwise, repeat steps S3.2 to S3.5 until the degree of fit meets the preset threshold.
[0011] The advantage of the present invention is that based on the early energy consumption data collection, carbon emission accounting, carbon emission influencing factor analysis of the building, multiple influencing factors affecting carbon emissions are used to update the carbon emission data accounting formula, thereby optimizing the prediction effect of carbon data emissions in the building park.
[0012] Secondly, the present invention searches for the optimal solution in the global range of the solution space based on the improved slime mold algorithm, ensuring that the prediction model does not need to adjust the link weights and thresholds multiple times during the training process, significantly improving the training efficiency and avoiding falling into the local minimum point.
[0013] Finally, the present invention is based on the attention mechanism and focuses on the contextual association of time series. It can reduce the complexity of the model while maintaining high prediction performance, reduce the occurrence of overfitting, optimize the model training time, and provide support for subsequent corporate carbon emission reduction, carbon trading and other links. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flow chart of the carbon emission data prediction method for park building scenarios described in the present invention. DETAILED DESCRIPTION
[0015] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0016] The carbon emission data prediction method for park building scenarios described in the present invention is as follows: Figure 1 As shown, the specific steps include: S1, divide the historical carbon emissions and influencing factors of the building park into a training set, a test set and a validation set, and complete the normalization of the historical carbon emissions.
[0017] Carbon emission accounting for a building park requires comprehensive consideration of carbon emissions and development characteristics within the building park. The scope of carbon emission accounting includes geographical scope, emission sources, and gas types. Since building parks have clear geographical boundaries, the administrative area of the building park is usually used as the system boundary to calculate carbon emissions in various areas within the boundary.
[0018] The greenhouse gases accounted for in the building park include the six greenhouse gases specified by the Intergovernmental Panel on Climate Change IPCC, mainly including CO2 and CH4. Since various greenhouse gases contribute differently to the greenhouse effect, in order to facilitate calculation, the present invention uniformly converts greenhouse gases into carbon dioxide equivalent CO2e. According to the standards proposed by the World Resources Institute WRI and the World Business Council for Sustainable Development WBCSD, as well as the ISO14064-1 standard list issued by the International Organization for Standardization, the greenhouse gas accounting boundaries can be divided into three different ranges.
[0019] Scope 1: direct carbon emissions from all energy consumption within the boundary; Scope 2: indirect carbon emissions from purchased electricity and heat; Scope 3: other indirect carbon emissions except scope 1 and scope 2.
[0020] The present invention mainly focuses on the carbon emissions in scope 1 and scope 2, and applies them to the carbon emissions accounting level of buildings and parks.
[0021] Carbon emissions from building parks mainly come from industrial production, buildings themselves, traffic and other fields. Each field can be divided into direct carbon emissions and indirect carbon emissions. Direct carbon emissions are carbon emissions caused by energy consumption, etc., and indirect carbon emissions are carbon emissions caused by the purchase of electricity and heat by various departments, as well as waste treatment departments.
[0022] Park green space includes parks, gardens, residential green space, street green space and other public areas covered with vegetation (trees, shrubs). Park green space is a near-natural ecological space that plays a huge role in offsetting carbon dioxide emissions. They not only provide various ecosystem services that benefit human health and well-being, but also achieve carbon fixation, which serves as an ecological regulation to offset carbon dioxide emissions, called carbon sink. Carbon sink is also an important part of the park's carbon emissions accounting.
[0023] The historical carbon emissions of the building park in this invention include industrial carbon emissions CE 工业 , Building Carbon Emissions CE 建筑 , Transportation Carbon Emissions CE 交通 and the carbon sink value of the park green space C 绿地碳汇 .
[0024] Said n represents the type of energy consumed, including coal and natural gas; EA i NCV represents the consumption of the i-th energy in each field. i represents the average low calorific value of the i-th energy source, CEF i Indicates the carbon content of the ith unit calorific value, COF i represents the carbon oxidation factor of the i-th energy source, ER i Indicates the energy consumption reduced by energy-saving measures such as photovoltaic power generation, CF i represents the carbon emission factor / plant carbon fixation factor, j represents the type of vehicle, t represents the type of transport, including passenger and freight transport, E j,t represents the carbon emissions of the ith transportation type of the ith mode of transport, x j,t represents the unit turnover energy consumption of the jth transportation vehicle and the tth transportation type, v j,t A represents the turnover of the t-th mode of transport in the j-th vehicle, i Represents the area of the i-th type of green space.
[0025] When calculating carbon emissions, the present invention uses an improved STIRPAT model to decompose factors and integrate various carbon emission influencing factors of the building park. The influencing factors affecting the carbon emissions of the building park include regional GDP Q, cumulative employment population P, energy intensity ES, energy structure EI, industrial structure IS, fixed asset investment LI, and the proportion of science and technology investment in regional GDP RD.
[0026] The relationship between carbon emissions C and influencing factors is: lnC=lna+blnP+clnQ+dlnLI+αlnRD+βlnES+γlnEI+ρlnIS+lne; among them, a, b, c, d, α, β, γ, ρ are the elasticity coefficients of each influencing factor; lne is the error term.
[0027] The calculation formula for the total carbon emissions of the building park is: In the formula, CE represents the total carbon emissions of the building park, i represents the carbon emissions in the four fields of industry, construction, and transportation, and C 绿地碳汇 Represents the carbon sink of green land.
[0028] S2, establish a carbon emission prediction model based on multi-head attention mechanism.
[0029] The multi-head attention mechanism can perform operations in parallel and then splice the operation results through linear transformation. Using the multi-head attention mechanism, the dependent feature relationship between data can be effectively extracted, the correlation between data can be captured and a context prediction model can be established, which is more conducive to the prediction of carbon emissions determined by multiple factors in building parks. The expression of the carbon emission prediction model of the multi-head attention mechanism established by the present invention is as follows: Q = W1*X K=W2*X V=W3*X Multihead(Q,K,V)=Concat(head1,...,head h )W o FNN(x)=max(0,xW1+b1)W2+b2 Where Q is the query matrix; K is the key matrix; V is the value matrix; W1, W2, W3, b1, b2 are trainable parameter matrices; x is the input, X is the processed input; d k is the dimension of the bond matrix; W o , is the learnable parameter matrix and h is the number of multi-head attention mechanisms.
[0030] S3, using chaos mapping, random inertia weight and flight strategy to improve the slime mold algorithm and determine the optimal parameters of the carbon emission prediction model.
[0031] The slime mold algorithm is a new type of swarm intelligence algorithm. It uses the biological group behavior characteristics of slime molds in nature to simulate the foraging behavior of slime molds. When slime molds approach a food source, the biological oscillator will generate a propagation wave to increase the cytoplasm flow and quickly obtain food. The intensity of the propagation wave generated by the oscillator depends on the concentration of food. The higher the food concentration, the stronger the propagation wave and the faster the cytoplasm flow. The slime mold algorithm is a mathematical model established by the propagation wave generated by the slime mold biological oscillator to achieve the function of model optimization. The slime mold algorithm has obvious advantages in its fast convergence speed, few parameters, and strong search ability.
[0032] The method of the present invention uses an improved slime mold algorithm to optimize the parameters in the carbon emission prediction model based on the attention mechanism to seek the optimal solution of the prediction result. The specific steps include: S3.1, initializing the parameters of the carbon emission prediction model; S3.2, using the chaotic sequence generated by the chaotic map to initialize the slime mold population, initialize the positions of n slime molds, set the weight coefficient and parameters of each slime mold, calculate the fitness of each slime mold position, and obtain the first optimal position and the first optimal fitness of the n slime molds.
[0033] The formula for generating chaotic population sequence is as follows: Among them, k is the population, i is the number of iterations, u∈(0,1), generally takes the value of 0.5, Chaotic sequence generated for a chaotic map.
[0034] The chaotic population sequence updates the slime mold position in a nonlinear decreasing manner, and the formula is as follows: p=tanh|S(i)-DF|, (i=1,2,...,N) Among them, X b (t) represents the current position of the individual with the best fitness, X(t) represents the current position of the slime mold individual, and X A (t) and X B (t) represents the random position of the two slime molds, W is the weight coefficient of the slime mold, and P is the control parameter. S(i) is the fitness of X, DF is the best fitness among all iterations, vb∈[-a,a], vc∈[-1,1], a is a parameter, t represents the current iteration number, T represents the maximum iteration value, bF and wF represent the best fitness and worst fitness of the current population respectively. r is a random number in [0,1]; DF is the best fitness among all iterations; N is the population size.
[0035] S3.3, update the positions of n slime molds according to the update formula improved by random inertia weight and flight strategy, calculate the fitness of each slime mold position, and obtain the second optimal position and second optimal fitness of the n slime molds.
[0036] The update formula based on random inertia weight and flight strategy improvement is as follows: L~t -λ ,1<λ<3 w=w min +(w max -w min )×rand()+σ×randn() Among them, ub and lb are the upper and lower boundaries of the search space, W is the weight coefficient, vc is the feedback factor used to describe the feedback relationship between food concentration and slime mold quality, vb is a random number between [-a, a], β is usually a constant of 1.5, Γ represents the standard gamma function. w represents the weight of random inertia, randn() is a random number of normal distribution, σ μ Variance is used to measure the degree of deviation between the weight of a random variable and the mean. In the final stage, the slime mold performs physical grasping, which is mainly simulated by parameters vb, vc, and W. z is the probability of the separated slime mold individual searching for other food sources, that is, the probability of mutation, which is generally set to 0.03. w represents the weight of random inertia, w max and w minrepresents the maximum and minimum values of the random inertia weight, t represents the current iteration number, and σ represents the variance.
[0037] S3.4, comparing the first optimal position and the second optimal position of each slime mold, and selecting the optimal position of each slime mold to form the optimal positions of n slime molds.
[0038] S3.5, calculate the degree of fit of each slime mold position under the optimal position. If the degree of fit meets the preset threshold, the global optimal position is output to obtain the optimal parameters of the carbon emission prediction model; otherwise, repeat steps S3.2 to S3.5 until the degree of fit meets the preset threshold.
[0039] S4, use the optimal parameters and the S1 step data set to train, test and validate the carbon emission prediction model.
Claims
1. A carbon emission data prediction method for park building scenarios, characterized in that: The following steps are involved: S1, dividing the historical carbon emissions and influencing factors of the building park into a training set, a test set and a validation set, and completing the normalization of the historical carbon emissions; S2, establish a carbon emission prediction model based on multi-head attention mechanism; S3, using chaos mapping, random inertia weight and flight strategy to improve the slime mold algorithm and determine the optimal parameters of the carbon emission prediction model; S4, use the optimal parameters and the S1 step data set to train, test and validate the carbon emission prediction model.
2. According to claim 1, a carbon emission data prediction method for park building scenarios is characterized by: The historical carbon emissions of the building park include industrial carbon emissions CE 工业 , Building Carbon Emissions CE 建筑 , Transportation Carbon Emissions CE 交通 and the carbon sink value of the park green space C 绿地碳汇 .
3. The carbon emission data prediction method for park building scenarios according to claim 1 is characterized by: The influencing factors include regional GDP Q, cumulative employment population P, energy intensity ES, energy structure EI, industrial structure IS, fixed asset investment LI, and the proportion of science and technology investment in regional GDP RD; the relationship between carbon emissions C and the influencing factors is: ; Among them, a, b, c, d, , , , is the elasticity coefficient of each influencing factor; is the error term.
4. The carbon emission data prediction method for park building scenarios according to claim 2 is characterized by: Said , , , , n represents the type of energy consumed, including coal and natural gas; represents the consumption of the i-th energy in each field, represents the average low calorific value of the i-th energy source, represents the carbon content of the ith unit calorific value, represents the carbon oxidation factor of the i-th energy source, Indicates the energy consumption reduced by energy-saving measures such as photovoltaic power generation, represents the carbon emission factor / plant carbon fixation factor, j represents the type of transportation, t represents the type of transportation, including passenger and freight transportation, represents the carbon emissions of the ith transportation type of the ith means of transport, represents the unit turnover energy consumption of the jth transportation vehicle and the tth transportation type, represents the turnover of the t-th mode of transport in the j-th vehicle, Represents the area of the i-th type of green space.
5. The carbon emission data prediction method for park building scenarios according to claim 1 is characterized by: Step S3 specifically includes: S3.1, initializing the parameters of the carbon emission prediction model; S3.2, using the chaotic sequence generated by the chaotic mapping to initialize the slime mold population, initialize the positions of n slime molds, set the weight coefficient and parameters of each slime mold, calculate the fitness of each slime mold position, and obtain the first optimal position and the first optimal fitness of the n slime molds; S3.3, updating the positions of n slime molds according to the update formula improved by random inertia weight and flight strategy, calculating the fitness of each slime mold position, and obtaining the second optimal position and the second optimal fitness of the n slime molds; S3.4, comparing the first optimal position and the second optimal position of each slime mold, and selecting the optimal position of each slime mold to form n optimal positions of slime molds; S3.5, calculate the degree of fit of each slime mold position under the optimal position. If the degree of fit meets the preset threshold, the global optimal position is output to obtain the optimal parameters of the carbon emission prediction model; otherwise, repeat steps S3.2 to S3.5 until the degree of fit meets the preset threshold.