The application discloses an improved short-term and
nowcasting precipitation prediction method using random masks and a
Transformer, and belongs to the field of
precipitation prediction. The improved short-term and
nowcasting precipitation prediction method using random masks and a
Transformer comprises the following steps: S1, constructing a random
mask spatiotemporal sequence image; S2, constructing a
network model, and inputting the spatiotemporal sequence image marked with the
mask into the network for model training; the
network model comprises an
encoder-decoder structure with a UNet as a core model, a SwinTransformer module is embedded in the
encoder, and an SE-Net attention mechanism is introduced; S3, in the model training process, a prediction value is obtained through a
forward propagation process of the input image, then the model is continuously fine-tuned according to a
loss function, the
loss function is minimized, and the accurate prediction capability of the model is realized; and S4, L1+L2 regularization is used in the training process to prevent
overfitting. The high-order non-stationarity in the modeling spatiotemporal sequence is improved, and the short-term and long-term dependence information in the spatiotemporal sequence is learned at the same time, so that the prediction accuracy of the model is improved.