A method and apparatus for predicting daily maximum temperature based on bidirectional long short-term memory networks
By using a bidirectional long short-term memory network-based approach, and leveraging multidimensional meteorological features and periodic information, the problem of insufficient long-term temporal dependence in daily maximum temperature forecasting was solved, achieving higher forecast accuracy and stability.
Patent Information
- Application Number
- CN202611359718.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies cannot fully utilize multi-source meteorological features in predicting daily maximum temperatures, making it difficult to model the long-term temporal dependence of temperature sequences. This results in low accuracy of daily high-temperature predictions at the station scale, especially in predicting days with temperatures above 35°C.
A bidirectional long short-term memory (LSTM) network-based approach is adopted. By acquiring multidimensional meteorological observation data, multidimensional meteorological impact features and periodic features are extracted. A bidirectional LSTM layer is used to capture the bidirectional contextual dependencies of temperature sequences, construct a training sample set and perform iterative training to output the temperature prediction results for the next consecutive days.
It significantly improves the accuracy of daily maximum temperature prediction and the ability to identify high-temperature events, overcomes the shortcomings of traditional methods in modeling long-term dependencies, and improves the prediction accuracy and stability at the station scale.
Smart Images

Figure CN123113049A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of meteorological forecasting technology, specifically to a method and apparatus for predicting daily maximum temperature based on a bidirectional long short-term memory network. Background Technology
[0002] In current meteorological operations, daily maximum temperature forecasts typically rely on traditional statistical methods, numerical weather prediction products, or empirical correction methods. While traditional methods can provide some temperature trend forecasting capabilities, they still have shortcomings in terms of station-scale forecasting, short-term effects, and the identification of extreme high-temperature events. Especially in the scenario of daily station-based high-temperature forecasting, temperature changes are influenced by multiple factors, including previous temperature accumulation, humidity changes, precipitation processes, and seasonal cycles. Single variables or simple linear models are insufficient to fully characterize their complex temporal dependencies.
[0003] In existing technologies, some methods use historical temperature sequences from a single station for prediction, or rely on only a few meteorological factors for regression modeling. These methods typically suffer from the following problems: limited predictive feature dimensions, failing to fully utilize humidity, precipitation, and periodic information; traditional models have limited ability to model long-term dependencies, making it difficult to effectively capture the continuous accumulation process before high temperatures occur; and insufficient high-temperature identification capabilities, leading to missed or false alarms, especially exhibiting instability in predicting days with temperatures above 35°C. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method and apparatus for predicting daily maximum temperature based on bidirectional long short-term memory networks, so as to solve the problems in the prior art that it is impossible to make full use of multi-source meteorological features, difficult to model the long-term temporal dependence of temperature sequences, and low accuracy of daily high temperature prediction at the station scale.
[0005] According to a first aspect of the present invention, a method for predicting daily maximum temperature based on a bidirectional long short-term memory network is provided, the method comprising:
[0006] Acquire multidimensional raw meteorological observation data for the most recent consecutive preset number of days from any meteorological station within the target area; the multidimensional raw meteorological observation data contains a variety of meteorological elements. The multidimensional raw meteorological observation data of the meteorological stations are preprocessed and sorted according to time sequence to obtain the meteorological observation data sequence of the meteorological stations. Multidimensional meteorological impact features and periodic features are extracted from the meteorological observation data sequence, and the multidimensional meteorological impact features and periodic features are concatenated to obtain the target input features; The target input features are input into a bidirectional long short-term memory network model, which outputs a prediction of the daily maximum temperature for a future number of consecutive preset days. The bidirectional long short-term memory network model includes: an input layer, a bidirectional long short-term memory LSTM layer module, and a fully connected output layer; The input layer is used to receive the target input features and pass them to the bidirectional long short-term memory (LSTM) layer module; the bidirectional long short-term memory (LSTM) layer module is used to extract the bidirectional temporal dependency features from the target input features and pass them to the fully connected output layer, and the fully connected output layer maps the bidirectional temporal dependency features to the predicted daily maximum temperature for a future consecutive preset number of days.
[0007] Preferably, The bidirectional long short-term memory LSTM layer module includes N bidirectional long short-term memory LSTM layers, and each bidirectional long short-term memory LSTM layer has the same hidden layer dimension. The first bidirectional long short-term memory LSTM layer takes the target input features as input, and the i-th bidirectional long short-term memory LSTM layer takes the output features of the (i-1)-th bidirectional long short-term memory LSTM layer as input features, i=2,3,…,N; Each bidirectional long short-term memory (LSTM) layer performs forward and backward iterative calculations simultaneously at each time step of the input feature, generating the forward hidden state and backward hidden state at each time step. The forward hidden state and backward hidden state at each time step are concatenated to obtain the output feature of each bidirectional long short-term memory (LSTM) layer. The Nth layer of the bidirectional long short-term memory LSTM extracts the forward hidden state and backward hidden state of the last time step from the output features of the N-1 layer and merges them, then passes the merged features to the fully connected output layer.
[0008] Preferably, A regularized Dropout layer is also set between two adjacent bidirectional long short-term memory (LSTM) layers; The regularized Dropout layer is used to receive the output features of the (i-1)th bidirectional long short-term memory LSTM layer, randomly discard some neurons in the output features with a preset probability, and pass the processed output features to the i-th bidirectional long short-term memory LSTM layer. The regularized Dropout layer is enabled during the training phase of the bidirectional long short-term memory network model and disabled during the inference and prediction phase.
[0009] Preferably, The training of the bidirectional long short-term memory network model includes: Construct a bidirectional long short-term memory network model architecture; Historical multidimensional raw meteorological observation data from multiple meteorological stations within the target area are acquired. The historical multidimensional raw meteorological observation data of each meteorological station are preprocessed and sorted according to time sequence to obtain the historical meteorological observation data sequence of each meteorological station. Multidimensional meteorological impact features and periodic features are extracted from the historical meteorological observation data sequence of each meteorological station. The multidimensional meteorological impact features and periodic features are then spliced together to obtain the original historical meteorological feature sequence of each meteorological station. A training sample set is constructed from the original historical meteorological feature sequence using a sliding window method. The training sample set contains multiple sample pairs, each of which contains an input sample and an output label. The input sample is a historical meteorological feature sequence of a consecutive preset number of days extracted from the original historical meteorological feature sequence, and the output label is the daily maximum temperature sequence of the historical meteorological feature sequence of a consecutive preset number of days after the input sample. The bidirectional long short-term memory network model architecture is iteratively trained using the training sample set. When the preset iteration stopping condition is met, the bidirectional long short-term memory network model is obtained.
[0010] Preferably, The extraction of multidimensional meteorological impact features from the meteorological observation data sequence includes: The XGBoost algorithm is used to obtain the degree of influence of each meteorological element in the meteorological observation data sequence on the daily maximum temperature. The meteorological elements are sorted according to the degree of influence, and the M meteorological elements with the highest degree of influence are selected as the multidimensional meteorological influence features.
[0011] Preferably, After extracting periodic features from the meteorological observation data sequence, the method further includes: The periodic features are subjected to triangular transformation to obtain triangular features; the triangular features are then concatenated with multidimensional meteorological influence features to obtain the target input features.
[0012] Preferably, The periodic characteristics include daily periodic characteristics and monthly periodic characteristics; The step of performing a triangular transformation on the periodic features to obtain triangular features includes: The sine and cosine transform values of the daily and monthly cycle features are calculated respectively to obtain the daily cycle sine feature, daily cycle cosine feature, monthly cycle sine feature, and monthly cycle cosine feature.
[0013] Preferably, The process of preprocessing the multidimensional raw meteorological observation data from the meteorological stations and sorting it chronologically to obtain the meteorological observation data sequence of the meteorological stations includes: Replace missing values in the multidimensional raw meteorological observation data of the meteorological stations with preset standard values; Replace outliers that exceed the standard range in the multidimensional raw meteorological observation data of the meteorological station with preset standard values; The multidimensional raw meteorological observation data, after processing for missing and outlier values, is divided into multiple meteorological records. These records are then sorted chronologically to obtain the meteorological observation data sequence for the meteorological station. Each record includes at least: the meteorological station number, the date the meteorological element was acquired, and the meteorological element itself.
[0014] According to a second aspect of the present invention, a daily maximum temperature prediction device based on a bidirectional long short-term memory network is provided, the device comprising: Data acquisition module: used to acquire multidimensional raw meteorological observation data of the most recent consecutive preset number of days from any meteorological station within the target area, wherein the multidimensional raw meteorological observation data contains a variety of meteorological elements; Data processing module: used to preprocess the multidimensional raw meteorological observation data of the meteorological station, sort them according to time sequence, and obtain the meteorological observation data sequence of the meteorological station; Feature extraction module: used to extract multidimensional meteorological impact features and periodic features from the meteorological observation data sequence, and to concatenate the multidimensional meteorological impact features and periodic features to obtain the target input features; Prediction module: used to input the target input features into a bidirectional long short-term memory network model, which outputs the predicted daily maximum temperature for a future preset number of days; The bidirectional long short-term memory network model includes: an input layer, a bidirectional long short-term memory LSTM layer module, and a fully connected output layer; The input layer is used to receive the target input features and pass them to the bidirectional long short-term memory (LSTM) layer module; the bidirectional long short-term memory (LSTM) layer module is used to extract the bidirectional temporal dependency features from the target input features and pass them to the fully connected output layer, and the fully connected output layer maps the bidirectional temporal dependency features to the predicted daily maximum temperature for a future consecutive preset number of days.
[0015] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This application expands the input features from a single temperature reading to a multidimensional feature space encompassing multidimensional meteorological impact features and periodic information by acquiring multidimensional meteorological data and extracting periodic and periodic features. As a result, the model can simultaneously perceive the multidimensional patterns preceding high-temperature events when predicting daily maximum temperatures, effectively solving the problem of insufficient feature dimensions in traditional methods and laying a rich information foundation for subsequent time-series modeling. By inputting the preprocessed multi-source meteorological feature sequences into a bidirectional long short-term memory (LSM) network model for prediction, and utilizing the unique forward and backward memory units of BiLSTM, the model can simultaneously capture the bidirectional contextual dependencies of temperature sequences from the past to the future and from the future to the past. Combined with the construction method of using historical sequences of a continuously preset number of days as input sliding windows, the model can effectively learn the continuous thermal accumulation and weather evolution process before high-temperature events, overcoming the technical bottleneck of insufficient modeling ability of traditional linear models or shallow networks for long-term series dependencies, and significantly improving the prediction accuracy of daily maximum temperatures at the station scale.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0018] Figure 1 This is a flowchart illustrating a method for predicting daily maximum temperature based on a bidirectional long short-term memory network, according to an exemplary embodiment. Figure 2 This is a schematic diagram of the overall architecture according to another exemplary embodiment; Figure 3 This is a schematic diagram of the architecture of a bidirectional long short-term memory network model according to another exemplary embodiment; Figure 4 This is a schematic diagram of a daily maximum temperature prediction device based on a bidirectional long short-term memory network, according to another exemplary embodiment. In the attached diagram: 1-Data acquisition module, 2-Data processing module, 3-Feature extraction module, 4-Prediction module. Detailed Implementation
[0019] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0020] Example 1 Figure 1 This is a flowchart illustrating a daily maximum temperature prediction method based on a bidirectional long short-term memory network according to an exemplary embodiment. The method includes: S1, acquire the most recent consecutive preset number of days of multidimensional raw meteorological observation data from any meteorological station within the target area. The multidimensional raw meteorological observation data contains a variety of meteorological elements. S2, preprocesses the multidimensional raw meteorological observation data of the meteorological stations and sorts them according to time to obtain the meteorological observation data sequence of the meteorological stations; S3: Extract multidimensional meteorological impact features and periodic features from meteorological observation data sequences, and concatenate the multidimensional meteorological impact features and periodic features to obtain the target input features; S4, input the target input features into the bidirectional long short-term memory network model, and the bidirectional long short-term memory network model outputs the predicted daily maximum temperature for the next preset number of consecutive days; The bidirectional long short-term memory network model includes: an input layer, a bidirectional long short-term memory LSTM layer module, and a fully connected output layer; The input layer receives the target input features and passes them to the bidirectional long short-term memory (LSTM) layer module. The bidirectional LSTM layer module extracts the bidirectional temporal dependency features from the target input features and passes them to the fully connected output layer. The fully connected output layer maps the bidirectional temporal dependency features to the predicted daily maximum temperature for a future number of consecutive preset days.
[0021] It is understood that this embodiment specifically includes: This application requires training a bidirectional long short-term memory network model as the basis for subsequent daily maximum temperature prediction. The training process of the bidirectional long short-term memory network model includes: Construct a bidirectional long short-term memory network model, as shown in the attached figure. Figure 2 and appendix Figure 3 As shown, the bidirectional long short-term memory network model includes: an input layer, a bidirectional long short-term memory LSTM layer module, and a fully connected output layer; The bidirectional long short-term memory (LSTM) layer module includes three bidirectional long short-term memory (LSTM) layers. Each bidirectional long short-term memory (LSTM) layer has the same hidden layer dimension, HIDDEN_DIM=256. The first bidirectional long short-term memory (LSTM) layer takes the target input features as input, and the second bidirectional LSTM layer takes the output features of the first bidirectional LSTM layer as input features. Each bidirectional long short-term memory (LSTM) layer performs forward and backward iterative calculations simultaneously at each time step of the input feature, generating the forward hidden state and backward hidden state at each time step. The forward hidden state and backward hidden state at each time step are concatenated to obtain the output feature of each bidirectional long short-term memory (LSTM) layer. The third bidirectional long short-term memory (LSTM) layer extracts the forward and backward hidden states of the last time step from the output features of the second layer and merges them, then passes the merged features to the fully connected output layer. The fully connected output layer maps bidirectional temporal dependency features to the predicted daily maximum temperature for a future consecutive preset number of days (30 days); Meanwhile, as attached Figure 3 As shown, a regularized Dropout layer is set between two adjacent bidirectional long short-term memory (LSTM) layers. The regularized Dropout layer receives the output features of the previous bidirectional LSTM layer, randomly discards neurons with a probability of DROPOUT_RATE=0.3 to suppress overfitting, and passes the processed output features to the next bidirectional LSTM layer. It should be noted that the regularized Dropout layer is enabled during the training phase of the bidirectional LSTM network model to suppress overfitting, and is disabled during the inference and prediction phase to avoid a decrease in prediction accuracy due to data loss.
[0022] After setting up the model architecture, it is necessary to obtain the training data required for model training, specifically including: Obtain the original historical meteorological observation data of M meteorological stations within the target area, where M is an integer greater than or equal to 2. The original historical meteorological observation data is organized by station and date. Each meteorological station forms a continuous meteorological observation data sequence, which consists of multiple meteorological records arranged in chronological order. Each meteorological record includes at least: station number, date, daily maximum temperature, daily average temperature, daily minimum temperature, average relative humidity, minimum relative humidity, and daily precipitation.
[0023] Before using time series data, it's essential to clean and process the data to address potential missing values, outliers, and other issues, and to facilitate subsequent research. This involves analyzing the data in Excel and then using Python to further process it as needed. For example, different missing value markers (999999, 999, null) are replaced with a unified missing value symbol (NaN); outliers in temperature, humidity, and precipitation are corrected; and linear interpolation is performed on the time series data at each station level to complete the data. Generally, the more elements introduced, the higher the training cost, and the more susceptible the model is to noise. Therefore, this embodiment uses the XGBoost algorithm to analyze the influence of different meteorological elements on the daily maximum temperature, and selects the four meteorological elements with the highest influence: daily maximum temperature, average relative humidity, minimum relative humidity, and precipitation data as the meteorological influence features mentioned above. In addition, daily and monthly periodic features are extracted from the meteorological observation data sequence, and their sine and cosine transform values 'sin_day', 'cos_day', 'sin_month', and 'cos_month' are calculated as four triangular features.
[0024] Z-score standardization was performed on the daily maximum temperature, average relative humidity, minimum relative humidity, and precipitation data of each meteorological station for historical periods to facilitate model training. Finally, eight elements were selected and concatenated as the target input features: daily maximum temperature (TEM_Max_scaled), average relative humidity (RHU_Avg_scaled), minimum relative humidity (RHU_Min_scaled), daily precipitation (PRE_Time_0808_scaled), daily cycle sine feature (sin_day), daily cycle cosine feature (cos_day), monthly cycle sine feature (sin_month), and monthly cycle cosine feature (cos_month). The effective dataset was divided into training, validation, and test sets. Mixed samples from all meteorological stations were arranged chronologically in a 7:2:1 ratio. The training set was used for model parameter learning, the validation set for performance evaluation and early termination control during model training to avoid overfitting, and the test set to provide objective evaluation metrics representing the model's true predictive ability. The preprocessed eight elements were used to construct training samples using a sliding window approach. Specifically, a 30-day historical sequence was used as input, and the daily maximum temperature for the next 30 days was used as the output label. The final input x for each data point was 30. For a matrix of size 8, the output y is 30. For each station, a vector of 1 is generated by a sliding window in chronological order to produce multiple input-output sample pairs. The input samples contain 8 features, namely daily maximum temperature, average relative humidity, minimum relative humidity, daily precipitation, daily cycle sine feature, daily cycle cosine feature, monthly cycle sine feature and monthly cycle cosine feature. The output label is the daily maximum temperature sequence for the next 30 days. The bidirectional long short-term memory network model constructed above was trained using the training set. During training, the Huber loss function was used as the loss function, which is the mean squared error (MSE) when the error is small and switches to the mean absolute error (MAE) when the error is large. The Adam optimizer was used to update the parameters, with the learning rate set to 0.001. The batch size was set to 64, and the maximum number of training epochs was set to 500. Early stopping control was implemented during training using the validation loss. When the patience counter reached PATIENCE=40, early stopping was triggered, and training was terminated early. Gradient pruning was also performed during training to prevent gradient explosion. After each training epoch, the training loss and validation loss were calculated, and the current optimal model parameters were saved when the validation loss was better.
[0025] After training, the model file containing model parameters, optimizer parameters, optimal validation loss, normalizers for each site, output stride, number of model layers, number of hidden units, and number of input features should be saved. By completely saving the above information, it is ensured that the model state and data processing logic at the end of training can be accurately restored in the subsequent prediction stage. Prediction can be deployed independently without relying on the original training code. At the same time, the saved model file provides a unified and reproducible benchmark for subsequent ablation experiments and control experiments. In actual deployment, if the model's prediction performance on new data degrades significantly, the model can be retrained or fine-tuned based on the completely saved configuration.
[0026] After model training, the normalized predicted values output by the model are denormalized using the normalizer of the corresponding station to restore the actual temperature values. Simultaneously, the highest daily temperature values of the actual observed days in the target month are extracted for subsequent evaluation. The predicted values are compared with the actual observed values, and the mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²) are calculated. Using 35℃ as the high-temperature threshold, the predicted and observed results are converted into high-temperature event identification results. The hit count (TP), false alarm count (FP), missed alarm count (FN), correct rejection count (TN), accuracy, hit rate (POD), false alarm rate (FAR), and critical success index (CSI) are calculated. A comparison graph of the predicted and actual observed curves is plotted, displaying indicators such as MAE, RMSE, R², accuracy, POD, FAR, and CSI to visually demonstrate the model's prediction performance at the target station in the target month. If the prediction performance does not meet the expected target (error exceeds the preset threshold), the model needs to be retrained.
[0027] After the model is trained, it is deployed. When it is necessary to predict the daily maximum temperature, as shown in the attached figure... Figure 2 As shown, historical observation data for the preceding 30 consecutive days from any meteorological station within the target area are obtained. It is important to emphasize that during the model training phase, historical data from multiple meteorological stations are used to train a prediction model applicable to all meteorological stations. Therefore, during the inference and prediction phase, only meteorological data from any one meteorological station is needed. The obtained historical meteorological observation data undergoes the aforementioned preprocessing and feature extraction to obtain a 30-day × 8 input feature sequence. This input feature sequence is then fed into the trained bidirectional long short-term memory network model, which outputs the predicted daily maximum temperature for the following 30 consecutive days.
[0028] Example 2: Figure 4 This is a schematic diagram of a daily maximum temperature prediction device based on a bidirectional long short-term memory network, according to another exemplary embodiment. The device includes: Data acquisition module 1: Used to acquire multidimensional raw meteorological observation data of the most recent consecutive preset number of days from any meteorological station within the target area. The multidimensional raw meteorological observation data contains a variety of meteorological elements. Data processing module 2: used to preprocess the multidimensional raw meteorological observation data of meteorological stations and sort them according to time sequence to obtain the meteorological observation data sequence of meteorological stations; Feature extraction module 3: used to extract multidimensional meteorological impact features and periodic features from meteorological observation data sequences, and to concatenate the multidimensional meteorological impact features and periodic features to obtain the target input features; Prediction Module 4: This module is used to input the target input features into the bidirectional long short-term memory network model. The bidirectional long short-term memory network model outputs the predicted daily maximum temperature for the next preset number of consecutive days. The bidirectional long short-term memory network model includes: an input layer, a bidirectional long short-term memory LSTM layer module, and a fully connected output layer; The input layer receives the target input features and passes them to the bidirectional long short-term memory (LSTM) layer module. The bidirectional LSTM layer module extracts the bidirectional temporal dependency features from the target input features and passes them to the fully connected output layer. The fully connected output layer maps the bidirectional temporal dependency features to the predicted daily maximum temperature for a future number of consecutive preset days.
[0029] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0030] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.
[0031] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0032] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0033] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0034] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0035] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0036] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0037] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for predicting daily maximum temperature based on a bidirectional long short-term memory network, characterized in that, The method includes: Acquire multidimensional raw meteorological observation data for the most recent consecutive preset number of days from any meteorological station within the target area; the multidimensional raw meteorological observation data contains a variety of meteorological elements. The multidimensional raw meteorological observation data of the meteorological stations are preprocessed and sorted according to time sequence to obtain the meteorological observation data sequence of the meteorological stations. Multidimensional meteorological impact features and periodic features are extracted from the meteorological observation data sequence, and the multidimensional meteorological impact features and periodic features are concatenated to obtain the target input features; The target input features are input into a bidirectional long short-term memory network model, which outputs a prediction of the daily maximum temperature for a future number of consecutive preset days. The bidirectional long short-term memory network model includes: an input layer, a bidirectional long short-term memory LSTM layer module, and a fully connected output layer; The input layer is used to receive the target input features and pass them to the bidirectional long short-term memory (LSTM) layer module; the bidirectional long short-term memory (LSTM) layer module is used to extract the bidirectional temporal dependency features from the target input features and pass them to the fully connected output layer, and the fully connected output layer maps the bidirectional temporal dependency features to the predicted daily maximum temperature for a future consecutive preset number of days.
2. The method for predicting daily maximum temperature based on a bidirectional long short-term memory network according to claim 1, characterized in that, The bidirectional long short-term memory LSTM layer module includes N bidirectional long short-term memory LSTM layers, and each bidirectional long short-term memory LSTM layer has the same hidden layer dimension. The first bidirectional long short-term memory LSTM layer takes the target input features as input, and the i-th bidirectional long short-term memory LSTM layer takes the output features of the (i-1)-th bidirectional long short-term memory LSTM layer as input features, i=2,3,…,N; Each bidirectional long short-term memory (LSTM) layer performs forward and backward iterative calculations simultaneously at each time step of the input feature, generating the forward hidden state and backward hidden state at each time step. The forward hidden state and backward hidden state at each time step are concatenated to obtain the output feature of each bidirectional long short-term memory (LSTM) layer. The Nth layer of the bidirectional long short-term memory LSTM extracts the forward hidden state and backward hidden state of the last time step from the output features of the N-1 layer and merges them, then passes the merged features to the fully connected output layer.
3. The method for predicting daily maximum temperature based on a bidirectional long short-term memory network according to claim 2, characterized in that, A regularized Dropout layer is also set between two adjacent bidirectional long short-term memory (LSTM) layers; The regularized Dropout layer is used to receive the output features of the (i-1)th bidirectional long short-term memory LSTM layer, randomly discard some neurons in the output features with a preset probability, and pass the processed output features to the i-th bidirectional long short-term memory LSTM layer. The regularized Dropout layer is enabled during the training phase of the bidirectional long short-term memory network model and disabled during the inference and prediction phase.
4. The method for predicting daily maximum temperature based on a bidirectional long short-term memory network according to claim 1, characterized in that, The training of the bidirectional long short-term memory network model includes: Construct a bidirectional long short-term memory network model architecture; Historical multidimensional raw meteorological observation data from multiple meteorological stations within the target area are acquired. The historical multidimensional raw meteorological observation data of each meteorological station are preprocessed and sorted according to time sequence to obtain the historical meteorological observation data sequence of each meteorological station. Multidimensional meteorological impact features and periodic features are extracted from the historical meteorological observation data sequence of each meteorological station. The multidimensional meteorological impact features and periodic features are then spliced together to obtain the original historical meteorological feature sequence of each meteorological station. A training sample set is constructed from the original historical meteorological feature sequence using a sliding window method. The training sample set contains multiple sample pairs, each of which contains an input sample and an output label. The input sample is a historical meteorological feature sequence of a consecutive preset number of days extracted from the original historical meteorological feature sequence, and the output label is the daily maximum temperature sequence of the historical meteorological feature sequence of a consecutive preset number of days after the input sample. The bidirectional long short-term memory network model architecture is iteratively trained using the training sample set. When the preset iteration stopping condition is met, the bidirectional long short-term memory network model is obtained.
5. The method for predicting daily maximum temperature based on a bidirectional long short-term memory network according to claim 1, characterized in that, The extraction of multidimensional meteorological impact features from the meteorological observation data sequence includes: The XGBoost algorithm is used to obtain the degree of influence of each meteorological element in the meteorological observation data sequence on the daily maximum temperature. The meteorological elements are sorted according to the degree of influence, and the M meteorological elements with the highest degree of influence are selected as the multidimensional meteorological influence features.
6. The method for predicting daily maximum temperature based on a bidirectional long short-term memory network according to claim 1, characterized in that, After extracting periodic features from the meteorological observation data sequence, the method further includes: The periodic features are subjected to triangular transformation to obtain triangular features; the triangular features are then concatenated with multidimensional meteorological influence features to obtain the target input features.
7. The method for predicting daily maximum temperature based on a bidirectional long short-term memory network according to claim 6, characterized in that, The periodic characteristics include daily periodic characteristics and monthly periodic characteristics; The step of performing a triangular transformation on the periodic features to obtain triangular features includes: The sine and cosine transform values of the daily and monthly cycle features are calculated respectively to obtain the daily cycle sine feature, daily cycle cosine feature, monthly cycle sine feature, and monthly cycle cosine feature.
8. The method for predicting daily maximum temperature based on a bidirectional long short-term memory network according to claim 1, characterized in that, The process of preprocessing the multidimensional raw meteorological observation data from the meteorological stations and sorting it chronologically to obtain the meteorological observation data sequence of the meteorological stations includes: Replace missing values in the multidimensional raw meteorological observation data of the meteorological stations with preset standard values; Replace outliers that exceed the standard range in the multidimensional raw meteorological observation data of the meteorological station with preset standard values; The multidimensional raw meteorological observation data, after processing for missing and outlier values, is divided into multiple meteorological records. These records are then sorted chronologically to obtain the meteorological observation data sequence for the meteorological station. Each record includes at least: the meteorological station number, the date the meteorological element was acquired, and the meteorological element itself.
9. The device for predicting daily maximum temperature based on bidirectional long short-term memory network, characterized in that, The device includes: Data acquisition module: used to acquire multidimensional raw meteorological observation data of the most recent consecutive preset number of days from any meteorological station within the target area, wherein the multidimensional raw meteorological observation data contains a variety of meteorological elements; Data processing module: used to preprocess the multidimensional raw meteorological observation data of the meteorological station, sort them according to time sequence, and obtain the meteorological observation data sequence of the meteorological station; Feature extraction module: used to extract multidimensional meteorological impact features and periodic features from the meteorological observation data sequence, and to concatenate the multidimensional meteorological impact features and periodic features to obtain the target input features; Prediction module: used to input the target input features into a bidirectional long short-term memory network model, which outputs the predicted daily maximum temperature for a future preset number of days; The bidirectional long short-term memory network model includes: an input layer, a bidirectional long short-term memory LSTM layer module, and a fully connected output layer; The input layer is used to receive the target input features and pass them to the bidirectional long short-term memory (LSTM) layer module; the bidirectional long short-term memory (LSTM) layer module is used to extract the bidirectional temporal dependency features from the target input features and pass them to the fully connected output layer, and the fully connected output layer maps the bidirectional temporal dependency features to the predicted daily maximum temperature for a future consecutive preset number of days.
