A method and system for weather prediction using data-driven approach

By using Fourier airspace and time domain operators in weather prediction for spatial and temporal decomposition, extracting spatial and timing features, and building a transformer neural network, the problem of insufficient climatic position perception ability in the existing technology is solved, and more efficient and accurate weather prediction is achieved.

CN117055138BActive Publication Date: 2025-05-30SHANGHAI ARTIFICIAL INTELLIGENCE INNOVATION CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311126275.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2025-05-30
Estimated Expiration
2043-09-01

AI Technical Summary

Technical Problem

When using the Fourier transform neural operators for weather prediction, the prior art retains only a set of neural operators, which limits the model's perception of climate positions in the data, resulting in the failure to effectively improve the prediction ability.

Method used

A method of using Fourier space-domain operators and Fourier time-domain operators for space-time decomposition is proposed. The spatial and timing features are extracted through fast Fourier transform and frequency-domain filters, and the prediction features are refined through the full connection layer to construct a transformer neural network for weather state prediction.

Benefits of technology

It improves the accuracy of weather prediction, reduces the computational complexity, and enhances the robustness and anti-overfitability of the model through autonomous learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117055138B_ABST
    Figure CN117055138B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for weather prediction using data-driven approach, which is used to solve the problems in the prior art that the weather prediction model cannot perceive the climate location, fails to fully utilize the temporal information, reduces the prediction accuracy, and has complex calculations. The solution is as follows: Obtain T frames of historical weather state maps for predicting the weather state at a specified time, divide each frame of the historical weather state map into blocks spatially, combine two adjacent blocks at the same position in space temporally, and use the combined blocks to obtain the first embedding vector; Based on the first embedding vector, perform spatio-temporal decomposition N times to obtain the final prediction features, and generate the weather state at the specified time based on the final prediction features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to weather prediction, and in particular, to a method and system for numerical weather prediction using data-driven approach. Background Art

[0002] Weather forecasting using data-driven methods relies on video prediction methods in deep learning. In deep learning, typically, a neural network and a loss function are designed, and the data is iteratively processed using the backpropagation algorithm to optimize the parameters of the neural network such that the value of the loss function for the training data is minimized, in order to learn the data features and perform video prediction.

[0003] To obtain better performance, the existing technical solution is to use a transformer neural network structure to extract features from the data. To reduce the large computational overhead brought by the transformer neural network structure, a neural operator based on the Fourier transform is used in the network, reducing the computational complexity from quadratic to pseudo-linear. However, since only a set of neural operators are retained in the frequency domain, this improvement limits the model's ability to perceive the climate position in the data, and the prediction ability is not improved instead. Summary of the Invention

[0004] In order to solve the above problems existing in the prior art, the object of this case is to propose a method and system for weather prediction using data-driven approach, and the technical solution is as follows.

[0005] In a first aspect, this case proposes a method for weather prediction using data-driven approach, the method comprising the following steps:

[0006] Obtain T frames of historical weather state maps for predicting the weather state at a specified time, where T is a set value;

[0007] Divide each frame of the historical weather state map into blocks in space, combine two adjacent blocks at the same position in space over time, and use the combined blocks to obtain a first embedding vector;

[0008] Based on the first embedding vector, perform spatio-temporal decomposition N times to obtain the final prediction features, and based on the final prediction features, generate the weather state at the specified time, where N is a set value.

[0009] In an implementation of the above technical solution, the prediction features are dimension-reduced using a decoder composed of convolutional layers, and the dimension-reduced prediction features are used for weather state prediction.

[0010] In an implementation of the above technical solution, the spatio-temporal decomposition step includes:

[0011] Obtain a number of weather state segments based on the historical weather state map, and obtain the second embedding vector corresponding to the weather state segment according to the first embedding vector;

[0012] Extract spatial features based on the second embedding vector;

[0013] Sort the spatial features of all weather state segments according to the temporal position to obtain the temporal information between frames, and then obtain the prediction features;

[0014] If the spatio-temporal decomposition is not completed, use the prediction features as the new second embedding vector, and repeat the process of extracting spatial features and temporal information until N times of spatio-temporal decomposition are completed.

[0015] In one implementation of the above technical solution, the spatio-temporal decomposition is implemented through a spatio-temporal decomposition module;

[0016] The spatio-temporal decomposition module includes a Fourier spatial domain operator, a Fourier temporal domain operator, and a fully connected layer; where:

[0017] The Fourier spatial domain operator is used to extract the spatial features of the first embedding vector. The steps include: converting the first embedding vector arranged in the spatial dimension to the frequency domain through the fast Fourier transform, multiplying by the frequency domain filter in the frequency domain, and finally performing the inverse fast Fourier transform of the result back to the spatial domain to obtain the spatial features;

[0018] The Fourier temporal domain operator is used to extract the temporal features. The steps include: converting the spatial features arranged in the time position to the frequency domain through the fast Fourier transform, multiplying by the frequency domain filter in the frequency domain, and finally performing the inverse fast Fourier transform of the result back to the temporal domain to obtain the temporal features;

[0019] The fully connected layer is used to further refine the temporal features into prediction features. In one implementation of the above technical solution, the Fourier spatial domain operator can obtain a set of learnable frequency domain coefficients through training for autonomous learning of positions.

[0020] In one implementation of the above technical solution, a normalization layer is set before each part of the Fourier spatial domain operator, the Fourier temporal domain operator, and the fully connected layer in the spatio-temporal decomposition module.

[0021] In a second aspect, the present case proposes a weather prediction system using data-driven methods. The system includes an acquisition module, a preprocessing module, and a weather prediction model; where:

[0022] The acquisition module is configured to acquire T frames of historical weather state maps for predicting the weather, where T is a set value;

[0023] The preprocessing module is configured to spatially divide each frame of the historical weather state map into blocks, combine two adjacent blocks at the same spatial position in time, and use the combined blocks to obtain the first embedding vector;

[0024] A weather prediction model takes a first embedding vector as input, performs spatio-temporal decomposition on the first embedding vector N times to obtain final prediction features, and generates the weather state at the next moment based on the final prediction features, where N is a set value;

[0025] The weather prediction model includes a spatio-temporal decomposition module, and the spatio-temporal decomposition module includes a Fourier spatial domain operator, a Fourier time domain operator, and a fully connected layer; where:

[0026] The Fourier spatial domain operator is used to extract spatial features, and the steps include: converting the weather state features arranged in the spatial dimension to the frequency domain through the fast Fourier transform, multiplying with the frequency domain filter in the frequency domain, and finally performing the inverse fast Fourier transform on the result back to the spatial domain;

[0027] The Fourier time domain operator is used to extract temporal features, and the steps include: converting the weather state features arranged in the time dimension to the frequency domain through the fast Fourier transform, multiplying with the frequency domain filter in the frequency domain, and finally performing the inverse fast Fourier transform on the result back to the time domain;

[0028] The fully connected layer is used to further refine the temporal features into prediction features.

[0029] In an implementation manner of the above technical solution, the data used for training the weather prediction model is subjected to enhancement processing, and the steps include:

[0030] Adding Gaussian noise with a variance of σ to the data used for training, and randomly translating the data along the earth's latitude direction with a probability of p, where: σ and p are set values. In an implementation manner, σ = 0.1 and p = 0.5.

[0031] In an implementation manner of the above technical solution: The weather prediction model uses the mean squared error and the backpropagation algorithm to determine the optimal parameters of the model.

[0032] The beneficial effects of this case compared with the prior art are as follows:

[0033] (1) Using the Fourier spatial domain operator and the Fourier time domain operator to separately process the symbol vectors in the spatial and temporal domains to obtain spatio-temporal features not only improves the prediction accuracy but also reduces the computational complexity.

[0034] (2) Obtaining a set of learnable frequency domain coefficients through training enables the Fourier operator to autonomously learn and perceive the positional relationship within the frame while maintaining the linear number of parameters.

[0035] (3) Subjecting the training data to noise enhancement and translation enhancement improves the robustness of long-term weather prediction and reduces overfitting of the model during training. Description of the Drawings

[0036] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0037] Figure 1 , One Schematic diagram of the implementation of the Fourier time / space domain operator in a specific embodiment;

[0038] Figure 2 , One Schematic diagram of the process overview in a specific embodiment. Specific Embodiment

[0039] In view of the problem that in the prior art, in order to reduce the large computational overhead brought by the "transformer" neural network structure, a neural operator based on the Fourier transform is used in the neural network. However, since only a set of neural operators are retained in the frequency domain, the perception ability of the model for the climate position in the data is limited. In this case, a new Fourier neural operator is proposed, which can realize the perception of the internal position of the data by the model while introducing fewer parameters. Using this Fourier neural operator to construct a transformer neural network structure can extract the temporal information between data frames and achieve the purpose of accurately predicting the weather state.

[0040] The following will clearly and completely describe the present solution in conjunction with the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.

[0041] (1) Fourier Time / Space Domain Operator

[0042] Refer to Figure 1 The schematic diagram of the implementation of the Fourier time / space domain operator shown. They accept the weather state features arranged in the time / space dimension, first transform the features to the frequency domain through the fast Fourier transform, then multiply with the frequency domain filter in the frequency domain, and finally inverse fast Fourier transform the result back to the time / space domain. In this way, the complexity of the attention mechanism of the transformer neural network can be reduced from square to pseudo-linear.

[0043] Specifically, in the Fourier domain operator, a set of filters with learnable parameters and a set of learnable frequency domain coefficients can be obtained through training. Since the product of the filters and coefficients in the frequency domain is equivalent to convolution in the time domain, by performing an inverse Fourier transform on a set of learnable frequency domain coefficients, a set of frequency domain convolutions with different coefficients corresponding to each position can be obtained. Thus, the position relationship within the frame can be autonomously perceived through this set of learnable frequency domain coefficients. Compared with the prior art, the number of parameters required to perceive the position relationship of the symbol vector within the frame is reduced from linear to constant. While introducing fewer parameters, the Fourier domain operator realizes the adaptive position perception of the data inside.

[0044] (2) Constructing a Transformer neural network

[0045] Using the above Fourier operator to construct a spatio-temporal decomposition module, and combining the spatio-temporal decomposition modules (N of them) and the convolutional decoder to form a Transformer neural network, which can not only perceive position features but also extract the temporal information between frames of the weather state map. After training, the weather state at a specified time can be predicted based on historical weather states.

[0046] The spatio-temporal decomposition module includes a Fourier domain operator, a Fourier time domain operator, and a fully connected layer. Specifically: The Fourier domain operator is used to extract the spatial features of the first embedding vector. It converts the first embedding vector arranged in the spatial dimension to the frequency domain through the fast Fourier transform, then multiplies it with the frequency domain filter in the frequency domain, and finally performs an inverse fast Fourier transform on the result back to the spatial domain to obtain the spatial features. The Fourier time domain operator is used to extract the temporal features. It converts the spatial features arranged in the time position to the frequency domain through the fast Fourier transform, then multiplies it with the frequency domain filter in the frequency domain, and finally performs an inverse fast Fourier transform on the result back to the time domain to obtain the temporal features. The fully connected layer is used to further refine the temporal features into prediction features.

[0047] Connect N such spatio-temporal decomposition modules in series, and then send the final prediction features into a decoder composed of convolutional layers for dimensionality reduction, so as to generate the predicted weather state at the specified time.

[0048] (3) Predicting the weather state

[0049] The following combines Figure 2 , and describes an implementation process of using the above constructed Transformer neural network for weather prediction.

[0050] S10. Obtain historical weather state maps of T frames for predicting the weather state at a specified time, where T is a set value.

[0051] For the obtained historical weather status map, if it is used as training data for a transformer neural network, Gaussian noise with a variance of σ can be added to the data, and the data can be randomly translated along the horizontal axis with a probability of p, so as to perform simple and effective noise enhancement and translation enhancement on the discreteness and rotation in the data, achieving the effect of increasing the robustness of long-term prediction and reducing overfitting during model training. Exemplarily, σ = 0.1 and p = 0.5.

[0052] S20. Divide each frame of the historical weather status map into blocks in space, combine two adjacent blocks at the same position in space over time, and use the combined blocks to obtain the first embedding vector.

[0053] Specifically, cut each frame of the weather status map into small blocks of 1 pixel by 1 pixel in space, combine two adjacent small blocks at the same position in space over time, and then process the obtained blocks with a convolution operator to form the first embedding vector.

[0054] S30. Based on the first embedding vector, perform spatio-temporal decomposition N times to obtain the final prediction features, and based on the final prediction features, generate the weather status at the specified time, where N is a set value.

[0055] Specifically, obtain several weather status segments based on the historical weather status map. Exemplarily, form a weather status segment with 6 frames of the historical weather status map. Construct a second embedding vector for each weather status segment according to the corresponding first embedding vector.

[0056] As Figure 2 shown, send the first embedding vector into the spatio-temporal decomposition block. There are a total of 12 spatio-temporal decomposition blocks. The spatio-temporal decomposition module obtains the spatio-temporal features in a weather status segment by separately processing the symbolic vectors in the time domain and the spatial domain.

[0057] In each spatio-temporal decomposition block, first arrange the second embedding vectors extracted from a weather status segment composed of 6 frames according to the spatial position, then perform layer normalization on these second embedding vectors and use the Fourier spatial domain operator to extract the spatial features of the weather status segment.

[0058] Perform layer normalization on the obtained spatial features, then arrange the spatial features according to the temporal position, and use the Fourier time domain operator to extract the temporal features between frames.

[0059] Finally, perform layer normalization as well, and send each spatial feature into a fully connected layer to further refine the features. Take the output of the fully connected layer as the input of the next spatio-temporal decomposition module, repeat N times, and obtain the final prediction features. Exemplarily, N is 12.

[0060] The terms "first" and "second" mentioned above are only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.

[0061] S40. Feed the features obtained after the spatio-temporal decomposition block sequence into a decoder composed of convolutional layers for dimensionality reduction, thereby generating the predicted weather state at the specified time.

[0062] The specified time can be the next moment, the next day, the next week, etc. The time span that can be predicted depends on the time length of the historical weather state data and the scale of the transformer neural network. Figure 2 The schematic input data uses the weather state data (X1, X 2 ,..., X t ) before the current moment t to predict the weather state data X at the next moment t+1 t+1。

[0063] In another embodiment, a weather prediction system using data-driven is implemented according to the above method technical solution. The system includes an acquisition module, a preprocessing module, and a weather prediction model; wherein:

[0064] The acquisition module is configured to acquire T frames of historical weather state maps for weather prediction, where T is a set value;

[0065] The preprocessing module is configured to spatially divide each frame of the historical weather state map into blocks, combine two adjacent blocks at the same spatial position in time, and use the combined blocks to obtain the first embedding vector;

[0066] The weather prediction model takes the first embedding vector as input, performs spatio-temporal decomposition on the first embedding vector N times to obtain the final prediction features, and generates the weather state at the next moment based on the final prediction features, where N is a set value;

[0067] The weather prediction model is implemented using the above-mentioned transformer neural network, and the optimal parameters of the model are determined using the mean squared error and the backpropagation algorithm. After learning a set of relatively optimal parameters, when the weather states at the past several moments (exemplarily, 6 moments) are input into the network, the weather state at the next moment can be predicted.

[0068] Through the description of the above embodiments, those skilled in the art can clearly understand that the method or system of the present disclosure can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, in more cases for the present disclosure, software program implementation is a better implementation method.

[0069] Although the embodiments of the present invention have been described above in conjunction with the accompanying drawings, the present invention is not limited to the above specific embodiments and application fields. The above specific embodiments are merely illustrative and guiding, rather than restrictive. Those of ordinary skill in the art can also make many forms under the inspiration of this specification and without departing from the scope protected by the claims of the present invention, and all of these fall within the scope of protection of the present invention.

Claims

1. A method for weather prediction using data-driven approach, characterized in that, the method comprises the following steps: Obtain T frames of historical weather state maps for predicting the weather state at a specified time, where T is a set value; Divide each frame of the historical weather state map into blocks spatially, combine two adjacent blocks at the same spatial position temporally, and use the combined blocks to obtain the first embedding vector; Based on the first embedding vector, perform spatio-temporal decomposition N times to obtain the final prediction features, and generate the weather state at the specified time based on the final prediction features, where N is a set value; Among them, the spatio-temporal decomposition is implemented by a spatio-temporal decomposition module, and the spatio-temporal decomposition module includes a Fourier spatial domain operator, a Fourier time domain operator, and a fully connected layer; where: The Fourier spatial domain operator is used to extract the spatial features of the first embedding vector. It converts the first embedding vector arranged in the spatial dimension to the frequency domain through the fast Fourier transform, multiplies it with the frequency domain filter in the frequency domain, and finally inverse fast Fourier transforms the result back to the spatial domain to obtain the spatial features; The Fourier time domain operator is used to extract the temporal features. It converts the spatial features arranged in the time position to the frequency domain through the fast Fourier transform, multiplies it with the frequency domain filter in the frequency domain, and finally inverse fast Fourier transforms the result back to the time domain to obtain the temporal features; The fully connected layer is used to further refine the temporal features into prediction features.

2. The method according to claim 1, characterized in that, The prediction features are dimension-reduced using a decoder composed of convolutional layers, and the weather state is predicted using the dimension-reduced prediction features.

3. The method according to claim 1, characterized in that, The spatio-temporal decomposition step includes: Obtain several weather state segments based on the historical weather state map, and obtain the second embedding vector corresponding to the weather state segment according to the first embedding vector; Extract the spatial features based on the second embedding vector; Sort the spatial features of all weather state segments according to the temporal position, obtain the temporal information between frames, and further obtain the prediction features; If the spatio-temporal decomposition is not completed, use the prediction features as the new second embedding vector, and repeat the process of extracting spatial features and temporal information until N times of spatio-temporal decomposition are completed.

4. The method according to claim 1, characterized in that: The Fourier spatial domain operator can obtain a set of learnable frequency domain coefficients through training for autonomous learning of positions.

5. The method according to claim 1, characterized in that: A normalization layer is set before each part of the Fourier spatial domain operator, the Fourier time domain operator, and the fully connected layer in the spatio-temporal decomposition module.

6. A system for weather prediction using data-driven approach, characterized in that, the system includes an acquisition module, a preprocessing module, and a weather prediction model; where: The acquisition module is configured to obtain T frames of historical weather state maps for predicting the weather, where T is a set value; The preprocessing module is configured to divide each frame of the historical weather state map into blocks spatially, combine two adjacent blocks at the same spatial position temporally, and use the combined blocks to obtain the first embedding vector; A weather prediction model takes a first embedding vector as input, performs spatio-temporal decomposition on the first embedding vector N times to obtain final prediction features, and generates the weather state at the next moment based on the final prediction features, where N is a set value; The weather prediction model includes a spatio-temporal decomposition module, and the spatio-temporal decomposition module includes a Fourier spatial domain operator, a Fourier time domain operator, and a fully connected layer; where: The Fourier spatial domain operator is used to extract the spatial features of the first embedding vector. It transforms the first embedding vector arranged in the spatial dimension into the frequency domain through the fast Fourier transform, multiplies it with the frequency domain filter in the frequency domain, and finally inverse fast Fourier transforms the result back to the spatial domain to obtain the spatial features; The Fourier time domain operator is used to extract the temporal features. It transforms the spatial features arranged in the time position into the frequency domain through the fast Fourier transform, multiplies it with the frequency domain filter in the frequency domain, and finally inverse fast Fourier transforms the result back to the time domain to obtain the temporal features; The fully connected layer is used to further refine the temporal features into prediction features.

7. The system according to claim 6, wherein, The data used to train the weather prediction model undergoes enhancement processing, and the steps include: Adding Gaussian noise with a variance of σ to the data used for training, and randomly translating the data along the earth's latitude direction with a probability of p, where: σ and p are set values.

8. The system according to claim 7, wherein: σ = 0.1 and p = 0.

5.

9. The system according to claim 8, wherein: The weather prediction model uses the mean squared error and the backpropagation algorithm to determine the optimal parameters of the model.

Citation Information

Patent Citations

  • Wind power plant short-term wind speed prediction method

    CN112613657A

  • Spatial-temporal data prediction method, weather data prediction method and energy data prediction method

    CN116451827A