Carbon emission prediction method and device based on data enhancement and time-frequency fusion comparison
By adopting a carbon emission prediction method based on data enhancement and time-frequency fusion comparison in the power system, the TF-CEP model combined with multiple influencing factors has been used to solve the problem of low prediction accuracy in the prior art, and achieve higher carbon emission prediction accuracy.
Patent Information
- Application Number
- CN202411828829.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The existing carbon emission prediction methods based on artificial intelligence fail to fully consider the influence of weather factors, line state and energy storage components in the power system, resulting in low prediction accuracy.
The carbon emission prediction method based on data enhancement and time-frequency fusion comparison is adopted to perform data processing through the TF-CEP model. The model includes data acquisition, data augmentation, feature representation, contrast learning and downstream task modules, using Generative Adversarial Network (GAN) for data augmentation, time-domain and frequency-domain data representation, time-frequency fusion contrast learning, and combining weather, line state and energy storage component information for attention learning.
It effectively improves the accuracy of carbon emission forecasts and can more accurately consider various influencing factors in the power system.
Smart Images

Figure SMS_6 
Figure SMS_9 
Figure SMS_12
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of carbon emission prediction of power systems, and in particular to a carbon emission prediction method and device based on data enhancement and time-frequency fusion comparison. Background Art
[0002] As the global climate change problem becomes increasingly serious, reducing carbon emissions has become a research focus. The power system is one of the main sources of carbon emissions. In order to achieve low-carbon development of electricity, it is very important to carry out carbon emission prediction.
[0003] In the context of low-carbon electricity development, accurate prediction of the carbon emission intensity of the power system can provide data support for carbon emission reduction optimization strategies, thereby helping to reduce carbon emissions from the power system. At present, carbon emission prediction methods mainly use traditional prediction methods and artificial intelligence-based prediction methods. Traditional prediction methods are prone to prediction bias. Therefore, artificial intelligence prediction methods are widely used and have indeed improved the prediction speed. However, in the power system, weather factors, line conditions during transmission, and the charging and discharging process of energy storage elements in the distribution part will affect the prediction of carbon emissions. The existing artificial intelligence-based carbon emission prediction methods do not take into account the actual impact of these external factors on carbon emissions. The prediction methods of existing technologies are not accurate. Summary of the invention
[0004] In view of this, the present invention provides a carbon emission prediction method and device based on data enhancement and time-frequency fusion comparison, which utilizes power data for time-frequency fusion features and time-frequency fusion comparison, introduces an attention mechanism to combine weather information, line status information, energy storage element status information and other features to predict carbon emission intensity, which can effectively improve the accuracy of carbon emission prediction.
[0005] The technical solution adopted by the embodiment of the present invention to solve the technical problem is:
[0006] A carbon emission prediction method based on data enhancement and time-frequency fusion comparison is implemented based on the TF-CEP model. The TF-CEP model consists of a data acquisition module, a data enhancement module, a feature representation module, a contrastive learning module and a downstream task module in sequence. The prediction implementation steps include:
[0007] Step S1, the data acquisition module acquires power data P under different power generation modes, as well as weather data WT, line status data WS and energy storage element data SE; the power data includes thermal power data, hydropower data, wind power data, photovoltaic power generation data, and biomass power generation data, P∈R L×d , L represents the data length, d represents the feature dimension;
[0008] Step S2: the data enhancement module uses the generative adversarial network GAN toL×d Each power data P is subjected to data enhancement operation to obtain power generation data;
[0009] Step S3: In the feature representation module, the power data and the enhanced power generation data are respectively subjected to the time domain data representation module and the frequency domain data representation module for data representation learning. The time domain data representation module outputs the time domain sample feature t i , time domain enhanced sample features The frequency domain data characterization module outputs the frequency domain sample feature f i And frequency domain enhanced sample features
[0010] Step S4, the contrastive learning module compares t i and f i Perform feature fusion operation to obtain time-frequency fusion feature o i ,right and Perform feature fusion operation to obtain the time-frequency fusion features of the enhanced sample Further comparative learning in the time-frequency domain is performed to obtain the feature representation vector C i ;
[0011] Step S5: the downstream task module uses the weather data WT, the line status data WS and the energy storage element data SE to combine C i Attention learning is performed on the concatenated result of P to obtain the attention weights of the three data types, and the attention weights are further used to adjust C i The adjusted data is combined with the result of P and used as the carbon emission intensity forecast result for the next stage.
[0012] Preferably, step S2 is to perform data enhancement based on the generative model to create power generation data with the same temporal and spatial dependencies as the real data; the generative model is composed of a generator G and a discriminator D, the generator G generates new power generation data through a linear layer and LSTM, and the discriminator D verifies the new power generation data based on one-dimensional convolution and LSTM;
[0013] The actual data distribution of power data is represented by P r , the data distribution generated by GAN is P g , the loss of adversarial training is expressed as:
[0014]
[0015] in, Represents the real data p r and generate data p g Linear interpolation between .
[0016] Preferably, in the feature representation module:
[0017] The time domain data representation module is composed of L convolutional layers stacked together, and a single convolutional layer is represented as:
[0018]
[0019] P fc =max(0,FC(P cv1d ))
[0020] FC(P cv1d )=P cv1d W fc +b fc
[0021] t i =Norm(P fc +P)
[0022]
[0023] in, represents a one-dimensional convolution operation, || represents a concatenation operation, and the convolution kernel
[0024] R = {b (1) ,b (2) ,...,b (h)},W fc ∈R d×h , b fc ∈R 1×h ; FC(·) table
[0025] represents a single fully connected neural network layer; Norm() represents the layer normalization operation, μ and σ 2 are the mean and variance respectively; γ and β represent the parameter vectors of scaling and translation respectively. The process of layer normalization is expressed as:
[0026]
[0027] The frequency domain data characterization module introduces the FECAM mechanism to characterize the power data and the enhanced power generation data: First, the power data P∈R L×d After the split operation, the power generation data in each channel is split to obtain the variables {v0,v1,...,v L-1}; Then, the discrete cosine transform DCT is introduced to obtain frequency information, each channel variable is multiplied by all DCT components on the element, and the complete channel tensor Freq is obtained by stacking and realigning:
[0028] v0,v1,…,v L-1=Split(P t-d+1:t )
[0029] Freq i =DCT j (v i )
[0030] Freq=stack(Freq 0 ,Freq 1 ,...,Freq n-1 )
[0031] Then, a fully connected neural network structure is used to learn the frequency channel attention. The process is:
[0032] F att =σ(W2δ(W1Freq))
[0033] g(P t-d+1:t )=F att
[0034] f i =FECAM(P)
[0035]
[0036] Preferably, in the contrastive learning module, the feature fusion process is expressed as:
[0037] o i =concat(t i ,f i )
[0038]
[0039] The same batch of X data of power data samples corresponds to sample o i and As a positive sample pair, other samples are used as negative samples, and the corresponding samples o in the same batch of data are maximized. i and The similarity between feature representations is minimized to perform time-frequency contrast learning with other samples to obtain a high-quality feature representation vector C i ; During the TF-CEP model training process, the loss function is expressed as:
[0040]
[0041] in, Indicates calculation o i and , γ is a hyperparameter.
[0042] Preferably, the steps of the downstream task module include:
[0043] Step S51, splicing C i The concatenation result is passed through the FC layer to obtain the matrix D:
[0044] D=FC(C i ||P)
[0045] Step S52: weather data WT, line status data WS and energy storage element data SE are respectively used as query vectors after passing through the FC layer and then perform attention learning with D to obtain the attention weight α WT , α WS , α SE :
[0046] Q WT =WT
[0047] K WT =D
[0048]
[0049] Q WS =WS
[0050] K WS =V WS =D
[0051]
[0052] Q SE =SE
[0053] K SE =V SE =D
[0054]
[0055] In the formula, h represents the vector dimension, and represents the weight parameter matrix;
[0056] Calculate D WT , D WS and D SE :
[0057]
[0058] Splicing D WT , D WS and D SE , the concatenation is passed through the Norm() layer and the FC layer to obtain the output Y as the carbon emission intensity prediction result for the next stage:
[0059] Y=FC(Norm((D WT ||D WS ||D SE )+D))
[0060] The loss function used in the TF-CEP model training process is mean square error.
[0061]
[0062] In the formula, let Y (i) Represents the prediction result, Y′ (i) represents the true result, and L is the total number of samples.
[0063] A carbon emission prediction device based on data enhancement and time-frequency fusion comparison implements the above method based on the TF-CEP model. The TF-CEP model is composed of a data acquisition module, a data enhancement module, a feature representation module, a contrastive learning module and a downstream task module in sequence:
[0064] The data acquisition module is used to acquire power data P under different power generation modes, as well as weather data WT, line status data WS and energy storage element data SE; the power data includes thermal power data, hydropower data, wind power data, photovoltaic power generation data, and biomass power generation data, P∈R L×d , L represents the data length, d represents the feature dimension;
[0065] The data enhancement module is used to generate adversarial networks (GANs) to enhance the set R L×d Each power data P is subjected to data enhancement operation to obtain power generation data;
[0066] The feature representation module includes a time domain data representation module and a frequency domain data representation module, which is used to perform data representation learning on the power data and the enhanced power generation data through the time domain data representation module and the frequency domain data representation module respectively, and the time domain data representation module outputs the time domain sample feature t i , time domain enhanced sample features The frequency domain data characterization module outputs the frequency domain sample feature f i And frequency domain enhanced sample features
[0067] The contrastive learning module is used to compare t i and f i Perform feature fusion operation to obtain time-frequency fusion feature o i ,right and Perform feature fusion operation to obtain the time-frequency fusion features of the enhanced sample Further comparative learning in the time-frequency domain is performed to obtain the feature representation vector C i ;
[0068] The downstream task module is used to combine the weather data WT, the line status data WS and the energy storage element data SE with C i Attention learning is performed on the concatenated result of P to obtain the attention weights of the three data types, and the attention weights are further used to adjust C i The adjusted data is combined with the result of P and used as the carbon emission intensity forecast result for the next stage.
[0069] It can be seen from the above technical scheme that the carbon emission prediction method and device based on data enhancement and time-frequency fusion comparison provided by the embodiment of the present invention first learns the potential knowledge of time domain and frequency domain data based on power data under different power generation modes, and then based on the time-frequency fusion features, maximizes the similarity between the feature representations of positive samples and minimizes the similarity between negative sample pairs for time-frequency fusion comparison. Finally, the attention mechanism is introduced to combine features such as weather information, line status information, and energy storage element status information to predict carbon emission intensity. The present invention uses power data for time-frequency fusion features and time-frequency fusion comparison, introduces an attention mechanism to combine features such as weather information, line status information, and energy storage element status information to predict carbon emission intensity, which can effectively improve the accuracy of carbon emission prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 This is the architecture diagram of the TF-CEP model for carbon emission prediction based on data enhancement and time-frequency fusion comparison.
[0071] Figure 2 Schematic diagram of the frequency domain data characterization module. DETAILED DESCRIPTION
[0072] The technical scheme and technical effects of the present invention are further elaborated in detail below in conjunction with the accompanying drawings of the present invention.
[0073] In order to fully exploit the time and frequency information in power data and predict carbon emission intensity, this paper proposes the TF-CEP method. The model architecture of TF-CEP is as follows: Figure 1As shown. The model consists of a data module, a data enhancement and feature representation module, a comparative learning module and a downstream task module. The power data information under different power generation modes is of great significance to the prediction of carbon emission intensity. In this article, the power data under different power generation modes mainly include coal power data, hydroelectricity power data, wind power data, photovoltaic power data and biomass power data. In order to fully mine the power data information under different power generation modes, firstly, the data enhancement operation is performed on the power data through the data enhancement and feature representation module, and feature representation learning is performed in the time domain and frequency domain, so that the model can fully mine the potential knowledge in the power data and obtain the time domain sample feature t i , time domain enhanced sample features Frequency domain sample feature f i And frequency domain enhanced sample features Then, in the contrastive learning module, the time-frequency domain sample features and the time-frequency domain enhanced sample features are fused respectively, and contrastive learning in the time-frequency domain is performed. In the downstream task module, weather conditions and other information are introduced to predict carbon emission intensity, and the prediction performance of the model is improved through the attention mechanism. The following is a detailed introduction to the specific implementation process of the data enhancement module, feature representation module, contrastive learning module, and downstream task module in the TF-CEP model.
[0074] Step S1, the data acquisition module acquires power data P under different power generation modes, as well as weather data WT, line status data WS and energy storage element data SE; the power data includes thermal power data, hydropower data, wind power data, photovoltaic power generation data, and biomass power generation data, P∈R L×d , L represents the data length, d represents the feature dimension;
[0075] Step S2: The data enhancement module uses the generative adversarial network GAN to L×d Each power data P is subjected to data enhancement operation to obtain power generation data;
[0076] Step S3: In the feature representation module, the power data and the enhanced power generation data are respectively subjected to the time domain data representation module and the frequency domain data representation module for data representation learning. The time domain data representation module outputs the time domain sample feature t i , time domain enhanced sample features The frequency domain data characterization module outputs the frequency domain sample features f i And frequency domain enhanced sample features
[0077] Step S4, the comparison learning module compares t i and f iPerform feature fusion operation to obtain time-frequency fusion feature o i ,right and Perform feature fusion operation to obtain the time-frequency fusion features of the enhanced sample Further comparative learning in the time-frequency domain is performed to obtain the feature representation vector C i ;
[0078] Step S5: The downstream task module uses weather data WT, line status data WS and energy storage element data SE to combine C i Attention learning is performed on the concatenated result of P to obtain the attention weights of the three data types, and the attention weights are further used to adjust C i The adjusted data is combined with the result of P and used as the carbon emission intensity forecast result for the next stage.
[0079] In order to enhance the robustness and improve the generalization ability of the model, we first input the power data P∈R under different power generation modes. L×d The present invention uses a generative adversarial network to perform data enhancement. The module aims to learn a generative model that can create power generation data with the same temporal and spatial dependencies as real data. The data enhancement module is mainly composed of a generator G and a discriminator D. The generator generates new power generation data through a linear layer and LSTM, and the discriminator verifies the data based on one-dimensional convolution and LSTM.
[0080] The actual data distribution of power data is represented by P r , the data distribution generated by GAN is P g , the loss of adversarial training is expressed as:
[0081]
[0082] in, Represents the real data p r and generate data p g Linear interpolation between .
[0083] The feature representation module is used to perform data representation learning on the power data and the enhanced power generation data through the time domain data representation module and the frequency domain data representation module respectively:
[0084] The time domain data representation module is composed of L convolutional layers stacked together, and the representation of a single convolutional layer is:
[0085]
[0086] P fc =max(0,FC(P cv1d )) (3)
[0087] FC(P cv1d )=P cv1d W fc +b fc (4)
[0088] t i =Norm(P fc +P) (5)
[0089]
[0090] in, represents a one-dimensional convolution operation, || represents a concatenation operation, and the convolution kernel
[0091] R = {b (1) ,b (2) ,...,b (h)},W fc ∈R d×h , b fc ∈R 1×h ; FC(·) table
[0092] represents a single fully connected neural network layer; Norm() represents the layer normalization operation, μ and σ 2 are the mean and variance respectively; γ and β represent the parameter vectors of scaling and translation respectively. The process of layer normalization is expressed as:
[0093]
[0094] The frequency domain data characterization module introduces the FECAM mechanism to characterize and learn the power data and enhanced power generation data. The specific process is as follows: Figure 2 As shown: First, the power data P∈R L×d After the split operation, the power generation data in each channel is split to obtain the variables {v0,v1,...,v L-1}; Then, the discrete cosine transform DCT is introduced to obtain frequency information, each channel variable is multiplied by all DCT components on the element, and the complete channel tensor Freq is obtained by stacking and realigning:
[0095] v0,v1,…,v L-1 =Split(P t-d+1:t ) (8)
[0096] Freq i =DCT j (v i ) (9)
[0097] Freq=stack(Freq 0,Freq 1 ,...,Freq n-1 ) (10)
[0098] Then, a fully connected neural network structure is used to learn the frequency channel attention. The process is:
[0099] F att =σ(W2δ(W1Freq)) (11)
[0100] g(P t-d+1:t )=F att (12)
[0101] f i =FECAM(P) (13)
[0102]
[0103] In the contrastive learning module, the feature fusion process is expressed as:
[0104] o i =concat(t i ,f i ) (15)
[0105]
[0106] The same batch of X data of power data samples corresponds to sample o i and As a positive sample pair, other samples are used as negative samples, and the corresponding samples o in the same batch of data are maximized. i and The similarity between feature representations is minimized to perform time-frequency contrast learning with other samples to obtain a high-quality feature representation vector C i ; During the TF-CEP model training process, the loss function is expressed as:
[0107]
[0108] in, Indicates calculation o i and , γ is a hyperparameter.
[0109] The steps of the downstream task module include:
[0110] Step S51, splicing C i The concatenation result is passed through the FC layer to obtain the matrix D:
[0111] D=FC(C i ||P) (19)
[0112] Step S52: Since carbon emission intensity is closely related to weather data, line status and energy storage element status in the power system, we add the acquired weather data, line status data and energy storage element data to the attention learning of power data features. The weather data WT, line status data WS and energy storage element data SE are respectively used as query vectors after passing through the FC layer to perform attention learning with D to obtain the attention weight α WT , α WS , α SE :
[0113] Q WT =WT (20)
[0114] K WT =D (21)
[0115]
[0116] Q WS =WS (23)
[0117] K WS =V WS =D (24)
[0118]
[0119] Q SE =SE (26)
[0120] K SE =V SE =D (27)
[0121]
[0122] In the formula, h represents the vector dimension, and represents the weight parameter matrix;
[0123] Calculate D WT , D WS and D SE :
[0124]
[0125] Splicing D WT , D WS and D SE , the concatenation is passed through the Norm() layer and the FC layer to obtain the output Y as the carbon emission intensity prediction result for the next stage:
[0126] Y=FC(Norm((D WT ||D WS ||DSE )+D)) (32)
[0127] The loss function used in the TF-CEP model training process is mean square error.
[0128]
[0129] In the formula, let Y (i) Represents the prediction result, Y′ (i) represents the true result, and L is the total number of samples.
[0130] A carbon emission prediction device based on data enhancement and time-frequency fusion comparison implements the above method based on the TF-CEP model. The TF-CEP model is composed of a data acquisition module, a data enhancement module, a feature representation module, a contrastive learning module and a downstream task module in sequence:
[0131] The data acquisition module is used to obtain power data P under different power generation modes, as well as weather data WT, line status data WS and energy storage element data SE; power data includes thermal power data, hydropower data, wind power data, photovoltaic power generation data, and biomass power generation data, P∈R L×d , L represents the data length, d represents the feature dimension;
[0132] The data enhancement module is used to use the generative adversarial network GAN to enhance the set R L×d Each power data P is subjected to data enhancement operation to obtain power generation data;
[0133] The feature representation module includes a time domain data representation module and a frequency domain data representation module, which are used to perform data representation learning on the power data and the enhanced power generation data through the time domain data representation module and the frequency domain data representation module respectively. The time domain data representation module outputs the time domain sample feature t i , time domain enhanced sample features The frequency domain data characterization module outputs the frequency domain sample features f i And frequency domain enhanced sample features
[0134] Contrastive learning module for t i and f i Perform feature fusion operation to obtain time-frequency fusion feature o i ,right and Perform feature fusion operation to obtain the time-frequency fusion features of the enhanced sample Further comparative learning in the time-frequency domain is performed to obtain the feature representation vector C i ;
[0135] Downstream task module, used to combine weather data WT, line status data WS and energy storage element data SE with C i Attention learning is performed on the concatenated result of P to obtain the attention weights of the three data types, and the attention weights are further used to adjust C i The adjusted data is combined with the result of P and used as the carbon emission intensity forecast result for the next stage.
[0136] Data and Experimental Description
[0137] In order to verify the effectiveness of the TF-CEP model method, this paper uses data from the power service system, which contains 627,263 sequence samples. The ratio of the training set, validation set, and test set is set to 0.7:0.15:0.15. The experimental environment is shown in Table 1.
[0138] Table1 Experimental environment
[0139]
[0140] In this invention, we use Mean Square Error (MSE) and Mean Absolute Error (MAE) as evaluation indicators.
[0141]
[0142] Where N represents the number of samples, y i is the true value, is the predicted value. The smaller the values of MSE and MAE, the smaller the difference and average difference between the model predicted value and the true value, that is, the better the prediction performance of the model.
[0143] Comparison of prediction results (model performance)
[0144] (1) In order to verify the performance of the model, we compare the proposed method TF-CEP with eight baseline methods, and the prediction results are shown in Table 2. The experimental results show that the TF-CEP method is superior to other baseline methods. The reason for the performance improvement of the TF-CEP method is that it fully learns the time domain and frequency domain features of power data and mines the potential knowledge in the features through comparative learning.
[0145] Table 2:Comparison of the results of different prediction methods
[0146]
[0147]
[0148] (2) In this paper, we compare the TF-CEP method with four state-of-the-art methods: Ts2vec, BTSF, SimCLR and TS-TCC. According to Table 3, the TF-CEP method has a better advantage than the other four methods.
[0149] Ts2vec
[17] : A representation learning model that hierarchically distinguishes positive and negative samples from instance and temporal dimensions.
[0150] BTSF
[18] : This method proposes a Bilinear Temporal-Spectral Fusion framework and improves model performance by learning feature representations in the time domain and frequency domain respectively.
[0151] SimCLR
[19] : A self-supervised contextual contrastive learning framework.
[0152] TS-TCC
[20] : A contrastive learning framework based on temporal contrast module and contextual contrast module.
[0153] Table 3: Comparison of State-of-the-art methods
[0154]
[0155] Ablation experiment:
[0156] To further verify the contribution of each module in the TF-CEP method, we conducted ablation experiments. The variants of our method are shown in Table 4.
[0157] Table 4.The variants of TF-CEP
[0158]
[0159] Table 5 shows the performance of different variants of the TF-CEP method. The experiment shows that the performance of the TF-CEP method is better than the other four variants. In addition, the experiment shows that the data enhancement module, time-frequency domain representation learning module and contrastive learning module of the TF-CEP method have an important impact on the performance of the carbon emission prediction model.
[0160] Table 5:Performance comparison of different variants
[0161]
[0162] Parameters influence:
[0163] In order to better predict carbon emission intensity and reduce the impact of model parameters on prediction results, this paper conducts parameter experiments on the prediction performance of the model under different embedding dimensions. In this paper, the parameter h is set to 8, 16, 32, 64, and 128. According to the experimental results, the larger the h, the better the model prediction performance, but when h>16, the model prediction performance effect is not obvious. Therefore, based on the parameter experiment, this paper sets h to 16.
[0164] What is disclosed above is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. A person skilled in the art can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
[0165]
[17] Choi S,Kang D,Cho M.Contrastive Mean-Shift Learning for Generalized Category Discovery[C].Proceedings of the IEEE / CVF Conference onComputer Vision and Pattern Recognition.2024:23094-23104.
[0166]
[18] Wu J, Sun W, Gan T, et al. Neighbor-guided consistent and contrastive learning for semi-supervised action recognition [J]. IEEE Transactions on ImageProcessing, 2023, 32: 2215-2227.
[0167]
[19] Shu
[0168]
[20] Basak H,Yin Z.Pseudo-label guided contrastive learning for semi-supervised medical image segmentation[C].Proceedings of the IEEE / CVFconference on computer vision and pattern recognition.2023:19786-19797.
Claims
1. A carbon emission prediction method based on data enhancement and time-frequency fusion comparison, characterized in that: Based on the TF-CEP model implementation, the TF-CEP model consists of a data acquisition module, a data enhancement module, a feature representation module, a contrastive learning module, and a downstream task module. The prediction implementation steps include: Step S1, the data acquisition module acquires power data P under different power generation modes, as well as weather data WT, line status data WS and energy storage element data SE; the power data includes thermal power data, hydropower data, wind power data, photovoltaic power generation data, and biomass power generation data. L represents the data length, and d represents the feature dimension; Step S2: the data enhancement module uses a generative adversarial network (GAN) to Each power data P is subjected to data enhancement operation to obtain power generation data; Step S3: In the feature representation module, the power data and the enhanced power generation data are respectively subjected to the time domain data representation module and the frequency domain data representation module for data representation learning. The time domain data representation module outputs the time domain sample feature t i , time domain enhanced sample features The frequency domain data characterization module outputs the frequency domain sample feature f i And frequency domain enhanced sample features Step S4, the contrastive learning module compares t i and f i Perform feature fusion operation to obtain time-frequency fusion feature o i ,right and Perform feature fusion operation to obtain the time-frequency fusion features of the enhanced sample Further comparative learning in the time-frequency domain is performed to obtain the feature representation vector C i ; Step S5: the downstream task module uses the weather data WT, the line status data WS and the energy storage element data SE to combine C i Attention learning is performed on the concatenated result of P to obtain the attention weights of the three data types, and the attention weights are further used to adjust C i The adjusted data is combined with the result of P and used as the carbon emission intensity forecast result for the next stage.
2. The carbon emission prediction method based on data enhancement and time-frequency fusion comparison according to claim 1 is characterized in that: The step S2 is to perform data enhancement based on the generative model to create power generation data with the same temporal and spatial dependencies as the real data; the generative model is composed of a generator G and a discriminator D, the generator G generates new power generation data through a linear layer and LSTM, and the discriminator D verifies the new power generation data based on one-dimensional convolution and LSTM; The actual data distribution of power data is represented by P r , the data distribution generated by GAN is P g , the loss of adversarial training is expressed as: in, Represents the real data p r and generate data p g Linear interpolation between .
3. The carbon emission prediction method based on data enhancement and time-frequency fusion comparison according to claim 2 is characterized in that: In the feature representation module: The time domain data representation module is composed of L convolutional layers stacked together, and a single convolutional layer is represented as: P fc =max(0,FC(P cv1d )) FC(P cv1d )=P cv1d W fc +b fc t i =Norm(P fc +P) in, represents a one-dimensional convolution operation, || represents a concatenation operation, and the convolution kernel FC(·) represents a single fully connected neural network layer; Norm() represents the layer normalization operation, μ and σ 2 are the mean and variance respectively; γ and β represent the parameter vectors of scaling and translation respectively. The process of layer normalization is expressed as: The frequency domain data characterization module introduces the FECAM mechanism to characterize and learn the power data and enhanced power generation data: First, the power data After the split operation, the power generation data in each channel is split to obtain the variables {v0,v1,...,v L-1 }; Then, the discrete cosine transform DCT is introduced to obtain frequency information, each channel variable is multiplied by all DCT components on the element, and the complete channel tensor Freq is obtained by stacking and realigning: v0,v1,…,v L-1 =Split(P t-d+1:t ) Freq i =DCT j (υ i ) Freq=stack(Freq 0 ,Freq 1 ,...,Freq n-1 ) Then, a fully connected neural network structure is used to learn the frequency channel attention. The process is: F att =σ(W2δ(w1Freq)) g(P t-d+1:t )=F att f i =FECAM(P) 4. The carbon emission prediction method based on data enhancement and time-frequency fusion comparison according to claim 3 is characterized in that: In the contrastive learning module, the feature fusion process is expressed as: o i =concat(t i ,f i ) The same batch of X data of power data samples corresponds to sample o i and As a positive sample pair, other samples are used as negative samples, and the corresponding samples o in the same batch of data are maximized. i and The similarity between feature representations is minimized to perform time-frequency contrast learning with other samples to obtain a high-quality feature representation vector C i ; During the TF-CEP model training process, the loss function is expressed as: in, Indicates calculation o i and , γ is a hyper parameter.
5. The carbon emission prediction method based on data enhancement and time-frequency fusion comparison according to claim 4 is characterized in that: The steps of the downstream task module include: Step S51, splicing C i The concatenation result is passed through the FC layer to obtain the matrix D: D=FC(C i ||P) Step S52: weather data WT, line status data WS and energy storage element data SE are respectively used as query vectors after passing through the FC layer and then perform attention learning with D to obtain the attention weight α WT , α WS , α SE : Q WT =WT K WT =D Q WS =WS K WS =V WS =D Q SE =SE K SE =V SE =D In the formula, h represents the vector dimension, and represents the weight parameter matrix; Calculate D WT , D WS and D SE : Splicing D WT , D WS and D SE , the concatenation is passed through the Norm() layer and the FC layer to obtain the output Y as the carbon emission intensity prediction result for the next stage: Y=FC(Norm((D WT ||D WS ||D SE )+D)) The loss in the TF-CEP model training process uses mean square error as the loss function In the formula, let Y (i) Represents the prediction result, Y′ (i) represents the true result, and L is the total number of samples.
6. A carbon emission prediction device based on data enhancement and time-frequency fusion comparison, characterized in that: The method described in any one of claims 1 to 5 is implemented based on the TF-CEP model, wherein the TF-CEP model is composed of a data acquisition module, a data enhancement module, a feature representation module, a contrastive learning module, and a downstream task module in sequence: The data acquisition module is used to acquire power data P under different power generation modes, as well as weather data WT, line status data WS and energy storage element data SE; the power data includes thermal power data, hydropower data, wind power data, photovoltaic power generation data and biomass power generation data. L represents the data length, and d represents the feature dimension; The data enhancement module is used to generate adversarial networks (GAN) to Each power data P is subjected to data enhancement operation to obtain power generation data; The feature representation module includes a time domain data representation module and a frequency domain data representation module, which is used to perform data representation learning on the power data and the enhanced power generation data through the time domain data representation module and the frequency domain data representation module respectively, and the time domain data representation module outputs the time domain sample feature t i , time domain enhanced sample features The frequency domain data characterization module outputs the frequency domain sample feature f i And frequency domain enhanced sample features The contrastive learning module is used to compare t i and f i Perform feature fusion operation to obtain time-frequency fusion feature o i ,right and Perform feature fusion operation to obtain the time-frequency fusion features of the enhanced sample Further comparative learning in the time-frequency domain is performed to obtain the feature representation vector C i ; The downstream task module is used to combine the weather data WT, the line status data WS and the energy storage element data SE with C i Attention learning is performed on the concatenated result of P to obtain the attention weights of the three data types, and the attention weights are further used to adjust C i The adjusted data is combined with the result of P and used as the carbon emission intensity forecast result for the next stage.
Citation Information
Patent Citations
Carbon emission prediction method and system based on double-view comparative learning
CN116862080A
Short-term carbon emission prediction method and device, computer readable storage medium and product
CN118628121A
Electric carbon sensing system and method for industrial users and computer equipment
CN118885468A
Short-term carbon emission prediction method based on CNN-Bi-LSTM neural network model
CN119090067A
Electric power plan management system and electric power plan management method
JP2020201712A