Enso long-term prediction method, device and medium based on multi-head spatiotemporal attention mechanism
By adopting a long-term ENSO forecasting method based on a multi-head spatiotemporal attention mechanism, the problem of insufficient multivariate data integration in existing technologies is solved, and efficient and accurate long-term ENSO forecasting is achieved, which is suitable for climate disaster early warning and emergency response.
Patent Information
- Application Number
- CN202411800614.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-12-09
AI Technical Summary
Existing technologies have failed to effectively integrate multivariate data in ENSO forecasts, resulting in insufficient long-term forecast accuracy. In particular, when dealing with the interactions between different meteorological variables, the forecast errors are large, making it impossible to provide a reliable basis for long-term climate early warning.
The ENSO long-term forecasting method based on a multi-head spatiotemporal attention mechanism is adopted. By constructing three-dimensional field data, multi-scale block processing and spatiotemporal embedding mechanism, combined with an improved multi-head spatiotemporal attention mechanism and encoder-decoder architecture, the long-range temporal dependence and complex spatial interaction of meteorological data are captured, and the model is trained and corrected by backpropagation.
It significantly improves the accuracy and efficiency of long-term ENSO forecasts, especially demonstrating better robustness in long-term forecasts. It can accurately capture the regional impacts of ENSO events and complex climate change, reduce forecast errors, and provide scientific and precise support for climate disaster prevention.
Smart Images

Figure CN119918716B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of climate prediction, and particularly relates to an ENSO long-term prediction method based on a multi-head spatiotemporal attention mechanism, equipment and a medium. BACKGROUND
[0002] ENSO (El Nino-Southern Oscillation) is one of the important factors causing extreme weather such as floods and droughts, and therefore, improving the accuracy of ENSO prediction is crucial for reducing the impact of climate disasters. Since the composition of marine data is relatively complex and difficult to obtain, traditional ENSO prediction methods often only focus on the individual role of marine or atmospheric variables and make predictions based on a single variable. This is particularly insufficient in dealing with the interaction between different meteorological variables, resulting in low prediction accuracy, especially in long-term prediction, with large prediction errors, which cannot provide reliable basis for long-term climate warning.
[0003] Chinese patent application with publication number CN117688978A discloses an ENSO event spatiotemporal prediction method fusing multi-source data, which uses a multi-source data fusion method to combine marine data and atmospheric data, specifically including sea surface temperature, ocean heat content, radial wind anomaly and zonal wind anomaly, into multi-dimensional observation data to improve the prediction length and accuracy of ENSO events. However, this method uses the convolution layer and attention layer of the convolutional long short-term memory neural network to extract the spatial features of the expanded observation data, and the extraction ability and computational efficiency of the model for multi-scale features need to be further improved. Therefore, it is necessary to design a new ENSO prediction method that can accurately and efficiently perform ENSO long-term prediction to reduce the impact of climate disasters and provide more scientific and accurate support for emergency response and disaster prevention. SUMMARY
[0004] The purpose of the present application is to overcome the defects of the prior art and provide an ENSO long-term prediction method based on a multi-head spatiotemporal attention mechanism, equipment and a medium, which can accurately and efficiently perform ENSO long-term prediction to reduce the impact of climate disasters and provide more scientific and accurate support for emergency response and disaster prevention.
[0005] The purpose of the present application can be achieved by the following technical solutions:
[0006] The present application provides an ENSO long-term prediction method based on a multi-head spatiotemporal attention mechanism, comprising the following steps:
[0007] S1, obtaining sea surface temperature, sea surface wind stress and ocean surface temperature at different depths to construct three-dimensional field data D input ;
[0008] S2, performing spatiotemporal attention on the three-dimensional field data Dinput Preprocessing is performed to remove long-term trends and seasonal variations to generate a standardized dataset D norm ;
[0009] S3, the standardized dataset D norm is processed by a Patch function to generate multi-scale spatiotemporal features F patch ;
[0010] S4, the spatiotemporal features F patch are mapped to a high-dimensional space by a spatiotemporal embedding mechanism to obtain embedded features F embed , the spatiotemporal embedding mechanism includes time embedding, space embedding and linear embedding;
[0011] S5, the embedded features F embed are input into a trained ENSO long-term prediction model based on a multi-head spatiotemporal attention mechanism to obtain an ENSO prediction result;
[0012] The ENSO long-term prediction model based on the multi-head spatiotemporal attention mechanism includes an encoder module, a multi-scale feature fusion module and a decoder module connected in sequence, the encoder module is constructed based on an improved multi-head spatiotemporal attention mechanism and is used for feature extraction of input data, the improved multi-head spatiotemporal attention mechanism replaces a Softmax x function in the multi-head spatiotemporal attention mechanism with a linear mapping function; the multi-scale feature fusion module is used for fusing features of different scales output by the encoder module; the decoder module includes multiple decoders, each decoder is used for generating an intermediate prediction result according to a prediction feature output by itself and an output of the multi-scale feature fusion module, and the outputs of all decoders are weighted and summed to obtain a final prediction result.
[0013] Further, in step S3, the spatiotemporal features F patch are generated by a Patch function, and the specific formula is as follows:
[0014] F patch = Patch(D norm , M scale )
[0015] Wherein, M scale represents a multi-scale division operation.
[0016] Further, in the spatiotemporal embedding mechanism, the specific process of the time embedding is to inject position information for each time point, and the specific formula is as follows:
[0017]
[0018]
[0019] where PE represents the position encoding, d model is the dimension of the embedding vector, pos represents the position of the time point in the sequence, and i represents half of the embedding dimension;
[0020] The specific process of the spatial embedding is to map each spatial position to a high-dimensional space through an embedding layer;
[0021] The specific process of the linear embedding is to compress the spatio-temporal feature F patch through a linear transformation;
[0022] The expression of the embedding feature F embed obtained through the spatio-temporal embedding mechanism is as follows:
[0023] F embed = E temporal (F patch ) + E spatial (F patch ) + E linear (F patch )
[0024] where E temporal (*) is a temporal embedding function, E spatial (*) is a spatial embedding function, and E linear (*) is a linear embedding function.
[0025] Further, the expression of the improved multi-head spatio-temporal attention mechanism is as follows:
[0026] Z = Concat (head1, head2,... head h ) W O
[0027]
[0028] where Z is the output of the improved multi-head spatio-temporal attention mechanism, Concat (*) represents a feature concatenation operation, W O is a trainable weight, h represents the number of attention heads, Q i , K i , and V i represent the query matrix, key matrix, and value matrix of the i-th attention head head i , is a linear mapping function, specifically a Linear Attention function.
[0029] Further, the encoder module comprises a modified multi-head spatio-temporal attention mechanism and a feedforward network connected in sequence, and a normalization layer is arranged before and after the feedforward network.
[0030] Further, the output of the feedforward network is F feedforward , and the outputs of the normalization layers before and after the feedforward network are Z norm and F scale , respectively.
[0031] Z norm =Norm(Z+F embed )
[0032] F feedforward =ReLU(W1Z norm +b1)
[0033] F scale =Norm(F feedforward +Z norm )
[0034] wherein Z is the output of the modified multi-head spatio-temporal attention mechanism, Norm(*) represents a normalization operation, ReLU(*) represents an activation function, and W1 and b1 are the weight and bias of the network, respectively.
[0035] Further, each decoder in the decoder module comprises a multi-head attention mechanism, a normalization layer, a feedforward network layer and a linear layer connected in sequence.
[0036] Further, the ENSO long-term prediction model based on the multi-head spatio-temporal attention mechanism is trained by using a recurrent training mode through a back propagation algorithm.
[0037] The application further provides an electronic device comprising a memory, a processor and a program stored in the memory, and the processor implements the above method when executing the program.
[0038] The application further provides a computer readable storage medium having a computer program stored thereon, and the program is executed by a processor to implement the above method.
[0039] Compared with the prior art, the application has the following beneficial effects:
[0040] 1. The application provides an ENSO long-term prediction method based on a multi-head spatio-temporal attention mechanism, which firstly constructs a standardized data set D norm based on sea surface temperature, sea surface wind stress and ocean surface temperature at different depths; and then performs block processing on the spatial dimension of the standardized data set D norm by using a Patch function to generate multi-scale spatio-temporal features Fpatch and map it to a high-dimensional space through a spatio-temporal embedding mechanism to obtain embedded features F embed The multi-scale patch division mechanism can capture the change characteristics of meteorological variables in different spatial ranges, especially when dealing with large-scale and local-scale climate phenomena, which can significantly improve the accuracy of spatio-temporal feature extraction and is suitable for capturing the regional influence of ENSO events; finally, the embedded features F embed Input the trained ENSO long-term prediction model based on the multi-head spatio-temporal attention mechanism to obtain the ENSO prediction result, the ENSO long-term prediction model based on the multi-head spatio-temporal attention mechanism adopts an encoder-decoder architecture, the encoder module is constructed based on the improved multi-head spatio-temporal attention mechanism, and the specific improvement is to replace the Softmax function in the multi-head spatio-temporal attention mechanism with a linear mapping function. x The linear mapping function can capture the long-range temporal dependence and complex spatial interaction of meteorological data, process multi-dimensional spatio-temporal features in parallel, greatly reduce the computational complexity, improve the efficiency and accuracy of the model in long-time span data processing, and especially show better robustness in ENSO long-term prediction.
[0041] 2、The present application adopts the back propagation method to feedback correct the model during the model training and optimization process, so as to improve the prediction accuracy and reduce the error, thereby improving the long-term prediction accuracy of ENSO events and reducing the prediction error. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 It is a flow chart of the ENSO long-term prediction method based on the multi-head spatio-temporal attention mechanism;
[0043] Figure 2 It is a structural schematic diagram of the ENSO long-term prediction model based on the multi-head spatio-temporal attention mechanism;
[0044] Figure 3 It is a structural schematic diagram of the encoder;
[0045] Figure 4 It is a structural schematic diagram of the decoder. DETAILED DESCRIPTION
[0046] The present application will be described in detail below in combination with the drawings and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present application, and gives a detailed implementation manner and specific operation process, but the protection scope of the present application is not limited to the following examples.
[0047] Embodiment:
[0048] This embodiment provides a long-term ENSO forecasting method based on a multi-head spatiotemporal attention mechanism. This method aims to address the problem of insufficient ENSO forecasting accuracy caused by the inability of existing technologies to effectively integrate multivariate data in long-term forecasting. The main steps of this method are as follows: First, acquire three-dimensional atmospheric and oceanic field data to construct the three-dimensional field data. Then, remove long-term trends and seasonal variations from the three-dimensional field data through standardization preprocessing to generate a standardized dataset. After data standardization, use a multi-scale patch partitioning mechanism to perform multi-scale block processing on the three-dimensional data, extracting spatiotemporal features at different spatial scales. This multi-scale patch partitioning can capture the dependencies of three-dimensional field data in different spatial dimensions, forming a multi-resolution spatial feature representation suitable for capturing the regional impact of ENSO events. The processed data is then input into a long-term ENSO forecasting model based on a multi-head spatiotemporal attention mechanism. This model adopts a convolutional encoder-decoder architecture, where the encoder processes data from different time and spatial dimensions in parallel to capture the complex interactions between meteorological variables. In particular, this embodiment proposes using Linear... r Attentio n The mechanism replaces the Softma in the traditional multi-head spatiotemporal attention mechanism. x The function can significantly reduce computational complexity. Finally, the model is trained and calibrated using historical ENSO event data to generate the final ENSO prediction results. During model training and optimization, backpropagation is used to provide feedback calibration to improve prediction accuracy and reduce errors, thereby improving the long-term prediction accuracy of ENSO events and reducing prediction errors.
[0049] The above methods are as follows Figure 1 As shown, the specific steps include:
[0050] S1. Obtain sea surface temperature (SST), sea surface wind stress (τx and τy), and upper ocean temperatures at different depths to construct three-dimensional field data D. input .
[0051] S2, regarding the three-dimensional field data D input Preprocessing and normalization are performed to remove long-term trends and seasonal variations, generating a standardized dataset D containing outliers. norm .
[0052] S3. Use the Patch function to standardize the dataset D. norm Spatial segmentation is performed to generate multi-scale spatiotemporal features F. patch .
[0053] To capture multi-scale spatial features, this embodiment uses a patch partitioning mechanism to partition the standardized dataset D. normThe multi-scale patch processing mechanism can divide the data into a plurality of sub-regions according to the spatial resolution of the data, and the scale of each region is determined according to the patch parameter M scale The dynamic adjustment is performed to generate the multi-scale spatio-temporal features F patch The specific formula is as follows:
[0054] F patch =Patch(D norm , M scale )
[0055] S4, the spatio-temporal features F patch are mapped to a high-dimensional space through a spatio-temporal embedding mechanism to obtain embedded features F embed .
[0056] In order to ensure that the model can capture the relative relationship between time points when processing time series data, the embodiment introduces a spatio-temporal embedding mechanism. The spatio-temporal embedding mechanism includes time embedding, space embedding and linear embedding. The specific process of time embedding is as follows: injecting unique position information for each time point. Since the data at different time points has a sequence and a periodic pattern, the time encoding generated by combining the sine and cosine functions has a logarithmic frequency distribution in each dimension to generate a unique embedding that can represent the position of the time point. The specific formula is as follows:
[0057]
[0058] Where PE represents the position encoding, d model is the dimension of the embedding vector, pos represents the position of the time point in the sequence, and i represents half of the embedding dimension (because two values are generated for each position).
[0059] The specific process of space embedding is as follows: in order to learn the data relationship between different latitude and longitude positions of the marine surface temperature and wind stress, etc., each spatial position is mapped to a high-dimensional space through an embedding layer, and the data in the spatial dimension is extracted through the space embedding. The main purpose is to extract the local changes in space to ensure that the spatial information is retained.
[0060] The specific process of linear embedding is as follows: the spatio-temporal features F patch are compressed through linear transformation to map the original data to a high-dimensional space, retain the original feature information of the data, realize the alignment of the data and the embedding space dimension, and enable the time and space embedding vectors to be effectively merged into the model input.
[0061] The expression of the embedded features F embed obtained through the spatio-temporal embedding mechanism is as follows:
[0062] F embed =E temporal(F patch )+E spatial (F patch )+E linear (F patch )
[0063] Among them, E temporai (*) represents the time embedding function, E spatial (*) is the spatial embedding function, E linear (*) represents a linear embedding function.
[0064] S5, embed feature F embed Input the trained ENSO long-term prediction model based on multi-head spatiotemporal attention mechanism to obtain ENSO prediction results.
[0065] like Figure 2 As shown, the ENSO long-term prediction model based on a multi-head spatiotemporal attention mechanism includes an encoder module, a multi-scale feature fusion module, and a decoder module connected in sequence. The encoder module is built based on an improved multi-head spatiotemporal attention mechanism and is used to extract features from the input data. The improved multi-head spatiotemporal attention mechanism replaces the Softmax function in the multi-head spatiotemporal attention mechanism with a linear mapping function, Linear Attention. The multi-scale feature fusion module is used to fuse features at different scales output by the encoder module. The decoder module includes n decoders. Each decoder generates intermediate prediction results based on its own output prediction features and the output of the multi-scale feature fusion module. The final prediction result is obtained by weighted summation of the outputs of all decoders. Specific descriptions of each module are as follows:
[0066] like Figure 3 As shown, the encoder module employs a stacked multi-layer neural network structure, with its core components being an improved multi-head spatiotemporal attention mechanism, a feedforward network, and a normalization layer. The encoder module's input is first processed by the improved multi-head spatiotemporal attention mechanism. By computing the weights of multiple attention heads in parallel, it captures complex spatiotemporal interactions, as shown in the following expression:
[0067] Z=Concat(head1, head2,...head h W O
[0068]
[0069] Where Z represents the output of the improved multi-head spatiotemporal attention mechanism, Concat(*) denotes the feature concatenation operation, and W... O For trainable weights, h represents the number of attention heads, and Q... i K i and Vi denotes the i-th head i query matrix, key matrix and value matrix, is a LinearAttention function. By replacing the Softmax function in the traditional multi-head spatio-temporal attention mechanism with a linear function, the computational complexity can be optimized from O(n 2 ) to O(nlog(n)), effectively improving the computational efficiency.
[0070] The output of the improved multi-head spatio-temporal attention mechanism is connected through a residual connection and normalized, denoted as:
[0071] Z norm = Norm(Z + F embed )
[0072] Then, the output Z norm of the improved multi-head spatio-temporal attention mechanism is input into a feedforward network to further extract features, with the formula:
[0073] F feedforward = ReLU(W1Z norm + b1)
[0074] The output F feedforward of the feedforward network is linearly transformed and activated by the ReLU function, and then residual connection and normalization are applied again to output the final feature F scale :
[0075] F scale = Norm(F feedforward + Z norm )
[0076] In the above process, Norm(*) represents the normalization operation, ReLU(*) represents the activation function, and W1 and b1 are the weights and biases of the network, respectively.
[0077] The feature fusion module generates the final feature representation by fusing multi-scale features. The specific operation is as follows: fuse the features F scale1 and F scale2 from different scales, with the formula:
[0078] F fusion = F scale1 + F scale2
[0079] where F scale1 and F scale2 represent features of different scales.
[0080] The decoder module receives two inputs: one is the feature F fusion, and the second is the prediction feature Z output by the decoder itself decoder , so as to realize sequence-to-sequence learning.
[0081] Each decoder comprises a multi-head spatio-temporal attention mechanism, a normalization layer, a feedforward network layer, and a linear layer, as shown in the figure. Figure 4 The output of the feedforward network is F feedforward , the outputs of the first and second normalization layers from the input direction of the decoder are Z norm-1 and Z norm-2 , and the output of the linear layer is Y pred , which is the intermediate prediction result generated by each decoder. The specific formula of each layer is as follows:
[0082] Z norm-1 =Norm(Z+F embed )
[0083] F decoder =Concat(Z norm-1 , F fusion )
[0084] Z norm-2 =Norm(Z+F decoder )
[0085] F feedforward =ReLU(W1Z norm-2 +b1)
[0086] Z decoder =Norm(F feedforward +Z norm-2 )
[0087] Y pred =Linear(Dropout(F decoder ))
[0088] wherein F decoder represents the result of splicing the feature Z norm-1 after the first normalization in the decoder and the feature F fusion after the fusion of the encoder output, Concat(*) represents the feature splicing operation, and Linear(*) represents the linear layer.
[0089] The final prediction value Y final of the model is obtained by weighted combination of the intermediate results generated by multiple decoders, and the specific representation is as follows:
[0090] Y final =W1Y pred1 +W2Y pred2 +...+W n Y predn
[0091] wherein W n are trainable weights, Y predn are intermediate prediction results generated by different decoders.
[0092] The ENSO long-term prediction model based on the multi-head spatio-temporal attention mechanism is corrected through historical ENSO event data, trained through the back propagation algorithm in a loop training mode, and the robustness and prediction accuracy of the model on unknown data are verified through cross-validation and performance evaluation.
[0093] The above method breaks through the limitations of traditional prediction methods, not only effectively capturing long-range dependencies in time series, but also analyzing long-range correlations between different geographical locations in the spatial dimension. By effectively integrating multi-modal meteorological data such as atmosphere and ocean, and introducing multi-scale Patch segmentation processing, the model can extract key features at different spatial scales, further enhancing the accuracy of ENSO prediction. Through the use of linear attention mechanism, the computational efficiency is significantly optimized, enabling the model to efficiently process long time series data. The above innovation not only ensures high prediction accuracy of the model, but also improves the robustness of the model, which can adapt to various application requirements in complex climate environments, providing important support for meteorological disaster prediction and long-term climate research.
[0094] The above method can accurately predict the time and intensity of ENSO events over a long time range, and has strong adaptability and scalability when processing complex meteorological data. It can not only adapt to changes in different geographical locations and atmospheric variables, but also optimize the computational complexity, and can be applied to climate prediction, agricultural production planning, and global climate change research, etc. It can provide more reliable climate data support for meteorological departments, improve disaster response efficiency, and has wide application prospects.
[0095] If the above method is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the prior art that essentially contributes or the part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various program code storage media.
[0096] The foregoing description of the embodiments has been presented for the purpose of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed. Modifications and variations are possible in light of the above teachings or can be acquired from practice of the application. As well, the description is presented in the context of the preferred embodiments as a number of alternatives. It is not intended to limit the application to the precise form described.
Claims
1. An ENSO long-term prediction method based on a multi-head spatiotemporal attention mechanism, characterized in that, The method comprises the following steps: S1, acquire sea surface temperature, sea surface wind stress and ocean surface temperature at different depths, construct three-dimensional field data D input ; S2, on the three-dimensional field data D input Pre-processing is performed, removing long-term trends and seasonal variations, generating a standardized dataset D norm ; S3, passing the standardized dataset D through a Patch function norm performing chunking in spatial dimension to generate multi-scale spatio-temporal features F patch ; S4, mapping the spatio-temporal features F patch to a high-dimensional space to obtain embedded features F embed , the spatio-temporal embedding mechanism comprising temporal embedding, spatial embedding and linear embedding; S5、obtaining the embedded feature F embed inputting the trained ENSO long-term prediction model based on the multi-head spatiotemporal attention mechanism, to obtain an ENSO prediction result; The ENSO long-term prediction model based on the multi-head spatio-temporal attention mechanism comprises an encoder module, a multi-scale feature fusion module and a decoder module connected in sequence, the encoder module is constructed based on an improved multi-head spatio-temporal attention mechanism and is used for feature extraction of input data, the improved multi-head spatio-temporal attention mechanism replaces a Softmax function in the multi-head spatio-temporal attention mechanism with a linear mapping function; the multi-scale feature fusion module is used for fusing features of different scales output by the encoder module; the decoder module comprises a plurality of decoders, each decoder is used for generating an intermediate prediction result according to a prediction feature output by itself and an output of the multi-scale feature fusion module, and a final prediction result is obtained by weighted summation of outputs of all decoders.
2. The ENSO long-term prediction method based on a multi-head spatio-temporal attention mechanism according to claim 1, characterized in that, In step S3, the spatio-temporal features F are generated by a Patch function patch The specific formula is as follows: F patch = Patch(D norm , M scale ) where M scale denotes a multi-scale partition operation.
3. The ENSO long-term prediction method based on a multi-head spatio-temporal attention mechanism according to claim 1, characterized in that, In the spatio-temporal embedding mechanism, the specific process of the time embedding is as follows: position information is injected at each time point, and the specific formula is as follows: where PE denotes the position encoding, d model is the dimension of the embedding vector, pos denotes the position of the time point in the sequence, and i denotes half of the embedding dimension; The specific process of the space embedding is as follows: each spatial position is mapped to a high-dimensional space through an embedding layer. The specific process of the linear embedding is: compressing the spatio-temporal features F patch by a linear transformation; The embedding features F obtained by the spatio-temporal embedding mechanism embed The expression is as follows: F embed = E temporal (F patch ) + E spatial (F patch ) + E linear (F patch ) where E temporal (*) is a temporal embedding function, E spatial (*) is a spatial embedding function, E linear (*) is a linear embedding function.
4. The ENSO long-term prediction method based on a multi-head spatio-temporal attention mechanism according to claim 1, characterized in that, The expression of the improved multi-head spatio-temporal attention mechanism is as follows: Z = Concat(headl, head2,... head h )W O where Z is the output of the improved multi-head spatio-temporal attention mechanism, Concat(*) represents a feature concatenation operation, W O are trainable weights, h represents the number of attention heads, Q i , K i , and V i represent the query matrix, key matrix, and value matrix of the i-th head head i , is a linear mapping function, specifically a Linear Attention function.
5. The ENSO long-term prediction method based on a multi-head spatio-temporal attention mechanism according to claim 1, characterized in that, The encoder module comprises an improved multi-head spatio-temporal attention mechanism and a feedforward network connected in sequence, and a normalization layer is arranged before and after the feedforward network.
6. The ENSO long-term prediction method based on the multi-head spatio-temporal attention mechanism according to claim 5, characterized in that, The output of the feedforward network is F feedforward , the outputs of the normalization layers before and after the feedforward network are Z norm and F scale , respectively, and the expressions of the above outputs are as follows: Z norm = Norm(Z + F embed ) F feedforward = ReLU(W1Z norm + b1) F scale = Norm(F feedforward + Z norm ) In the formula, Z is the output of the improved multi-head spatio-temporal attention mechanism, Norm(*) represents a normalization operation, ReLU(*) represents an activation function, W1 and b1 are the weight and bias of the network respectively.
7. The ENSO long-term prediction method based on a multi-head spatio-temporal attention mechanism according to claim 1, characterized in that, In the decoder module, each decoder comprises a multi-head attention mechanism, a normalization layer, a feedforward network layer and a linear layer connected in sequence.
8. The ENSO long-term prediction method based on a multi-head spatio-temporal attention mechanism according to claim 1, characterized in that, The ENSO long-term prediction model based on the multi-head spatio-temporal attention mechanism is trained by using a recurrent training mode through a back propagation algorithm.
9. An electronic device comprising a memory, a processor, and a program stored in the memory, wherein the program causes the processor to function as: The processor implements the method according to any one of claims 1-8 when executing the program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method according to any one of claims 1-8.
Citation Information
Patent Citations
ENSO event spatio-temporal prediction method and device fusing multi-source data and medium
CN117688978A