Weather data prediction method and system based on deep learning
Through deep learning-based methods, CNN and LSTM extract the spatial and temporal characteristics of weather data, and a multi-layer perceptron model is constructed, which solves the accuracy and adaptability problems of traditional weather prediction methods and achieves efficient and accurate weather prediction.
Patent Information
- Application Number
- CN202510632410.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-29
AI Technical Summary
Traditional weather prediction methods are sensitive to initial conditions and are difficult to accurately capture the complex nonlinear relationships of atmospheric systems, resulting in limited prediction accuracy.
Using a deep learning-based method, spatial features are extracted through convolutional neural networks (CNNs), temporal features are extracted through recurrent neural networks and their variants (such as LSTMs), and multi-layer perceptron models are constructed to fuse multi-source weather data for prediction.
It improves the accuracy and efficiency of weather forecasting, enhances the adaptability and generalization capabilities of the model, and can provide accurate prediction results in a short period of time.
Smart Images

Figure CN120561845A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of meteorological forecasting, and specifically relates to a weather data forecasting method and system based on deep learning. Background Art
[0002] Weather forecasting plays a vital role in many areas, such as agricultural production, transportation, and energy supply. Accurate weather forecasts can help people prepare for natural disasters, reduce losses from natural disasters, and improve production efficiency.
[0003] Traditional weather forecasting methods primarily rely on numerical weather prediction models. These models, based on atmospheric physics equations, use computers to simulate the movement and changes of the atmosphere to make predictions. However, these traditional methods have several limitations. For one thing, numerical models are extremely sensitive to initial conditions; even small errors in initial data can lead to significant deviations in forecast results. Furthermore, the atmospheric system is a highly complex nonlinear system, and traditional models struggle to accurately capture its complex nonlinear relationships, resulting in limited forecast accuracy.
[0004] With the rapid development of artificial intelligence technology, deep learning has brought new opportunities to the field of weather forecasting with its powerful feature learning and nonlinear modeling capabilities. Deep learning models can automatically learn complex patterns and laws from large amounts of weather data, thereby improving the accuracy and reliability of weather forecasts. Summary of the Invention
[0005] The purpose of the present invention is to provide a weather data prediction method and system based on deep learning to overcome the shortcomings of traditional weather forecasting methods and improve the accuracy, efficiency and reliability of weather data forecasting.
[0006] The present invention provides a weather data prediction method based on deep learning, comprising the following steps:
[0007] Collect multi-source weather data, clean and normalize the collected weather data, and divide it into training set, validation set and test set;
[0008] Use convolutional neural networks to extract spatial features from spatially structured data, and use recurrent neural networks and their variants to extract temporal features from time series data, and then fuse the spatial and temporal features.
[0009] Build a weather forecast model based on deep learning, train the model using the training set, and adjust the model hyperparameters based on the validation set;
[0010] The preprocessed weather data to be predicted is input into the trained weather prediction model to obtain the prediction results.
[0011] Furthermore, the multi-source weather data includes ground meteorological station observation data, high-altitude detection data, satellite remote sensing data and radar data.
[0012] Furthermore, the cleaning of the collected weather data specifically includes:
[0013] Missing values are filled by interpolation, and outliers are identified and processed using statistical analysis methods.
[0014] Furthermore, convolutional neural networks are used to extract spatial features from spatially structured data, and recurrent neural networks and their variants are used to extract temporal features from time series data. The spatial and temporal features are then fused as follows:
[0015] Construct a convolutional neural network consisting of four convolutional layers. The first convolutional layer has 32 3×3 convolution kernels, the second convolutional layer has 64 3×3 convolution kernels, the third convolutional layer has 128 3×3 convolution kernels, and the fourth convolutional layer has 256 3×3 convolution kernels. Each convolutional layer has a stride of 1, a padding of "same", and an activation function of LeakyReLU with a negative slope of 0.01. Each convolutional layer is followed by a maximum pooling layer with a pooling window size of 2×2 and a stride of 2. Convolution and pooling operations are performed on spatially structured data such as satellite cloud images and radar echo images to extract spatial features.
[0016] The long short-term memory network (LSTM) is used to process the temperature and pressure time series data. The LSTM layer contains 256 neurons and the input sequence length is 24. It captures the temporal dependency to extract temporal features.
[0017] The extracted spatial features and temporal features are spliced through the fully connected layer, and the spliced feature vector is input into three fully connected layers for feature transformation and nonlinear mapping. The first fully connected layer contains 512 neurons, the second fully connected layer contains 256 neurons, and the third fully connected layer contains 128 neurons. The activation function of the fully connected layer is GELU to achieve feature fusion.
[0018] Furthermore, the weather forecast model is specifically:
[0019] The overall structure adopts a multi-layer perceptron, and the input layer receives the fused feature vector;
[0020] There are five hidden layers. The first hidden layer contains 1024 neurons, the second hidden layer contains 512 neurons, the third hidden layer contains 256 neurons, the fourth hidden layer contains 128 neurons, and the fifth hidden layer contains 64 neurons. The activation function of each hidden layer is the Swish function.
[0021] The output layer contains 72 neurons.
[0022] Furthermore, the Swish function formula is:
[0023] f(x)=x·σ(x)
[0024] Among them, σ(x) is the sigmoid function, and x is the input value of the corresponding hidden layer.
[0025] Furthermore, when using the training set to train the model, if continuous weather data is predicted, the mean square error loss function is used; if discrete weather data is predicted, the focal loss function is used; the Nadam optimization algorithm is used to update the model parameters, with the learning rate set to 0.0005, beta1 set to 0.9, beta2 set to 0.999, and epsilon set to 1e-8.
[0026] The present invention also provides a weather data prediction system based on deep learning, comprising:
[0027] Data collection and preprocessing module: used to collect multi-source weather data, clean and normalize the collected weather data, and divide it into training set, validation set and test set;
[0028] Feature extraction module: It is used to extract spatial features from spatially structured data using convolutional neural networks, and to extract temporal features from time series data using recurrent neural networks and their variants, and then fuse the spatial and temporal features;
[0029] Model building and training module: used to build a weather forecast model based on deep learning, train the model using the training set, and adjust the model hyperparameters based on the validation set;
[0030] Weather data prediction module: used to input the preprocessed weather data to be predicted into the trained weather prediction model to obtain the prediction results.
[0031] Compared with the prior art, the present invention has the following advantages:
[0032] Improved forecast accuracy: By fusing multi-source weather data and using CNN and LSTM to extract spatial and temporal features respectively, this invention can more comprehensively and accurately capture the complex patterns and regularities in weather data, thereby improving the accuracy of weather forecasts.
[0033] Enhanced model adaptability: The use of multiple data cleaning and preprocessing methods, as well as flexible loss functions and optimization algorithms, enables the model to adapt to weather data of different types and qualities, enhancing the model's generalization ability and adaptability.
[0034] Improved prediction efficiency: The parallel computing capability of deep learning models makes the prediction process more efficient, enabling accurate prediction results to be obtained in a shorter time, meeting the needs of practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings illustrate various embodiments generally by way of example and not limitation, and together with the description and claims, serve to explain embodiments of the invention. Where appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive of the embodiments of the present apparatus or method.
[0036] Figure 1 A schematic flow chart of the method of the present invention is shown. DETAILED DESCRIPTION
[0037] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0038] like Figure 1 As shown, the present invention provides a weather data prediction method based on deep learning, comprising:
[0039] Data collection and preprocessing
[0040] Data collection
[0041] Regular collection of multi-source weather data is carried out by signing data sharing agreements with meteorological departments and accessing professional meteorological data platforms. Specifically, temperature, air pressure, humidity, wind direction, and wind speed observation data from ground meteorological stations are collected at four fixed time points every day (02:00, 08:00, 14:00, and 20:00). Satellite cloud image data sent by geostationary meteorological satellites and radar echo image data detected by Doppler radar are collected every hour. For high-altitude detection data, the vertical distribution data of high-altitude temperature, air pressure, humidity, wind direction, and wind speed measured by the radiosonde are obtained every 12 hours.
[0042] Data cleaning
[0043] A comprehensive check of the collected data was performed, starting with processing missing values. Taking temperature data as an example, if the temperature data at a certain moment was missing, linear interpolation was used to fill in the missing values based on the temperature values at the two adjacent moments.
[0044] Outliers are identified and handled using the standard deviation method within statistical analysis. The mean and standard deviation of the data are calculated, and data that deviates from the mean by more than three standard deviations are considered outliers. Identified outliers are replaced with the value of the nearest normal data point.
[0045] The data were normalized using the minimum-maximum normalization method.
[0046] Feature extraction
[0047] Spatial feature extraction
[0048] The constructed convolutional neural network is used to process satellite cloud imagery and radar echo images. First, the satellite cloud imagery and radar echo image data are input into the CNN. In the first convolutional layer, 32 3×3 convolution kernels are used to convolve the input data, extracting local features of the cloud imagery and echo images, such as cloud shape and radar echo intensity distribution. After the convolution operation, the LeakyReLU activation function introduces nonlinearity to enhance the model's expressive power. Next, a 2×2 max pooling layer is used for downsampling, reducing the data dimensionality while retaining important feature information.
[0049] The data then passes through the second, third, and fourth convolutional layers, increasing the number of convolution kernels to 64, 128, and 256, respectively, to further extract higher-level spatial features. Each convolutional layer is followed by a max pooling layer, which continuously reduces the size of the data and extracts representative spatial features.
[0050] 2. Temporal feature extraction
[0051] The temperature and pressure time series data are input into the LSTM network. The LSTM layer effectively captures the temporal dependencies of the data through its forget gate, input gate, and output gate control mechanism. The input sequence length is set to 24, meaning that each input contains the temperature or pressure data for the past 24 time steps. The 256 neurons in the LSTM layer process the input sequence, learning the temporal variations of temperature and pressure and extracting temporal features.
[0052] 3. Feature Fusion
[0053] The extracted spatial and temporal features are concatenated through a fully connected layer. The concatenated feature vector is input into the first fully connected layer, which contains 512 neurons. The feature vector is linearly transformed and activated by GELU to further extract the correlation information between the features. The output is then input into the second fully connected layer (containing 256 neurons) and the third fully connected layer (containing 128 neurons). Multiple feature transformations and nonlinear mappings are performed to obtain a fused feature representation that integrates spatial and temporal information.
[0054] Model building and training
[0055] Model building
[0056] Use the Keras API in Python's deep learning framework TensorFlow to build a weather prediction model with a multi-layer perceptron structure according to the above description.
[0057] The weather forecast model is as follows:
[0058] The overall structure adopts a multi-layer perceptron, and the input layer receives the fused feature vector;
[0059] There are five hidden layers. The first hidden layer contains 1024 neurons, the second hidden layer contains 512 neurons, the third hidden layer contains 256 neurons, the fourth hidden layer contains 128 neurons, and the fifth hidden layer contains 64 neurons. The activation function of each hidden layer is the Swish function.
[0060] The output layer contains 72 neurons.
[0061] Model training
[0062] The model is trained using the training set. If continuous weather data is predicted, the mean square error loss function is used; if discrete weather data is predicted, the focus loss function is used. The Nadam optimization algorithm is used to update the model parameters, with the learning rate set to 0.0005, beta1 to 0.9, beta2 to 0.999, and epsilon to 1e-8.
[0063] The pre-processed weather data to be predicted is input into the trained weather prediction model to obtain the prediction results. The normalized prediction results are then denormalized to restore them to the original data range.
[0064] The above is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solutions and inventive concepts of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A weather data prediction method based on deep learning, characterized in that: The following steps are involved: Collect multi-source weather data, clean and normalize the collected weather data, and divide it into training set, validation set and test set; Use convolutional neural networks to extract spatial features from spatially structured data, and use recurrent neural networks and their variants to extract temporal features from time series data, and then fuse the spatial and temporal features. Build a weather forecast model based on deep learning, train the model using the training set, and adjust the model hyperparameters based on the validation set; The preprocessed weather data to be predicted is input into the trained weather prediction model to obtain the prediction results.
2. The weather data prediction method based on deep learning according to claim 1, characterized in that: The multi-source weather data includes ground meteorological station observation data, high-altitude detection data, satellite remote sensing data and radar data.
3. The weather data prediction method based on deep learning according to claim 1, characterized in that: The cleaning of the collected weather data specifically includes: Missing values are filled by interpolation, and outliers are identified and processed using statistical analysis methods.
4. The weather data prediction method based on deep learning according to claim 1, characterized in that: Convolutional neural networks are used to extract spatial features from spatially structured data, and recurrent neural networks and their variants are used to extract temporal features from time series data. The spatial and temporal features are then fused as follows: Construct a convolutional neural network consisting of four convolutional layers. The first convolutional layer has 32 3×3 convolution kernels, the second convolutional layer has 64 3×3 convolution kernels, the third convolutional layer has 128 3×3 convolution kernels, and the fourth convolutional layer has 256 3×3 convolution kernels. Each convolutional layer has a stride of 1, a padding of "same", and an activation function of LeakyReLU with a negative slope of 0.
01. Each convolutional layer is followed by a maximum pooling layer with a pooling window size of 2×2 and a stride of 2. Convolution and pooling operations are performed on spatially structured data such as satellite cloud images and radar echo images to extract spatial features. The long short-term memory network (LSTM) is used to process the temperature and pressure time series data. The LSTM layer contains 256 neurons and the input sequence length is 24. It captures the temporal dependency to extract temporal features. The extracted spatial features and temporal features are spliced through the fully connected layer, and the spliced feature vector is input into three fully connected layers for feature transformation and nonlinear mapping. The first fully connected layer contains 512 neurons, the second fully connected layer contains 256 neurons, and the third fully connected layer contains 128 neurons. The activation function of the fully connected layer is GELU to achieve feature fusion.
5. The weather data prediction method based on deep learning according to claim 1, characterized in that: The weather forecast model is specifically: The overall structure adopts a multi-layer perceptron, and the input layer receives the fused feature vector; There are five hidden layers. The first hidden layer contains 1024 neurons, the second hidden layer contains 512 neurons, the third hidden layer contains 256 neurons, the fourth hidden layer contains 128 neurons, and the fifth hidden layer contains 64 neurons. The activation function of each hidden layer is the Swish function. The output layer contains 72 neurons.
6. The weather data prediction method based on deep learning according to claim 5, characterized in that: The Swish function formula is: f(x)=x·σ(x) Among them, σ(x) is the sigmoid function, and x is the input value of the corresponding hidden layer.
7. The weather data prediction method based on deep learning according to claim 1, characterized in that: When using the training set to train the model, if continuous weather data is predicted, the mean square error loss function is used; if discrete weather data is predicted, the focal loss function is used; the Nadam optimization algorithm is used to update the model parameters, with the learning rate set to 0.0005, beta1 to 0.9, beta2 to 0.999, and epsilon to 1e-8.
8. A weather data prediction system based on deep learning, characterized in that: include: Data collection and preprocessing module: used to collect multi-source weather data, clean and normalize the collected weather data, and divide it into training set, validation set and test set; Feature extraction module: It is used to extract spatial features from spatially structured data using convolutional neural networks, and to extract temporal features from time series data using recurrent neural networks and their variants, and then fuse the spatial and temporal features; Model building and training module: used to build a weather forecast model based on deep learning, train the model using the training set, and adjust the model hyperparameters based on the validation set; Weather data prediction module: used to input the preprocessed weather data to be predicted into the trained weather prediction model to obtain the prediction results.