Carbon emission prediction method based on multi-view attention and recurrent neural network
The carbon emission prediction method that combines multi-view attention and recurrent neural networks with evolutionary optimization algorithms solves the problem of unsatisfactory prediction results caused by suboptimal parameter settings in existing technologies, and achieves higher accuracy in carbon emission prediction.
Patent Information
- Application Number
- CN202411835497.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Existing technologies for predicting industrial carbon emissions often fail to achieve high accuracy due to suboptimal parameter settings, resulting in unsatisfactory prediction results.
A carbon emission prediction method combining multi-view attention and recurrent neural networks with evolutionary optimization algorithms is proposed. Features are extracted through multi-view attention, and feature aggregation is learned through adaptive graph attention. A hybrid gated recurrent unit network is constructed, and the model parameters are optimized using a flock optimization algorithm.
It significantly improves the accuracy and effectiveness of carbon emission prediction, enhances the ability to extract long-term dependent time-series information, and solves the problem of parameter optimization and tuning.
Smart Images

Figure CN119721480B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of carbon emissions, and more specifically, to a carbon emissions prediction method based on multi-view attention and recurrent neural networks. Background Art
[0002] With the intensification of global climate change, the monitoring and prediction of industrial carbon emissions have become particularly important. Accurate carbon emission prediction is of great significance for policy making, energy management and environmental protection. In industrial applications, due to the nonlinearity of the data, it is often difficult to obtain ideal prediction accuracy by directly applying the original data for prediction. Therefore, it is first necessary to perform multi-view feature extraction on the data in order to reveal the inherent laws and characteristics of the data from different views. This includes but is not limited to the decomposition of time series and the extraction of time-frequency information of data through different mathematical transformations (such as Fourier transform and wavelet transform). However, since industrial carbon emission data often exhibits highly complex nonlinearity, including the volatility of time series and the interaction between multiple features, it is difficult to achieve ideal prediction results when predicting carbon emissions using only these feature extraction methods.
[0003] The prior art discloses a method and device for predicting urban carbon emissions based on a collaborative spatiotemporal convolutional network. The method comprises: using urban grids as nodes and constructing a heterogeneous graph of multi-perspective urban correlations based on spatial connectivity, geographic proximity, and temporal similarity of carbon emissions between grids; inputting urban carbon emissions and traffic density data into the heterogeneous graph in parallel; using two spatiotemporal convolutional modules to extract the spatiotemporal characteristics of carbon emissions and traffic density from the heterogeneous graphs containing carbon emissions and traffic density data, respectively; extracting the dependence of traffic density on carbon emissions from the spatiotemporal characteristics of traffic density, and fusing the dependence of traffic density on carbon emissions with the spatiotemporal characteristics of carbon emissions to obtain a global spatiotemporal characteristic of carbon emissions; and combining the global spatiotemporal characteristic of carbon emissions with external factors to collaboratively predict urban carbon emissions. However, because this method requires manual setting of network parameters, the parameters are often suboptimal, which in turn affects the prediction results. Summary of the Invention
[0004] The purpose of this invention is to disclose a carbon emission prediction method based on multi-view attention and recurrent neural network with better prediction effect.
[0005] To achieve the above objectives, the present invention provides a carbon emission prediction method based on multi-view attention and recurrent neural network, comprising:
[0006] S1: Get input data, perform multi-view attention feature extraction on the input data, and obtain a variety of feature information;
[0007] S2: Multiple feature information is aggregated through a feature aggregation algorithm based on adaptive graph attention learning to obtain fused feature information;
[0008] S3: Construct a prediction model of a hybrid gated recurrent unit network based on evolutionary optimization based on a recurrent neural network; use the fused feature information as the input of the prediction model;
[0009] S4: Optimizing the parameters of the prediction model through an evolutionary algorithm to obtain a prediction model with optimal model parameters;
[0010] S5: Realize industrial carbon emission prediction based on the prediction model of optimal model parameters and multiple characteristic information.
[0011] Furthermore, step S1 includes: performing fast Fourier transform on the input data to extract features to obtain frequency domain feature information; performing Gram angle field extraction on the input data to obtain correlation feature information; and performing Markov transfer field feature extraction on the input data to obtain dynamic change law feature information.
[0012] Furthermore, the input data is subjected to fast Fourier transform to extract features and obtain frequency domain feature information; including:
[0013] Performing a fast Fourier transform on the input data to extract features converts the input data from the time domain to the frequency domain, finds the top k frequencies with the largest amplitude, calculates the cycles with large energy, and uses the cycles with large energy as the selected cycles. Based on the selected cycles, the number of cycles is obtained, and the time step dimension of the input data in the time domain is reshaped into a dimension of cycle * number of cycles based on the number of cycles, which serves as the frequency domain feature information. The formula is as follows:
[0014] F=Avg(Amp(FFT(X))),
[0015]
[0016] Among them, FFT(·) and Amp(·) represent the calculation of fast Fourier transform and amplitude value respectively; through the function Avg(·) in d model The vector is averaged over the dimension vector Indicates the amplitude value of each frequency;
[0017] Based on the selected number of periods {s1,…,s k}, we get representations corresponding to different numbers of cycles by reshaping the input X into a four-dimensional tensor using the following formula:
[0018]
[0019] Padding(·) is used to expand the time series by 0 along the time dimension to make it consistent with compatible; Represents the i-th reconstructed time series, which is the frequency domain feature information.
[0020] Furthermore, the input data is subjected to Gram angle field feature extraction to obtain correlation feature information; including:
[0021] Construct a Gram matrix to represent the differences between each time point; based on the calculated Gram matrix, expand the time step dimension of the input data to two dimensions; pass the Gram matrix through the activation function Elu to obtain correlation feature information;
[0022] The cosine difference between each time point in the time step dimension is calculated using the following formula:
[0023] G(i,j)=cos(πX(i)-πX(j)),i,j∈{1,…,L}
[0024] Among them, G is the generated Gram matrix, i and j represent the index position of the time series; by calculating the Gram matrix of the time step dimension seq, the calculated GAF matrix is then passed through the activation function Elu and finally in d model The dimension of stacking is X g It is the correlation feature information.
[0025] Furthermore, the input data is subjected to Markov transition field feature extraction to obtain dynamic change law feature information, including:
[0026] The input data is divided into multiple bins in the time step dimension, and then the value corresponding to each time point is changed to its corresponding bin number, thereby constructing the transfer Markov transfer matrix and Markov transfer field, which represent the transition between each time point; and the time step dimension of the input data is expanded to two dimensions. The Markov transfer matrix and Markov transfer field are activated by the Leaky-ReLU function to obtain the dynamic change law feature information;
[0027] Markov transition matrix W and Markov transition field M:
[0028]
[0029] In order to maintain the trend of the original data and express its nonlinear information, the calculated Markov transfer matrix is then activated by the Leaky-relu function and finally model The dimension of stacking is X m It is the characteristic information of dynamic change rules.
[0030] Furthermore, step S2 includes: f 、X gand X m Constructed as a graph structure; where X f is the frequency domain feature information correlation feature information; X g is the correlation feature information; X m is the characteristic information of dynamic change law; for X f , whose node feature is the dimension of the cycle number {s1,…,s k};;For X g and X m , the node features are all the dimension seq of the second time step; f 、X g and X m As a node for full connection, the adjacency matrix A is a matrix of all 1s; then the adjacency matrix A is multiplied by a gradient descent weight matrix W a , and get the new adjacency matrix Represents the connection strength between nodes, according to the new adjacency matrix and X f 、X g and X m Get graph G f , G g and G m ;
[0031] For graph G f =(V f ,E f ), where V f is a set of nodes, E f is an edge set, and each node v if ∈V f There is a eigenvector x if ; The feature vector of each node is first transformed by a linear transformation Wx if , and get h if ; The attention coefficient α between the i-th node and the j-th node ijf It is given by the following formula:
[0032]
[0033] Then perform weighted summation;
[0034]
[0035] The graph attention network will be used twice in this feature aggregation process, and a linear gating mechanism is used to control the outflow of data that has learned a single piece of information.
[0036] Furthermore, step S3 includes:
[0037] The prediction model of the hybrid gated recurrent unit network based on evolutionary optimization includes: a scalar gated recurrent unit, a network matrix gated recurrent unit, a fully connected layer, and multiple nonlinear hidden layers;
[0038] The scalar gated recurrent unit is constructed by the scalar long short-term memory neural network unit and the gated recurrent unit in the extended long short-term memory neural network; the matrix gated recurrent unit is constructed by the matrix long short-term memory neural network unit and the gated recurrent unit in the extended long short-term memory neural network.
[0039] Furthermore, step S3 includes:
[0040] For the matrix-gated recurrent unit, the input data first undergoes batch normalization to stabilize the training process and accelerate convergence. It then undergoes two up-projections to map the dimensions to a higher space. One of the projections passes through the matrix-gated recurrent unit to capture its internal temporal information. The other projection passes through the activation function Gelu to express internal nonlinear information. The data after the two processing steps is then multiplied by vectors to mix the information. Finally, the dimensions are mapped back through down-projection, and then through residual connections, and the data is finally output.
[0041] For the scalar gated recurrent unit, the input data is first batch normalized, then the timing information is extracted, and then batch normalized again to stabilize the data information; the internal nonlinear information is expressed through the activation function Gelu, and finally the data is output through the residual connection.
[0042] Furthermore, in step S4, the evolutionary algorithm is a flock optimization algorithm.
[0043] Furthermore, step S4 includes:
[0044] The learning rate, dropout of the three layers of the model, and the values of the two activation functions are encoded as the optimization goals of the individuals in the flock. The negative value of the model prediction error is used as the fitness function. According to the role allocation of the flock optimization algorithm, the individuals are divided into hens, roosters, and chicks. The different behavioral characteristics of each role are used to set the search strategy of the individuals in different optimization stages. In the early stage of optimization, the hens strengthen the global search through their strong self-exploration ability to ensure that the flock covers a wider solution space. In the later stage of optimization, the chicks gradually rely on the learning of hens and roosters, strengthen local search, and promote the gradual convergence of the solution to the global optimal solution. The specific steps are as follows:
[0045] S4.1: Initialize the number and position of chickens in the flock and substitute the initial solution into the prediction model;
[0046] S4.2: For the fused feature information, extract the timing information through the matrix gated recurrent unit;
[0047] S4.3: Prevent overfitting of the prediction model through multiple nonlinear hidden layers;
[0048] S4.4: Extract the timing information again through scalar gated loops.
[0049] S4.5: Regularize the prediction model again through multiple nonlinear hidden layers;
[0050] S4.6: Output the predicted value through the fully connected layer to complete the fitness value solution of the first individual;
[0051] S4.7: Repeat steps S4.2 to S4.6 to calculate the fitness values of multiple individuals and find the global optimal individual and its fitness;
[0052] S4.8: Update individual positions according to the roles and behavior rules of the swarm optimization algorithm;
[0053] S4.9: Repeat steps S4.2 to S4.8 for multiple iterations of swarm optimization to obtain the optimal parameters;
[0054] S4.10: Substitute the optimal parameters into the model to obtain a prediction model with the optimal model parameters.
[0055] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0056] This paper exploits the diverse characteristics of carbon emission data by performing multi-view attention feature extraction on input data. A feature aggregation algorithm based on adaptive graph attention learning is used to fully aggregate feature information. This paper constructs a prediction model based on a hybrid gated recurrent unit network based on evolutionary optimization, significantly improving its ability to extract long-term dependent temporal information. Furthermore, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby solving the problem of optimizing parameter adjustment for industrial carbon emission prediction methods and improving prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a diagram of the carbon emission prediction method based on multi-view attention and recurrent neural network described in Example 1;
[0058] Figure 2 This is a structural diagram of the scalar gated recurrent unit described in Example 2;
[0059] Figure 3 This is a structural diagram of the matrix gated recurrent unit described in Example 3; DETAILED DESCRIPTION
[0060] The accompanying drawings are for illustrative purposes only and are not to be construed as limiting this patent;
[0061] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.
[0062] Example 1:
[0063] This embodiment provides Figure 1 The carbon emission prediction method and system based on multi-view attention and recurrent neural network shown in the figure include:
[0064] S1: Get input data, perform multi-view attention feature extraction on the input data, and obtain a variety of feature information;
[0065] S2: Multiple feature information is aggregated through a feature aggregation algorithm based on adaptive graph attention learning to obtain fused feature information;
[0066] S3: Construct a prediction model of a hybrid gated recurrent unit network based on evolutionary optimization based on a recurrent neural network; use the fused feature information as the input of the prediction model;
[0067] S4: Optimizing the parameters of the prediction model through an evolutionary algorithm to obtain a prediction model with optimal model parameters;
[0068] S5: Realize industrial carbon emission prediction based on the prediction model of optimal model parameters and multiple characteristic information.
[0069] This embodiment fully exploits the diverse characteristics of carbon emission data by extracting features using multi-view attention from the input data. A feature aggregation algorithm based on adaptive graph attention learning is used to fully aggregate feature information. This embodiment significantly improves its ability to extract long-term dependent temporal information by constructing a prediction model based on a hybrid gated recurrent unit network based on evolutionary optimization. Furthermore, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby optimizing the parameters of industrial carbon emission prediction methods and improving prediction results.
[0070] Example 2:
[0071] This embodiment further discloses the following on the basis of the first embodiment:
[0072] Step S1 includes: performing fast Fourier transform on the input data to extract features to obtain frequency domain feature information; performing Gram angle field extraction on the input data to obtain correlation feature information; and performing Markov transfer field feature extraction on the input data to obtain dynamic change law feature information.
[0073] Perform fast Fourier transform on the input data to extract features and obtain frequency domain feature information; including:
[0074] Performing a fast Fourier transform on the input data to extract features converts the input data from the time domain to the frequency domain, finds the top k frequencies with the largest amplitude, calculates the cycles with large energy, and uses the cycles with large energy as the selected cycles. Based on the selected cycles, the number of cycles is obtained, and the time step dimension of the input data in the time domain is reshaped into a dimension of cycle * number of cycles based on the number of cycles, which serves as the frequency domain feature information. The formula is as follows:
[0075] F=Avg(Amp(FFT(X))),
[0076]
[0077] Among them, FFT(·) and Amp(·) represent the calculation of fast Fourier transform and amplitude value respectively; through the function Avg(·) in d model The vector is averaged over the dimension vector Indicates the amplitude value of each frequency;
[0078] Based on the selected number of periods {s1,…,s k}, we get representations corresponding to different numbers of cycles by reshaping the input X into a four-dimensional tensor using the following formula:
[0079]
[0080] Padding(·) is used to expand the time series by 0 along the time dimension to make it consistent with compatible; Represents the i-th reconstructed time series, which is the frequency domain feature information.
[0081] Perform Gram angle field feature extraction on the input data to obtain correlation feature information; including:
[0082] Construct a Gram matrix to represent the differences between each time point; based on the calculated Gram matrix, expand the time step dimension of the input data to two dimensions; pass the Gram matrix through the activation function Elu to obtain correlation feature information;
[0083] The cosine difference between each time point in the time step dimension is calculated using the following formula:
[0084] G(i,j)=cos(πX(i)-πX(j)),i,j∈{1,…,L}
[0085] Among them, G is the generated Gram matrix, i and j represent the index position of the time series; by calculating the Gram matrix of the time step dimension seq, the calculated GAF matrix is then passed through the activation function Elu and finally in d model The dimension of stacking is Xg It is the correlation feature information.
[0086] Perform Markov transition field feature extraction on the input data to obtain dynamic change law feature information, including:
[0087] The input data is divided into multiple bins in the time step dimension, and then the value corresponding to each time point is changed to its corresponding bin number, thereby constructing the transfer Markov transfer matrix and Markov transfer field, which represent the transition between each time point; and the time step dimension of the input data is expanded to two dimensions. The Markov transfer matrix and Markov transfer field are activated by the Leaky-ReLU function to obtain the dynamic change law feature information;
[0088] Markov transition matrix W and Markov transition field M:
[0089]
[0090] In order to maintain the trend of the original data and express its nonlinear information, the calculated Markov transfer matrix is then activated by the Leaky-relu function and finally model The dimension of stacking is X m It is the characteristic information of dynamic change rules.
[0091] Step S2 includes: f 、X g and X m Constructed as a graph structure; where X f is the frequency domain feature information correlation feature information; X g is the correlation feature information; X m is the characteristic information of dynamic change law; for X f , whose node feature is the dimension of the cycle number {s1,…,s k}; for X g and X m , the node features are all the dimension seq of the second time step; f 、X g and X m As a node for full connection, the adjacency matrix A is a matrix of all 1s; then the adjacency matrix A is multiplied by a gradient descent weight matrix W a , and get the new adjacency matrix Represents the connection strength between nodes, according to the new adjacency matrix and X f 、X g and X m Get graph G f , G g and Gm ;
[0092] For graph G f =(V f ,E f ), where V f is a set of nodes, E f is an edge set, and each node v if ∈V f There is a eigenvector x if ; The feature vector of each node is first transformed by a linear transformation Wx if , and get h if ; The attention coefficient α between the i-th node and the j-th node ijf It is given by the following formula:
[0093]
[0094] Then perform weighted summation;
[0095]
[0096] The graph attention network will be used twice in this feature aggregation process, and a linear gating mechanism is used to control the outflow of data that has learned a single piece of information.
[0097] Step S3 includes:
[0098] The prediction model of the hybrid gated recurrent unit network based on evolutionary optimization includes: a scalar gated recurrent unit, a network matrix gated recurrent unit, a fully connected layer, and multiple nonlinear hidden layers;
[0099] The scalar gated recurrent unit is constructed by the scalar long short-term memory neural network unit and the gated recurrent unit in the extended long short-term memory neural network; the matrix gated recurrent unit is constructed by the matrix long short-term memory neural network unit and the gated recurrent unit in the extended long short-term memory neural network.
[0100] Step S3 includes:
[0101] For the matrix-gated recurrent unit, the input data first undergoes batch normalization to stabilize the training process and accelerate convergence. It then undergoes two up-projections to map the dimensions to a higher space. One of the projections passes through the matrix-gated recurrent unit to capture its internal temporal information. The other projection passes through the activation function Gelu to express internal nonlinear information. The data after the two processing steps is then multiplied by vectors to mix the information. Finally, the dimensions are mapped back through down-projection, and then through residual connections, and the data is finally output.
[0102] For the scalar gated recurrent unit, the input data is first batch normalized, then the timing information is extracted, and then batch normalized again to stabilize the data information; the internal nonlinear information is expressed through the activation function Gelu, and finally the data is output through the residual connection.
[0103] This embodiment fully exploits the diverse characteristics of carbon emission data by extracting features using multi-view attention from the input data. A feature aggregation algorithm based on adaptive graph attention learning is used to fully aggregate feature information. This embodiment significantly improves its ability to extract long-term dependent temporal information by constructing a prediction model based on a hybrid gated recurrent unit network based on evolutionary optimization. Furthermore, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby optimizing the parameters of industrial carbon emission prediction methods and improving prediction results.
[0104] Example 3:
[0105] This embodiment further discloses the following on the basis of the second embodiment:
[0106] In step S4, the evolutionary algorithm is a chicken swarm optimization algorithm.
[0107] Step S4 includes:
[0108] The learning rate, dropout of the three layers of the model, and the values of the two activation functions are encoded as the optimization goals of the individuals in the flock. The negative value of the model prediction error is used as the fitness function. According to the role allocation of the flock optimization algorithm, the individuals are divided into hens, roosters, and chicks. The different behavioral characteristics of each role are used to set the search strategy of the individuals in different optimization stages. In the early stage of optimization, the hens strengthen the global search through their strong self-exploration ability to ensure that the flock covers a wider solution space. In the later stage of optimization, the chicks gradually rely on the learning of hens and roosters, strengthen local search, and promote the gradual convergence of the solution to the global optimal solution. The specific steps are as follows:
[0109] S4.1: Initialize the number and position of chickens in the flock and substitute the initial solution into the prediction model;
[0110] S4.2: For the fused feature information, extract the timing information through the matrix gated recurrent unit;
[0111] S4.3: Prevent overfitting of the prediction model through multiple nonlinear hidden layers;
[0112] S4.4: Extract the timing information again through scalar gated loops.
[0113] S4.5: Regularize the prediction model again through multiple nonlinear hidden layers;
[0114] S4.6: Output the predicted value through the fully connected layer to complete the fitness value solution of the first individual;
[0115] S4.7: Repeat steps S4.2 to S4.6 to calculate the fitness values of multiple individuals and find the global optimal individual and its fitness;
[0116] S4.8: Update individual positions according to the roles and behavior rules of the swarm optimization algorithm;
[0117] S4.9: Repeat steps S4.2 to S4.8 for multiple iterations of swarm optimization to obtain the optimal parameters;
[0118] S4.10: Substitute the optimal parameters into the model to obtain a prediction model with the optimal model parameters.
[0119] This embodiment fully exploits the diverse characteristics of carbon emission data by extracting features using multi-view attention from the input data. A feature aggregation algorithm based on adaptive graph attention learning is used to fully aggregate feature information. This embodiment significantly improves its ability to extract long-term dependent temporal information by constructing a prediction model based on a hybrid gated recurrent unit network based on evolutionary optimization. Furthermore, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby optimizing the parameters of industrial carbon emission prediction methods and improving prediction results.
[0120] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.
Claims
1. A carbon emission prediction method based on multi-view attention and recurrent neural network, characterized by: include: S1: Get input data, perform multi-view attention feature extraction on the input data, and obtain a variety of feature information; S2: Multiple feature information is aggregated through a feature aggregation algorithm based on adaptive graph attention learning to obtain fused feature information; S3: Construct a prediction model of a hybrid gated recurrent unit network based on evolutionary optimization based on a recurrent neural network; use the fused feature information as the input of the prediction model; S4: Optimizing the parameters of the prediction model by an evolutionary algorithm to obtain a prediction model with optimal model parameters; in step S4, the evolutionary algorithm is a flock optimization algorithm, specifically including: The learning rate, dropout of the three layers of the model, and the values of the two activation functions are encoded as the optimization goals of the individuals in the flock. The negative value of the model prediction error is used as the fitness function. According to the role allocation of the flock optimization algorithm, the individuals are divided into hens, roosters, and chicks. The different behavioral characteristics of each role are used to set the search strategy of the individuals in different optimization stages. In the early stage of optimization, the hens strengthen the global search through their strong self-exploration ability to ensure that the flock covers a wider solution space. In the later stage of optimization, the chicks gradually rely on the learning of hens and roosters, strengthen local search, and promote the gradual convergence of the solution to the global optimal solution. The specific steps are as follows: S4.1: Initialize the number and position of chickens in the flock and substitute the initial solution into the prediction model; S4.2: For the fused feature information, extract the timing information through the matrix gated recurrent unit; S4.3: Prevent overfitting of the prediction model through multiple nonlinear hidden layers; S4.4: Extract the timing information again through scalar gated loops. S4.5: Regularize the prediction model again through multiple nonlinear hidden layers; S4.6: Output the predicted value through the fully connected layer to complete the fitness value solution of the first individual; S4.7: Repeat steps S4.2 to S4.6 to calculate the fitness values of multiple individuals and find the global optimal individual and its fitness; S4.8: Update individual positions according to the roles and behavior rules of the swarm optimization algorithm; S4.9: Repeat steps S4.2 to S4.8 for multiple iterations of swarm optimization to obtain the optimal parameters; S4.10: Substitute the optimal parameters into the model to obtain a prediction model with the optimal model parameters. S5: Realize industrial carbon emission prediction based on the prediction model of optimal model parameters and multiple characteristic information.
2. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 1 is characterized in that: Step S1 includes: performing fast Fourier transform on the input data to extract features to obtain frequency domain feature information; performing Gram angle field extraction on the input data to obtain correlation feature information; and performing Markov transfer field feature extraction on the input data to obtain dynamic change law feature information.
3. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 2 is characterized in that: Perform fast Fourier transform on the input data to extract features and obtain frequency domain feature information; including: Performing a fast Fourier transform on the input data to extract features converts the input data from the time domain to the frequency domain, finds the top k frequencies with the largest amplitude, calculates the cycles with large energy, and uses the cycles with large energy as the selected cycles. Based on the selected cycles, the number of cycles is obtained, and the time step dimension of the input data in the time domain is reshaped into a dimension of cycle * number of cycles based on the number of cycles, which serves as the frequency domain feature information. The formula is as follows: F=Avg(Amp(FFT(X))), Among them, FFT(·) and Amp(·) represent the calculation of fast Fourier transform and amplitude value respectively; through the function Avg(·) in d model The vector is averaged over the dimension vector Indicates the amplitude value of each frequency; Based on the selected number of periods {s1,…,s k }, we get representations corresponding to different numbers of cycles by reshaping the input X into a four-dimensional tensor using the following formula: Padding(·) is used to expand the time series by 0 along the time dimension to make it consistent with compatible; Represents the i-th reconstructed time series, which is the frequency domain feature information.
4. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 2 is characterized in that: Perform Gram angle field feature extraction on the input data to obtain correlation feature information; including: Construct a Gram matrix to represent the differences between each time point; based on the calculated Gram matrix, expand the time step dimension of the input data to two dimensions; pass the Gram matrix through the activation function Elu to obtain correlation feature information; The cosine difference between each time point in the time step dimension is calculated using the following formula: G(i,j)=cos(πX(i)-πX(j)),i,j∈{1,…,L} Among them, G is the generated Gram matrix, i and j represent the index position of the time series; by calculating the Gram matrix of the time step dimension seq, the calculated GAF matrix is then passed through the activation function Elu and finally in d model The dimension of stacking is X g It is the correlation feature information.
5. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 2 is characterized in that: Perform Markov transition field feature extraction on the input data to obtain dynamic change law feature information, including: The input data is divided into multiple bins in the time step dimension, and then the value corresponding to each time point is changed to its corresponding bin number, thereby constructing the transfer Markov transfer matrix and Markov transfer field, which represent the transition between each time point; and the time step dimension of the input data is expanded to two dimensions. The Markov transfer matrix and Markov transfer field are activated by the Leaky-ReLU function to obtain the dynamic change law feature information; Markov transition matrix W and Markov transition field M: In order to maintain the trend of the original data and express its nonlinear information, the calculated Markov transfer matrix is then activated by the Leaky-relu function and finally model The dimension of stacking is X m It is the characteristic information of dynamic change rules.
6. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 2, characterized in that: Step S2 includes: f 、X g and X m Constructed as a graph structure; where X f is the frequency domain feature information correlation feature information; X g is the correlation feature information; X m is the characteristic information of dynamic change law; for X f , whose node feature is the dimension of the cycle number {s1,…,s k }; for X g and X m , the node features are all the dimension seq of the second time step; f 、X g and X m As a node for full connection, the adjacency matrix A is a matrix of all 1s; then the adjacency matrix A is multiplied by a gradient descent weight matrix W a , and get the new adjacency matrix Represents the connection strength between nodes, according to the new adjacency matrix and X f 、X g and X m Get graph G f , G g and G m ; For graph G f =(V f ,E f ), where V f is a set of nodes, E f is an edge set, and each node v if ∈V f There is a eigenvector x if ; The feature vector of each node is first transformed by a linear transformation Wx if , and get h if ; The attention coefficient α between the i-th node and the j-th node ijf It is given by the following formula: Then perform weighted summation; The graph attention network will be used twice in this feature aggregation process, and a linear gating mechanism is used to control the outflow of data that has learned a single piece of information.
7. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 1 is characterized in that: Step S3 includes: The prediction model of the hybrid gated recurrent unit network based on evolutionary optimization includes: a scalar gated recurrent unit, a network matrix gated recurrent unit, a fully connected layer, and multiple nonlinear hidden layers; The scalar gated recurrent unit is constructed by the scalar long short-term memory neural network unit and the gated recurrent unit in the extended long short-term memory neural network; the matrix gated recurrent unit is constructed by the matrix long short-term memory neural network unit and the gated recurrent unit in the extended long short-term memory neural network.
8. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 1 is characterized in that: Step S3 includes: For the matrix-gated recurrent unit, the input data first undergoes batch normalization to stabilize the training process and accelerate convergence. It then undergoes two up-projections to map the dimensions to a higher space. One of the projections passes through the matrix-gated recurrent unit to capture its internal temporal information. The other projection passes through the activation function Gelu to express internal nonlinear information. The data after the two processing steps is then multiplied by vectors to mix the information. Finally, the dimensions are mapped back through down-projection, and then through residual connections, and the data is finally output. For the scalar gated recurrent unit, the input data is first batch normalized, then the timing information is extracted, and then batch normalized again to stabilize the data information; the internal nonlinear information is expressed through the activation function Gelu, and finally the data is output through the residual connection.
Citation Information
Patent Citations
Ceramic cultural relic fragment classification method based on swarm intelligent optimization convolutional neural network
CN116311255A