A long-term climate prediction method based on a dynamic graph neural network model
By using a dynamic graph neural network model, combined with spatial interaction modeling and temporal feature extraction, the problem of insufficient prediction accuracy in long-term climate forecasting is solved, and high-precision prediction of future climate trends is achieved, which is suitable for social decision-making and practical applications.
Patent Information
- Application Number
- CN202411608098.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing long-term climate prediction methods lack accuracy when dealing with climate change over long periods, struggle to capture the complex dynamic relationships between climate elements, and conventional deep learning models cannot take into account the time-series characteristics and relationships both inside and outside geographical locations.
A dynamic graph neural network model is adopted. The spatial interaction modeling module captures the dynamic interaction relationship between geographical locations, the temporal feature extraction module captures the changes of climate elements over time, and the fusion prediction module generates future climate prediction results. The Transformer Encoder and multi-head attention mechanism are used to extract spatiotemporal features, and the model is optimized by mean square error.
It has achieved high-precision prediction of future climate trends, meeting the needs of social decision-making and practical applications, and improving the accuracy and reliability of long-term climate prediction.
Smart Images

Figure CN119598843B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of deep learning and time series prediction, and specifically relates to a long-term climate prediction method based on a dynamic graph neural network model. BACKGROUND
[0002] In climate prediction and environmental monitoring, long-term climate prediction is a crucial task, especially as global climate change becomes increasingly significant, accurate prediction of climate trends for future months or even years has become an urgent demand of all sectors of society. However, due to the complexity and variability of the climate system, achieving long-term and accurate climate prediction still faces great challenges. Currently, methods for long-term climate prediction can be divided into two categories: one is climate prediction based on traditional statistical methods, and the other is climate prediction based on machine learning methods.
[0003] Climate prediction based on traditional statistical methods usually relies on the statistical characteristics of historical climate data, and predicts future climate trends through time series analysis and regression models. This method is simple to use and performs well when the amount of data is small, but its main disadvantage is that it is difficult to effectively capture the complex dynamic relationships between climate elements. Especially when facing long-term prediction tasks, the prediction accuracy of traditional methods is usually not ideal, and it is difficult to cope with the diversity and uncertainty of climate change.
[0004] Machine learning-based climate prediction methods have become a research hotspot in recent years, especially with the rapid development of deep learning technology, through neural networks to model the complex spatio-temporal patterns in climate data has become the mainstream. Compared with traditional methods, this method can more accurately capture the interaction between climate elements, thus generating more accurate prediction results. However, existing deep learning-based climate prediction methods also have some shortcomings. For example, most methods can only handle short-term prediction tasks, and the memory capacity and ability to capture complex spatio-temporal patterns of the model are still limited for long-term climate prediction. In addition, deep learning models have high requirements for data quality, and when faced with high noise and multi-modal climate data, the reliability and accuracy of the prediction results often cannot be guaranteed.
[0005] In summary, the current long-term climate prediction methods have the following challenges:
[0006] 1. Insufficient prediction accuracy: Existing climate prediction models often struggle to maintain high accuracy when dealing with long-term climate change, especially when predicting climate trends for months or even years, the uncertainty of the prediction results is large.
[0007] 2. Trade-off between internal and external geographical positions: conventional deep learning models often focus on either the time series characteristics within a channel or the time series relationship between channels in time series prediction, and cannot balance both. SUMMARY
[0008] To solve the above problems, the present application provides a long-term climate prediction method based on a dynamic graph neural network model. This method can effectively model the complex spatio-temporal relationship in the climate system through a dynamic graph neural network, thereby achieving high-precision long-term climate prediction.
[0009] The present application is realized by the following technical solutions:
[0010] A long-term climate prediction method based on a dynamic graph neural network model:
[0011] The method specifically includes the following steps:
[0012] Step 1, collect and process historical climate data, obtain climate time series, and construct a climate data set suitable for training, including training set, validation set and test set;
[0013] Step 2, input the climate time series of step 1 into the deep learning model to simulate the complex spatio-temporal characteristics between climate elements;
[0014] Step 3, generate future long-term climate prediction data based on the spatio-temporal characteristics obtained in step 2;
[0015] Step 4, adjust the parameters according to the performance of the model on the validation set;
[0016] Step 5, test the model on the test set, calculate the error between the prediction result and the real climate data, and further optimize the model through the error feedback mechanism.
[0017] Further, the deep learning model is composed of three core modules: a spatial interaction modeling module, a time feature extraction module, and a fusion prediction module;
[0018] The spatial interaction modeling module is responsible for capturing the dynamic interaction relationship between geographical positions from the input climate data;
[0019] The time feature extraction module is used to capture the time-varying relationship of climate elements;
[0020] The fusion prediction module fuses the features output by the spatial interaction modeling module and the time feature extraction module to generate future climate prediction results.
[0021] Further, in step 1, the historical climate data is two-dimensional time series data, where the first dimension is the time point and the second dimension is the geographical coordinate; each value represents the daily average of the corresponding geographical location;
[0022] In order to improve the convergence speed and prediction accuracy of the model, the original climate data needs to be standardized, i.e., the daily average of the climate at each geographical location is converted to a standardized numerical interval, so as to eliminate the dimensional difference between different climate elements;
[0023] Further, in step 2, the sequence length of the deep learning model input is 365, representing the data of the past year, and each input univariate time series x i is divided into 12 sequence blocks, representing the data of each month;
[0024] That is, the input standardized two-dimensional time series x∈R T×N is divided into x p ∈R P×N , where R is the real number field, T is the total length of the input time series, P is the size of each time block, and N is the number of time blocks, and then the channel information is fused with the batch dimension.
[0025] Further, in step 2, the spatial interaction modeling module uses a matrix A∈R N×N to represent the directed graph of N geographical climate relationships, and the matrix A is optimized with the model training: A ij = ReLU(tanh(βET gc ))
[0026] Where E∈R N×d , trainable parameter T gc ∈R d×d ; ReLU is an activation function; A ij represents the connection relationship between point i and point j in the adjacency matrix A; tanh is an activation function, and β is a hyperparameter;
[0027] In the graph neural network, for a given adjacency matrix A∈R N×N containing N nodes and initial state , the node features can be calculated by K-hop neighbor aggregation:
[0028]
[0029] Where A is the original graph adjacency matrix, is the normalized graph adjacency matrix, is the output feature matrix, and φ∈R D×Dis a trainable transformation matrix to adjust the final feature representation. This way can effectively capture information from the global neighbor structure and transform the features by matrix Φ to obtain the final node feature representation.
[0030] Considering a fixed integration time and small step size is applied, the model can make the following transformation, replacing the propagation step k∈{0,…,K-1} with a continuous variable
[0031] H G (t+Δt cgp )=H G (t)+Δt cgp (A-I N )H G (t)#
[0032] =[(1-Δt cgp )I N +Δt cgp A]H G (t)
[0033] H G is the feature matrix representing the latent state in a particular aggregation step, Δt cgp is the single propagation step size,
[0034] The continuous dynamics of graph propagation is represented as an ODE:
[0035]
[0036] where the initialization state H G is the intermediate state of the continuous-time aggregation process. To further reduce numerical errors, the model uses an attention transformation to replace the linear mapping:
[0037]
[0038] where ODESolve is a black-box ordinary differential equation solver; H G (t i ) represents a particular intermediate state in the process of graph information propagation; H out is used as the temporal feature z int based on modeling spatial interactions.
[0039] Further, in step 2, the time feature extraction module maps the climate sequence into a latent representation using a TransformerEncoder:
[0040] c d =W p x p +Wpos
[0041] where W p ∈ R D×P is a trainable linear projection that maps the input time series block into a d-dimensional latent space and adds learnable positional encoding W pos ∈ R D×N to monitor the temporal order of the sequence blocks; the temporal latent representation x d is fed into the Transformer Encoder as input;
[0042] In the Transformer Encoder, each attention head h = 1, H in the multi-head attention transforms the input x d into a query matrix Q h , a key matrix K h and a value matrix V h :
[0043]
[0044] is the Query weight matrix of the h-th attention head, is the Key weight matrix of the h-th attention head, is the Value weight matrix of the h-th attention head,
[0045] After the normalized product operation, the attention output is obtained:
[0046]
[0047] In this multi-head attention module, there are also batch normalization layers and a feedforward network, which are connected through a residual connection; after that, the multi-head attention generates a representation denoted as z inn , and is input into the fusion prediction module as a representation of private temporal features within the channel.
[0048] Further, in step 3, the fusion prediction module first uses three different linear layers ψ q , ψ k , ψ v to transform z int and z inn into three embedding representations: ψ q (z int ), ψ k (z inn ), ψ v (z inn ); then, the channel-level similarity matrix M is calculated by matrix multiplication and using softmax:
[0049] M = F softmax (ψ q (z int )⊙ψ k (z inn ))
[0050] By matrix multiplication of ψ v (z inn ) and M T , then apply a linear layer ω c to convert the size of the above feature map; finally, the output is obtained by matrix addition:
[0051] H mix = ω c (ψ v (z inn )⊙M T )+z int
[0052] The model contains a time series prediction module including a time decoder and a projection function, which inputs the aggregated features H C to the time decoder Time Series Decoder to map the latent embedding to the original data space; finally, the model uses a projection function based on a feedforward network for prediction;
[0053] The time decoder first inputs the aggregated features H mix through layer normalization to obtain the normalized embedding; then, using a multi-head self-attention layer MHSA containing a mask and a residual connection to obtain
[0054]
[0055] where W q , W k , W v are three different linear layers ψ q , ψ k , ψ v corresponding linear projection;
[0056] Finally, the learned features are input into a projection function for future prediction:
[0057]
[0058] where represents the final prediction result, W p and b p are learnable parameters.
[0059] Further, in step 5, the mean square error (MSE) loss is used to measure the difference between the predicted value and the true value; the loss on each channel is collected and averaged over the time series to obtain the overall target loss L:
[0060]
[0061] E x is the expected value representing the average loss over the entire data distribution, y i is the predicted value of the i-th sample, i.e., the output result of the model, x i is the true value of the i-th sample, i.e., the label data or target value,
[0062] The goal of the model is to minimize the MSE between the predicted value and the true value to improve the accuracy of the propagation prediction.
[0063] An electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the above method when executing the computer program.
[0064] A computer-readable storage medium for storing computer instructions, the computer instructions being executed by a processor to implement the steps of the above method.
[0065] Advantages of the present application
[0066] Compared with the prior art, the present application performs well on long-time span climate prediction tasks by introducing dynamic graph neural networks, realizes accurate prediction of future climate trends, meets the practical application needs of social decision-making, agricultural planning, energy management, etc., and provides more valuable climate prediction services for the practical utility of climate prediction in coping with global climate change. BRIEF DESCRIPTION OF DRAWINGS
[0067] Fig. 1 The method flowchart of the present application.
[0068] Fig. 2 The long-term climate sequence prediction model structure diagram based on deep learning. DETAILED DESCRIPTION
[0069] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0070] The experimental methods used in the following examples are conventional methods unless otherwise specified. The materials, reagents, methods and instruments used are conventional materials, reagents, methods and instruments in the art unless otherwise specified, and can be obtained by commercial channels by those skilled in the art.
[0071] In combination Figs. 1-2 , the present application proposes a long-term climate prediction method based on a dynamic graph neural network model,
[0072] A long-term climate prediction method based on a dynamic graph neural network model:
[0073] As Fig. 1 shown, the method specifically includes the following steps:
[0074] Step 1, collect and process historical climate data, obtain climate time series, construct climate data sets suitable for training, including training set, validation set and test set;
[0075] Historical (original) climate data can be stored in various formats, such as CSV, NetCDF, etc. First, the historical climate data needs to be uniformly converted into a two-dimensional time series format suitable for model input. Among them, the time dimension represents consecutive time points (such as daily), and the geographical dimension represents different geographical coordinates (such as latitude and longitude). The value corresponding to each location represents the daily average value of the climate of that location, such as temperature, precipitation, etc.
[0076] That is, the historical climate data used by the present application is two-dimensional time series data, wherein the first dimension is the time point and the second dimension is the geographical coordinate. Each value represents the daily average value of the climate element of the corresponding geographical location.
[0077] In order to improve the convergence speed and prediction accuracy of the model, it is necessary to standardize the original climate data. Specifically, the daily average value of the climate of each geographical location is converted to a standardized numerical interval (such as [0, 1]) to eliminate the dimensional differences between different climate elements.
[0078] The standardization formula is as follows:
[0079]
[0080] Where x is the original climate data value, min(x) and max(x) represent the minimum and maximum values in the data set, respectively. The standardized time series data is used in the following.
[0081] The overall architecture of the long-term climate prediction model proposed by the present application is as shown in Fig. 2As shown, the model mainly consists of three core modules: spatial interaction modeling module, temporal feature extraction module, and fusion prediction module. These modules work collaboratively to extract spatio-temporal features from the input climate data and generate high-precision climate prediction results.
[0082] The spatial interaction modeling module is responsible for capturing the dynamic interaction relationship between geographical locations from the input climate data. This module utilizes dynamic graph neural networks to model climate elements at different spatio-temporal locations, generating feature maps with spatio-temporal correlations.
[0083] The temporal feature extraction module aims to capture the temporal variation relationship of climate elements. This module adopts a Transformer-based architecture to model the dependency relationship in the time dimension, thereby extracting the temporal features of each geographical location.
[0084] The fusion prediction module fuses the features output by the spatial interaction modeling module and the temporal feature extraction module to generate future climate prediction results.
[0085] The goal of the model is to improve prediction accuracy by minimizing the error between the prediction results and the real climate data. The workflow of the model is as follows:
[0086] Q = SpatialEncoder(X)
[0087] K, V = TemporalExtractor(X)
[0088] Y = Decoder(Q, K, V)
[0089] Where SpatialEncoder(·) represents the spatial interaction modeling module, TemporalExtractor(·) represents the temporal feature extraction module, and Decoder(·) represents the fusion prediction module. Through this process, the invention can generate climate prediction data that is highly similar to the real climate change trend, providing reliable technical support for long-term climate prediction.
[0090] Step 2: Input the climate time series of step 1 into the deep learning model to simulate the complex spatio-temporal features between climate elements;
[0091] The sequence length input into the deep learning model is 365, representing data from the past year, and each input single-variable time series x i is divided into 12 sequence blocks, representing data for each month. This method provides more rich context information, which is beneficial for the model to learn and extract features from the time series.
[0092] Specifically, the input time series x ∈ R T×N is divided into xp ∈R P×N where R is the real number field, T is the total length of the input time series, P is the size of each time block, N is the number of time blocks, and then the channel information is fused with the batch dimension. The model learns the representation of the time block and the view within the time block using self-attention networks through this blocking operation.
[0093] In step 2, the spatial interaction modeling module uses a matrix A∈R N×N to represent the directed graph of N inter-geographical climate relationships, and the matrix A is optimized during model training: A ij = ReLU(tanh(βET gc ))
[0094] where E∈R N×d and trainable parameter T gc ∈R d×d . ReLU is the activation function. A ij represents the connection relationship between point i and point j in the adjacency matrix A. tanh is an activation function, and β is a hyperparameter;
[0095] In a graph neural network, given an adjacency matrix A∈R N×N containing N nodes and an initial state , the node features can be calculated by K-hop neighbor aggregation:
[0096]
[0097] where A is the normalized graph adjacency matrix, is the normalized graph adjacency matrix, is the output feature matrix, φ∈R D×D is a trainable transformation matrix used to adjust the final feature representation. This way can effectively capture information from the global neighbor structure and transform the features through the matrix Φ to obtain the final node feature representation.
[0098] Considering a fixed integration time and a small step size being applied, the model can make the following transformation, replacing the propagation step k∈{0,…,K-1} with a continuous variable
[0099] H G (t+Δt cgp )=H G (t)+Δt cgp (A-I N )H G (t)#
[0100] = [(1-Δt cgp )I N+ At cgp A]H G (t)
[0101] H G is a feature matrix representing the latent state in a particular aggregation step, At cgp is a single propagation step size,
[0102] The continuous dynamics of graph propagation are represented using ODEs as:
[0103]
[0104] where the initial state H G is the intermediate state of the continuous-time aggregation process. To further reduce numerical errors, the model uses an attention transformation to replace the linear mapping:
[0105]
[0106] where ODESolve is a black-box ordinary differential equation solver. H G (t i ) represents a particular intermediate state in the process of graph information propagation.
[0107] To learn from rich temporal information, the spatial ordinary differential equation is treated as an internal process of the proposed temporal neural ordinary differential equation, which enables the model to accurately model the stable dynamics of multivariate time series from both spatial and temporal perspectives. The model stacks multiple residual convolution blocks to extract and aggregate temporal patterns in a non-recursive manner:
[0108]
[0109] where TCN(·, Θ l ) is a parameterized temporal convolution layer, is a truncation function.
[0110] The model decouples the relationship between the aggregation depth L and the integration time T by letting In this way, given a desired termination time T and initial state the entire continuous-time aggregation process can be characterized using a set of parameters by letting At→ 0:
[0111]
[0112] The time aggregation process is a discretized form of the following ordinary differential equation (ODE):
[0113]
[0114] where the input sequence is mapped to the latent space by independent convolutional layers Initial state The model employs a gating mechanism to control the information flow in each integration step to realize the TCN:
[0115] TCN(H T (t), Θ) = f c (H T (t), Θ c ) 0 f G (H T (t), Θ g )
[0116] where f c (·, Θ c ) and f G (·, Θ g ) are filter and gate convolutions, which have similar network structures but different parameters and nonlinearities:
[0117]
[0118] where σ(·) denotes the sigmoid activation function, and δ denotes the convolution operation with the scalable dilation definition.
[0119] Given two black-box ODE solvers, i.e., ODESolve 1 (·) and ODESolve 2 (·), the learned spatio-temporal representation of the input sequence can be obtained by integrating :
[0120]
[0121] where, Based on the above two propositions, the following definitions are given:
[0122]
[0123] In the above equation, the internal ODE solving and attention transformation, i.e., A(·, Φ), gives Let H G (0) = TCN(H(t), t, θ). By using the ODE solver once for the 12 time series patches, finally, H out is taken as the temporal feature z int based on the spatial interaction modeling.
[0124] The time feature extraction module maps the climate sequence into a latent representation using a Transformer Encoder:
[0125] x d = W p x p + W pos
[0126] where W p ∈ R D×P is a trainable linear projection that maps the input time series chunk into a d-dimensional latent space and adds learnable positional encoding W pos ∈ R D×N to monitor the temporal order of the sequence chunk. The time series latent representation x d is fed into a Transformer Encoder as input. In the Transformer Encoder, each of the h attention heads h = 1, H transforms the input x d into a query matrix, a key matrix and a value matrix:
[0127]
[0128] is the Query weight matrix of the h attention heads, is the Key weight matrix of the h attention heads, is the Value weight matrix of the h attention heads,
[0129] After a normalized product operation, the attention output is obtained:
[0130]
[0131] In this multi-head attention module, a batch normalization layer and a feedforward network are also included, which are connected through a residual connection. After that, the multi-head attention generates a representation represented as z inn , and is input into the internal-external fusion prediction module as a representation of private time features inside the channel.
[0132] Step 3, generating future long-term climate prediction data by the spatio-temporal features obtained in step 2;
[0133] In step 3, the features output by the spatial interaction modeling module and the time feature extraction module are fused by the fusion prediction module to generate future climate prediction results;
[0134] First, the model uses three linear layers ψ q , ψ k , ψ v to convert z int and z inn into three embedding representations: ψ q (zint ), ψ k (z inn ), ψ v (z inn ). Then, the channel-wise similarity matrix M is computed by matrix multiplication followed by a softmax:
[0135] M = F softmax (ψ q (z int ) 0 ψ k (z inn ))
[0136] The size of the above feature map is transformed by a linear layer ω v (z inn ) and M T , followed by a linear layer ω c . Finally, the output is obtained by matrix addition:
[0137] H mix = ω c (ψ v (z inn ) 0 M T ) + z int
[0138] The model contains a time series prediction module that includes a temporal decoder and a projection function, which takes the aggregated features H C as input to a temporal decoder Time Series Decoder that maps the latent embedding to the original data space. Finally, the model makes predictions using a projection function based on a feedforward network.
[0139] The temporal decoder first inputs the aggregated features H mix through a layer normalization to obtain a normalized embedding. Then, a multi-head self-attention layer MHSA with a mask is used with a residual connection to obtain
[0140]
[0141] where W q , W k , W v are three different linear layers ψ q , ψ k , ψ v corresponding linear projections. Finally, the learned feature is input into a projection function for future predictions:
[0142]
[0143] where W represents the final prediction result p and b p are learnable parameters.
[0144] Step 4, parameter adjustment according to the performance of the model on the validation set;
[0145] The parameter adjustment includes but is not limited to: manually adjusting the hyperparameters, or using automated hyperparameter optimization techniques (such as grid search, random search, Bayesian optimization, etc.) to automatically adjust the learning rate, batch size, model layer number, hidden unit number, etc.
[0146] In each training iteration, the parameters of the model such as weights and biases are updated according to the gradient of the loss function. This is achieved through the backpropagation algorithm and optimizers such as SGD, Adam, etc.
[0147] Step 5, test the model on the test set, calculate the error between the prediction result and the real climate data, and further optimize the model through the error feedback mechanism.
[0148] The mean squared error (MSE) loss is used to measure the difference between the predicted value and the true value. The loss on each channel is collected and averaged over the time series to get the overall target loss:
[0149]
[0150] E x is the expected value representing the average loss over the entire data distribution, y i is the predicted value of the i-th sample, i.e. the output result of the model, x i is the true value of the i-th sample, i.e. the label data or target value, the goal of the model is to minimize the MSE between the predicted value and the true value to improve the accuracy of the propagation prediction.
[0151] An electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the above method when executing the computer program.
[0152] A computer-readable storage medium for storing computer instructions, the computer instructions being executed by a processor to implement the steps of the above method.
[0153] The memory in the embodiments of the application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Where the nonvolatile memory is a read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, for example, static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). Note that the memory described herein is intended to include, among others, these and any other memory suitable for storing the data associated with the methods described herein.
[0154] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired manner such as a coaxial cable, an optical fiber, a digital subscriber line (DSL), or a wireless manner such as infrared, wireless, microwave, etc. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available medium can be a magnetic medium such as a floppy disk, a hard disk, a magnetic tape, an optical medium such as a digital video disc (DVD), or a semiconductor medium such as a solid state disc (SSD), etc.
[0155] In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware in the processor or the instruction in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0156] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the method embodiments can be completed by the integrated logic circuit of hardware in the processor or the instructions in the form of software. The processor mentioned above can be a general processor, a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as hardware code executed by the processor, or executed by the combination of hardware and software modules in the code processor. The software module can be located in the random access memory, the flash memory, the read only memory, the programmable read only memory or the electrically erasable programmable memory, the register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.
[0157] The above describes in detail the long-term climate prediction method based on the dynamic graph neural network model, and the principle and implementation mode of the present application are described. The above embodiment is only used to help understand the method and core idea of the present application; at the same time, for the general skilled person in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as the limitation of the present application.
Claims
1. A long-term climate prediction method based on a dynamic graph neural network model, characterized in that: The method specifically comprises the following steps: Step 1: Collect and process historical climate data to obtain climate time series, and build a climate dataset suitable for training, including a training set, a validation set, and a test set; The deep learning model is composed of three core modules: a spatial interaction modeling module, a temporal feature extraction module, and a fusion prediction module; The spatial interaction modeling module is responsible for capturing the dynamic interaction relationship between geographical locations from the input climate data; The temporal feature extraction module is used to capture the temporal variation relationship of climate elements; The fusion prediction module fuses the features output by the spatial interaction modeling module and the temporal feature extraction module to generate future climate prediction results; Step 2: Input the climate time series of step 1 into the deep learning model to simulate the complex spatio-temporal characteristics between climate elements; In step 2, the spatial interaction modeling module uses a matrix representation of N inter-geographical climate relationships directed graph, and the matrix A is optimized with model training: where E , trainable parameters ; ReLU is an activation function; denotes the connection between point i and point j in the adjacency matrix A; tan is an activation function, is a hyperparameter; In a graph neural network, for a given an adjacency matrix containing N nodes and an initial state , node features are computed by K-hop neighbor aggregation: wherein is the original graph adjacency matrix, is the normalized graph adjacency matrix, is the output feature matrix, is a trainable transformation matrix used to adjust the final feature representation; Considering the case where a fixed integration time and step size is applied, the propagation step is replaced by a continuous variable : is a characteristic matrix representing the latent state in the aggregation step, is a single propagation step, The continuous dynamics of graph propagation is expressed using ODE as: where the initialization state , is the intermediate state of the continuous-time aggregation process; to further reduce numerical errors, the model uses an attention transformation instead of a linear mapping: wherein is a black-box ordinary differential equation solver; denotes a specific intermediate state during the graph information propagation process; will be used as a temporal feature based on spatial interaction modeling ; Step 3: Generate future long-term climate prediction data based on the spatio-temporal characteristics obtained in step 2; Step 4: Adjust the parameters according to the performance of the model on the validation set; Step 5: Test the model on the test set, calculate the error between the prediction results and the true climate data, and further optimize the model through the error feedback mechanism.
2. The prediction method according to claim 1, characterized in that: In step 1, the historical climate data is two-dimensional time series data, where the first dimension is the time point and the second dimension is the geographical coordinate; each value represents the daily average value of the corresponding geographical location; In order to improve the convergence speed and prediction accuracy of the model, the original climate data needs to be standardized to convert the daily average value of each geographical location into a standardized numerical interval, so as to eliminate the dimensional difference between different climate elements.
3. The prediction method according to claim 2, characterized in that: In step 2, the sequence length of the input of the deep learning model is 365, representing the data of the past year, and each input univariate time series The strategy of dividing into 12 sequence blocks represents the data of each month; i.e. the normalized two-dimensional time series of input are segmented into where R is the real field, T is the total length of the input time series, P is the size of each time block, and N is the number of time blocks, and then the channel information is fused with the batch dimension.
4. The prediction method according to claim 3, characterized in that: In step 2, the time feature extraction module uses Transformer Encoder to map the climate sequence to a latent representation: where is a trainable linear projection that maps the input time series chunk into a d-dimensional latent space and adds learnable positional encoding for monitoring the temporal order of the sequence chunks; temporal latent representation as input to the Transformer Encoder; In the Transformer Encoder, each attention head in the multi-head attention , H converts the input into a query matrix , a key matrix and a value matrix : is a Query weight matrix of h attention heads, is a Key weight matrix of the hth attention head, is a Value weight matrix of the hth attention head, After the normalized product operation, the attention output is obtained: In the multi-head attention module, a batch normalization layer and a feedforward network are also included, which are formed through a residual connection; afterwards, the multi-head attention generates a representation denoted as and is input to the fusion prediction module as a private temporal feature representing the internal channel.
5. The prediction method according to claim 4, characterized in that: In step 3, the first fusion prediction module uses three different linear layers to transform and to three embedding representations: ; then, the channel-level similarity matrix M is computed by matrix multiplication followed by a softmax: By and matrix multiplication, followed by a linear layer to convert the size of the feature map; finally, the output is obtained by matrix addition: The model contains a time series prediction module comprising a time decoder and a projection function that takes aggregated features into a time decoder Time Series Decoder that maps the latent embedding to the original data space; finally, the model makes predictions using a projection function based on a feedforward network; The temporal decoder first aggregates features The input is normalized by layer normalization to obtain normalized embeddings; then, a multi-head self-attention layer MHSA with a mask is used with a residual connection to obtain : wherein are three different linear layers corresponding linear projections; Finally, the learned features are input into a projection function for future prediction: wherein represents the final prediction result, and are learnable parameters.
6. The prediction method according to claim 5, characterized in that: In step 5, the mean squared error (MSE) loss is used to measure the difference between the predicted value and the true value; the loss on each channel is collected and averaged over the time series to get the overall target loss : is the expected value representing the average loss over the entire data distribution, is the prediction value of the i-th sample, i.e., the output result of the model, is the true value of the i-th sample, i.e., the label data or target value, The goal of the model is to minimize the MSE between the predicted value and the true value to improve the accuracy of the propagation prediction. 7.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The processor executes the computer program to realize the steps of the method of any one of claims 1 to 6.
8. A computer readable storage medium for storing computer instructions, characterized in that, The computer instructions are executed by the processor to realize the steps of the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Climate causal discovery method based on deep reinforcement learning
CN117407763A
Deep learning prediction method for multi-mode data fusion
CN117874527A