Training method of carbon emission prediction model
By constructing a multi-step timing prediction model, integrating static data and multi-dimensional timing data of construction units, the problem of low carbon emission prediction accuracy in the existing technology is solved, and accurate prediction and long-term management support for construction units' carbon emissions are achieved.
Patent Information
- Application Number
- CN202510018559.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-07
AI Technical Summary
The existing carbon emission prediction model has low accuracy in the carbon emission prediction of construction units, and has failed to make full use of the static data and multi-dimensional timing data of construction units.
By obtaining the historical carbon emissions and related factor data of construction units, a training sample set is constructed, and a multi-step timing prediction model is constructed, including static feature extraction module, timing feature extraction module, feature fusion module and prediction module, fusion of static data and multi-dimensional timing data, predicting carbon emissions in multiple time steps in the future.
A more accurate carbon emission forecast for building units is achieved, which can support the long-term carbon emission management of building units and improve the comprehensiveness and accuracy of the forecast.
Smart Images

Figure CN119941271A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of carbon emission prediction, and in particular to a training method for a carbon emission prediction model. Background Art
[0002] In the context of global response to climate change, accurate prediction and effective control of carbon emissions have become the focus of attention of various countries and regions. Carbon emissions are one of the main factors leading to global warming, and they have a profound impact on the environment, ecosystems and sustainable development of human society. The construction industry is one of the important sources of carbon emissions, accounting for a considerable proportion of the total global carbon emissions. This is mainly due to the production of materials during the construction process and the energy consumption during the operation of the building (such as heating, cooling, lighting, etc.), which will generate a large amount of greenhouse gas emissions.
[0003] With the development of machine learning, deep learning, and reinforcement learning technologies, it is possible to use intelligent algorithm training models to predict carbon emissions. Among the existing carbon emission prediction models, the prediction models for building units have certain limitations. Many general carbon emission prediction models do not fully consider the unique characteristics of building units, such as the impact of building structure type, usage function, geographical location and other factors on carbon emissions. Some existing prediction methods may only focus on a single type of data, such as only considering energy consumption data, while ignoring other factors related to carbon emissions. For building units, in addition to energy consumption data (which is a time series data), there are also many static data, such as the area of the building, the type of building materials, etc., which are also important in predicting carbon emissions. However, existing models often cannot make good use of these static data and time series data, so the prediction accuracy is not high. Summary of the invention
[0004] In view of the above analysis, an embodiment of the present invention aims to provide a training method for a carbon emission prediction model to solve the problem of low prediction accuracy of existing models.
[0005] In one aspect, an embodiment of the present invention provides a method for training a carbon emission prediction model, comprising the following steps:
[0006] Obtaining historical carbon emissions of the building unit and corresponding carbon emission related factor data; the carbon emission related factor data includes static data and multi-dimensional time series data;
[0007] Construct a training sample set based on the historical carbon emissions of the building unit and the corresponding carbon emission related factor data;
[0008] Constructing a multi-step time series prediction model, the multi-step time series prediction model is used to predict carbon emissions in multiple time steps in the future; the multi-step time series prediction model includes: a static feature extraction module, used to extract static features based on the static data; a time series feature extraction module, used to extract time series features based on the multi-dimensional time series data; a feature fusion module, used to fuse static features and time series features; a prediction module, used to predict carbon emissions in multiple time steps in the future based on the fused features;
[0009] The multi-step time series prediction model is trained based on the training sample set to obtain a carbon emission prediction model.
[0010] Based on the further improvement of the above method, the following formula is used to calculate the training loss of the multi-step time series prediction model:
[0011] Loss=Loss mse +Loss shape
[0012] Loss shape =β1Loss1+β2Loss2+β3loss3
[0013] Among them, Loss mse Represents mean square error loss, Loss shape represents shape loss, Loss1 represents the distance loss between the label sequence and the prediction sequence, Loss2 represents the principal component loss between the label sequence and the prediction sequence, Loss3 represents the correlation loss between the label sequence and the prediction sequence, and β1, β2 and β3 represent weights.
[0014] Based on the further improvement of the above method, the following formula is used to calculate the distance loss between the label sequence and the prediction sequence:
[0015]
[0016] Where N represents the number of samples in the current training batch, T′ represents the length of the label sequence, and y it represents the value of the tth element in the label sequence of the i-th sample, Represents the value of the tth element in the prediction sequence of the i-th sample, y ij Represents the value of the jth element in the label sequence of the i-th sample, represents the value of the jth element in the predicted sequence of the i-th sample, and d(·,·) represents the signed distance function.
[0017] Based on the further improvement of the above method, the following formula is used to calculate the principal component loss between the label sequence and the prediction sequence:
[0018]
[0019] Among them, N represents the number of samples in the current training batch, n mf represents the number of principal components, n f represents the quantity of all components, F j (y i ) means taking y i The jth principal component of Indicates taking The jth principal component of Indicates taking The kth non-principal component of ||·|| p represents the Lp norm, y i represents the label sequence of the i-th sample, Represents the predicted sequence of the i-th sample.
[0020] Based on the further improvement of the above method, the following formula is used to calculate the correlation loss between the label sequence and the prediction sequence:
[0021]
[0022] Among them, y i represents the label sequence of the i-th sample, represents the predicted sequence of the i-th sample, R(·,·) represents the cross-correlation function, ||·|| p represents the Lp norm, and N represents the number of samples in the current training batch.
[0023] Based on the further improvement of the above method, a training sample set is constructed based on the historical carbon emissions of the building units and the corresponding carbon emission related factor data, including:
[0024] For each building unit, two sliding windows with a length of T are used to slide in parallel on the multidimensional time series data and the corresponding carbon emission time series data;
[0025] The multidimensional time series data, carbon emission time series data and static data of the building unit obtained by sliding at each step are used as the input data of the sample, and the carbon emission time series data of multiple time steps after the sliding window on the carbon emission time series data are the labels of the sample, constituting a sample.
[0026] Based on the further improvement of the above method, the temporal feature extraction module includes:
[0027] A periodic feature extraction module, used to extract periodic features of time series data based on multi-dimensional time series data of samples;
[0028] A deep feature extraction module, used to extract deep features of each time step using a cycle unit based on the periodic features;
[0029] The feature weighting module is used to perform weighted fusion of the deep features of each time step based on the carbon emissions at each time step to obtain the time series features.
[0030] Based on the further improvement of the above method, the periodic feature extraction module extracts the periodic features of the time series data in the following manner:
[0031] For each dimension of time series data, K periodic components of the time series data of the dimension are calculated, and the time series data of the dimension is converted into K two-dimensional data based on the K periodic components;
[0032] Based on the two-dimensional convolutional network, feature extraction is performed on each two-dimensional data to obtain K two-dimensional features;
[0033] Each two-dimensional feature is converted into a one-dimensional feature; based on the weights of the K periodic components, the K one-dimensional features are weightedly fused to obtain the periodic features corresponding to the time series data of each dimension.
[0034] Based on the further improvement of the above method, the following formula is used to calculate the periodic characteristics of the time series data of this dimension:
[0035]
[0036] Among them, f ct A represents the periodic eigenvalue of the tth time step of the cth dimension time series data, ck Represents the amplitude corresponding to the kth period component of the cth dimension time series data, Represents the eigenvalue of the tth time step of the one-dimensional feature corresponding to the kth periodic component of the cth dimension time series data.
[0037] Based on the further improvement of the above method, the weight of the deep feature of each time step is calculated using the following formula:
[0038] w t =αy t +(1-α)w t-1
[0039] Among them, w t-1 represents the weight of the deep feature at the t-1th time step, w t represents the weight of the deep feature at the tth time step, y t represents the carbon emissions at the tth time step, and α represents the smoothing factor.
[0040] Compared with the prior art, the present invention obtains the historical carbon emissions of the park building units and the corresponding carbon emission related factor data to construct a training sample set, and constructs a multi-step time series prediction model to extract static data features and multi-dimensional time series data features, integrate static data and multi-dimensional time series data, and make full use of different types of data information to more comprehensively and accurately predict emissions, thereby achieving accurate carbon emission prediction for building units. Unlike the previous prediction of carbon emissions at only one time point, the present invention predicts carbon emissions at multiple time steps in the future, thereby providing support for long-term carbon emission management of building units.
[0041] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;
[0043] Figure 1 The present invention is a flowchart of a method for training a carbon emission prediction model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0045] A specific embodiment of the present invention discloses a method for training a carbon emission prediction model, such as Figure 1 As shown, the following steps are included:
[0046] S1. Obtain the historical carbon emissions of the park's building units and the corresponding carbon emission-related factor data; the carbon emission-related factor data includes static data and multi-dimensional time series data;
[0047] S2, constructing a training sample set based on the historical carbon emissions of the building unit and the corresponding carbon emission related factor data;
[0048] S3, constructing a multi-step time series prediction model, the multi-step time series prediction model is used to predict the carbon emissions in multiple time steps in the future; the multi-step time series prediction model includes: a static feature extraction module, used to extract static features based on the static data; a time series feature extraction module, used to extract time series features based on the multi-dimensional time series data; a feature fusion module, used to fuse static features and time series features; a prediction module, used to predict the carbon emissions in multiple time steps in the future based on the fused features;
[0049] S4. Training the multi-step time series prediction model based on the training sample set to obtain a carbon emission prediction model.
[0050] It should be noted that the building units within the park include industrial buildings, office buildings, commercial buildings, residential buildings, cultural and sports buildings, and administrative buildings.
[0051] The static data in the carbon emission related factor data include built environment data; the multidimensional time series data include energy consumption time series data and socio-economic time series data.
[0052] The built environment data of a building unit includes the stage of the building unit's life cycle, land area, volume ratio, building type, land use nature, land use mix, building area, building shape coefficient, building height, and building orientation. Energy consumption data includes water, electricity, gas, and chemical fuel consumption data. Socioeconomic data includes population, economy, product output, etc. Energy consumption and socioeconomics are both multidimensional data.
[0053] The whole life cycle includes three stages: materialization, operation and disposal. It should be noted that within a unit of time, a building unit can only be in one stage.
[0054] Compared with the prior art, the training method of the carbon emission prediction model provided by the present invention obtains the historical carbon emissions of the park building units and the corresponding carbon emission related factor data to construct a training sample set, and constructs a multi-step time series prediction model to extract static data features and multi-dimensional time series data features, integrate static data and multi-dimensional time series data, and make full use of different types of data information to more comprehensively and accurately predict emissions, thereby achieving accurate carbon emission prediction for building units. Unlike the previous method of only predicting carbon emissions at one time point, the present invention predicts carbon emissions at multiple time steps in the future, thereby providing support for long-term carbon emission management of building units.
[0055] The historical carbon emissions of each building unit are the carbon emissions calculated per unit time in history.
[0056] After obtaining the historical carbon emissions of the building unit and the corresponding carbon emission related factor data, a training sample set is constructed based on the historical carbon emissions of the building unit and the corresponding carbon emission related factor data, including:
[0057] For each building unit, two sliding windows of length T are used to slide in parallel on the multidimensional time series data and the corresponding carbon emission time series data;
[0058] The multidimensional time series data, carbon emission time series data, and static data of the building unit obtained by sliding at each step are used as the input data of the sample, and the carbon emission time series data of multiple time steps after the sliding window on the carbon emission time series data are the labels of the sample, constituting a sample.
[0059] During implementation, the built environment data of the building unit is numerical data, and the energy consumption, social economy, and carbon emissions are time series data, that is, time series data consisting of energy consumption, social economy, and carbon emissions at each time step in historical time. Therefore, when constructing the sample, a sliding window is used to extract the time series data to construct the sample.
[0060] During implementation, it is assumed that the dimension of the multidimensional time series data (energy consumption time series data and socio-economic time series data) in the carbon emission related factor data is C. For each building unit that has obtained historical carbon emissions and corresponding carbon emission related factor data, two sliding windows of length T are used to slide in parallel on the multidimensional time series data and the corresponding carbon emission time series data, respectively. The sliding step can be set to one time step or multiple time steps, which can be set according to the time series data length and calculation accuracy requirements.
[0061] Carbon emissions in the past may have an impact on carbon emissions in the future. Carbon emissions in the past time steps have a certain reference significance for carbon emissions in the future. Therefore, the current carbon emissions data is also used as the input data of the sample. Therefore, for each sliding step, the multidimensional time series data and carbon emissions time series data in the current window constitute the multidimensional time series data of the sample, that is, the multidimensional time series data of the sample includes energy consumption time series data, social and economic time series data and corresponding carbon emissions time series data. The multidimensional time series data and the built environment data of the building unit are used as the input data of the sample; the carbon emissions time series data of multiple time steps after the current sliding window on the carbon emissions time series data are used as the labels of the sample, thereby obtaining a sample, and then constructing a training sample set.
[0062] A multi-step time series forecasting model is constructed to predict carbon emissions at multiple time steps in the future.
[0063] Specifically, the constructed multi-step time series prediction model includes:
[0064] A static feature extraction module, used for extracting static features based on the static data;
[0065] A time series feature extraction module, used to extract time series features based on the multi-dimensional time series data;
[0066] Feature fusion module, used to fuse static features and temporal features;
[0067] The prediction module is used to predict the carbon emissions in multiple time steps in the future based on the fused features;
[0068] During implementation, since built environment data is numerical data and multidimensional time series data is time series data, features need to be extracted separately.
[0069] Therefore, the constructed time series prediction network model includes a static extraction module and a time series feature extraction module to respectively extract the characteristics of built environment data, energy consumption time series data, characteristics of social and economic time series data, and the corresponding carbon emissions characteristics.
[0070] During implementation, the static feature extraction module can adopt a one-dimensional convolutional network structure with a convolution kernel size of 1.
[0071] The time series feature extraction module is used to extract the features of time series data. Specifically, the time series feature extraction module includes:
[0072] A periodic feature extraction module, used to extract periodic features of time series data based on multi-dimensional time series data of samples;
[0073] A deep feature extraction module, used to extract the deep features of each time step using a cycle unit based on the periodic features;
[0074] The feature weighting module is used to perform weighted fusion of the deep features of each time step based on the carbon emissions at each time step to obtain the time series features.
[0075] During implementation, since time series data is usually a superposition of multiple processes and has multi-periodic attributes, the periodic features of multi-dimensional time series data are extracted through the periodic feature extraction module in order to more fully mine the features and improve the prediction accuracy.
[0076] Specifically, the periodic feature extraction module extracts periodic features from time series data in the following manner:
[0077] For each dimension of time series data, K periodic components of the time series data of the dimension are calculated, and the time series data of the dimension is converted into K two-dimensional data based on the K periodic components;
[0078] Based on the two-dimensional convolutional network, feature extraction is performed on each two-dimensional data to obtain K two-dimensional features;
[0079] Each two-dimensional feature is converted into a one-dimensional feature; based on the weights of the K periodic components, the K one-dimensional features are weightedly fused to obtain the periodic features corresponding to the time series data of each dimension.
[0080] During implementation, a fast Fourier transform is performed on the time series data of each dimension to obtain the period of the time series data of each dimension and the amplitude of each period;
[0081] Take K periods with larger amplitudes as the K period components of the time series data of this dimension.
[0082] During implementation, the frequency components of the time series data of each dimension in the multidimensional data of the sample are calculated by fast Fourier transform, and the main K frequency components are taken according to the amplitude of the frequency components. According to the conversion relationship between the adopted frequency, frequency and period of the time series data, K period components can be obtained. That is, the period corresponding to the first K frequencies with larger amplitudes is taken as the K period components of this dimension. During implementation, the size of K is determined according to the length of the time series data and the calculation accuracy requirements.
[0083] During implementation, after obtaining K periodic components of each dimensional time series data, the dimensional time series data is converted into two-dimensional data based on each periodic component; in the two-dimensional data, the columns and rows of the two-dimensional data respectively reflect the time series changes within the cycle and between cycles.
[0084] It should be noted that if the length of the time series data is not a multiple of a periodic component, zeros are padded after the two-dimensional data corresponding to the periodic component to make the two-dimensional data structure complete. When the two-dimensional feature is converted to a one-dimensional feature later, the padded bits are first deleted and then converted to a one-dimensional feature.
[0085] Then, feature extraction can be performed on each two-dimensional data based on the two-dimensional convolutional network to obtain K two-dimensional features. During implementation, the two-dimensional convolutional network can use an existing network, such as an Inception network, to extract two-dimensional features. The size of the extracted two-dimensional features is the same as that of the input two-dimensional data.
[0086] After extracting the two-dimensional features, the two-dimensional features are converted into one-dimensional features, and the obtained one-dimensional features have the same length as the time series data of this dimension.
[0087] Since the time series data of this dimension has K periodic components, that is, K one-dimensional features are obtained, and each one-dimensional feature contributes differently to the data, therefore, the K one-dimensional features are weightedly fused based on the weights of the K periodic components to obtain the periodic features corresponding to the time series data of each dimension.
[0088] During implementation, the amplitude corresponding to each periodic component is used as the weight of the periodic component. The amplitude of each periodic component, that is, the amplitude of the frequency component corresponding to each periodic component, that is, the amplitude of each frequency obtained by fast Fourier transform.
[0089] During implementation, the following formula is used to calculate the periodic characteristics of the time series data of this dimension:
[0090]
[0091] Among them, f ct A represents the periodic eigenvalue of the tth time step of the cth dimension time series data, ck Represents the amplitude corresponding to the kth period component of the cth dimension time series data, Represents the eigenvalue of the tth time step of the one-dimensional feature corresponding to the kth periodic component of the cth dimension time series data.
[0092] For example, the size of a sample's multidimensional time series data is T×C, where T is the number of time steps and C is the dimension. The periodic feature extraction module extracts features from each dimension separately, and the obtained periodic features are still time series data, that is, they are still of the size of T×C.
[0093] After obtaining the periodic features, deep learning is performed to extract deep features. During implementation, a cyclic unit is used to extract the deep features of each time step. That is, the periodic features obtained at each time step are used as the input of a time step, and a cyclic unit is used to extract the deep features.
[0094] During implementation, the recurrent unit may adopt multiple layers of gated recurrent units, each layer of gated recurrent units is used to extract hidden features based on input data; the input of the first layer of gated recurrent units is the periodic features of each time step; the input of each layer of gated recurrent units except the first layer includes the periodic features of each time step and the hidden features of the previous time step; the last layer of gated recurrent units outputs the deep features of each time step.
[0095] Since each time step has different impacts on future moments, the deep features of each time step are weighted and fused based on the carbon emissions at each time step to obtain the time series features, so that the extracted features are more conducive to the prediction of carbon emissions at future moments.
[0096] When implemented, the weight of the deep features at each time step is calculated using the following formula:
[0097] w t =αy t +(1-α)w t-1
[0098] Among them, w t-1 represents the weight of the deep feature at the t-1th time step, w t represents the weight of the deep feature at the tth time step, y t represents the carbon emissions at the tth time step, and α represents the smoothing factor.
[0099] The smoothing factor determines the degree of reliance on past time steps. α∈[0,1], when α is large, newer time steps will have a greater impact, when α is small, older time steps will have a greater impact. The weight of the first time step can be preset.
[0100] During implementation, the feature fusion module concatenates the static features and the time series features to obtain fused features. The prediction module predicts carbon emissions based on the fused features. The prediction module can use a fully connected layer to output predicted values for multiple time steps.
[0101] During implementation, the following formula is used to calculate the training loss of the multi-step time series forecasting model:
[0102] Loss=Loss mse +Loss shape
[0103] Among them, Loss mse Represents mean square error loss, Loss shape Represents shape loss.
[0104] Specifically, the shape loss is calculated using the following formula:
[0105] Loss shape =β1Loss1+β2Loss2+β3Loss3
[0106] Among them, Loss1 represents the distance loss between the label sequence and the prediction sequence, Loss2 represents the principal component loss between the label sequence and the prediction sequence, Loss3 represents the correlation loss between the label sequence and the prediction sequence, and β1, β2 and β3 represent weights.
[0107] By considering the mean square error loss and shape loss, the optimization direction of the model can be more effectively guided and the prediction accuracy can be improved.
[0108] In implementation, if the predicted sequence has the same shape as the label sequence, the distance difference at each time step does not fluctuate much. Therefore, the following formula is used to calculate the distance loss between the label sequence and the predicted sequence:
[0109]
[0110] Where N represents the number of samples in the current training batch, T′ represents the length of the label sequence, and y it represents the value of the tth element in the label sequence of the i-th sample, Represents the value of the tth element in the prediction sequence of the i-th sample, y ij Represents the value of the jth element in the label sequence of the i-th sample, represents the value of the jth element in the predicted sequence of the i-th sample, and d(·,·) represents the signed distance function.
[0111] If the predicted sequence has the same shape as the label sequence, the principal components of the predicted sequence and the label sequence are not much different. Therefore, the following formula is used to calculate the principal component loss between the label sequence and the predicted sequence:
[0112]
[0113] Among them, N represents the number of samples in the current training batch, n mf represents the number of principal components, n f represents the quantity of all components, F j (y i ) means taking y i The jth principal component of Indicates taking The jth principal component of Indicates taking The kth non-principal component of ||·|| p represents the Lp norm, y i represents the label sequence of the i-th sample, Represents the predicted sequence of the i-th sample.
[0114] During implementation, the components of the sequence are obtained by fast Fourier transform to obtain the frequencies of the sequence, where the frequencies with larger amplitudes are the principal components and the others are non-principal components. The number of principal components can be determined according to the length of the sequence.
[0115] If the predicted sequence has the same shape as the label sequence, the difference between the correlation coefficient between the predicted sequence and the label sequence and the autocorrelation of the label sequence is very small. Therefore, the following formula is used to calculate the correlation loss between the label sequence and the predicted sequence:
[0116]
[0117] Among them, y i represents the label sequence of the i-th sample, represents the predicted sequence of the i-th sample, R(·,·) represents the cross-correlation function, ||·|| p represents the Lp norm, and N represents the number of samples in the current training batch.
[0118] By considering distance fluctuations, principal component differences, and correlation differences, the similarity between the prediction results and labels is more fully considered, so that the model can predict carbon emissions more accurately.
[0119] When the model training reaches the number of iterations or meets the preset training loss accuracy, the training is stopped and the carbon emission prediction model is obtained.
[0120] Based on the carbon emission prediction model, the carbon emissions of each building unit can be predicted. During implementation, the built environment data of the building unit to be predicted and the multi-dimensional time series data of T time steps before the current moment (including energy consumption time series data, social and economic time series data, and carbon emission time series data) can be obtained as the input data of the model to predict the carbon emissions of the building unit to be predicted in multiple time steps in the future. Determine whether carbon control measures need to be implemented for the building unit based on the predicted carbon emissions.
[0121] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0122] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for training a carbon emission prediction model, characterized in that: The following steps are involved: Obtaining historical carbon emissions of the building unit and corresponding carbon emission related factor data; the carbon emission related factor data includes static data and multi-dimensional time series data; Construct a training sample set based on the historical carbon emissions of the building unit and the corresponding carbon emission related factor data; Constructing a multi-step time series prediction model, the multi-step time series prediction model is used to predict carbon emissions in multiple time steps in the future; the multi-step time series prediction model includes: a static feature extraction module, used to extract static features based on the static data; a time series feature extraction module, used to extract time series features based on the multi-dimensional time series data; a feature fusion module, used to fuse static features and time series features; a prediction module, used to predict carbon emissions in multiple time steps in the future based on the fused features; The multi-step time series prediction model is trained based on the training sample set to obtain a carbon emission prediction model.
2. The method for training a carbon emission prediction model according to claim 1, characterized in that: The training loss of the multi-step time series prediction model is calculated using the following formula: Loss=Loss mse +Loss shape Loss shape =β1Loss1+β2Loss2+β3Loss3 Among them, Loss mse Represents mean square error loss, Loss shape represents shape loss, Loss1 represents the distance loss between the label sequence and the prediction sequence, Loss2 represents the principal component loss between the label sequence and the prediction sequence, Loss3 represents the correlation loss between the label sequence and the prediction sequence, and β1, β2 and β3 represent weights.
3. The method for training a carbon emission prediction model according to claim 2, characterized in that: The distance loss between the label sequence and the prediction sequence is calculated using the following formula: Where N represents the number of samples in the current training batch, T′ represents the length of the label sequence, and y it represents the value of the tth element in the label sequence of the i-th sample, Represents the value of the tth element in the prediction sequence of the i-th sample, y ij Represents the value of the jth element in the label sequence of the i-th sample, represents the value of the jth element in the predicted sequence of the i-th sample, and d(·,·) represents the signed distance function.
4. The method for training a carbon emission prediction model according to claim 2, characterized in that: The principal component loss between the label sequence and the prediction sequence is calculated using the following formula: Among them, N represents the number of samples in the current training batch, n mf represents the number of principal components, n f represents the quantity of all components, F j (y i ) means taking y i The jth principal component of Indicates taking The jth principal component of Indicates taking The kth non-principal component of ||·|| p represents the Lp norm, y i represents the label sequence of the i-th sample, Represents the predicted sequence of the i-th sample.
5. The method for training a carbon emission prediction model according to claim 2, characterized in that: The following formula is used to calculate the correlation loss between the label sequence and the prediction sequence: Among them, y i represents the label sequence of the i-th sample, represents the predicted sequence of the i-th sample, R(·,·) represents the cross-correlation function, ||·|| p represents the Lp norm, and N represents the number of samples in the current training batch.
6. The method for training a carbon emission prediction model according to claim 1, characterized in that: The training sample set is constructed based on the historical carbon emissions of the building unit and the corresponding carbon emission related factor data, including: For each building unit, two sliding windows with a length of T are used to slide in parallel on the multidimensional time series data and the corresponding carbon emission time series data; The multidimensional time series data, carbon emission time series data and static data of the building unit obtained by sliding at each step are used as the input data of the sample, and the carbon emission time series data of multiple time steps after the sliding window on the carbon emission time series data are the labels of the sample, constituting a sample.
7. The method for training a carbon emission prediction model according to claim 3, characterized in that: The temporal feature extraction module comprises: A periodic feature extraction module, used to extract periodic features of time series data based on multi-dimensional time series data of samples; A deep feature extraction module, used to extract the deep features of each time step using a cycle unit based on the periodic features; The feature weighting module is used to perform weighted fusion of the deep features of each time step based on the carbon emissions at each time step to obtain the time series features.
8. The method for training a carbon emission prediction model according to claim 4, characterized in that: The periodic feature extraction module extracts periodic features from time series data in the following manner: For each dimension of time series data, K periodic components of the time series data of the dimension are calculated, and the time series data of the dimension is converted into K two-dimensional data based on the K periodic components; Based on the two-dimensional convolutional network, feature extraction is performed on each two-dimensional data to obtain K two-dimensional features; Each two-dimensional feature is converted into a one-dimensional feature; based on the weights of the K periodic components, the K one-dimensional features are weightedly fused to obtain the periodic features corresponding to the time series data of each dimension.
9. The method for training a carbon emission prediction model according to claim 5, characterized in that: The following formula is used to calculate the periodic characteristics of the time series data of this dimension: Among them, f ct A represents the periodic eigenvalue of the tth time step of the cth dimension time series data, ck Represents the amplitude corresponding to the kth period component of the cth dimension time series data, Represents the eigenvalue of the tth time step of the one-dimensional feature corresponding to the kth periodic component of the cth dimension time series data.
10. The method for training a carbon emission prediction model according to claim 4, characterized in that: The weight of the deep feature at each time step is calculated using the following formula: w t =αy t +(1-a)w t-1 Among them, w t-1 represents the weight of the deep feature at the t-1th time step, w t represents the weight of the deep feature at the tth time step, y t represents the carbon emissions at the tth time step, and α represents the smoothing factor.
Citation Information
Patent Citations
Regional energy internet integration system and method for optimizing configuration and operation thereof
CN107784410A
Commercial building low-carbon scheduling method and system considering full-life-cycle carbon emission
CN118863401A
Dynamic carbon emission factor prediction method based on data driving
CN119005405A
Multi-frame prediction for hybrid neural network / hidden Markov models
US8442821B1