High temperature-low temperature prediction method and device based on numerical weather forecast

By constructing a high-temperature-low-temperature prediction model based on numerical weather prediction and using residual bidirectional LSTM layers and attention layers to process data, the prediction accuracy problem of traditional methods in complex atmospheric environments is solved, and accurate prediction and reliable decision support for high-temperature-low-temperature events are achieved.

CN121806154APending Publication Date: 2026-04-07HUANENG (ZHEJIANG) ENERGY DEV CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies lack dynamic adaptability to complex and variable atmospheric environments in temperature forecasting, especially under rare or abnormal weather conditions where forecast accuracy decreases, making it difficult to meet practical needs.

Method used

By acquiring raw data from numerical weather prediction models and historical temperature observation data, and after quality monitoring and cleaning, sample features are constructed. A high-temperature-low-temperature prediction model is trained using a residual bidirectional LSTM layer and an attention layer to achieve accurate prediction of high-temperature-low-temperature conditions.

Benefits of technology

It enables accurate prediction of high-temperature and low-temperature events, provides more reliable decision-making basis, and improves the accuracy and adaptability of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121806154A_ABST
    Figure CN121806154A_ABST
Patent Text Reader

Abstract

The invention discloses a high temperature-low temperature prediction method and device based on numerical weather forecast, and the method comprises the steps: obtaining the original data of a numerical weather forecast mode in a prediction region, collecting the historical air temperature observation data of a plurality of meteorological stations in the prediction region, and enabling the historical air temperature observation data to comprise the daily maximum air temperature and the daily minimum air temperature; performing quality monitoring on the collected numerical weather forecast data, and sorting and cleaning the original data and the historical air temperature observation data; constructing sample features based on the preprocessed data, marking a true value, taking the sample features as input features, and training an established high-temperature-low-temperature prediction model; and carrying out the same preprocessing step as the training data on numerical weather forecast data in a prediction area obtained in real time, and inputting the data into the trained prediction model to obtain an air temperature prediction value of the daily maximum air temperature or the daily minimum air temperature. The prediction result is closer to the actual temperature change trend, and a more reliable decision basis is provided for each industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of weather forecasting technology, specifically a method and device for high-temperature and low-temperature forecasting based on numerical weather prediction. Background Technology

[0002] In the field of meteorology, accurate temperature forecasting is of paramount importance for numerous industries, including agricultural planning, energy management, public health and safety, and urban operations. Traditional temperature forecasting methods primarily rely on statistical analysis of historical meteorological data, using patterns discovered in historical data to predict future temperature changes. However, this method has significant limitations: firstly, it can only speculate based on past data patterns, lacking dynamic adaptability to the current complex and variable atmospheric environment; secondly, its forecast accuracy drops drastically when faced with rare or abnormal weather conditions, making it difficult to meet practical needs.

[0003] Numerical weather prediction has emerged as a solution to this problem. Based on physical laws, it dynamically simulates the evolution of atmospheric states by solving equations of atmospheric motion, providing richer and more accurate physical information for temperature forecasting. However, numerical weather prediction data is highly specialized and complex, involving multiple meteorological elements, multiple vertical levels, and multiple time scales. How to efficiently extract key information from massive amounts of data and transform it into accurate high-temperature and low-temperature forecasts remains a critical challenge that the meteorological field urgently needs to overcome. This involves not only data processing technology but also challenges in selecting appropriate prediction models and improving the accuracy of prediction results. Summary of the Invention

[0004] The purpose of this invention is to provide a method and apparatus for high-temperature-low-temperature prediction based on numerical weather prediction, so as to solve the problems mentioned in the background art. To achieve the above objectives, firstly, a high-temperature-low-temperature prediction method based on numerical weather prediction is provided, comprising: Obtain raw data from numerical weather prediction models within the forecast area, and collect historical temperature observation data from multiple meteorological stations within the forecast area, including daily maximum and minimum temperatures; The collected numerical weather forecast data is monitored for quality, and the raw data and historical temperature observation data are sorted and cleaned. Based on the preprocessed data, sample features are constructed and the true values ​​are labeled. The sample features are used as input features to train the established high-temperature-low-temperature prediction model. The numerical weather forecast data acquired in real time within the forecast area undergoes the same preprocessing steps as the training data, and is then input into the trained forecast model to obtain the predicted values ​​of the daily maximum or minimum temperature.

[0005] In conjunction with the first aspect, in one possible implementation, for low-temperature prediction, both the historical temperature observation data and the raw data are winter data; the raw data includes: NWP model data, reanalysis data, and sea surface temperature precursor data; the NWP model data includes: geopotential height at the first isobaric surface, temperature advection at the second isobaric surface, and specific humidity at the third isobaric surface; the reanalysis data includes: snow cover and net surface radiation; the sea surface temperature precursor data includes: NAT index; the historical temperature observation data includes: daily minimum temperature at a preset altitude and daily average snow depth.

[0006] In conjunction with the first aspect, in one possible implementation, sample features are constructed based on the preprocessed data and the true values ​​are labeled, including: constructing the geopotential height anomaly feature of the first isobaric surface based on the geopotential height at the first isobaric surface and the average winter climate value of historical years in the prediction area; constructing the cold advection intensity feature of the second isobaric surface based on the temperature advection at the second isobaric surface; constructing the snow cover influence coefficient feature based on snow cover rate and snow depth; constructing the NAT index feature based on the NAT index; and labeling the sample features corresponding to multiple days in each preset time period as a sample, wherein the label value is the lowest temperature of each day in the preset consecutive days after the preset time period, and the daily low temperature warning level.

[0007] In conjunction with the first aspect, in one possible implementation, for high-temperature forecasting, both the historical temperature observation data and the raw data are summer data; the raw data includes: NWP model data, reanalysis data, and sea surface temperature precursor data; the NWP model data includes: geopotential height at the first isobaric surface, temperature advection at the second isobaric surface, and specific humidity at the third isobaric surface; the reanalysis data includes: daily maximum surface temperature and daily average boundary layer height; the sea surface temperature precursor data includes: IPG index; the historical temperature observation data includes: daily maximum temperature at a preset height and daily average surface relative humidity.

[0008] In conjunction with the first aspect, in one possible implementation, sample features are constructed based on preprocessed data and the true values ​​are labeled, including: constructing geopotential height anomaly features of the first isobaric surface based on the geopotential height at the first isobaric surface and the average summer climate values ​​of historical years in the prediction area; constructing warm advection intensity features of the second isobaric surface based on temperature advection at the second isobaric surface; constructing specific humidity features of the third isobaric surface based on the daily average specific humidity at the third isobaric surface; constructing IPG index features based on the IPG index; and labeling the sample features corresponding to multiple days in each preset time period as a single sample, wherein the label value is the highest temperature of each day in a preset consecutive number of days after the preset time period, and the daily high temperature warning level.

[0009] In conjunction with the first aspect, in one possible implementation, the established high-temperature-low-temperature prediction model is trained using sample features as input features, including: training the established low-temperature prediction model based on winter data and using corresponding sample features as input features; and predicting the established high-temperature prediction model based on summer data and using corresponding sample features as input features.

[0010] In conjunction with the first aspect, in one possible implementation, both the high-temperature prediction model and the low-temperature prediction model include: an input layer, a residual bidirectional LSTM layer, an attention layer, and an output layer; the input layer is used to receive sample features; the residual bidirectional LSTM layer is used to capture the sequential effects of cold or hot air over a continuous time period; the attention layer is used to enhance key features; and the output layer is used to output prediction results representing the lowest or highest temperature and the warning level.

[0011] In conjunction with the first aspect, in one possible implementation, the residual bidirectional LSTM layer outputs feature values ​​corresponding to features for multiple days within a preset time period representing the features of the corresponding sample features; the attention layer is used to calculate a weighted average of the LSTM feature values ​​of the daily corresponding features of the sample features for each preset time period, according to the weights corresponding to different features, to obtain the score corresponding to that day; based on the score corresponding to that day and the score corresponding to the preset time period, the attention weight for that day is determined; based on the LSTM feature value for that day and the attention weight for that day, the weighted LSTM feature value for that day is determined.

[0012] Secondly, a high-temperature-low-temperature prediction device based on numerical weather prediction is provided, comprising: The data acquisition module is used to acquire raw data from numerical weather prediction models within the prediction area and collect historical temperature observation data from multiple meteorological stations within the prediction area, including daily maximum and minimum temperatures. The preprocessing module is used to monitor the quality of the collected numerical weather forecast data and to organize and clean the raw data and the historical temperature observation data. The training module is used to construct sample features based on preprocessed data and label the ground truth. The sample features are used as input features to train the established high-temperature-low-temperature prediction model. The prediction module is used to input the real-time numerical weather forecast data within the prediction area into the completed prediction model after undergoing the same preprocessing steps as the training data, so as to obtain the predicted values ​​of the daily maximum or minimum temperature.

[0013] Thirdly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, performs the steps of the high-temperature-low-temperature prediction method based on numerical weather forecasting as described in the first aspect or any embodiment of the first aspect.

[0014] Compared with the prior art, the beneficial effects of the present invention are: This invention provides a method and apparatus for high-temperature-low-temperature prediction based on numerical weather prediction, comprising: acquiring raw data of numerical weather prediction models within the prediction area; collecting historical temperature observation data from multiple meteorological stations within the prediction area, including daily maximum and minimum temperatures; monitoring the quality of the collected numerical weather prediction data; organizing and cleaning the raw data and the historical temperature observation data; constructing sample features based on the preprocessed data and labeling the ground truth values; using the sample features as input features to train the established high-temperature-low-temperature prediction model; and inputting the real-time acquired numerical weather prediction data within the prediction area, after undergoing the same preprocessing steps as the training data, into the trained prediction model to obtain the predicted values ​​of daily maximum or minimum temperatures. This invention integrates numerical weather prediction data and meteorological observation data, effectively removes data noise and mines key information through a data preprocessing process, utilizes cutting-edge machine learning algorithms to construct a prediction model, and fully explores the potential patterns in the data, thereby achieving accurate prediction of high-temperature-low-temperature events. Compared with traditional methods, the prediction results are closer to the actual temperature change trend, providing a more reliable decision-making basis for various industries. Attached Figure Description

[0015] Figure 1 A flowchart illustrating a high-temperature-low-temperature prediction method based on numerical weather prediction, provided for an embodiment of the present invention; Figure 2 This is a schematic diagram of a high-temperature-low-temperature prediction device based on numerical weather prediction, provided as an embodiment of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Example: This invention provides a high-temperature-low-temperature prediction method based on numerical weather prediction, comprising: S101. Obtain the raw data of the numerical weather prediction model within the prediction area, and collect historical temperature observation data from multiple meteorological stations within the prediction area, including daily maximum and minimum temperatures; S102. Monitor the quality of the collected numerical weather forecast data, and organize and clean the raw data and the historical temperature observation data; S103. Construct sample features based on the preprocessed data and label the true values. Use the sample features as input features to train the established high-temperature-low-temperature prediction model. S104. After the numerical weather forecast data of the real-time acquisition area is processed through the same preprocessing steps as the training data, it is input into the completed prediction model to obtain the predicted values ​​of the daily maximum temperature or daily minimum temperature.

[0018] In this embodiment, numerical weather prediction (NWP) data and temperature observation data can be collected, employing a strategy of using NWP data as the primary source and observation data as a supplement. NWP data, such as Numerical Weather Prediction (NWP) data, can compensate for the spatial limitations of actual measurement data compared to the latter. NWP models (such as ECMWF and CMA-GFS) use a gridded output, achieving a spatial resolution of 0.25° × 0.25° (approximately 28 km × 28 km) in the North China region, meaning there is one data point every 28 km, covering all blind spots. Furthermore, the physical parameters of the gridded data (such as 500 hPa geopotential height and 850 hPa temperature advection) are spatially continuous, avoiding model learning bias caused by the discretization of station data. Meanwhile, NWP data suffers from drawbacks such as simulation errors, insufficient adaptation to extreme weather, and limited long-term reliability, while real measurement data can precisely compensate for these shortcomings. Therefore, in this embodiment, the core of training the high and low temperature prediction model is to learn the mapping rule of 'input features → output target', where the output target, i.e., the label, must be the actual daily high and low temperature data, and NWP data, as simulated data, cannot serve as the label.

[0019] Furthermore, this disclosure is capable of making medium-term predictions of future minimum or maximum temperatures (e.g., predictions for the next 8-14 days). Since weather changes are continuous, the collected weather data should also be continuous dates. During training, 30 consecutive days of weather data can be used as a training sample to predict the minimum or maximum temperatures for each day from 8 to 14 days after those 30 days.

[0020] Furthermore, the acquired numerical weather prediction data and historical temperature observation data can be preprocessed. During the numerical weather prediction data preprocessing, the data is checked for obvious errors or outliers, such as temperatures exceeding theoretical extremes or unreasonable physical relationships between meteorological elements. For any erroneous or outlier data points, interpolation methods or estimation methods based on surrounding grid data are used for correction or removal. Then, the data is interpolated to improve its spatial and temporal continuity and consistency. In practice, the numerical weather prediction data is interpolated onto a spatial grid matching the location of the meteorological observation station and converted to a temporal resolution consistent with historical temperature observation data for matching analysis. Interpolation methods such as bilinear interpolation and cubic spline interpolation can be used to ensure that the interpolated data accurately reflects changes in atmospheric conditions at the target spatiotemporal location.

[0021] During the preprocessing of historical temperature observation data, missing and outlier values ​​are removed to ensure data integrity and reliability. For missing values, interpolation estimation can be performed based on data from adjacent time periods or surrounding stations. For outliers, judgment and correction can be made based on the statistical characteristics and physical rationality of historical data. At the same time, data from different stations are standardized to eliminate data bias caused by differences in observation instruments, changes in observation environment, etc. Temperature data from each station are standardized to have a mean of 0 and a standard deviation of 1, thereby ensuring the consistency of data from different stations in terms of numerical range and statistical characteristics, providing a high-quality data foundation for subsequent data fusion and model training.

[0022] In another embodiment provided in this disclosure, for low temperature prediction, both the historical temperature observation data and the raw data are winter data; The raw data includes: NWP model data, reanalysis data, and sea surface temperature precursor data; The NWP model data includes: geopotential height at the first isobaric surface, temperature advection at the second isobaric surface, and specific humidity at the third isobaric surface; the reanalysis data includes: snow cover and net surface radiation; the sea surface temperature precursor data includes: the NAT index. The historical temperature observation data includes: the lowest temperature at the preset altitude each day and the average snow depth each day.

[0023] In this embodiment of the disclosure, since the lowest temperature usually occurs in winter and the highest temperature usually occurs in summer, data for winter and summer will be collected separately according to the different driving effects of data on winter and summer. During model training, model training will also be performed separately for winter and summer to obtain more accurate minimum and maximum temperature values.

[0024] In medium-range high and low temperature forecasts based on Numerical Weather Prediction (NWP) models, there are fundamental differences between winter and summer in terms of meteorological driving mechanisms, data distribution characteristics, and forecast objectives. Directly mixing and training a single comprehensive forecast model can lead to model learning bias, requiring a scientific approach that considers both data characteristics and model logic. First, the core features of NWP (such as the geopotential height at the first isobaric surface (500 hPa) and the temperature advection at the first isobaric surface (850 hPa)) have completely opposite driving effects on high and low temperatures in winter and summer. Mixing them can lead to confusion in the interpretation of model features. For example, for the 500 hPa geopotential height (z500), the driving logic for low temperatures in winter is: a lower z500 at high latitudes (strong Siberian High) means southward movement of cold air, resulting in low temperatures; while the driving logic for high temperatures in summer is: a higher z500 in the subtropical high-controlled area (strong subtropical high) means accumulation of warm air, resulting in high temperatures. Secondly, the numerical distribution of winter and summer high and low temperature data shows a bimodal separation with no overlapping intervals. Mixing these data can lead to confusion in the model's criteria for judging normal / abnormal values.

[0025] Further analysis of data, such as ERA5 (European Centre for Medium-Range Weather Forecasts) and NCEP (National Center for Environmental Prediction), are high-precision atmospheric state datasets generated by fusing historical observation data with NWP model results. They are often used for initial field calibration of models (e.g., using ERA5 data to supplement missing observation values ​​when improving LSTM model training).

[0026] In medium-term (8-14 days) high and low temperature forecasts, precursory sea surface temperature data (such as the winter NAT index and the summer IPG index) do not directly replace NWP data or actual measurement data. Instead, they serve as early warning signals at the climatological scale, compensating for the limitations of NWP data in capturing long-term climate impacts and providing underlying climatological logic support for the labeling patterns of actual measurement data. Simulations using the NWP model's ocean-atmosphere coupling module show that when NAT is positive (higher sea surface temperatures in the North Atlantic, lower in the central region, and higher in the South), it causes the Atlantic jet stream to shift southward, guiding Siberian cold air to move southeast and increasing the probability of low winter temperatures in North and Northeast my country (e.g., the positive NAT anomaly in the winter of 2021 corresponded to an extreme low temperature of -30℃ in Northeast my country). When the IPG is positive (higher sea surface temperatures in the western Pacific warm pool and lower sea surface temperatures in the eastern Indian Ocean-central Pacific), it will strengthen the stability of the western Pacific subtropical high (hereinafter referred to as the subtropical high), causing the subtropical high to control the Yangtze River basin for a long period of time, resulting in an increase in the number and intensity of high-temperature days in the region during the summer (for example, the positive IPG anomaly in the summer of 2022 corresponded to a sustained high temperature of over 40°C in the Yangtze River basin).

[0027] The impact of sea surface temperature (SST) changes on atmospheric circulation has a lag (e.g., it takes 1-2 months for North Atlantic SST anomalies to affect cold air masses in North China during winter, and 2-3 months for Indo-Pacific SST anomalies to affect the subtropical high during summer). The short-term initial field of the North Atlantic Water Surface Temperature (NWP) cannot directly include these long-term lag signals, and SST precursor data fills this gap. Therefore, when collecting data, the corresponding NAT index should be data from 1-2 months prior to the target prediction date. If predicting a cold trend in North China in December (e.g., whether a sustained cold wave will occur), NAT index data from October-November (1-2 months in advance) should be obtained. The corresponding IPG index should be data from 2-3 months prior to the target prediction date. If predicting a hot trend in North China in June (e.g., whether the subtropical high will be stronger and extend westward), IPG index data from March-May (2-3 months in advance) should be obtained.

[0028] In another embodiment provided in this disclosure, step S103 above, which involves constructing sample features based on the preprocessed data and labeling the ground truth, includes: Step 1: Construct the geopotential height anomaly characteristics of the first isobaric surface based on the geopotential height at the first isobaric surface and the average winter climate values ​​of historical years in the prediction area; Step 2: Construct the cold advection intensity characteristics of the second isobaric surface based on the temperature advection at the second isobaric surface; Step 3: Construct the characteristics of the snow impact coefficient based on snow cover rate and snow depth; Step 4: Construct NAT index features based on NAT index; Step 5: Label the sample features corresponding to multiple days in each preset time period as a single sample, and label the lowest daily temperature and the daily low temperature warning level for each consecutive number of days after the preset time period.

[0029] In this embodiment, the first isobaric surface is 500 hPa, the second isobaric surface is 850 hPa, and the third isobaric surface is 700 hPa as examples. The geopotential height anomaly of the first isobaric surface can be obtained by subtracting the average winter climate value of North China (e.g., 5020 gpm, calculated using winter data from 1991-2020) from the geopotential height of 500 hPa on the day. The cold advection intensity of the second isobaric surface can be obtained by taking the absolute value of the temperature advection at 850 hPa (only retained in winter, the stronger the cold advection, the larger the value). The snow cover influence coefficient can be obtained by snow cover rate (%) × weighting coefficient + snow depth (cm) × weighting coefficient (e.g., snow cover rate 50%, depth 10cm, 50×0.3+10×0.1=16). The NAT index can be obtained by (the corresponding NAT index on the day - the average NAT index from 1991-2020) ÷ the standard deviation of the NAT index (calculated using the Excel "STDEV" function).

[0030] Additionally, the time window can be set to 30 days, meaning the preset time period can be 30 days. Each day, the corresponding feature values ​​of the four features mentioned above need to be determined. These four features corresponding to each day within the 30 days are used as key samples. These samples are then labeled with the label value of 30, the lowest daily temperature within the preset consecutive days (e.g., 8-14 days), and the daily low-temperature warning level. Warning levels can be represented numerically: no warning, blue warning, yellow warning, red warning, etc. Different temperature ranges correspond to different low-temperature warning levels, which will not be elaborated here. During implementation, labels are placed by "day," with each sample corresponding to the "average 2-meter temperature for each day for the next 8-14 days" (e.g., using features from January 1-30, labeling the daily temperature from January 31 to February 13, resulting in 14 numerical labels). The labeled data must strictly match the 30-day × 4 feature matrix to form structured data of "sample ID - feature matrix - numerical labels (14) - low-temperature warning level labels (14)". For example, sample ID "202001-North China": the feature matrix consists of four common features from January 1st to 30th, 2020; the numerical labels are the daily temperatures from January 31st to February 13th (e.g., -8℃, -10℃, etc.); and the low-temperature warning level labels are "0 / 1 / 2 / 3" for each day (e.g., January 31st -8℃ < -6℃ (mean -4℃ -2℃), labeled 1). Thus, each sample's 30-day historical data contains four basic features for each day (e.g., winter 500hPa geopotential height anomaly, 850hPa cold advection intensity, snow cover influence coefficient, standardized NAT index), i.e., four dimensions per day. The corresponding input matrix shape is (number of samples, 30 days, 4 dimensions) (e.g., (32, 30, 4)).

[0031] In another embodiment provided in this disclosure, for high temperature forecasting, both the historical temperature observation data and the raw data are summer data; The raw data includes: NWP model data, reanalysis data, and sea surface temperature precursor data; The NWP model data includes: geopotential height at the first isobaric surface, temperature advection at the second isobaric surface, and specific humidity at the third isobaric surface; the reanalysis data includes: daily maximum surface temperature and daily average boundary layer height; the sea surface temperature precursor data includes: IPG index; The historical temperature observation data includes: the highest temperature at the preset altitude each day and the average relative humidity at ground level each day.

[0032] In this embodiment, most of the data can be found in the description of low-temperature prediction. The boundary layer height here can be used to determine whether high temperatures are easily diffused. The IPG index can serve as a precursor indicator of the intensity of the subtropical high in summer.

[0033] In another embodiment provided in this disclosure, step S103 above, which involves constructing sample features based on the preprocessed data and labeling the ground truth, includes: Step 1: Construct the geopotential height anomaly characteristics of the first isobaric surface based on the geopotential height at the first isobaric surface and the average summer climate values ​​of historical years in the prediction area; Step 2: Construct the warm advection intensity characteristics of the second isobaric surface based on the temperature advection at the second isobaric surface; Step 3: Construct the specific humidity characteristics of the third isobaric surface based on the daily average specific humidity at the third isobaric surface; Step 4: Construct IPG index features based on the IPG index; Step 5: Label the sample features corresponding to multiple days in each preset time period as a single sample, and label the highest temperature of each day in the preset consecutive days after the preset time period, as well as the daily high temperature warning level.

[0034] In this embodiment of the disclosure, the geopotential height anomaly characteristic of the first isobaric surface can be determined by the 500hPa osmotic pressure of the day. The geopotential height (grid data) is calculated by subtracting the average summer climate value of North China (5860 gpm; for example, the climate average is calculated using summer data from 1991-2020, and the average is obtained using the Excel "AVG" function); the second isobaric surface warm advection intensity characteristic can be obtained by taking the absolute value of the positive value of the 850 hPa temperature advection (grid data) (take 0 when the temperature advection is negative, because only summer warm advection affects high temperatures; this can be achieved using the Excel "MAX(temperature advection, 0)" function); the third isobaric surface specific humidity characteristic can be directly extracted from the "700 hPa daily average specific humidity" in the grid data (if the data is missing, it can be estimated using the surface relative humidity, such as surface humidity 70% → 70 × 0.8 + 2 = 58 g / kg); the IP index characteristic can be obtained by (the corresponding IPG index for the day minus the summer average IPG index from 1991-2020) ÷ the standard deviation of the IPG index (the standard deviation is calculated using the Excel "STDEV" function to standardize the index and eliminate the influence of magnitude).

[0035] Additionally, the time window can be set to 30 days. Following this example, a 30-day preset time period will be used. Each day, the corresponding feature values ​​of the four features mentioned above need to be determined. These four features for each day of the 30 days are then used as key sample points. These samples are labeled with the label value of 30, the daily highest temperature within a preset consecutive number of days (e.g., 8-14 days), and the daily high-temperature warning level. Warning levels can be represented numerically: no warning 0, blue warning 1, yellow warning 2, red warning 3, etc. Different temperature ranges correspond to different high-temperature warning levels, which will not be elaborated further here.

[0036] In another embodiment provided in this disclosure, step S103 above, using sample features as input features to train the established high-temperature-low-temperature prediction model, includes: Step 1: Based on data specific to winter, use the corresponding sample features as input features to train the established low-temperature prediction model; Step 2: Based on summer data, use the corresponding sample features as input features to make predictions using the established high-temperature prediction model.

[0037] In this embodiment of the disclosure, since the lowest temperature usually occurs in winter and the highest temperature usually occurs in summer, during model training, the model is trained separately for winter and summer based on the sample features of the corresponding seasons to obtain more accurate minimum and maximum temperature values.

[0038] In another embodiment provided in this disclosure, both the high-temperature prediction model and the low-temperature prediction model include: an input layer, a residual bidirectional LSTM layer, an attention layer, and an output layer; The input layer is used to receive sample features; The residual bidirectional LSTM layer is used to capture the effects of cold or hot air over a continuous period of time. The attention layer is used to enhance key features; The output layer is used to output the prediction results representing the lowest or highest temperature and the warning level.

[0039] In this embodiment of the disclosure, the above model structure is used for both the lowest temperature prediction model and the highest temperature prediction model. Taking the low temperature prediction model as an example, assuming that each sample feature includes data from 30 consecutive days, the input can be a "30-day historical feature table for each sample", specifically a 30-row × 4-column data matrix (for 30 days × 4 core winter features). In a no-code platform (such as TensorFlow Playground), the input is converted into a batch tensor with a shape of (32, 30, 4) (32 represents the number of samples in each training session, 30 represents the number of days, and 4 represents the number of features).

[0040] LSTM (Long Short-Term Memory) is the core of the model. The low-temperature prediction model uses "bidirectional LSTM + residual connections" to solve the problem of "correlation between cold air masses within 30 days". The residual bidirectional LSTM layer can directly receive tensor-form samples from the input layer (e.g., (32, 30, 4)). It extracts patterns from the time dimension and analyzes them in two directions: forward LSTM: observes the development process of cold air from day 1 to day 30 (e.g., how cold advection changes from weak to strong); backward LSTM: observes the source influence of cold air from day 30 to day 1 (e.g., whether the low temperature on day 30 is affected by the continued snow accumulation of the previous 10 days). The results from the two directions are combined to form a 30-day × 512-dimensional time feature matrix (shape such as (32, 30, 512)): where 512 is an assumed value, assuming that the features at each time point are expanded from the original 4 basic features to 512 high-level features that can reflect the correlation between different time points.

[0041] Because bidirectional LSTM focuses on extracting temporal correlation patterns, it may overlook the fundamental influence of individual features (e.g., the influence coefficient of snow accumulation on a particular day is particularly large, but it is masked by the temporal pattern). Therefore, residual connections are needed to supplement the fundamental information and avoid bias in pattern extraction. In implementation, the "30-day feature matrix" of the input layer (e.g., (32, 30, 4)) can be taken and expanded into 512 dimensions through a simple linear transformation layer (consistent with the output dimension of the bidirectional LSTM, facilitating addition). The output is the element-wise addition of the 512-dimensional temporal feature matrix of the bidirectional LSTM to the linearly transformed 512-dimensional fundamental feature matrix, resulting in a temporal feature matrix with fundamental information (the shape is still (32, 30, 512)).

[0042] The attention layer acts as a key feature enhancer for the model, allowing it to focus on important data. It is the core of the predictive model, addressing the issue that not all days or features are equally important within the 30-day feature set (e.g., "cold advection intensity of 6.8℃ / day on day 10" has a greater impact on subsequent low temperatures than "cold advection of 2.1℃ / day on day 5"). This is achieved by assigning weights to key data. The 30-day × 512-dimensional time feature matrix ((32, 30, 512)) output from the residual bidirectional LSTM layer is used as input, and the output is a 1 × 512-dimensional "weighted feature vector" (compressing the 30-day features into a single vector while simultaneously reflecting the importance of each day).

[0043] The attention layer uses a weight calculation layer (called the "Dense layer" in no-code platforms) to convert the 30-day × 512-dimensional features into 30-day × 1-dimensional weights (each day corresponds to a weight). Then, the "Softmax function" normalizes the 30 weights (ensuring all weights sum to 1, avoiding any day having an excessively high or low weight). The key features are weighted by multiplying the 30-day × 512-dimensional feature matrix element-wise with the 30-day × 1-dimensional weights. For example, each value of the 512-dimensional feature for day 10 is multiplied by 0.18 (weight), and each value of the 512-dimensional feature for day 5 is multiplied by 0.02. These weighted features are then summed, merging the 30-day weighted features into a single vector for use by the subsequent output layer. In essence, the 30-day × 512-dimensional weighted feature matrix is ​​summed along the time dimension to obtain a 1 × 512-dimensional weighted feature vector.

[0044] The output layer is the result generator, outputting two types of predicted targets. In one branch, the 1×512-dimensional weighted feature vector output from the attention layer is used as input; a fully connected layer (called a regression layer on no-code platforms) compresses the 512-dimensional vector into a 1×14-dimensional vector (corresponding to the 2m minimum temperature values ​​for each day of the next 14 days). In the other branch, the 1×512-dimensional weighted feature vector output from the attention layer is also used as input; a fully connected layer first compresses the 512-dimensional vector into a "1×70-dimensional vector" (14 days × 5 warning levels). =70); split by "day", the 70-dimensional vector is split into 14 1×5-dimensional vectors (each vector corresponds to the probability of 5 warning levels); the softmax function is used to normalize each 1×5-dimensional vector to ensure that the probability of 5 levels is added to equal 1); finally, the warning level probabilities for 14 days are output, such as: "Day 1: Level 0 (0.1), Level 1 (0.2), Level 2 (0.6), Level 3 (0.1), Level 4 (0), finally judged as Level 2 Yellow Warning", directly outputting the business-oriented warning results without manual judgment.

[0045] In another embodiment provided in this disclosure, the output of the residual bidirectional LSTM layer is the feature value of the corresponding feature for multiple days in a preset time period representing the feature of the corresponding sample; The attention layer is used to calculate the weighted average of the LSTM feature values ​​of the corresponding features of each preset time period of the input sample features, according to the weights corresponding to different features, to obtain the score corresponding to that day; based on the score corresponding to that day, the attention weight of that day is determined; and based on the LSTM feature value of that day and the attention weight of that day, the weighted LSTM feature value of that day is determined.

[0046] In this embodiment, the LSTM output features on day t are represented by a 1×512 dimensional vector (corresponding to a row of the 30-day×512 time feature matrix in the model structure), which are the 512 LSTM output feature values ​​on day t. Different features are weighted according to their corresponding weights, and a weighted summation is performed on each feature. Assuming the low-temperature prediction model is trained and the LSTM outputs five features with weights W=[0.6,0.1,0.2,0.05,0.05], and the five LSTM output feature values ​​on day 10 are [3.0, 0.5, 2.0, 1.0, 0.8] (the first three values ​​are high, corresponding to strong cold advection, snow cover, and NAT index features); then the linear transformation result is: z 10 =4.54, which is the score for day 10. This score can also be processed using an activation function, setting z... t Compress the reasonable range.

[0047] The value of the feature weight W can be gradually optimized by the model through feedback from the loss function. Initially, the value of W can be very small. In each training round, W is adjusted based on the total loss through backpropagation. If the model predicts a large deviation in the low temperature of a strong cold advection day (high loss), it indicates that the weight of the "cold advection-related feature" in W is too low. In this case, backpropagation will increase this weight (e.g., from 0.3 to 0.6). After the model converges, the loss will steadily decrease to a reasonable range.

[0048] Furthermore, after obtaining the daily ratings, the ratings can be converted into attention weights (α) using Softmax normalization. t By normalizing, the total weight of the 30 days is 1. The daily weight can clearly identify which day's features are more important for predicting low or high temperatures in the next 14 days.

[0049] After obtaining the daily weights, i.e., the attention weights, we can multiply each attention weight by the corresponding day's multidimensional LSTM features to obtain the weighted LSTM feature value for that day. Assuming the five-dimensional LSTM feature value for day 10 is [3.0, 0.5, 2.0, 1.0, 0.8], and the attention weight α... 10 =0.45, then the five-dimensional weighted eigenvalue is 0.45×[3.0,0.5, 2.0, 1.0, 0.8]=[1.35, 0.225, 0.9, 0.45, 0.36]. It can be seen that the cold advection correlation eigenvalue of 1.35 is amplified, and the actual contribution is improved.

[0050] In this embodiment, prediction result verification, model updating, and optimization are also possible. The prediction result verification calculates the RMSE between the predicted and measured values. A smaller RMSE indicates that the predicted result is close to the actual value, and the model's prediction accuracy is high. A larger RMSE requires further analysis of the causes of the error and optimization of the model. Specifically, the formula for calculating the RMSE in prediction result verification is RMSE = ,in It refers to the number of data samples. These are the actual observed temperature values. It is the predicted temperature value; In this embodiment, as the atmospheric environment changes, numerical weather prediction models improve, and new observational data accumulate, the original prediction model may gradually show deviations or performance degradation. Therefore, it is necessary to regularly collect and organize the latest numerical weather prediction data and meteorological observation data, retrain and optimize the model, and update the model every quarter or half a year. The model parameters are re-estimated and adjusted using new data samples, and the model structure and input feature selection are updated to adapt to changes in the atmospheric environment and underlying surface conditions, ensuring the long-term stability and accuracy of the prediction model. Attention should be paid to the development and updates of numerical weather prediction models, and new meteorological data products and forecasting technologies should be introduced in a timely manner to further improve the performance and predictive ability of the prediction model, providing more reliable technical support for high temperature-low temperature prediction.

[0051] This disclosure provides a high-temperature-low-temperature prediction device based on numerical weather prediction, such as... Figure 2 As shown, it includes: The data acquisition module 201 is used to acquire raw data from numerical weather prediction models within the prediction area and collect historical temperature observation data from multiple meteorological stations within the prediction area, including daily maximum and minimum temperatures. The preprocessing module 202 is used to monitor the quality of the collected numerical weather forecast data and to organize and clean the raw data and the historical temperature observation data. Training module 203 is used to construct sample features based on preprocessed data and label the true values, and to train the established high temperature-low temperature prediction model by using the sample features as input features. The prediction module 204 is used to input the real-time numerical weather forecast data within the prediction area into the completed prediction model after performing the same preprocessing steps as the training data, so as to obtain the predicted values ​​of the daily maximum temperature or daily minimum temperature.

[0052] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the high-temperature-low-temperature prediction method based on numerical weather forecasting described in any of the above embodiments.

[0053] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that it can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the invention. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A high-temperature-low-temperature prediction method based on numerical weather prediction, characterized in that, include: Obtain raw data from numerical weather prediction models within the forecast area, and collect historical temperature observation data from multiple meteorological stations within the forecast area, including daily maximum and minimum temperatures; The collected numerical weather forecast data is monitored for quality, and the raw data and historical temperature observation data are sorted and cleaned. Based on the preprocessed data, sample features are constructed and the true values ​​are labeled. The sample features are used as input features to train the established high-temperature-low-temperature prediction model. The numerical weather forecast data acquired in real time within the forecast area undergoes the same preprocessing steps as the training data, and is then input into the trained forecast model to obtain the predicted values ​​of the daily maximum or minimum temperature.

2. The method according to claim 1, characterized in that, For low temperature forecasting, both the historical temperature observation data and the raw data refer to winter data. The raw data includes: NWP model data, reanalysis data, and sea surface temperature precursor data; The NWP model data includes: geopotential height at the first isobaric surface, temperature advection at the second isobaric surface, and specific humidity at the third isobaric surface; the reanalysis data includes: snow cover and net surface radiation; the sea surface temperature precursor data includes: the NAT index. The historical temperature observation data includes: the lowest temperature at the preset altitude each day and the average snow depth each day.

3. The method according to claim 2, characterized in that, Based on the preprocessed data, sample features are constructed and ground truth values ​​are labeled, including: The geopotential height anomaly characteristics of the first isobaric surface are constructed based on the geopotential height at the first isobaric surface and the average winter climate values ​​of historical years in the predicted region. The cold advection intensity characteristics of the second isobaric surface are constructed based on the temperature advection at the second isobaric surface. The characteristics of the snow impact coefficient are constructed based on snow cover rate and snow depth; Constructing NAT index features based on NAT index; The sample features corresponding to multiple days in each preset time period are labeled as a single sample, and the label value is the lowest temperature of each day in the preset consecutive days after the preset time period, as well as the daily low temperature warning level.

4. The method according to claim 1, characterized in that, For high temperature forecasting, both the historical temperature observation data and the raw data refer to summer data. The raw data includes: NWP model data, reanalysis data, and sea surface temperature precursor data; The NWP model data includes: geopotential height at the first isobaric surface, temperature advection at the second isobaric surface, and specific humidity at the third isobaric surface; the reanalysis data includes: daily maximum surface temperature and daily average boundary layer height; the sea surface temperature precursor data includes: IPG index; The historical temperature observation data includes: the highest temperature at the preset altitude each day and the average relative humidity at ground level each day.

5. The method according to claim 4, characterized in that, Based on the preprocessed data, sample features are constructed and ground truth values ​​are labeled, including: The geopotential height anomaly characteristics of the first isobaric surface are constructed based on the geopotential height at the first isobaric surface and the average summer climate values ​​of historical years in the predicted region. The warm advection intensity characteristics of the second isobaric surface are constructed based on the temperature advection at the second isobaric surface. The specific humidity characteristics of the third isobaric surface are constructed based on the daily average specific humidity at the third isobaric surface. Constructing IPG index features based on the IPG index; The sample features corresponding to multiple days in each preset time period are labeled as a single sample, and the label value is the highest temperature of each day in the preset consecutive days after the preset time period, as well as the daily high temperature warning level.

6. The method according to claim 1, characterized in that, The high-temperature-low-temperature prediction model is trained using sample features as input features, including: Based on data specific to winter, the corresponding sample features are used as input features to train the established low-temperature prediction model. Based on summer data, the corresponding sample features are used as input features to make predictions for the established high-temperature prediction model.

7. The method according to claim 6, characterized in that, Both the high-temperature prediction model and the low-temperature prediction model include: an input layer, a residual bidirectional LSTM layer, an attention layer, and an output layer; The input layer is used to receive sample features; The residual bidirectional LSTM layer is used to capture the effects of cold or hot air over a continuous period of time. The attention layer is used to enhance key features; The output layer is used to output the prediction results representing the lowest or highest temperature and the warning level.

8. The method according to claim 7, characterized in that, The output of the residual bidirectional LSTM layer is the feature value of the corresponding feature for multiple days in the preset time period represented by the feature of the corresponding sample; The attention layer is used to calculate the score corresponding to each day of the sample feature corresponding to each preset time period of the input sample feature by performing a weighted average of the LSTM feature values ​​of the sample feature over multiple days according to the weights corresponding to different features. Based on the corresponding score for that day, determine the attention weight for that day; Based on the LSTM feature values ​​and attention weights of that day, determine the weighted LSTM feature values ​​for that day.

9. A high-temperature-low-temperature prediction device based on numerical weather prediction, characterized in that, include: The data acquisition module is used to acquire raw data from numerical weather prediction models within the prediction area and collect historical temperature observation data from multiple meteorological stations within the prediction area, including daily maximum and minimum temperatures. The preprocessing module is used to monitor the quality of the collected numerical weather forecast data and to organize and clean the raw data and the historical temperature observation data. The training module is used to construct sample features based on preprocessed data and label the ground truth. The sample features are used as input features to train the established high-temperature-low-temperature prediction model. The prediction module is used to input the real-time numerical weather forecast data within the prediction area into the completed prediction model after undergoing the same preprocessing steps as the training data, so as to obtain the predicted values ​​of the daily maximum or minimum temperature.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the high-temperature-low-temperature prediction method based on numerical weather forecasting as described in any one of claims 1 to 8.