A rainstorm prediction method, system, medium and device based on ST-Transformer

Through the ST-Transformer model combined with the multi-head spatiotemporal attention mechanism and the physical constraint fusion layer, the problem of data diversity and accuracy under complex terrain conditions in heavy rain prediction is solved, efficient heavy rain forecast is achieved, and scientific decision-making support is provided.

CN118467978BActive Publication Date: 2024-10-01NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410914219.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-01
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

It is difficult for existing technology to effectively consider multiple aspects of data and feature information in heavy rain prediction, resulting in insufficient accuracy and reliability of prediction results, especially under complex terrain conditions.

Method used

The heavy rain prediction method based on ST-Transformer is adopted, through the multi-head spatiotemporal attention mechanism, geographical information embedding layer and physical constraint fusion layer, combined with multi-source meteorological data, to construct spatiotemporal characteristics and physical laws, and improve the spatiotemporal resolution and physical consistency of the prediction. .

Benefits of technology

It improves the accuracy and reliability of heavy rain forecast, is suitable for all types of complex terrain conditions, provides scientific and reliable decision support, and provides effective prediction results for disaster prevention and reduction, urban management, agricultural production and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118467978B_ABST
    Figure CN118467978B_ABST
Patent Text Reader

Abstract

The present invention discloses a rainstorm prediction method, system, medium and equipment based on ST-Transformer in the field of meteorological forecast technology, aiming to solve the problem that the existing technology cannot meet the actual needs. It includes: collecting multi-source meteorological data sets; performing data preprocessing according to the multi-source meteorological data sets to obtain a processed data set; performing data encoding according to the processed data set to obtain an encoded data set; performing rainstorm prediction based on the trained and optimized rainstorm prediction model according to the encoded data set to obtain a prediction result. The present invention can effectively extract and utilize the spatiotemporal characteristics, geographical characteristics and physical laws in meteorological data, improve the spatiotemporal resolution, accuracy and physical consistency of rainstorm forecasts, and is suitable for rainstorm forecasts under various complex terrain conditions, providing scientific and reliable decision support for disaster prevention and mitigation, urban management, agricultural production and other fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of meteorological forecasting, and in particular to a ST-Transformer-based rainstorm prediction method, system, medium and equipment. Background Art

[0002] Heavy rain prediction is a complex issue, which is affected by many factors, including meteorological conditions, topography, urban environment, etc. The quality and diversity of data are very important for the accuracy and generalization ability of the model. With the impact of climate change and urban development, how to model and consider various data and feature information to continuously improve the accuracy and reliability of heavy rain prediction and respond to new challenges and changes is one of the current problems that need to be solved urgently. The accuracy and stability of the model also need to consider various data and feature information, and the reliability of its prediction results also needs to be fully verified and evaluated to cope with different meteorological conditions and geographical environments. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide a rainstorm prediction method, system, medium and equipment based on ST-Transformer, which is suitable for rainstorm prediction under various complex terrain conditions and improves the temporal and spatial resolution, accuracy and physical consistency of rainstorm forecasts.

[0004] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions:

[0005] In a first aspect, the present invention provides a rainstorm prediction method based on ST-Transformer, comprising:

[0006] Collect multi-source meteorological data sets;

[0007] Performing data preprocessing according to the multi-source meteorological data set to obtain a processed data set;

[0008] According to the processed data set, data encoding is performed to obtain an encoded data set;

[0009] According to the encoded data set, based on the trained and optimized rainstorm prediction model, rainstorm prediction is performed to obtain a prediction result;

[0010] The rainstorm prediction model is built based on the ST-Transformer model, including:

[0011] A spatiotemporal encoder with a multi-head spatiotemporal attention mechanism is used to capture the dynamic changes and spatial correlation of the spatiotemporal sequence in the model input to obtain spatiotemporal features;

[0012] The geographic information embedding layer is used to convert the geographic features in the model input into an embedding vector and deeply fuse it with the spatiotemporal features to obtain the geographic information embedding result;

[0013] The physical constraint fusion layer is used to combine the physical parameters related to atmospheric dynamics, thermodynamics and rainstorm formation as prior knowledge with the spatiotemporal characteristics to obtain the physical constraint fusion result;

[0014] An autoregressive decoder is used to predict the precipitation rate in the future period hour by hour based on the spatiotemporal characteristics, the geographic information embedding result and the physical constraint fusion result;

[0015] The training and optimization process of the rainstorm prediction model includes:

[0016] Construct multi-source meteorological training sets, validation sets, and test sets;

[0017] Constructing a rainstorm prediction model, performing model training on the rainstorm prediction model according to the training set, updating model parameters through back propagation and optimization algorithm, and obtaining a trained rainstorm prediction model;

[0018] Using the validation set to evaluate the model performance and adjust the hyperparameters of the trained rainstorm prediction model;

[0019] The test set is used to test the prediction effect of the trained rainstorm prediction model to obtain an optimized rainstorm prediction model.

[0020] Optionally, the multi-source meteorological data set is collected through sounding balloon observations, ground meteorological station observations, radar and satellite remote sensing, numerical model outputs, automatic weather station networks and new observation equipment.

[0021] Optionally, the multi-source meteorological data set includes atmospheric state parameters, water vapor conditions, dynamic conditions, thermal conditions, terrain effects and other relevant parameters;

[0022] The atmospheric state parameters include air pressure and temperature;

[0023] The water vapor conditions include water vapor content and water vapor transport information;

[0024] The dynamic conditions include wind field, ground wind speed and wind direction;

[0025] The thermal conditions include convective effective potential energy and potential temperature;

[0026] The terrain effects include terrain height, terrain slope and terrain obstacle index;

[0027] The other relevant parameters include cloud cover, cloud top temperature and atmospheric stability parameters.

[0028] Optionally, the data preprocessing includes the following steps:

[0029] The collected multi-source meteorological data sets are processed by removing outliers and filling missing values ​​to obtain a cleaned data set;

[0030] Calculating the weight of each indicator variable in the cleaned data set by using an entropy method, and adding the weight to the cleaned data set to obtain a preliminary processed data set;

[0031] The preliminary processed data set is organized into a three-dimensional array with a ground distance resolution of 500M and a height resolution of 500M. Each coordinate position corresponds to a virtual sensor node, and each virtual sensor node contains 16 environmental variables, which are ;

[0032] in, Indicates the air pressure in the atmospheric state parameters, Expressed as temperature in atmospheric state parameters, represents the water vapor content in the water vapor condition, represents the water vapor transport information in the water vapor conditions, represents the wind field in dynamic conditions, represents the surface wind speed in dynamic conditions, Indicates the wind direction in dynamic conditions, represents the effective potential energy of convection in the thermodynamic condition, represents the potential temperature in the thermal condition, Indicates the terrain height in terrain influence, represents the terrain slope in terrain influence, represents the terrain obstacle index in the terrain effect, Indicates the cloud cover among other related parameter values, represents the cloud top temperature among other related parameter values, represents the atmospheric stability parameter among other related parameter values, is the weight of each indicator variable determined by the entropy method;

[0033] Arrange the three-dimensional array in chronological order: for each virtual sensor node, the 16 environmental variable data Take every 15 minutes as a sample and obtain The data within the time range is obtained, m samples are obtained, and the processed data set is obtained, which is expressed as: .

[0034] Optionally, using the entropy method to calculate the weight of each indicator variable in the cleaned data set includes:

[0035] set up is the original data matrix of the cleaned data set, where the number of samples is , the number of evaluation indicators is , For the The sample The value of the indicator, , , the original data matrix expression is as follows:

[0036] ;

[0037] By analyzing the original data matrix The correlation between various indicators and rainstorm intensity is as follows: The evaluation indicators in are divided into two types: positive indicators and negative indicators;

[0038] For the original data matrix To standardize the Convert to unitless relative number , , get the standardized data matrix: is a positive indicator, then the relative ;like If it is a negative indicator, the relative ;

[0039] in, Represents the original data matrix Middle Samples under The data value of the indicator, Indicates The maximum data value of the indicator. Indicates The minimum data value of an indicator. Represents the first Samples under The data value of the indicator;

[0040] The standardized data matrix is ​​translated using the following formula to obtain a translated data matrix:

[0041] ;

[0042] in, Represents the first Samples under The data value of the indicator, Represents the first Samples under The data value of the indicator, Indicates the translation amplitude;

[0043] According to the translated data matrix, the first Samples under The proportion of indicators:

[0044] ;

[0045] in, Indicates Samples under The proportion of the indicators, Represents the first Samples under The data value of the indicator;

[0046] According to the said Samples under The proportion of the indicators is calculated by the following formula Entropy value of the indicator:

[0047] ;

[0048] in, Indicates The entropy value of the indicator, ;

[0049] According to The entropy value of the indicator is calculated by the following formula The coefficient of variation of the indicators is:

[0050] ;

[0051] in, Indicates The coefficient of variation of the indicators;

[0052] According to the difference coefficient of the jth indicator, the following formula is used to calculate the Weight of the indicator :

[0053] ;

[0054] in, For the The weight of the indicator.

[0055] Optionally, the data encoding includes:

[0056] According to the processed data set, the coordinates of each virtual sensor node in the three-dimensional space are encoded into a vector of a fixed length through continuous position encoding to obtain a spatial position encoding, and the spatial position encoding expression is: (num_coordinates, sequence_length, y), wherein num_coordinates represents the total number of coordinate points, sequence_length represents the time series length of each coordinate point, and y represents the dimension of the environmental parameter;

[0057] According to the processed data set, each environmental variable is normalized and encoded, and the environmental parameters of a single sample are merged into a vector to obtain an environmental variable vector. The environmental variable vector expression is: (num_coordinates, sequence_length, y + coordinate_encoding_dim), where coordinate_encoding_dim = row direction encoding dimension + column direction encoding dimension + layer direction encoding dimension, which represents the sum of the encoding dimensions in the three directions of ground distance, ground width and height;

[0058] The spatial position encoding is combined with the environmental variable vector of each time step to form a composite vector containing position information and environmental variables, and a data encoding data set is obtained. The data encoding data set expression is: (num_coordinates*sequence_length,y+coordinate_encoding_dim).

[0059] In a second aspect, the present invention provides a rainstorm prediction system based on ST-Transformer, comprising:

[0060] The multi-source meteorological data set acquisition module is used to: acquire multi-source meteorological data sets;

[0061] A data preprocessing module is used to: perform data preprocessing according to the multi-source meteorological data set to obtain a processed data set;

[0062] A data encoding module, used to: perform data encoding according to the processed data set to obtain an encoded data set;

[0063] A rainstorm prediction module is used to: perform rainstorm prediction based on the encoded data set and the trained and optimized rainstorm prediction model to obtain a prediction result;

[0064] The rainstorm prediction model is built based on the ST-Transformer model, including:

[0065] A spatiotemporal encoder with a multi-head spatiotemporal attention mechanism is used to capture the dynamic changes and spatial correlation of the spatiotemporal sequence in the model input to obtain spatiotemporal features;

[0066] The geographic information embedding layer is used to convert the geographic features in the model input into an embedding vector and deeply fuse it with the spatiotemporal features to obtain the geographic information embedding result;

[0067] A physical constraint fusion layer is used to combine the physical parameters related to atmospheric dynamics and thermodynamics as prior knowledge with the spatiotemporal characteristics to obtain a physical constraint fusion result;

[0068] An autoregressive decoder is used to predict the precipitation rate in the future period hour by hour based on the spatiotemporal characteristics, the geographic information embedding result and the physical constraint fusion result;

[0069] The training and optimization process of the rainstorm prediction model includes:

[0070] Construct multi-source meteorological training sets, validation sets, and test sets;

[0071] Constructing a rainstorm prediction model, performing model training on the rainstorm prediction model according to the training set, updating model parameters through back propagation and optimization algorithm, and obtaining a trained rainstorm prediction model;

[0072] Using the validation set to evaluate the model performance and adjust the hyperparameters of the trained rainstorm prediction model;

[0073] The test set is used to test the prediction effect of the trained rainstorm prediction model to obtain an optimized rainstorm prediction model.

[0074] In a third aspect, the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps of any one of the ST-Transformer-based rainstorm prediction methods described in the first aspect are implemented.

[0075] In a fourth aspect, the present invention provides a computer device / equipment / system, comprising:

[0076] Memory, for storing computer programs / instructions;

[0077] A processor is used to execute the computer program / instructions to implement the steps of the ST-Transformer-based rainstorm prediction method described in any one of the first aspects.

[0078] In a fifth aspect, the present invention provides a computer program product, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the steps of the ST-Transformer-based rainstorm prediction method described in any one of the first aspects are implemented.

[0079] Compared with the prior art, the present invention has the following beneficial effects:

[0080] 1. The ST-Transformer-based rainstorm prediction method provided by the present invention collects and cleans multi-source meteorological data sets, determines the weight of variables by the amount of information provided by each index value, objectively reflects the degree of influence of different indicators on the comprehensive evaluation results, and reduces the interference of human factors; introduces the ST-Transformer model, and combines geographic information fusion and physical constraint embedding to effectively extract and utilize the spatiotemporal characteristics, geographic characteristics and physical laws in meteorological data, improves the spatiotemporal resolution, accuracy and physical consistency of rainstorm forecasts, and is suitable for rainstorm forecasts under various complex terrain conditions, providing scientific and reliable decision-making support for disaster prevention and mitigation, urban management, agricultural production and other fields;

[0081] 2. The ST-Transformer-based rainstorm prediction system provided by the present invention realizes rainstorm prediction by setting a multi-source meteorological data set acquisition module, a data preprocessing module, a data encoding module and a rainstorm prediction module, which has practical significance and good application prospects;

[0082] 3. The computer-readable storage medium, computer device / equipment / system and computer program product provided by the present invention can execute the steps of the ST-Transformer-based rainstorm prediction method provided by the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 The following is a workflow diagram of a rainstorm prediction method based on ST-Transformer according to an embodiment of the present invention. DETAILED DESCRIPTION

[0084] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.

[0085] It should be noted that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0086] The present invention proposes a rainstorm prediction method, system, medium and equipment based on ST-Transformer, introduces the ST-Transformer model, makes full use of its powerful spatiotemporal series modeling capability, combines geographic information fusion and physical constraint embedding, effectively extracts and utilizes the spatiotemporal characteristics, geographic characteristics and physical laws in meteorological data, improves the spatiotemporal resolution, accuracy and physical consistency of rainstorm forecast, and is suitable for rainstorm forecast under various complex terrain conditions, providing scientific and reliable decision support for disaster prevention and mitigation, urban management, agricultural production and other fields.

[0087] Embodiment 1

[0088] The embodiment of the present invention discloses a rainstorm prediction method based on ST-Transformer, referring to Figure 1 As shown, the specific steps include:

[0089] S1, collects multi-source meteorological data sets;

[0090] S2, performing data preprocessing according to the multi-source meteorological data set to obtain a processed data set;

[0091] S3, performing data encoding according to the processed data set to obtain an encoded data set;

[0092] S4, performing heavy rain prediction according to the encoded data set and based on the trained and optimized heavy rain prediction model to obtain a prediction result.

[0093] Specifically,

[0094] In step S1, the system collects multi-source meteorological data of the target area in real time or at regular intervals, including but not limited to meteorological elements such as temperature, humidity, wind speed, wind direction, air pressure, cloud cover, precipitation rate, and geographical information such as topography, landforms, and surface characteristics. The area to be forecasted is located in the center of the target area to ensure that the acquired data can fully reflect the rainstorm formation environment in the area.

[0095] In this embodiment, the specific methods for collecting the multi-source meteorological data set include the following five methods:

[0096] Radiosonde observation and collection method: A radiosonde is carried by a radiosonde into the atmosphere, and transmits data on changes in meteorological parameters such as temperature, humidity, air pressure, wind direction and speed with altitude through radio signals; these data are used to draw a temperature-logarithmic pressure diagram (T-lnP diagram), from which unstable energy parameters such as convective effective potential energy (CAPE), lift index (LI), K index, pseudo-equivalent potential temperature (θse), convective condensation height (LCL), and characteristic layer heights such as 0℃ layer height and -20℃ layer height can be directly read or calculated.

[0097] Observation and collection method of ground meteorological stations: Ground meteorological stations regularly record ground meteorological elements such as air temperature, dew point temperature, wind speed and direction, and air pressure; these data are used to calculate the temperature difference and dew point difference from the ground to the middle and upper troposphere (such as 500hPa), and then derive unstable energy parameters such as the K index and Showalter instability index (SSI).

[0098] Radar and satellite remote sensing collection methods: Doppler weather radar detects the echo intensity, speed, spectral width and other information inside the cloud layer by transmitting and receiving microwave signals. It can estimate the vertical integrated liquid water content (VIL), echo top height, etc., and indirectly reflect the water vapor distribution and convection intensity in the atmosphere. Satellite cloud images observe the cloud top temperature, cloud top height, etc. through infrared, visible light and microwave channels. Combined with information such as cloud texture and cloud top cooling rate, it helps to identify cloud system characteristics that may produce heavy rain.

[0099] Numerical model output collection method: Numerical weather forecast models simulate global or regional atmospheric conditions by solving atmospheric dynamics and thermodynamics equations. Model output contains a large number of three-dimensional meteorological parameter fields, such as temperature, humidity, wind speed, wind direction, vertical velocity, etc. Forecasters or researchers can extract the required unstable energy parameters and characteristic layer height information from them.

[0100] Automatic weather station network and new observation equipment collection methods: Automatic weather stations, lightning location systems, wind profiler radars, lidar and other modern observation equipment provide meteorological data with high temporal and spatial resolution, which play an important role in the close monitoring and early warning of severe convective weather such as heavy rain; for example, wind profiler radar can measure vertical wind shear, and lidar can detect the internal structure of clouds and water vapor distribution.

[0101] In step S2, the collected meteorological data is subjected to preprocessing operations such as standardization, missing value filling, outlier detection and correction, and the geographic information is converted into a feature representation suitable for model input. In addition, the time series data is sliced ​​according to the specified time interval (such as hours and minutes) to construct a spatiotemporal data cube containing the historical period and the period to be forecasted; specifically, it includes:

[0102] Perform quality control on the data, remove outliers, fill in missing values, and perform necessary standardization or normalization to obtain a cleaned data set;

[0103] According to the cleaned data set, the weight of each indicator variable is calculated using the entropy method, and the weight is added to the cleaned data set as an additional feature to construct new sample data to obtain a preliminary processed data set;

[0104] The preliminary processed data set is sorted to establish a three-dimensional array of the forecast area with a ground distance resolution of 500 meters, a y-axis coordinate of 500 meters, and a height resolution of 500 meters. The preliminary processed data set is expanded into a three-dimensional array in the form of (ground distance resolution 500 meters, width resolution 500 meters, height resolution 500 meters). Let (A, B, C) be the representation of the three-dimensional array of prediction indicators. Each coordinate position (a, b, c) corresponds to a virtual sensor node, and each virtual sensor node contains 16 environmental variables. ,in Indicates the air pressure in the atmospheric state parameters, Expressed as temperature in atmospheric state parameters, represents the water vapor content in the water vapor condition, represents the water vapor transport information in the water vapor conditions, represents the wind field in dynamic conditions, represents the surface wind speed in dynamic conditions, Indicates the wind direction in dynamic conditions, represents the effective potential energy of convection in the thermodynamic condition, represents the potential temperature in the thermal condition, Indicates the terrain height in terrain influence, represents the terrain slope in terrain influence, represents the terrain obstacle index in the terrain effect, Indicates the cloud cover among other related parameter values, represents the cloud top temperature among other related parameter values, represents the atmospheric stability parameter among other related parameter values, is the weight of each indicator variable determined by the entropy method;

[0105] Arrange the three-dimensional array (A, B, C) in chronological order: for each virtual sensor node, the 16 environmental variable data Take every 15 minutes as a sample and obtain The data within the time range is obtained, m samples are obtained, and the processed data set is obtained, which is expressed as: .

[0106] Specifically, the entropy method is used to determine the weight of each input indicator variable. Based on the principle of information entropy, the weight of the variable is determined by the amount of information provided by each indicator value, objectively reflecting the influence of different indicators on the comprehensive evaluation results, reducing the interference of human factors, and measuring the indicator weight by entropy value, which fully reflects the structural relationship between indicators. The specific operation steps are as follows:

[0107] (1) Construct the original data matrix

[0108] set up is the original data matrix, is the number of samples, is the number of evaluation indicators, For the The sample The value of the indicator, , , construct the original data matrix as follows:

[0109] ;

[0110] (2) Defining indicator attributes

[0111] By defining the attributes of the indicators, the indicators are divided into two types: positive indicators and negative indicators. The positive and negative indicators are measured by analyzing the correlation between the indicators of the cleaned multi-source meteorological data set and the rainstorm intensity (precipitation intensity). The specific attributes are defined as follows:

[0112] The atmospheric state parameters: air pressure

[0113] The air flow on the surface is from bottom to top in the vertical direction. The central airflow rises, and there is a low pressure area near the ground. Rainfall will occur at this time, and the air pressure is defined as a negative indicator.

[0114] The atmospheric state parameters: temperature

[0115] When the temperature is high, the air can contain more water vapor, the greater the relative humidity, the more prevalent upward air currents are, and rainfall is more likely to form, so the temperature is defined as a positive indicator.

[0116] The water vapor conditions: water vapor content

[0117] Areas where water vapor content is concentrated and transported upward have more rainfall, while areas with lower water vapor content are less likely to experience rainfall. Water vapor content is defined as a positive indicator.

[0118] The water vapor conditions: water vapor transport information

[0119] Areas with large water vapor flux values ​​or large gradients are prone to rainfall, that is, areas where water vapor is easily transported have more rainfall, and areas where water vapor is not easily transported have less rainfall. Water vapor transport information is defined as a positive indicator.

[0120] The power condition: wind field

[0121] The wind field shows the distribution of wind in a certain area, including wind intensity and direction. It is divided into Class I, Class II and Class III wind fields according to wind speed. When there are more warm and humid air currents in the area and it is a Class I wind field, the probability of rainfall is higher, and the wind field is defined as a positive indicator.

[0122] The dynamic conditions: ground wind speed

[0123] Wind speed is the distance that air flows per unit time, and is usually expressed in wind levels. The denser the isobars, the greater the horizontal pressure gradient force, the smoother the underlying surface, the smaller the undulations, the smaller the friction, and the greater the wind speed. When there are more warm and humid air masses per unit time, the greater the possibility of precipitation. Wind speed is defined as a positive indicator.

[0124] The dynamic conditions: wind direction

[0125] The horizontal pressure gradient force is perpendicular to the isobars, and the wind direction points from high pressure to low pressure; the Coriolis force is always perpendicular to the wind direction and increases with increasing latitude; the friction force is always opposite to the wind direction, and together with the horizontal pressure gradient force and the Coriolis force, an acute angle is formed between the near-ground wind direction and the isobars. The windward shore is affected by the water vapor brought from the ocean by the wind belt, and there is more rainfall, while the wind on the leeward shore blows from the land to the ocean, the air is dry, and there is less rainfall, and the wind direction is defined as a positive indicator.

[0126] Thermodynamic conditions: Convective effective potential

[0127] Convective Available Potential Energy (CAPE) is widely used to quantify the instability of atmospheric stratification or the positive buoyancy that a lifted air parcel can have. Its unit is the number of joules per kilogram of air (J / Kg). Stronger CAPE often corresponds to stronger convection and rainfall, defining the convective available potential energy as a positive indicator.

[0128] ;

[0129] in, represents the free convection height, represents the equilibrium height, where the buoyancy is zero, Indicates the virtual temperature of the air mass, Indicates the virtual temperature of the environment. Represents standard gravity.

[0130] The thermal conditions:

[0131] Potential temperature is the potential temperature of an air parcel. It does not change with the change of the height or pressure of the air parcel, eliminating the influence of gas pressure at different heights. It is a conservative physical quantity. It is defined as follows:

[0132] ;

[0133] in, It is the standard atmospheric pressure, usually 1000hPa.

[0134] When the potential temperature decreases with increasing altitude, it means that the air is unstable and prone to precipitation.

[0135] The terrain affects: Terrain height

[0136] The various ups and downs presented by the fixed objects distributed above the surface of the earth. If there is sufficient water vapor and the mountain height is appropriate, the rising air flow will increase with the increase of altitude, the temperature will gradually drop, the water vapor in the air will gradually reach saturation, and then reach oversaturation, so that rainfall is formed. Based on this, the terrain height is defined as a positive indicator.

[0137] The terrain influence: terrain slope

[0138] The uplift of the windward slope of the mountain causes more rainfall, while the leeward slope causes less rainfall, and the terrain slope is a positive indicator.

[0139] The terrain impact: Terrain Obstacle Index

[0140] When warm, humid and unstable air currents encounter mechanical obstacles of mountain systems during their migration, they can easily cause air currents to rise, intensify convection, and thus form rainfall, defining the terrain obstacle coefficient as a positive indicator.

[0141] Other related parameters: Cloud cover

[0142] Different thicknesses of clouds produce different amounts of precipitation. Thick clouds contain more water and produce more precipitation, while thin clouds contain less water and are less likely to produce precipitation. Divide the visible sky into 10 equal parts, and then estimate the number of parts of the sky covered by clouds. When the cloud cover is less than 1, it is sunny, between 1-4, it is cloudy, and greater than 8 is overcast, so the cloud cover is a positive indicator.

[0143] Other related parameters: Cloud top temperature

[0144] The cloud top temperature is the average effective radiation temperature of the horizontal space area when a certain area is covered by clouds, which represents the top temperature of the highest cloud. The cloud top temperature of the high cloud layer is very low, the cloud layer is very thin, and the water content is small, so no rainfall will occur; the cloud top temperature of the middle cloud layer is relatively low, and the water content is not much, so it is difficult to produce rainfall. Based on the above situation, the cloud top temperature is defined as a positive indicator.

[0145] Other related parameters: Atmospheric stability parameters

[0146] Atmospheric stability refers to the stability of the entire layer of air. It is a thermodynamic property of the atmosphere that determines whether it accelerates, curbs, or does not affect the movement of air masses moving vertically in it. The k index is one of the physical quantities that represent atmospheric stability. The larger the index, the more unstable the atmospheric stratification, and the more prone it is to convection and rainfall. Therefore, the atmospheric stability parameter is defined as a positive indicator.

[0147] ;

[0148] in, is the temperature, is the dew point temperature, the subscript number is the isobaric surface, and the unit is °C. The formula contains 3 terms, among which represents the vertical lapse rate of temperature, represents the absolute humidity in the lower layer, Represents the saturation temperature of the middle layer.

[0149] (3) Data standardization

[0150] The original data matrix is ​​standardized. Convert to unitless relative number , the value is limited to [0,1] to eliminate the difference in the result caused by the dimension.

[0151] If it is a positive indicator, the relative Calculated by formula (1):

[0152] (1)

[0153] If it is a negative indicator, the relative Calculated by formula (2):

[0154] (2)

[0155] in, Represents the original data matrix Middle Samples under The data value of the indicator, , indicating the The maximum data value of the indicator. , indicating the The minimum data value of an indicator. Represents the first Samples under The data value of the indicator.

[0156] (4) Translation

[0157] When the data is standardized and has values ​​of 0 and 1, in order to ensure that the logarithm taken when calculating the entropy value is meaningful, the standardized data matrix is ​​translated using formula (3):

[0158] (3)

[0159] in, Represents the first Samples under The data value after the index is shifted. Represents the first Samples under The data value of the indicator, Indicates the translation amplitude;

[0160] (5) Calculate the Samples under The proportion of indicators

[0161] (4)

[0162] in, Indicates Samples under The proportion of the indicators, Represents the first Samples under The data value of the indicator;

[0163] (6) Calculate the Entropy value of each indicator

[0164] (5)

[0165] in, For the The entropy value of the index is hour, , the k value algorithm is shown in formula (6):

[0166] (6)

[0167] (7) Calculate the The coefficient of variation of the indicators

[0168] (7)

[0169] In the formula, Indicates The coefficient of variation of the indicators, The value of directly affects the size of the weight. The larger the difference coefficient, the smaller the weight.

[0170] (8) Calculate the Weight of the indicator

[0171] (8)

[0172] in, For the The weight of the indicator.

[0173] In step S3, the data encoding includes:

[0174] According to the processed data set, the coordinates (a, b, c) of each virtual sensor node in the three-dimensional space are encoded into a vector of a fixed length to obtain a spatial position encoding;

[0175] According to the processed data set, the environmental variables are encoded. If there are differences in dimensions or numerical ranges between the environmental variables, each environmental variable is standardized or normalized so that each variable is on the same scale, thereby obtaining an environmental variable vector;

[0176] Construct spatiotemporal sequence samples, merge the spatial position encoding with the environmental variable vector of each time step to form a composite vector containing position information and environmental variables, and obtain a data encoding data set. For each virtual sensor node, its time series sample set will be a series of such composite vectors.

[0177] In this embodiment, sinusoidal encoding is used for spatial position encoding to retain spatial position information; the environment variable encoding combines y environment parameters into a vector, and each parameter occupies one dimension.

[0178] The time series data of all coordinate points in the spatial position encoding are a three-dimensional tensor: (num_coordinates, sequence_length, y), where num_coordinates represents the total number of coordinate points, sequence_length represents the time series length of each coordinate point, that is, the number of historical data batches Z, and y represents the environmental parameter dimension.

[0179] The environmental variable encoding adjusts the length of the coordinate encoding vector through linear transformation to make it consistent with the length of the environmental parameter vector. The merged vector will be used as the input feature of each time step. Its shape is (num_coordinates, sequence_length, y+coordinate_encoding_dim), where num_coordinates represents the total number of coordinate points, sequence_length represents the time series length of each coordinate point, that is, the number of historical data batches Z, y represents the environmental parameter dimension, and coordinate_encoding_dim represents the sum of the total number of possible values ​​on the three coordinate axes of ground distance direction, ground width direction and height direction. The specific calculation method is as follows:

[0180] Ground distance direction: Each row has A collection points. Since each collection point is 500 meters apart, the row coordinate value can be 0, 500, 1000, ..., (A-1)*500 meters. Using One-hot encoding, each coordinate value requires A bits of binary representation, so the encoding dimension in the row direction is A;

[0181] Ground width direction: Similarly, each column has B collection points, and the coordinate values ​​in the column direction can be 0, 500, 1000, ..., (B-1)*500 meters. The encoding dimension in the column direction is B;

[0182] Height direction: Each layer has C collection points. The coordinate values ​​in the layer direction can be 0, 500, 1000, ..., (C-1)*500 meters. The encoding dimension in the layer direction is C.

[0183] Add the encoding dimensions in the three directions, coordinate_encoding_dim = row direction encoding dimension + column direction encoding dimension + layer direction encoding dimension = A+B+C.

[0184] Since the ST-Transformer model usually processes one-dimensional sequence data, the above three-dimensional tensor needs to be flattened into a tensor of shape (num_coordinates*sequence_length,y+coordinate_encoding_dim), where each sample (time step) contains coordinate encoding and environment parameter information.

[0185] In step S4, before building the rainstorm prediction model, we must first clarify the target data of the task output and define the rainstorm intensity (precipitation intensity), which mainly includes the following two parts:

[0186] (1) Hourly Maximum Rainfall: refers to the maximum precipitation in a certain period of time (such as 1 hour). Hourly Maximum Rainfall can reflect the most intense precipitation period during a rainstorm and is of great significance for assessing the risks of floods and geological disasters caused by short-term heavy rainfall.

[0187] (2) Rainfall Intensity: the amount of precipitation per unit time (such as minutes or hours), usually expressed in millimeters per hour (mm / h) or millimeters per minute (mm / min). The precipitation rate reflects the instantaneous intensity of precipitation. High precipitation rates are often associated with extreme rainstorm events.

[0188] After clarifying the target data, it is necessary to further clarify the input data of the model, including the following:

[0189] (1) Atmospheric state parameters: Air pressure, measured by barometers at ground meteorological stations, radiosondes or satellite remote sensing (such as GPS occultation observations); Temperature, the ground temperature is directly observed using thermometers at meteorological stations; the temperature of different layers in the troposphere is mainly obtained through radiosondes (balloons carrying temperature sensors) or satellite remote sensing (infrared radiation measurement).

[0190] (2) Water vapor conditions: Water vapor content. Ground relative humidity is measured by the hygrometer at the meteorological station. The water vapor content in the troposphere is mainly obtained through humidity sensors in radiosondes, satellite remote sensing (such as microwave radiometers to measure the total water vapor column in the atmosphere), or ground-based GPS water vapor monitoring stations. Water vapor transport is calculated using wind speed and humidity observation data from meteorological stations, radiosonde data, satellite remote sensing data, and atmospheric dynamics equations.

[0191] (3) Dynamic conditions: Wind field, ground wind speed and wind direction are measured by anemometers at meteorological stations; three-dimensional wind field mainly relies on radiosonde, wind profiler, satellite remote sensing (such as cloud top wind speed products) and numerical model output; vertical velocity, direct observation data mainly comes from radiosonde; it can also be estimated by measuring the radial velocity of precipitation particles through Doppler radar, or calculated through numerical model simulation.

[0192] (4) Thermal conditions: potential temperature and convective effective potential energy, which are calculated based on temperature, humidity and air pressure data from radiosonde or meteorological stations.

[0193] (5) Terrain influence: Terrain height and slope are obtained through topographic maps, digital elevation models (DEM) or satellite remote sensing data; terrain obstacle index is based on terrain height, slope and wind direction information, obtained by calculation or using preprocessed terrain data products.

[0194] (6) Other relevant parameters: cloud amount, obtained through visual observation at ground meteorological stations, satellite cloud images (visible light, infrared or microwave channels) or cloud radar; cloud top temperature, obtained through satellite infrared remote sensing (measuring the cloud top radiation temperature) or radar (such as ice crystal phase information inferred from dual-polarization radar measurements); atmospheric stability parameters, such as lifted index and K index, calculated based on temperature and humidity data from meteorological stations or radiosonde combined with atmospheric static stability theory.

[0195] ST-Transformer is a variant that extends the Transformer model to process spatiotemporal data. By introducing spatiotemporal dimensions, specific position encodings, and adaptive structural adjustments, it can effectively capture the complex dependencies in spatiotemporal data and demonstrate excellent prediction performance in related fields.

[0196] In this embodiment, the rainstorm prediction model is mainly constructed based on the ST-Transformer model; the model includes a spatiotemporal encoder, a geographic information fusion layer, a physical constraint embedding layer, and a prediction decoder; the spatiotemporal encoder uses a multi-head spatiotemporal attention mechanism to perform deep learning on the spatiotemporal data cube to capture the dynamic changes and spatial correlations in the spatiotemporal sequence. The geographic information fusion layer deeply integrates the preprocessed geographic information with the spatiotemporal features to enhance the influence of topography and surface characteristics on the formation of rainstorms. The physical constraint embedding layer embeds the atmospheric dynamics, thermodynamics principles, and relevant physical parameters of rainstorm formation (such as CAPE, PWV, K index, etc.) as prior knowledge into the model to guide the model to follow the actual physical laws. The prediction decoder uses an autoregressive mechanism to predict the probability and intensity of rainstorms in the future period hour by hour based on historical spatiotemporal characteristics and geographic and physical constraint information.

[0197] The rainstorm prediction model mainly includes the following parts:

[0198] Spatiotemporal encoder: Build a Transformer-based spatiotemporal encoder, including a multi-head spatiotemporal attention mechanism. The input is a preprocessed spatiotemporal data cube, including historical environmental parameters and historical precipitation rates. The spatiotemporal attention mechanism simultaneously considers the dependency between time steps and the correlation between spatial locations, capturing the spatiotemporal characteristics of precipitation rate evolution;

[0199] Geographic information embedding layer: Detailed geographic information (elevation, slope) is used to design a geographic information embedding layer, which converts geographic features into embedding vectors and fuses them with the output of the spatiotemporal encoder, taking into account the impact of terrain on precipitation rate;

[0200] Physical constraint fusion layer: Take the physical parameters related to atmospheric dynamics and thermodynamics (CAPE, K index) as additional inputs, and combine these prior knowledge with spatiotemporal characteristics through the physical constraint fusion layer to guide the model to follow the actual physical laws;

[0201] Decoder: An autoregressive decoder is used to predict the precipitation rate in the future period hour by hour based on the spatiotemporal features, geographic information embedding and physical constraint fusion results output by the encoder. The decoder only allows access to historical and current prediction results to ensure causal consistency of the prediction process.

[0202] In this embodiment, the training and optimization process of the rainstorm prediction model includes:

[0203] Construct multi-source meteorological training sets, validation sets, and test sets to ensure that the spatiotemporal data cube remains continuous in time series and avoid information leakage;

[0204] Constructing a rainstorm prediction model, training the rainstorm prediction model according to the training set, updating the model parameters through back propagation and optimization algorithm (Adam), using mean square error (MSE) or root mean square error (RMSE) as the loss function, measuring the difference between the precipitation rate predicted by the model and the actual observed value, and obtaining a trained rainstorm prediction model;

[0205] Using the validation set to evaluate the model performance and adjust hyperparameters of the trained rainstorm prediction model, such as learning rate, batch size, model depth, etc., to ensure the generalization ability of the model;

[0206] The test set is used to further test the prediction effect of the trained rainstorm prediction model to obtain an optimized rainstorm prediction model.

[0207] When predicting heavy rain, the encoded data set is first input into the trained and optimized ST-Transformer model. The model outputs the probability distribution map of heavy rain in the forecast area within the specified forecast time and the intensity prediction map. The probability distribution map reflects the possibility of heavy rain at different time points and different spatial locations, and the intensity prediction map depicts the areas where heavy rain may occur in the future period and their expected precipitation intensity.

[0208] In this embodiment, the given environmental parameter data (including current time and historical data) are organized into a spatiotemporal data cube according to the preprocessing steps and input into the ST-Transformer model; the model outputs a precipitation rate prediction sequence for future time periods (such as the next few hours), including the precipitation rate prediction value for each time step; the trained ST-Transformer model can be deployed to the actual business system to provide real-time or short-term precipitation rate forecast support for meteorological services, disaster warning, water resources management, etc.

[0209] Embodiment 2

[0210] Based on the same inventive concept as the first embodiment, the embodiment of the present invention discloses a rainstorm prediction system based on ST-Transformer, which specifically includes:

[0211] The multi-source meteorological data set acquisition module is used to: acquire multi-source meteorological data sets;

[0212] A data preprocessing module is used to: perform data preprocessing according to the multi-source meteorological data set to obtain a processed data set;

[0213] A data encoding module, used to: perform data encoding according to the processed data set to obtain an encoded data set;

[0214] A rainstorm prediction module is used to: perform rainstorm prediction based on the encoded data set and the trained and optimized rainstorm prediction model to obtain a prediction result;

[0215] The rainstorm prediction model is built based on the ST-Transformer model, including:

[0216] A spatiotemporal encoder with a multi-head spatiotemporal attention mechanism is used to capture the dynamic changes and spatial correlation of the spatiotemporal sequence in the model input to obtain spatiotemporal features;

[0217] The geographic information embedding layer is used to convert the geographic features in the model input into an embedding vector and deeply fuse it with the spatiotemporal features to obtain the geographic information embedding result;

[0218] A physical constraint fusion layer is used to combine the physical parameters related to atmospheric dynamics and thermodynamics as prior knowledge with the spatiotemporal characteristics to obtain a physical constraint fusion result;

[0219] An autoregressive decoder is used to predict the precipitation rate in the future period hour by hour based on the spatiotemporal characteristics, the geographic information embedding result and the physical constraint fusion result;

[0220] The training and optimization process of the rainstorm prediction model includes:

[0221] Construct multi-source meteorological training sets, validation sets, and test sets;

[0222] Constructing a rainstorm prediction model, performing model training on the rainstorm prediction model according to the training set, updating model parameters through back propagation and optimization algorithm, and obtaining a trained rainstorm prediction model;

[0223] Using the validation set to evaluate the model performance and adjust the hyperparameters of the trained rainstorm prediction model;

[0224] The test set is used to test the prediction effect of the trained rainstorm prediction model to obtain an optimized rainstorm prediction model.

[0225] The specific functional implementation of each of the above modules can be found in the relevant content of the method in Example 1 and will not be elaborated here.

[0226] Embodiment 3

[0227] This embodiment provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps of the ST-Transformer-based rainstorm prediction method as described in any one of the first embodiments are implemented.

[0228] Embodiment 4

[0229] This embodiment provides a computer device / equipment / system, including:

[0230] Memory, for storing computer programs / instructions;

[0231] A processor is used to execute the computer program / instructions to implement the steps of the ST-Transformer-based rainstorm prediction method as described in any one of the first embodiments.

[0232] Embodiment 5

[0233] This embodiment provides a computer program product, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the steps of the ST-Transformer-based rainstorm prediction method as described in any one of the first embodiments are implemented.

[0234] In summary, the ST-Transformer-based rainstorm prediction method, system, medium and device provided by the present invention have the following beneficial effects:

[0235] 1. By introducing the ST-Transformer model, making full use of its powerful spatiotemporal sequence modeling capabilities, combining geographic information fusion and physical constraint embedding, the spatiotemporal characteristics, geographic characteristics and physical laws in meteorological data are effectively extracted and utilized, thus improving the spatiotemporal resolution, accuracy and physical consistency of heavy rain forecasts;

[0236] 2. This method is applicable to rainstorm prediction under various complex terrain conditions, and provides scientific and reliable decision-making support for disaster prevention and mitigation, urban management, agricultural production and other fields;

[0237] 3. The present invention can be implemented by pure software or hardware.

[0238] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0239] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0240] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0241] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0242] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A rainstorm prediction method based on ST-Transformer, characterized in that: include: Collect multi-source meteorological data sets; Performing data preprocessing according to the multi-source meteorological data set to obtain a processed data set; According to the processed data set, data encoding is performed to obtain an encoded data set; According to the encoded data set, based on the trained and optimized rainstorm prediction model, rainstorm prediction is performed to obtain a prediction result; The rainstorm prediction model is built based on the ST-Transformer model, including: A spatiotemporal encoder with a multi-head spatiotemporal attention mechanism is used to capture the dynamic changes and spatial correlation of the spatiotemporal sequence in the model input to obtain spatiotemporal features; The geographic information embedding layer is used to convert the geographic features in the model input into an embedding vector and deeply fuse it with the spatiotemporal features to obtain the geographic information embedding result; The physical constraint fusion layer is used to combine the physical parameters related to atmospheric dynamics, thermodynamics and rainstorm formation as prior knowledge with the spatiotemporal characteristics to obtain the physical constraint fusion result; An autoregressive decoder is used to predict the precipitation rate in the future period hour by hour based on the spatiotemporal characteristics, the geographic information embedding result and the physical constraint fusion result; The training and optimization process of the rainstorm prediction model includes: Construct multi-source meteorological training sets, validation sets, and test sets; Constructing a rainstorm prediction model, performing model training on the rainstorm prediction model according to the training set, updating model parameters through back propagation and optimization algorithm, and obtaining a trained rainstorm prediction model; Using the validation set to evaluate the model performance and adjust the hyperparameters of the trained rainstorm prediction model; Using the test set to test the prediction effect of the trained rainstorm prediction model to obtain an optimized rainstorm prediction model; The data preprocessing comprises the following steps: The collected multi-source meteorological data sets are processed by removing outliers and filling missing values ​​to obtain a cleaned data set; Calculating the weight of each indicator variable in the cleaned data set by using an entropy method, and adding the weight to the cleaned data set to obtain a preliminary processed data set; The preliminary processed data set is organized into a three-dimensional array with a ground distance resolution of 500M and a height resolution of 500M. Each coordinate position corresponds to a virtual sensor node, and each virtual sensor node contains 16 environmental variables, which are ; in, Indicates the air pressure in the atmospheric state parameters, Expressed as temperature in atmospheric state parameters, represents the water vapor content in the water vapor condition, represents the water vapor transport information in the water vapor conditions, represents the wind field in dynamic conditions, represents the surface wind speed in dynamic conditions, Indicates the wind direction in dynamic conditions, represents the effective potential energy of convection in the thermodynamic condition, represents the potential temperature in the thermal condition, Indicates the terrain height in terrain influence, represents the terrain slope in terrain influence, Represents the terrain obstacle index in the terrain effect, Indicates the cloud cover among other related parameter values, represents the cloud top temperature among other related parameter values, represents the atmospheric stability parameter among other related parameter values, is the weight of each indicator variable determined by the entropy method; Arrange the three-dimensional array in chronological order: for each virtual sensor node, the 16 environmental variable data Take every 15 minutes as a sample and obtain The data within the time range is obtained, m samples are obtained, and the processed data set is obtained, which is expressed as: ; The entropy method is used to calculate the weight of each indicator variable in the cleaned data set, including: set up is the original data matrix of the cleaned data set, where the number of samples is , the number of evaluation indicators is , For the The sample The value of the indicator, , , the original data matrix expression is as follows: ; By analyzing the original data matrix The correlation between various indicators and rainstorm intensity is as follows: The evaluation indicators in are divided into two types: positive indicators and negative indicators; For the original data matrix To standardize the Convert to unitless relative number , , get the standardized data matrix: is a positive indicator, then the relative ;like If it is a negative indicator, the relative ; in, Represents the original data matrix Middle Sample The data value of the indicator, Indicates The maximum data value of the indicator. Indicates The minimum data value of an indicator. Represents the first Sample The data value of the indicator; The standardized data matrix is ​​translated using the following formula to obtain a translated data matrix: ; in, Represents the first Sample The data value of the indicator, Represents the first Sample The data value of the indicator, Indicates the translation amplitude; According to the translated data matrix, the first Sample The proportion of indicators: ; in, Indicates Samples under The proportion of the indicators, Represents the first Samples under The data value of the indicator; According to the said Samples under The proportion of the indicators is calculated by the following formula Entropy value of the indicator: ; in, Indicates The entropy value of the indicator, ; According to The entropy value of the indicator is calculated by the following formula The coefficient of variation of the indicators is: ; in, Indicates The coefficient of variation of the indicators; According to the difference coefficient of the jth indicator, the following formula is used to calculate the The weight of the indicator : ; in, For the The weight of each indicator; The data encoding includes: According to the processed data set, the coordinates of each virtual sensor node in the three-dimensional space are encoded into a vector of a fixed length through continuous position encoding to obtain a spatial position encoding, and the spatial position encoding expression is: (num_coordinates, sequence_length, y), wherein num_coordinates represents the total number of coordinate points, sequence_length represents the time series length of each coordinate point, and y represents the dimension of the environmental parameter; According to the processed data set, each environmental variable is normalized and encoded, and the environmental parameters of a single sample are merged into a vector to obtain an environmental variable vector. The environmental variable vector expression is: (num_coordinates, sequence_length, y + coordinate_encoding_dim), where coordinate_encoding_dim = row direction encoding dimension + column direction encoding dimension + layer direction encoding dimension, which represents the sum of the encoding dimensions in the three directions of ground distance, ground width and height; The spatial position encoding is combined with the environmental variable vector of each time step to form a composite vector containing position information and environmental variables, and a data encoding data set is obtained. The data encoding data set expression is: (num_coordinates*sequence_length,y+coordinate_encoding_dim).

2. The ST-Transformer-based rainstorm prediction method according to claim 1, characterized in that: The multi-source meteorological datasets are collected through sounding balloon observations, ground-based meteorological station observations, radar and satellite remote sensing, numerical model outputs, automatic weather station networks and new observation equipment.

3. The ST-Transformer-based rainstorm prediction method according to claim 1, characterized in that: The multi-source meteorological data set includes atmospheric state parameters, water vapor conditions, dynamic conditions, thermal conditions, terrain effects and other related parameters; The atmospheric state parameters include air pressure and temperature; The water vapor conditions include water vapor content and water vapor transport information; The dynamic conditions include wind field, ground wind speed and wind direction; The thermal conditions include convective effective potential energy and potential temperature; The terrain effects include terrain height, terrain slope and terrain obstacle index; The other relevant parameters include cloud cover, cloud top temperature and atmospheric stability parameters.

4. A rainstorm prediction system based on ST-Transformer, characterized in that: include: The multi-source meteorological data set acquisition module is used to: acquire multi-source meteorological data sets; A data preprocessing module is used to: perform data preprocessing according to the multi-source meteorological data set to obtain a processed data set; A data encoding module, used to: perform data encoding according to the processed data set to obtain an encoded data set; A rainstorm prediction module is used to: perform rainstorm prediction based on the encoded data set and the trained and optimized rainstorm prediction model to obtain a prediction result; The rainstorm prediction model is built based on the ST-Transformer model, including: A spatiotemporal encoder with a multi-head spatiotemporal attention mechanism is used to capture the dynamic changes and spatial correlation of the spatiotemporal sequence in the model input to obtain spatiotemporal features; The geographic information embedding layer is used to convert the geographic features in the model input into an embedding vector and deeply fuse it with the spatiotemporal features to obtain the geographic information embedding result; A physical constraint fusion layer is used to combine the physical parameters related to atmospheric dynamics and thermodynamics as prior knowledge with the spatiotemporal characteristics to obtain a physical constraint fusion result; An autoregressive decoder is used to predict the precipitation rate in the future period hour by hour based on the spatiotemporal characteristics, the geographic information embedding result and the physical constraint fusion result; The training and optimization process of the rainstorm prediction model includes: Construct multi-source meteorological training sets, validation sets, and test sets; Constructing a rainstorm prediction model, performing model training on the rainstorm prediction model according to the training set, updating model parameters through back propagation and optimization algorithm, and obtaining a trained rainstorm prediction model; Using the validation set to evaluate the model performance and adjust the hyperparameters of the trained rainstorm prediction model; Using the test set to test the prediction effect of the trained rainstorm prediction model to obtain an optimized rainstorm prediction model; The data preprocessing comprises the following steps: The collected multi-source meteorological data sets are processed by removing outliers and filling missing values ​​to obtain a cleaned data set; Calculating the weight of each indicator variable in the cleaned data set by using an entropy method, and adding the weight to the cleaned data set to obtain a preliminary processed data set; The preliminary processed data set is organized into a three-dimensional array with a ground distance resolution of 500M and a height resolution of 500M. Each coordinate position corresponds to a virtual sensor node, and each virtual sensor node contains 16 environmental variables, which are ; in, Indicates the air pressure in the atmospheric state parameters, Expressed as temperature in atmospheric state parameters, represents the water vapor content in the water vapor condition, represents the water vapor transport information in the water vapor conditions, represents the wind field in dynamic conditions, represents the surface wind speed in dynamic conditions, Indicates the wind direction in dynamic conditions, represents the effective potential energy of convection in the thermodynamic condition, represents the potential temperature in the thermal condition, Indicates the terrain height in terrain influence, represents the terrain slope in terrain influence, Represents the terrain obstacle index in the terrain effect, Indicates the cloud cover among other related parameter values, represents the cloud top temperature among other related parameter values, represents the atmospheric stability parameter among other related parameter values, is the weight of each indicator variable determined by the entropy method; Arrange the three-dimensional array in chronological order: for each virtual sensor node, the 16 environmental variable data Take every 15 minutes as a sample and obtain The data within the time range is obtained, m samples are obtained, and the processed data set is obtained, which is expressed as: ; The entropy method is used to calculate the weight of each indicator variable in the cleaned data set, including: set up is the original data matrix of the cleaned data set, where the number of samples is , the number of evaluation indicators is , For the The sample The value of the indicator, , , the original data matrix expression is as follows: ; By analyzing the original data matrix The correlation between various indicators and rainstorm intensity is as follows: The evaluation indicators in are divided into two types: positive indicators and negative indicators; For the original data matrix To standardize the Convert to unitless relative number , , get the standardized data matrix: is a positive indicator, then the relative ;like If it is a negative indicator, the relative ; in, Represents the original data matrix Middle Sample The data value of the indicator, Indicates The maximum data value of the indicator. Indicates The minimum data value of an indicator. Represents the first Sample The data value of the indicator; The standardized data matrix is ​​translated using the following formula to obtain a translated data matrix: ; in, Represents the first Samples under The data value of the indicator, Represents the first Samples under The data value of the indicator, Indicates the translation amplitude; According to the translated data matrix, the first Sample The proportion of indicators: ; in, Indicates Samples under The proportion of the indicators, Represents the first Samples under The data value of the indicator; According to the said Sample The proportion of the indicators is calculated by the following formula Entropy value of the indicator: ; in, Indicates The entropy value of the indicator, ; According to The entropy value of the indicator is calculated by the following formula The coefficient of variation of the indicators is: ; in, Indicates The coefficient of variation of the indicators; According to the difference coefficient of the jth indicator, the following formula is used to calculate the The weight of the indicator : ; in, For the The weight of each indicator; The data encoding includes: According to the processed data set, the coordinates of each virtual sensor node in the three-dimensional space are encoded into a vector of a fixed length through continuous position encoding to obtain a spatial position encoding, and the spatial position encoding expression is: (num_coordinates, sequence_length, y), wherein num_coordinates represents the total number of coordinate points, sequence_length represents the time series length of each coordinate point, and y represents the dimension of the environmental parameter; According to the processed data set, each environmental variable is normalized and encoded, and the environmental parameters of a single sample are merged into a vector to obtain an environmental variable vector. The environmental variable vector expression is: (num_coordinates, sequence_length, y + coordinate_encoding_dim), where coordinate_encoding_dim = row direction encoding dimension + column direction encoding dimension + layer direction encoding dimension, which represents the sum of the encoding dimensions in the three directions of ground distance, ground width and height; The spatial position encoding is combined with the environmental variable vector of each time step to form a composite vector containing position information and environmental variables, and a data encoding data set is obtained. The data encoding data set expression is: (num_coordinates*sequence_length,y+coordinate_encoding_dim).

5. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the ST-Transformer-based rainstorm prediction method described in any one of claims 1 to 3 are implemented.

6. A computer device / equipment / system, characterized in that: include: Memory, for storing computer programs / instructions; A processor, configured to execute the computer program / instructions to implement the steps of the ST-Transformer-based rainstorm prediction method described in any one of claims 1 to 3.

7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the ST-Transformer-based rainstorm prediction method described in any one of claims 1 to 3 are implemented.