Carbon emission prediction method based on multi-view attention and recurrent neural network
By adopting a multi-view attention and recurrent neural network method in industrial carbon emission prediction, combined with adaptive graph attention learning and evolutionary optimization hybrid gated recurrent unit network, the problem of low carbon emission prediction accuracy in the existing technology is solved, and a more efficient prediction effect is achieved.
Patent Information
- Application Number
- CN202411835497.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-13
AI Technical Summary
The prior art is difficult to achieve ideal prediction accuracy in industrial carbon emission prediction, mainly due to the high complexity of the data and the unsatisfactory parameter optimization.
The carbon emission prediction method based on multi-view attention and recurrent neural network is adopted, and features are extracted through multi-view attention, combined with feature aggregation algorithm of adaptive graph attention learning, a prediction model of a hybrid gating recurrent unit network based on evolutionary optimization is constructed, and the model parameters are optimized using evolutionary algorithms.
The accuracy of carbon emission prediction is significantly improved, and the prediction effect is improved by fully exploring the diversified characteristics of the data and improving the parameter optimization capabilities of the model.
Smart Images

Figure CN119721480A_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 network. 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 data, it is often difficult to obtain ideal prediction accuracy by directly applying raw 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 presents a high degree of 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 comprising: taking urban grids as nodes, and taking spatial connectivity, geographic proximity, and carbon emission time similarity between grids as perspectives, constructing a heterogeneous graph of multi-perspective correlation of cities; inputting urban carbon emissions and traffic density data into the heterogeneous graph in parallel, and using one spatiotemporal convolution module to extract the spatiotemporal characteristics of carbon emissions and the spatiotemporal characteristics of traffic density from the heterogeneous graph with carbon emissions and traffic density data; 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 the global spatiotemporal characteristics of carbon emissions; combining the global spatiotemporal characteristics of carbon emissions with external factors to collaboratively predict urban carbon emissions. However, since this method requires artificial setting of network parameters, the parameters are often not optimal, which in turn affects the prediction effect. Summary of the invention
[0004] The purpose of the present invention is to disclose a carbon emission prediction method based on multi-view attention and recurrent neural network with better prediction effect.
[0005] In order to achieve the above object, the present invention provides a carbon emission prediction method based on multi-view attention and recurrent neural network, comprising:
[0006] S1: Obtain 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; and 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 various 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; performing Markov transfer field feature extraction on the input data to obtain dynamic change law feature information.
[0012] Further, the input data is subjected to fast Fourier transform to extract features and obtain frequency domain feature information; including:
[0013] Fast Fourier transform of input data to extract features will convert the input data from the time domain to the frequency domain, find the first k frequencies with the largest amplitude, calculate the cycle with large energy, and use the cycle with large energy as the selected cycle; based on the selected cycle, the number of cycles is obtained, and the time step dimension of the input data in the time domain is reshaped into the dimension of cycle * number of cycles according to the number of cycles 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 average vector is obtained on the dimension vector Indicates the amplitude value of each frequency;
[0017] Based on the selected number of periods {s1,…,s k}, we get the representations corresponding to different numbers of cycles by reshaping the input X into a 4D 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; the Gram matrix is calculated for the time step dimension seq, and the calculated GAF matrix is then passed through the activation function Elu and finally in d model The dimension is stacked as 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 is stacked as X m It is the characteristic information of dynamic change rules.
[0030] Further, 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 number of cycles {s1,…,s k};;For X g and X m , the node features are all the dimension seq of the second time step; X 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 obtain 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 node set, 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 , we 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 weighted sum;
[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 passes through batch normalization to stabilize the training process and accelerate convergence; then it is projected up twice to map the dimensions to a higher space, one of which passes through the matrix gated recurrent unit to capture its internal timing information; the other projection passes through the activation function Gelu to express the internal nonlinear information; the data after the two processings are multiplied by vectors to mix the information together; finally, the dimensions are mapped back through down projection, and then through residual connection, and finally the data is output;
[0041] For the scalar gated recurrent unit, the input data is first batch normalized, and 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, the 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, and 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, and the search strategies of individuals in different optimization stages are set by using the different behavioral characteristics of each role; 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 solution to gradually converge to the global optimal solution; the specific steps are:
[0045] S4.1: Initialize the number and position of chickens 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 loop single network;
[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, perform multiple swarm optimization iterations, and obtain the optimal parameters;
[0054] S4.10: Substitute the optimal parameters into the model to obtain the prediction model of the optimal model parameters.
[0055] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0056] The present invention fully exploits the diverse features of carbon emission data by performing multi-view attention feature extraction on the input data. A feature aggregation algorithm based on adaptive graph attention learning is used to fully aggregate feature information. The present invention significantly improves its ability to extract long-term dependent time series information by constructing a prediction model of a hybrid gated recurrent unit network based on evolutionary optimization. At the same time, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby solving the optimization parameter adjustment of the industrial carbon emission prediction method and improving the prediction effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a diagram of a carbon emission prediction method based on multi-view attention and recurrent neural network as described in Example 1;
[0058] Figure 2 This is a structural diagram of a scalar gated recurrent unit according to the second embodiment;
[0059] Figure 3 This is a structural diagram of the matrix gated recurrent unit described in Example 3; DETAILED DESCRIPTION
[0060] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0061] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0062] Embodiment 1:
[0063] This embodiment provides Figure 1 The carbon emission prediction method and system based on multi-view attention and recurrent neural network include:
[0064] S1: Obtain 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; and 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 various characteristic information.
[0069] This embodiment fully exploits the diverse features of carbon emission data by extracting features through multi-view attention of input data. A feature aggregation algorithm based on adaptive graph attention learning; thereby fully aggregating feature information. This embodiment significantly improves its ability to extract long-term dependent time series information by constructing a prediction model of a hybrid gated recurrent unit network based on evolutionary optimization. At the same time, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby solving the problem of optimizing the parameter adjustment of industrial carbon emission prediction methods, thereby improving the prediction effect.
[0070] Embodiment 2:
[0071] This embodiment further discloses 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; 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] Fast Fourier transform of input data to extract features will convert the input data from the time domain to the frequency domain, find the first k frequencies with the largest amplitude, calculate the cycle with large energy, and use the cycle with large energy as the selected cycle; based on the selected cycle, the number of cycles is obtained, and the time step dimension of the input data in the time domain is reshaped into the dimension of cycle * number of cycles according to the number of cycles 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 average vector is obtained on the dimension vector Indicates the amplitude value of each frequency;
[0078] Based on the selected number of periods {s1,…,s k}, we get the representations corresponding to different numbers of cycles by reshaping the input X into a 4D 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] Extract the Gram angle field features of 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; the Gram matrix is calculated for the time step dimension seq, and the calculated GAF matrix is then passed through the activation function Elu and finally in d model The dimension is stacked as Xg It is the correlation feature information.
[0086] Extract the Markov transition field features of the input data to obtain the 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 is stacked as 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 number of cycles {s1,…,s k}; for X g and X m , the node features are all the dimension seq of the second time step; X 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 obtain 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 node set, 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 , we 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 weighted sum;
[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 passes through batch normalization to stabilize the training process and accelerate convergence; then it is projected up twice to map the dimensions to a higher space, one of which passes through the matrix gated recurrent unit to capture its internal timing information; the other projection passes through the activation function Gelu to express the internal nonlinear information; the data after the two processings are multiplied by vectors to mix the information together; finally, the dimensions are mapped back through down projection, and then through residual connection, and finally the data is output;
[0102] For the scalar gated recurrent unit, the input data is first batch normalized, and 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 features of carbon emission data by extracting features through multi-view attention of input data. A feature aggregation algorithm based on adaptive graph attention learning; thereby fully aggregating feature information. This embodiment significantly improves its ability to extract long-term dependent time series information by constructing a prediction model of a hybrid gated recurrent unit network based on evolutionary optimization. At the same time, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby solving the problem of optimizing the parameter adjustment of industrial carbon emission prediction methods, thereby improving the prediction effect.
[0104] Embodiment three:
[0105] This embodiment further discloses on the basis of the second embodiment:
[0106] In step S4, the evolutionary algorithm is a flock optimization algorithm.
[0107] Step S4 includes:
[0108] The learning rate, the 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, and 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, and the search strategies of individuals in different optimization stages are set by using the different behavioral characteristics of each role; 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 solution to gradually converge to the global optimal solution; the specific steps are:
[0109] S4.1: Initialize the number and position of chickens 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 loop single network;
[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, perform multiple swarm optimization iterations, and obtain the optimal parameters;
[0118] S4.10: Substitute the optimal parameters into the model to obtain the prediction model of the optimal model parameters.
[0119] This embodiment fully exploits the diverse features of carbon emission data by extracting features through multi-view attention of input data. A feature aggregation algorithm based on adaptive graph attention learning; thereby fully aggregating feature information. This embodiment significantly improves its ability to extract long-term dependent time series information by constructing a prediction model of a hybrid gated recurrent unit network based on evolutionary optimization. At the same time, an evolutionary algorithm is used to achieve adaptive parameter adjustment, thereby solving the problem of optimizing the parameter adjustment of industrial carbon emission prediction methods, thereby improving the prediction effect.
[0120] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. Carbon emission prediction method based on multi-view attention and recurrent neural network, characterized in that: include: S1: Obtain 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; and use the fused feature information as the input of the prediction model; S4: Optimizing the parameters of the prediction model through an evolutionary algorithm to obtain a prediction model with optimal model parameters; S5: Realize industrial carbon emission prediction based on the prediction model of optimal model parameters and various 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; 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: Fast Fourier transform of input data to extract features will convert the input data from the time domain to the frequency domain, find the first k frequencies with the largest amplitude, calculate the cycle with large energy, and use the cycle with large energy as the selected cycle; based on the selected cycle, the number of cycles is obtained, and the time step dimension of the input data in the time domain is reshaped into the dimension of cycle * number of cycles according to the number of cycles 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 the representations corresponding to different numbers of cycles by reshaping the input X into a 4D 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: Extract the Gram angle field features of 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; the Gram matrix is calculated for the time step dimension seq, and the calculated GAF matrix is then passed through the activation function Elu and finally in d model The dimension is stacked as 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: Extract the Markov transition field features of the input data to obtain the 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 is stacked as X m It is the characteristic information of dynamic change rules.
6. According to claim 2, the carbon emission prediction method based on multi-view attention and recurrent neural network is 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 number of cycles {s1,…,s k }; for X g and X m , the node features are all the dimension seq of the second time step; X 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 obtain 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 node set, 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 , we 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 weighted sum; 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 passes through batch normalization to stabilize the training process and accelerate convergence; then it is projected up twice to map the dimensions to a higher space, one of which passes through the matrix gated recurrent unit to capture its internal timing information; the other projection passes through the activation function Gelu to express the internal nonlinear information; the data after the two processings is multiplied by vectors to mix the information together; finally, the dimensions are mapped back through down projection, and then through residual connection, and finally the data is output; For the scalar gated recurrent unit, the input data is first batch normalized, and 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.
9. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 7 is characterized in that: In step S4, the evolutionary algorithm is a flock optimization algorithm.
10. The carbon emission prediction method based on multi-view attention and recurrent neural network according to claim 9 is characterized in that: Step S4 includes: The learning rate, the 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, and 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, and the search strategies of individuals in different optimization stages are set by using the different behavioral characteristics of each role; 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 solution to gradually converge to the global optimal solution; the specific steps are: S4.1: Initialize the number and position of chickens 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 loop single network; 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, perform multiple swarm optimization iterations, and obtain the optimal parameters; S4.10: Substitute the optimal parameters into the model to obtain a prediction model of the optimal model parameters.
Citation Information
Patent Citations
Ceramic cultural relic fragment classification method based on swarm intelligent optimization convolutional neural network
CN116311255A