A method for medium-range temperature prediction based on physical constraints
By performing data preprocessing and feature fusion on the 2m temperature mid-term forecast method, and training the model using ConvLSTM2D layers and a physically constrained objective loss function, the problems of slow response and physical interpretability in existing forecast methods are solved, and higher prediction accuracy is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-12
AI Technical Summary
Existing 2m medium-term temperature forecasting methods cannot meet the requirements of modern meteorological services for rapid response and physical interpretability, and the forecast accuracy is low.
A physical constraint-based medium-term temperature prediction method is adopted. The historical dataset of multiple variables is preprocessed, and a trained medium-term temperature prediction model is used for prediction. The model is trained by a target loss function with physical constraints and an augmented training dataset. The model uses sliding window partitioning and ConvLSTM2D layer to extract spatiotemporal features, and removes redundant information for feature fusion.
It improves the accuracy of 2m temperature medium-term forecasts, meeting the requirements of modern meteorological services for rapid response and physical interpretability.
Smart Images

Figure CN121559636B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of temperature prediction technology, and in particular to a medium-term temperature prediction method based on physical constraints. Background Technology
[0002] 2m temperature (2m) is the atmospheric temperature at a height of 2 meters above the Earth's surface in meteorology. It is one of the benchmark indicators for global meteorological observation, and medium-term forecasting of 2m temperature is a key research direction in meteorological science and its applications. It is also widely used in climate research, agriculture, transportation, and other fields. Currently, commonly used short-term forecasting methods for 2m temperature mainly include: traditional numerical forecasting methods based on physical equations and purely data-driven methods.
[0003] However, existing 2m medium-term temperature forecasting methods cannot meet the requirements of modern meteorological services for rapid response and physical interpretability, and the prediction accuracy of 2m medium-term temperature forecasts is relatively low. Summary of the Invention
[0004] This application aims to propose a physical constraint-based medium-term temperature forecasting method that can meet the requirements of modern meteorological services for rapid response and physical interpretability, and can improve the forecasting accuracy of 2m medium-term temperature forecasts.
[0005] In a first aspect, embodiments of this application provide a method for medium-term temperature prediction based on physical constraints, the method comprising:
[0006] The data in the historical dataset containing multiple variables are preprocessed to obtain preprocessed data. The multiple variables include the temperature at 2m height, total cloud cover, east-west wind speed component, north-south wind speed component, and net radiation flux.
[0007] The preprocessed data is input into a trained mid-term temperature prediction model to perform mid-term temperature prediction, yielding the mid-term temperature prediction result. The trained mid-term temperature prediction model is obtained through training a physically constrained objective loss function and an augmented training dataset.
[0008] The preprocessed data is divided using a sliding window. The input tensor corresponding to each variable after the sliding window division is input to the ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable.
[0009] Remove redundant information from the spatiotemporal features corresponding to each variable to obtain the spatiotemporal features of each variable after removing redundant information.
[0010] The spatiotemporal features corresponding to all variables, after removing redundant information, are fused to obtain the fused features;
[0011] Based on the fusion features, a mid-term temperature prediction is performed to obtain the mid-term temperature prediction result.
[0012] Compared with the prior art, the first aspect of this application has the following beneficial effects:
[0013] This method preprocesses historical datasets containing multiple variables to obtain preprocessed data. These variables include temperature at 2m altitude, total cloud cover, east-west wind speed, north-south wind speed, and net radiation flux. The preprocessed data is then input into a trained mid-term temperature prediction model to obtain the mid-term temperature prediction result. The trained mid-term temperature prediction model is obtained using a physically constrained objective loss function and an augmented training dataset. Specifically, a sliding window is used to divide the preprocessed data, and the input tensor corresponding to each variable after the sliding window division is input to a ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable. Redundant information in the spatiotemporal features corresponding to each variable is removed to obtain the spatiotemporal features for each variable after removing redundant information. The spatiotemporal features corresponding to all variables after removing redundant information are fused to obtain fused features. Mid-term temperature prediction is then performed based on the fused features to obtain the mid-term temperature prediction result. Thus, by comprehensively considering physically meaningful variables as input tensors, and then training a well-trained medium-term temperature prediction model using a physically constrained objective loss function and an enhanced training dataset, the prediction accuracy of the well-trained medium-term temperature prediction model is improved. Finally, temperature prediction is performed using the well-trained medium-term temperature prediction model, so that the obtained medium-term temperature prediction results can meet the requirements of modern meteorological services for rapid response and physical interpretability, and improve the prediction accuracy of 2-meter medium-term temperature forecasts.
[0014] Secondly, embodiments of this application also provide a medium-term temperature prediction system based on physical constraints, the system comprising:
[0015] The data preprocessing unit is used to preprocess the data in the historical dataset containing multiple variables to obtain preprocessed data. The multiple variables include the acquired 2m height temperature, total cloud cover, east-west wind speed component, north-south wind speed component, and net radiation flux.
[0016] The intermediate temperature prediction unit is used to input the preprocessed data into a trained intermediate temperature prediction model to perform intermediate temperature prediction and obtain the intermediate temperature prediction result. The trained intermediate temperature prediction model is obtained by training a physically constrained objective loss function and an augmented training dataset.
[0017] The preprocessed data is divided using a sliding window. The input tensor corresponding to each variable after the sliding window division is input to the ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable.
[0018] Remove redundant information from the spatiotemporal features corresponding to each variable to obtain the spatiotemporal features of each variable after removing redundant information.
[0019] The spatiotemporal features corresponding to all variables, after removing redundant information, are fused to obtain the fused features;
[0020] Based on the fusion features, a mid-term temperature prediction is performed to obtain the mid-term temperature prediction result.
[0021] Thirdly, embodiments of this application also provide an electronic device, including at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform a physical constraint-based medium-term temperature prediction method as described above.
[0022] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a physical constraint-based medium-term temperature prediction method as described above.
[0023] It is understood that the beneficial effects of the second to fourth aspects compared with the related technologies are the same as the beneficial effects of the first aspect compared with the related technologies. Please refer to the relevant description in the first aspect above, which will not be repeated here. Attached Figure Description
[0024] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0025] Figure 1 This is a flowchart illustrating an embodiment of the physical constraint-based medium-term temperature prediction method provided in this application;
[0026] Figure 2 This is a schematic diagram of the data preprocessing flow in the best embodiment of the physical constraint-based medium-term temperature prediction method provided in this application;
[0027] Figure 3 This is a schematic diagram of the model architecture and physical constraint integration in the best embodiment of the physical constraint-based medium-term temperature prediction method provided in this application;
[0028] Figure 4 This is a schematic diagram of an embodiment of the physical constraint-based medium-term temperature prediction system provided in this application;
[0029] Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application. Detailed Implementation
[0030] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0031] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.
[0032] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0033] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0034] Existing 2m medium-range temperature forecasting methods cannot meet the requirements of modern meteorological services for rapid response and physical interpretability, and the forecast accuracy of 2m medium-range temperature forecasts is relatively low.
[0035] To address the problems existing in the prior art, this application proposes a medium-term temperature prediction method based on physical constraints.
[0036] Reference Figure 1 This application provides a schematic flowchart of a physical constraint-based mid-term temperature prediction method. This physical constraint-based mid-term temperature prediction method is applied to electronic devices, such as servers or mobile terminals. Figure 1 As shown, this physical constraint-based medium-term temperature prediction method may include the following steps:
[0037] Step S101: Preprocess the data in the historical dataset containing multiple variables to obtain preprocessed data. The multiple variables include the obtained 2m height temperature, total cloud cover, east-west wind speed component, north-south wind speed component, and net radiation flux.
[0038] Step S102: Input the preprocessed data into the trained mid-term temperature prediction model to perform mid-term temperature prediction and obtain the mid-term temperature prediction result. The trained mid-term temperature prediction model is obtained by training a physically constrained objective loss function and an augmented training dataset.
[0039] The preprocessed data is divided into sliding window segments. The input tensor corresponding to each variable after the sliding window segmentation is input to the ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable.
[0040] Remove redundant information from the spatiotemporal features corresponding to each variable to obtain the spatiotemporal features of each variable after removing redundant information.
[0041] The spatiotemporal features corresponding to all variables, after removing redundant information, are fused to obtain the fused features;
[0042] Mid-term temperature prediction is performed based on fusion features to obtain mid-term temperature prediction results.
[0043] In this embodiment, data from a historical dataset containing multiple variables is preprocessed to obtain preprocessed data. These variables include the acquired temperature at 2m altitude, total cloud cover, east-west wind speed, north-south wind speed, and net radiation flux. The preprocessed data is then input into a trained mid-term temperature prediction model to obtain the mid-term temperature prediction result. The trained mid-term temperature prediction model is obtained using a physically constrained objective loss function and an augmented training dataset. Specifically, a sliding window is used to divide the preprocessed data, and the input tensor corresponding to each variable after the sliding window division is input to a ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable. Redundant information in the spatiotemporal features corresponding to each variable is removed to obtain the spatiotemporal features after removing redundant information. The spatiotemporal features after removing redundant information from all variables are then fused to obtain fused features. Mid-term temperature prediction is then performed based on the fused features to obtain the mid-term temperature prediction result. Thus, by comprehensively considering physically meaningful variables as input tensors, and then training a well-trained medium-term temperature prediction model using a physically constrained objective loss function and an enhanced training dataset, the prediction accuracy of the well-trained medium-term temperature prediction model is improved. Finally, temperature prediction is performed using the well-trained medium-term temperature prediction model, so that the obtained medium-term temperature prediction results can meet the requirements of modern meteorological services for rapid response and physical interpretability, and improve the prediction accuracy of 2-meter medium-term temperature forecasts.
[0044] The above-mentioned preprocessing of data in historical datasets containing multiple variables can include normalization, missing value imputation, and other preprocessing.
[0045] The historical dataset mentioned above is used by the model to predict temperatures in the medium term.
[0046] The temperature at a height of 2m mentioned above can be the atmospheric temperature obtained at a height of 2 meters.
[0047] The total cloud cover mentioned above can be the percentage of the obtained sky cloud cover.
[0048] The east-west wind speed component mentioned above can be the wind speed obtained at a height of 10 meters x direction.
[0049] The north-south wind speed component mentioned above can be the wind speed in the y-direction at a height of 10 meters.
[0050] The aforementioned net radiation flux can be the obtained net solar radiation flux at the Earth's surface.
[0051] The above-mentioned medium-term temperature prediction model can be a medium-term temperature prediction model constructed using a ConvLSTM model, or it can be constructed using other network models known to those skilled in the art. This embodiment does not make any specific limitations.
[0052] The sliding window described above can be based on the idea of two pointers, where a window is formed between the elements pointed to by the two pointers, and data is selected by "sliding" on the data sequence (such as arrays or strings).
[0053] The above-mentioned removal of redundant information in the spatiotemporal features corresponding to each variable can be achieved by using methods known to those skilled in the art. This embodiment does not provide a specific description or limitation.
[0054] In some implementations, data from a historical dataset containing multiple variables is preprocessed to obtain preprocessed data, including:
[0055] Missing values are imputed in the historical dataset to obtain the imputed data;
[0056] The filled data is then normalized to obtain the normalized data;
[0057] The normalized data is stitched together with the static land and sea mask data to obtain the preprocessed data.
[0058] In this embodiment, by imputing missing values and normalizing the data in the historical dataset containing multiple variables, and then stitching and fusing it with static land and sea mask data, the influence of differences in the dimensions and numerical ranges of different variables on the model training gradient optimization process can be eliminated. This can clearly distinguish the significant differences in the underlying surface properties of land and sea areas, laying a good data foundation for the subsequent differentiated application of physical constraints.
[0059] The aforementioned static land and sea mask data can be mask data used to distinguish between land and sea areas. For example, land areas can be represented by 1 and sea areas by 0.
[0060] In some implementations, the trained mid-term temperature prediction model is trained using a physically constrained objective loss function and an augmented training dataset, including:
[0061] The data in the acquired training dataset is preprocessed to obtain the preprocessed training dataset;
[0062] The input tensor corresponding to each variable in the preprocessed training dataset is randomly horizontally flipped to obtain a new tensor after random horizontal flipping.
[0063] The input tensor corresponding to each variable in the preprocessed training dataset is randomly vertically flipped to obtain a new tensor after random vertical flipping.
[0064] The input tensor corresponding to each variable in the preprocessed training dataset is randomly time-shifted to obtain a new tensor after random time shift.
[0065] The new tensors after random horizontal flipping, random vertical flipping, and random time offset are added to the preprocessed training dataset to obtain the enhanced training dataset.
[0066] The mid-term temperature prediction model is trained by using a physically constrained objective loss function and an enhanced training dataset to obtain a well-trained mid-term temperature prediction model.
[0067] In this embodiment, by randomly flipping the input tensor corresponding to each variable in the preprocessed training dataset horizontally, vertically, and time-shifting, equivalent samples can be generated through random transformation, expanding the distribution of training data and laying a good data foundation for training a good mid-term temperature prediction model, thereby improving the temperature prediction accuracy of the trained mid-term temperature prediction model.
[0068] The data in the training dataset mentioned above is used for model training.
[0069] In some implementations, the preprocessed data is input into a trained mid-term temperature prediction model to perform mid-term temperature prediction, thereby obtaining the mid-term temperature prediction result, including:
[0070] The theoretical temperature value is calculated based on the base temperature, total cloud cover, and net radiative flux.
[0071] Based on theoretical temperature values and the temperature at a height of 2m, a radiation equilibrium constraint is constructed.
[0072] Based on the current 2m height temperature, the previous time step 2m height temperature, the east-west wind speed component, and the north-south wind speed component, a soil-atmosphere thermal coupling constraint is constructed.
[0073] The total physical loss function is constructed by weighted summation of the radiation balance constraint and the soil-atmosphere thermal coupling constraint.
[0074] The target loss function is constructed by adding the total physical loss function and the mean squared error loss function.
[0075] The mid-term temperature prediction model is trained by the objective loss function to obtain the trained mid-term temperature prediction model;
[0076] The preprocessed data is input into the trained mid-term temperature prediction model to make mid-term temperature predictions and obtain the mid-term temperature prediction results.
[0077] In this embodiment, physical constraints are constructed using physical information such as temperature at 2m altitude, total cloud cover, east-west wind speed, north-south wind speed, and net radiation flux. Then, a target loss function with physical constraints is used to train the medium-term temperature prediction model. This achieves a systematic coupling between meteorological data-driven approaches and atmospheric physical laws, laying a solid data foundation for training the medium-term temperature prediction model. This ensures that the medium-term temperature prediction results obtained later can meet the requirements of modern meteorological services for rapid response and physical interpretability.
[0078] In some implementations, the theoretical temperature value is calculated based on the base temperature, total cloud cover, and net radiative flux, including:
[0079] Obtain soil density and specific heat capacity;
[0080] The theoretical temperature value is calculated based on the base temperature, total cloud cover, net radiation flux, soil density, and specific heat capacity.
[0081] In this embodiment, the theoretical temperature value is calculated based on the base temperature, total cloud cover, net radiation flux, soil density, and specific heat capacity, which can lay a good data foundation for constructing radiation balance constraints.
[0082] The soil density and specific heat capacity can be obtained using techniques known to those skilled in the art, and this embodiment does not provide a specific description or limitation.
[0083] In some implementations, a radiation equilibrium constraint is constructed based on the theoretical temperature value and the temperature at a height of 2m, including:
[0084] The difference between the theoretical temperature value and the temperature at a height of 2m is calculated to obtain the difference result;
[0085] The norm square of the difference results is solved to construct the radiation equilibrium constraint.
[0086] In this embodiment, by constructing radiation balance constraints, the physical consistency of the model can be enhanced, laying a good data foundation for training a good medium-term temperature prediction model.
[0087] In some implementations, soil-atmosphere thermal coupling constraints are constructed based on the current 2m altitude temperature, the previous time step's 2m altitude temperature, the east-west wind speed component, and the north-south wind speed component, including:
[0088] ;
[0089] in, This indicates soil-atmosphere thermal coupling constraint. This indicates the temperature at a current height of 2 meters. This indicates the temperature at a height of 2 meters in the previous time step. This represents the east-west component of wind speed at a height of 10m. This indicates the temperature at a current height of 2m. Partial derivatives of the axis, This represents the north-south wind speed component at a height of 10m. This indicates the temperature at a current height of 2m. Partial derivatives of the axis, Indicates the time step. Take a positive integer. Represents the square norm.
[0090] In this embodiment, by constructing soil-atmosphere thermal coupling constraints, the physical consistency of the model can be enhanced, laying a good data foundation for training a good medium-term temperature prediction model.
[0091] To facilitate understanding by those skilled in the art, a set of preferred embodiments is provided below:
[0092] 2m temperature (2m) is the atmospheric temperature at a height of 2 meters above the Earth's surface in meteorology. It is one of the benchmark indicators for global meteorological observation, and medium-term 2m temperature forecasts are a key research direction in meteorological science and applications. It is also widely used in climate research, agriculture, transportation, and other fields. In agricultural production, 2m temperature forecasts can guide environmental control in facility agriculture and can also be used to assist in assessing the impact of climate change on vegetation phenology. In transportation, medium-term 2m temperature forecast data is an important basis for airport de-icing operations in winter and for the logistics industry to assess road icing risks and optimize transportation routes. In meteorology, medium-term temperature forecast data can be used for downscaling validation of regional climate models. By comparing the deviation between model outputs and measured temperatures, the parameterization scheme of land surface processes can be optimized, improving the ability to simulate temperature trends under climate change scenarios. For extreme weather events, 2m temperature forecasts, combined with dynamic and statistical models, can identify cold and warm advection transport characteristics in advance, providing technical support for early warnings of severe cooling or high temperatures.
[0093] Currently, commonly used 2m temperature medium-range forecasting methods mainly include: traditional numerical forecasting methods based on physical equations (such as the Integrated Forecasting System (ENS) of the Medium-Range Weather Forecasting Center and the CMA-MESO system of the Meteorological Bureau) and purely data-driven methods. Among them:
[0094] Traditional numerical weather prediction (NWP) methods are based on physical equations from fluid mechanics and thermodynamics, using discretized solutions to atmospheric dynamic processes. In 2-meter temperature prediction, they are primarily used for medium- to long-term forecasts of large-scale weather systems. Their physical mechanisms are highly interpretable and can effectively simulate the coupling relationship between temperature, pressure fields, and wind fields, making them suitable for regional climate background analysis. However, they require significant computational resources, making it difficult to achieve real-time updates with high spatiotemporal resolution forecasts. Furthermore, in complex terrains or urban underlying surfaces, traditional NWP methods exhibit significant errors in simulating surface heat exchange. Additionally, these methods are highly sensitive to changes in initial and boundary conditions, resulting in insufficient ability to capture sudden extreme temperature events.
[0095] Purely data-driven methods primarily use deep learning models to automatically extract spatiotemporal features from historical meteorological data, establishing a nonlinear mapping relationship between input variables (such as air pressure, wind speed, and humidity) and target temperature. This method demonstrates significant modeling capabilities and computational efficiency when handling nonlinear relationships, effectively capturing subtle features in complex terrains and perceiving the urban heat island effect. However, it also has obvious limitations: the model requires a large amount of labeled data, and prediction accuracy drops sharply in sparse data areas; the method lacks physical constraints, has insufficient generalization ability for unseen extreme weather patterns, and may experience "extrapolation failure"; furthermore, the lack of clear physical basis for model decisions makes the physical interpretation and verification of results difficult.
[0096] To address the problems existing in current technologies, this embodiment focuses on constructing a physically constrained ConvLSTM model, aiming to achieve accurate medium-term forecasts of the 2-meter temperature spatial distribution in China and surrounding areas over the next 7 days. This embodiment utilizes the ERA5 reanalysis meteorological dataset, focusing on exploring how to efficiently integrate key atmospheric physical constraints into a deep learning architecture. The goal of this embodiment is to overcome the limitations of traditional NWP and purely data-driven models, providing a more accurate and physically consistent technical solution for medium-term 2-meter temperature forecasting, while also providing a theoretical and methodological foundation for subsequent research on collaborative forecasting of multiple meteorological elements. The specific technical solution of this embodiment includes the following:
[0097] 1. ConvLSTM model.
[0098] Convolutional LSTM (ConvLSTM) is a deep learning architecture that combines the spatial feature extraction capabilities of convolutional neural networks (CNNs) with the time series modeling advantages of long short-term memory networks (LSTMs). This model achieves joint modeling of spatiotemporal sequence data by replacing the fully connected operations in traditional LSTMs with convolutional operations, making it valuable for applications in weather forecasting, video understanding, and disaster monitoring.
[0099] The ConvLSTM neural network replaces the ordinary fully connected weights in the LSTM neural network with convolutional operations. The model uses three ConvLSTM2D layers, with an input gate... Forgotten Gate Cell state Output gate and hidden state The calculation formula is as follows:
[0100] ;
[0101] ;
[0102] ;
[0103] ;
[0104] ;
[0105] ;
[0106] in, Indicates time Candidate cell state, Indicates the current input Convolution weights to the input gate, Indicates the hidden state in the previous moment. Convolution weights to the input gate, This represents the bias term of the input gate. Indicates the current input Convolution weights to the forget gate, Indicates the hidden state in the previous moment. Convolution weights to the forget gate, The bias term representing the forget gate. Indicates the current input Convolution weights to candidate cell states, Indicates the hidden state in the previous moment. Convolution weights to candidate cell states, Bias terms representing the candidate cell state. Indicates the current input The convolution weights to the output gate Indicates the hidden state in the previous moment. The convolution weights to the output gate Indicates the current cell state The convolution weights to the output gate This represents the bias term of the output gate. This represents the sigmoid activation function. This represents the output of the previous hidden layer. This represents the input to the current hidden layer. This represents information from the previous state unit, where tanh is the hyperbolic tangent function. This indicates element-wise multiplication. This indicates a convolution operation.
[0107] 2. Radiation balance principle and multivariable coupling mechanism.
[0108] (1) The principle of surface radiation balance.
[0109] The law of conservation of energy in atmospheric thermodynamics is one of the core physical foundations of this model, namely, the change in energy within a system equals the energy entering the system minus the energy leaving the system. In this 2m temperature prediction scenario, this can be simplified to a balance between the rate of temperature change and energy inputs and outputs such as radiation and advection, expressed mathematically as follows:
[0110] ;
[0111] in, Net surface radiation flux ( ); For incident solar shortwave radiation; The surface albedo is affected by surface type (this embodiment only distinguishes between land and sea) and vegetation cover; It is atmospheric inverse longwave radiation, and is related to atmospheric temperature and water vapor content; The reflection of solar radiation from the Earth's surface is controlled by both total cloud cover and albedo. For long-wave radiation emitted from the Earth's surface, calculations using the Stefan-Boltzmann law yield the following:
[0112] ;
[0113] in, The surface emissivity is set to 0.95 for all land areas. The Stefan-Boltzmann constant ( ), Temperature at a height of 2m.
[0114] (2) The mechanism of action of variables.
[0115] In the above principle, net radiative flux ( This represents the net solar radiation flux reaching the Earth's surface. Its mathematical relationship is as follows:
[0116] ;
[0117] When SSR > 0, the Earth's surface gains energy, leading to an increase in temperature; conversely, the Earth's surface cools down.
[0118] The upward solar radiation flux refers to the total amount of solar radiation incident on the Earth's surface. The downward solar radiation flux refers to the total amount of solar radiation reflected back from the Earth's surface to the atmosphere, etc. Albedo represents the ratio of solar radiation reflected from the Earth's surface to the solar radiation incident on it, reflecting the Earth's surface's ability to reflect solar radiation. This represents the proportion of solar radiation absorbed by the Earth's surface.
[0119] (3) Radiation modulation mechanism of total cloud cover.
[0120] Total cloud cover modulates the balance between shortwave radiation (solar radiation) and longwave radiation (Earth's infrared radiation), resulting in a dual effect: a "cooling effect" on shortwave radiation and a "warming effect" on longwave radiation. This means shortwave radiation attenuation and longwave radiation enhancement. The empirical expression for shortwave radiation attenuation is as follows:
[0121] ;
[0122] in, This represents the net shortwave radiation under cloudless conditions. This represents net radiative flux. This indicates the total cloud cover.
[0123] 3. Advection transport principle and wind field-temperature coupling mechanism.
[0124] Temperature advection is the transport of temperature caused by atmospheric motion. The three-dimensional advection equation is:
[0125] ;
[0126] in, This indicates the temperature at a height of 2m (this is the actual temperature value obtained). The mass derivative representing the temperature at a height of 2m. This represents the partial derivative of temperature at a height of 2m with respect to time. This represents the net non-adiabatic heating rate, which characterizes the net heat gained per unit volume of air per unit time. This represents the temperature gradient over a distance of 2m. It is a three-dimensional wind speed vector. and The u and v components represent the wind speed at a height of 10m, where u represents the east-west direction and v represents the north-south direction.
[0127] In the boundary layer, vertical velocity Since the vertical transport term is relatively small, the advection is mainly determined by the horizontal component. Therefore, neglecting the vertical transport term, the transport relationship between the wind field and temperature is as follows:
[0128] ;
[0129] When wind blows from a high-temperature area to a low-temperature area, the advection term is positive, causing the temperature in the target area to rise. From the above transport relationships, the mechanism by which the horizontal wind field affects the 2m temperature can be analyzed as follows: the temperature advection term directly leads to spatial temperature migration; and The larger the surface area, the stronger the turbulent exchange, and the faster the heat exchange between the Earth's surface and the atmosphere; at the boundary between land and sea, due to the sea-land breeze effect, and The diurnal variation drives the periodic fluctuations in temperature.
[0130] 4. Data preparation and preprocessing.
[0131] (1) Overview of the dataset.
[0132] This embodiment uses the ERA5 reanalysis dataset released by the European Centre for Medium-Range Weather Forecasts (ECMWF), with a time span from January 1, 2020 to December 31, 2024 (UTC), and a daily average temporal resolution. The spatial coverage is 73°E to 135°E, 3°N to 53°N, with a spatial resolution of 0.25° × 0.25° (latitude and longitude grid). The dataset includes dynamic meteorological variables, as shown in Tables 1 and 2.
[0133] Table 1 shows the variable attributes.
[0134]
[0135] Table 2 explains the variables.
[0136]
[0137] The value range in Table 2 represents the range of the data after normalization. The dataset forms a three-dimensional tensor structure in the spatiotemporal dimensions. To facilitate subsequent model input, the time series length of the data is uniformly clipped to 1827 days, and the spatial grid resolution is 201×249 (latitude×longitude), providing sufficient spatiotemporal information for model training.
[0138] (2) Data preprocessing process.
[0139] To fully explore the intrinsic value of the data and ensure that the model effectively captures the spatiotemporal evolution patterns of meteorological elements, a systematic preprocessing procedure was implemented on the original ERA5 reanalysis data, referring to... Figure 2 The specific steps are as follows:
[0140] Missing value imputation: Spatiotemporal interpolation algorithms are used to impute missing values in the original data to construct a spatiotemporally continuous and complete dataset. For the systematic missing data problem in the ocean region, the missing locations are independently labeled.
[0141] Data normalization: normalization of various meteorological variables Normalization was performed separately, and the calculation formula is as follows:
[0142] ;
[0143] in, This represents the normalization result. The sample mean of the variable. is the sample standard deviation of the variable. This treatment aims to eliminate the impact of differences in dimensions and numerical ranges between different variables on the model training gradient optimization process.
[0144] Landmask integration: Static landmask data is stitched together with dynamic meteorological variables as an additional channel by maintaining a 0 or 1 mask using the `land_mask`. This operation aims to enable the model to clearly distinguish significant differences in underlying surface properties between land and marine areas, laying the foundation for subsequent differentiated application of physical constraints. It should be noted that the static landmask data in this embodiment was obtained using methods well-known to those skilled in the art, and will not be specifically described in this embodiment.
[0145] Time series sample construction: Continuous time series data are transformed into structured "input-label" sample combinations. Each sample contains 7 consecutive days of multivariate meteorological data as the input sequence of the ConvLSTM model, and the following 7 days of 2-meter temperature field spatial distribution data as the output sequence of the ConvLSTM model, thereby constructing a dataset that meets the requirements of the ConvLSTM model training architecture.
[0146] Dataset partitioning: The preprocessed complete dataset is strictly divided into training and validation sets in 80% and 20% ratios, respectively, according to chronological order. This partitioning strategy strictly follows the principles of time series forecasting, simulating the rolling prediction process of the model in real-world scenarios, and providing a reliable and information-free benchmark for model performance evaluation.
[0147] 5. Establishment of a medium-term temperature prediction model.
[0148] (1) Layer establishment of ConvLSTM model (i.e. medium-term temperature prediction model).
[0149] The ConvLSTM model is constructed with six layers. In this embodiment, the model structure is visualized as a forward propagation data flow table, as shown in Table 3.
[0150] Table 3 shows the data flow during model forward propagation.
[0151]
[0152] This embodiment is based on Figure 3 The model is constructed using data structures from [the [source], and the specific construction method is as follows:]
[0153] 1) Multivariate Input Layer: This layer employs a separate channel design, constructed based on the principles of physical independence and complementarity of meteorological elements. Processing through independent channels preserves the integrity of the original features while avoiding mutual interference between data features of different dimensions. For the first... 1 variable ( ), input tensor set to ,in, This indicates the temperature at a height of 2m. The total cloud cover is represented by B, the batch size of the training data is B, the time step is T, H and W are the spatial dimensions, H is latitude, W is longitude, and 1 is the number of channels.
[0154] 2) Data Augmentation Layer: Due to the scarcity of extreme event samples and temporal resolution limitations in the ERA5 reanalysis data, equivalent samples are generated through random transformations to expand the distribution of the training data (used for model training in this embodiment). This is mainly achieved by simulating the spatial symmetry of the meteorological system and the translation invariance of the simulated meteorological process through horizontal / vertical flipping and time offset. The specific flipping algorithm is as follows:
[0155] Random horizontal flip: ;
[0156] Random vertical flip: ;
[0157] Random time offset: ;
[0158] in, This means that the transformation is performed with a 50% probability. These represent the time, latitude, longitude, and channel corresponding to the data augmentation, respectively. This represents the new tensor after a random horizontal flip. This represents the new tensor after a random vertical flip. This represents the new tensor after a random time offset. Indicates the time offset.
[0159] It should be noted that, except for the data augmentation layer which is only used in the model training phase, all other layers are used in both the model training and model prediction phases.
[0160] 3) Shared ConvLSTM2D Layers: ConvLSTM2D is a spatial domain extension of traditional LSTM, replacing fully connected layers with convolutional operations to enable the model to capture spatiotemporal correlations. The shared parameter design is based on the universal assumption of fluid dynamics equations: the spatiotemporal evolution of different variables follows the same dynamic mechanism. The model uses three ConvLSTM2D layers, with input gates... Forgotten Gate Cell state Output gate and hidden state The calculation formula is the same as that of the ConvLSTM model.
[0161] 4) Feature Extraction Layer: Since the temperature forecast for the next 7 days is mainly affected by the recent atmospheric circulation, and the influence of historical data on the forecast time information decays over time, this layer is set to remove redundant historical information.
[0162] ;
[0163] in, To meet the forecasted demand for the next 7 days.
[0164] 5) Feature Fusion Layer: Due to the complex interactions between different variables, and the common element-wise addition and attention mechanisms which ignore physical differences and have high computational complexity, this layer is set up to concatenate feature tensors along the channel dimension:
[0165] ;
[0166] Where each X represents the feature tensor of the corresponding meteorological variable after processing by the ConvLSTM layer, and the feature tensor corresponding to each variable is... After fusion , This indicates concatenation. This method preserves the independence of each variable's features and utilizes the model itself to dynamically learn and adjust the weight relationships between variables.
[0167] 6) Predictive Output Layer: After data feature fusion, the fused high-dimensional features need to be mapped to the temperature field for the next 7 days. This is achieved by using a Conv3D layer design, which utilizes 3D convolutional kernels to perform spatiotemporal aggregation of the input features.
[0168] ;
[0169] Where i represents the longitude index, j represents the latitude index, k represents the prediction time index, m represents the longitude offset, n represents the latitude offset, p represents the time offset, and c represents the channel index. Indicates the bias term. The kernel size represents the convolution kernel. A kernel size of 3 in the time dimension captures the trend of change within a 3-day time window. If the kernel size of 7 in the time dimension is used, it captures the trend of change within a 7-day time window. The kernel size of 3×3 in the spatial dimension can capture the spatial correlation of the local meteorological field.
[0170] (2) Physical constraint design based on atmospheric physics laws.
[0171] This embodiment deeply integrates physical laws into the model training process in the form of soft constraints. The core strategy is to enforce physical consistency through a customized loss function, which is essentially a norm penalty for the residuals of the physical equations. Based on the above principles and the actual model data, this embodiment constructs the physical constraints as follows:
[0172] 1) Radiation balance constraint.
[0173] Based on the radiation balance principle in the model, the temperature at 2m should theoretically satisfy:
[0174] ;
[0175] in, This represents the theoretical temperature at a height of 2m (i.e., the theoretical temperature value). The base temperature (temperature in K, which can be a value set manually based on experience, but this embodiment does not specify a particular value). The radiation influence coefficient, and These represent soil density and specific heat capacity, respectively. The radiation-constrained loss function is further constructed as follows:
[0176] ;
[0177] 2) Soil-atmosphere thermal coupling constraint.
[0178] Based on the derived temperature advection equation, this embodiment constructs the physical constraints for advection transport:
[0179] ;
[0180] in, The temperature at a height of 2m in the previous time step. Let be the time step. This formula is approximated using finite difference:
[0181] Temperature gradient: ;
[0182] Advection term: ;
[0183] in, Indicates longitude as latitude Temperature at a height of 2m Indicates longitude as latitude Temperature at a height of 2m Indicates longitude as latitude Temperature at a height of 2m.
[0184] Based on the above constraints, the total physical loss function is constructed as follows:
[0185] ;
[0186] In the physical constraint loss, considering that the influence of surface radiation balance on 2m temperature is greater than that of soil-atmosphere thermal coupling constraint, this embodiment fixes the dual constraint weights and... Set to 0.8, The value is set to 0.2. The specific weight setting can be adjusted according to the actual situation, and this embodiment does not impose any specific limitations.
[0187] (3) Construct the target loss function.
[0188] Based on the total physical loss function constructed above, this embodiment combines it with the data loss (i.e., the mean squared error loss function) to construct a dual-constraint loss function with both data-driven and physical law-based aspects:
[0189] ;
[0190] in, This represents the weights of the physical constraints in the loss function. The mean squared error loss function is used to measure it:
[0191] ;
[0192] Where N is the number of samples, These are the model's predicted values. This is the actual temperature value.
[0193] 6. Model training and optimization strategies.
[0194] (1) Training configuration and parameter settings.
[0195] 1) Input and output settings: The historical input is set to 21 to cover the average life cycle of mid-latitude weather systems and ensure that the complete evolution of weather processes is captured; the forecast output is set to 7 days to balance forecast accuracy with practical application needs and avoid problems such as a sharp drop in forecast accuracy caused by a significant increase in atmospheric chaos effects.
[0196] 2) Learning rate adjustment strategy: The ReLU callback function is used. When the validation loss does not improve for 5 consecutive epochs, the learning rate is automatically reduced to 0.5 times the original value. In the later stage, the low learning rate is finely adjusted to a physically feasible solution to avoid getting trapped in non-physical local optima.
[0197] (2) Dynamic adjustment of physical constraint strength.
[0198] To balance the model's fitting ability with physical consistency, this embodiment adopts a phased weighting strategy. During the rapid iteration phase after the model parameters are randomly initialized, the weights of the physical constraints are adjusted. The weights are uniformly set to 0.05, allowing the model to learn the statistical laws of temperature evolution through data-driven learning, avoiding strong physical constraints that suppress the fitting of complex nonlinear relationships (such as the unsteady characteristics of urban heat islands); once the model has learned the basic temperature field change patterns, the weights of the subsequent physical constraints will be adjusted. Setting it to 0.2 enhances physical constraints to correct statistical biases and improves the model's generalization ability in sparse data scenarios.
[0199] 7. Analysis of research results.
[0200] This embodiment relies on the GPU to train the model. By extracting the predicted and actual values of the heat map for the next three days, the comparison of the prediction results over the three days shows that the predicted field and the actual field are highly consistent in terms of large-scale thermal characteristics. At the same time, it clearly shows the coupling characteristics of the solar radiation latitudinal effect and the topographic thermal difference.
[0201] This embodiment further analyzes the spatial distribution of errors by extracting the differences between the predicted and actual values for the next three days. The deviations are mainly concentrated in the arid northwest, the forested northeast, and the land-sea boundary zone, with error ranges mostly within ±1℃. The positive deviation (predicted temperature higher) in the arid northwest reflects an over-response in the model's simulation of rapid surface warming under strong radiation on sunny days, suggesting that the intensity of radiation constraints may need localized adjustments for the arid region. The negative deviation (predicted temperature lower) in the southeast coastal area is related to insufficient simulation of the advection effect of complex wind fields under monsoon circulation; the gradient calculation using the finite difference approximation is insufficient to capture turbulent transport at the sub-grid scale. The localized patchy distribution of errors indicates that the spatial attention mechanism effectively focuses on areas with complex topography, but the 0.25° grid resolution still makes it difficult to include small- and medium-scale circulations such as valley winds and sea-land winds in the prediction considerations. For local small-scale anomalous weather systems, the model's identification and prediction capabilities remain weak.
[0202] Compared with the prior art, the technical solution of this embodiment has the following advantages:
[0203] The physically constrained ConvLSTM network architecture constructed in this embodiment achieves a systematic coupling between meteorological data-driven approaches and atmospheric physical laws by integrating multi-scale spatiotemporal features with dynamic physical mechanism constraints. In the spatial dimension, the model's regional-scale modeling error for 2m temperature in China and surrounding areas is stably controlled within 1℃, and the dynamic physical constraints significantly reduce the frequency of extreme deviations by 47%. In the temporal dimension, the model effectively suppresses the error accumulation effect in traditional multi-step forecasts, achieving a continuous convergence of the root mean square error (RMSE) of the 7-day medium-term forecast to within 1℃.
[0204] The proposed time-varying physical constraint weighting strategy establishes a dynamic balance between data fitting efficiency and physical interpretability, and constructs a closed-loop modeling framework of "spatiotemporal feature extraction - physical law embedding - prediction output", providing a new paradigm for 2m temperature medium-term forecasting that combines high accuracy and strong interpretability.
[0205] This embodiment demonstrates that the system integration of physical constraints and deep learning models can significantly enhance the physical consistency of models while improving the accuracy of 2-meter temperature mid-term forecasts, thus opening up innovative paths for interpretable intelligent forecasting of key meteorological variables.
[0206] Reference Figure 4 This application also provides a medium-term temperature prediction system based on physical constraints, which includes a data preprocessing unit 100 and a medium-term temperature prediction unit 200, wherein:
[0207] The data preprocessing unit 100 is used to preprocess the data in the historical dataset containing multiple variables to obtain preprocessed data. The multiple variables include the acquired 2m height temperature, total cloud cover, east-west wind speed component, north-south wind speed component, and net radiation flux.
[0208] The intermediate temperature prediction unit 200 is used to input preprocessed data into a trained intermediate temperature prediction model to perform intermediate temperature prediction and obtain the intermediate temperature prediction result. The trained intermediate temperature prediction model is obtained by training a physically constrained objective loss function and an augmented training dataset.
[0209] The preprocessed data is divided into sliding window segments. The input tensor corresponding to each variable after the sliding window segmentation is input to the ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable.
[0210] Remove redundant information from the spatiotemporal features corresponding to each variable to obtain the spatiotemporal features of each variable after removing redundant information.
[0211] The spatiotemporal features corresponding to all variables, after removing redundant information, are fused to obtain the fused features;
[0212] Mid-term temperature prediction is performed based on fusion features to obtain mid-term temperature prediction results.
[0213] It should be noted that since the medium-term temperature prediction system based on physical constraints in this embodiment is based on the same inventive concept as the medium-term temperature prediction method based on physical constraints described above, the corresponding content in the method embodiment is also applicable to this system embodiment, and will not be described in detail here.
[0214] Reference Figure 5 This application also provides an electronic device, which includes:
[0215] At least one memory;
[0216] At least one processor;
[0217] At least one program;
[0218] The program is stored in memory, and the processor executes at least one program to implement the physical constraint-based medium-term temperature prediction method described above in this disclosure.
[0219] This electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.
[0220] The electronic devices according to embodiments of this application will now be described in detail.
[0221] The processor 1600 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure.
[0222] The memory 1700 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1700 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1700 and is called and executed by the processor 1600 to execute the physically constrained mid-term temperature prediction method of the embodiments of this disclosure.
[0223] The input / output interface 1800 is used to implement information input and output.
[0224] The communication interface 1900 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0225] Bus 2000 transmits information between various components of the device (e.g., processor 1600, memory 1700, input / output interface 1800, and communication interface 1900);
[0226] The processor 1600, memory 1700, input / output interface 1800 and communication interface 1900 are connected to each other within the device via bus 2000.
[0227] This disclosure also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the above-described physical constraint-based intermediate temperature prediction method.
[0228] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0229] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by this disclosure are also applicable to similar technical problems.
[0230] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this disclosure, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0231] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0232] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0233] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0234] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0235] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0236] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0237] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0238] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. The embodiments of this application have been described in detail above with reference to the accompanying drawings, but this application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of this application.
Claims
1. A medium-term temperature prediction method based on physical constraints, characterized in that, The method includes: The data in the historical dataset containing multiple variables are preprocessed to obtain preprocessed data. The multiple variables include the temperature at 2m height, total cloud cover, east-west wind speed component, north-south wind speed component, and net radiation flux. The preprocessed data is input into a trained mid-term temperature prediction model to perform mid-term temperature prediction, thereby obtaining the mid-term temperature prediction result. The trained mid-term temperature prediction model is obtained by training a physically constrained objective loss function and an augmented training dataset, including: Calculate the theoretical temperature value based on the baseline temperature, the total cloud cover, and the net radiative flux; Based on the theoretical temperature value and the temperature at a height of 2m, a radiation balance constraint is constructed, including: ; Based on the current 2m altitude temperature, the previous time step's 2m altitude temperature, the east-west wind speed component, and the north-south wind speed component, a soil-atmosphere thermal coupling constraint is constructed, including: ; in, This indicates a radiation balance constraint. This indicates the temperature at a height of 2m. Indicates the base temperature. Indicates the radiation effect coefficient. This represents net radiative flux. Indicates total cloud cover. Indicates soil density, Indicates specific heat capacity. This indicates soil-atmosphere thermal coupling constraint. This indicates the temperature at a current height of 2 meters. This indicates the temperature at a height of 2 meters in the previous time step. This represents the east-west component of wind speed at a height of 10m. This indicates the temperature at a current height of 2m. Partial derivatives of the axis, This represents the north-south wind speed component at a height of 10m. This indicates the temperature at a current height of 2m. Partial derivatives of the axis, Indicates the time step. Take a positive integer. Represents the square of the norm; The total physical loss function is constructed by weighted summation of the radiation balance constraint and the soil-atmosphere thermal coupling constraint. The total physical loss function and the mean squared error loss function are added together to construct the target loss function; The mid-term temperature prediction model is trained using the target loss function to obtain the trained mid-term temperature prediction model; The preprocessed data is input into the trained mid-term temperature prediction model to perform mid-term temperature prediction, thereby obtaining the mid-term temperature prediction result. The preprocessed data is divided using a sliding window. The input tensor corresponding to each variable after the sliding window division is input to the ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable. Remove redundant information from the spatiotemporal features corresponding to each variable to obtain the spatiotemporal features of each variable after removing redundant information. The spatiotemporal features corresponding to all variables, after removing redundant information, are fused to obtain the fused features; Based on the fusion features, a mid-term temperature prediction is performed to obtain the mid-term temperature prediction result.
2. The medium-term temperature prediction method based on physical constraints according to claim 1, characterized in that, The process of preprocessing data from a historical dataset containing multiple variables to obtain preprocessed data includes: Missing values are imputed in the historical dataset to obtain the imputed data; The filled data is then normalized to obtain normalized data; The normalized data is then stitched together with the static land and sea mask data to obtain the preprocessed data.
3. The medium-term temperature prediction method based on physical constraints according to claim 1, characterized in that, The trained mid-term temperature prediction model is obtained by training a physically constrained objective loss function and an augmented training dataset, including: The data in the acquired training dataset is preprocessed to obtain the preprocessed training dataset; The input tensor corresponding to each variable in the preprocessed training dataset is randomly horizontally flipped to obtain a new tensor after random horizontal flipping. The input tensor corresponding to each variable in the preprocessed training dataset is randomly vertically flipped to obtain a new tensor after random vertical flipping. The input tensor corresponding to each variable in the preprocessed training dataset is randomly time-shifted to obtain a new tensor after random time shift. The new tensor after random horizontal flipping, the new tensor after random vertical flipping, and the new tensor after random time offset are added to the preprocessed training dataset to obtain the enhanced training dataset. The intermediate temperature prediction model is trained using a physically constrained objective loss function and the enhanced training dataset to obtain a well-trained intermediate temperature prediction model.
4. The medium-term temperature prediction method based on physical constraints according to claim 1, characterized in that, The calculation of the theoretical temperature value based on the base temperature, the total cloud cover, and the net radiative flux includes: Obtain soil density and specific heat capacity; The theoretical temperature value is calculated based on the base temperature, total cloud cover, net radiation flux, soil density, and specific heat capacity.
5. The medium-term temperature prediction method based on physical constraints according to claim 1, characterized in that, The process of constructing a radiation balance constraint based on the theoretical temperature value and the temperature at a height of 2m includes: The difference between the theoretical temperature value and the temperature at a height of 2m is calculated to obtain the difference result; The norm square of the difference result is solved to construct the radiation balance constraint.
6. A medium-term temperature prediction system based on physical constraints, characterized in that, The system includes: The data preprocessing unit is used to preprocess the data in the historical dataset containing multiple variables to obtain preprocessed data. The multiple variables include the acquired 2m height temperature, total cloud cover, east-west wind speed component, north-south wind speed component, and net radiation flux. A mid-term temperature prediction unit is used to input the preprocessed data into a trained mid-term temperature prediction model to perform mid-term temperature prediction and obtain the mid-term temperature prediction result. The trained mid-term temperature prediction model is obtained by training a physically constrained objective loss function and an augmented training dataset, and includes: Calculate the theoretical temperature value based on the baseline temperature, the total cloud cover, and the net radiative flux; Based on the theoretical temperature value and the temperature at a height of 2m, a radiation balance constraint is constructed, including: ; Based on the current 2m altitude temperature, the previous time step's 2m altitude temperature, the east-west wind speed component, and the north-south wind speed component, a soil-atmosphere thermal coupling constraint is constructed, including: ; in, This indicates a radiation balance constraint. This indicates the temperature at a height of 2m. Indicates the base temperature. Indicates the radiation effect coefficient. This represents net radiative flux. Indicates total cloud cover. Indicates soil density, Indicates specific heat capacity. This indicates soil-atmosphere thermal coupling constraint. This indicates the temperature at a current height of 2 meters. This indicates the temperature at a height of 2 meters in the previous time step. This represents the east-west component of wind speed at a height of 10m. This indicates the temperature at a current height of 2m. Partial derivatives of the axis, This represents the north-south wind speed component at a height of 10m. This indicates the temperature at a current height of 2m. Partial derivatives of the axis, Indicates the time step. Take a positive integer. Represents the square of the norm; The total physical loss function is constructed by weighted summation of the radiation balance constraint and the soil-atmosphere thermal coupling constraint. The total physical loss function and the mean squared error loss function are added together to construct the target loss function; The mid-term temperature prediction model is trained using the target loss function to obtain the trained mid-term temperature prediction model; The preprocessed data is input into the trained mid-term temperature prediction model to perform mid-term temperature prediction, thereby obtaining the mid-term temperature prediction result. The preprocessed data is divided using a sliding window. The input tensor corresponding to each variable after the sliding window division is input to the ConvLSTM2D layer through an independent channel to extract the spatiotemporal features corresponding to each variable. Remove redundant information from the spatiotemporal features corresponding to each variable to obtain the spatiotemporal features of each variable after removing redundant information. The spatiotemporal features corresponding to all variables, after removing redundant information, are fused to obtain the fused features; Based on the fusion features, a mid-term temperature prediction is performed to obtain the mid-term temperature prediction result.
7. An electronic device, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the physical constraint-based intermediate temperature prediction method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the physical constraint-based intermediate temperature prediction method as described in any one of claims 1 to 5.