A training method and device of a prediction model, an electronic device, and a storage medium

CN122548290APending Publication Date: 2026-08-11STATE GRID HUNAN ELECTRIC COMPANY DISASTER PREVENTION & REDUCTION CENT +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-23
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]为了解决上述技术问题,本申请提供了一种预测模型的训练方法、装置、电子设备及存储介质,以解决对冻雨天气预测结果存在较大偏差的问题

Benefits of technology

本实施例提供的预测模型的训练方法,可以通过多源冻雨数据融合、时空联合特征学习、物理注意力加权融合、空间特征增强及多约束损失优化,构建冻雨概率预测模型。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122548290A_ABST
    Figure CN122548290A_ABST
Patent Text Reader

Abstract

This application relates to the field of model training technology, and in particular to a method, apparatus, electronic device, and storage medium for training a prediction model. The method includes: acquiring multi-source freezing rain data and real-world freezing rain labels for each of multiple sample regions; and iteratively calculating the model using a spatiotemporal feature extraction network, a physical attention module, a spatial feature enhancement network, a prediction output layer, and a loss function value, until the loss function value meets a preset condition, thereby obtaining a freezing rain probability prediction model. This freezing rain probability prediction model is used to predict the probability of freezing rain occurring. This application can solve the problem of significant deviations in freezing rain weather prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of model training technology, and in particular to a method, apparatus, electronic device and storage medium for training a prediction model. Background Technology

[0002] Ice accumulation on power lines caused by freezing rain in winter is a major threat to the safe operation of the power grid. Accurate short-term forecasting of extreme freezing rain events is an urgent need for power grid icing early warning and disaster prevention and mitigation.

[0003] In related technologies, traditional numerical weather prediction models rely on solving physical equations. By coupling equations of thermodynamics, kinetics, and mass conservation, and combining them with parameterization schemes, they simulate atmospheric physical processes to predict freezing rain. However, for small-scale, highly localized extreme weather events like freezing rain, traditional parameterization schemes struggle to accurately characterize the fine physical mechanisms of its formation and evolution, easily leading to significant deviations in freezing rain weather predictions. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a method, apparatus, electronic device, and storage medium for training a prediction model, thereby resolving the issue of significant deviations in predictions of freezing rain weather.

[0005] Firstly, this application provides a training method for a prediction model. This method includes: acquiring multi-source freezing rain data and real-time freezing rain labels for each of multiple sample areas; the multi-source freezing rain data indicates the meteorological environment, atmospheric state, and spatiotemporal variation characteristics related to freezing rain within each sample area; and the real-time freezing rain labels indicate whether freezing rain has occurred in each sample area. During the current iterative calculation, the multi-source freezing rain data is input into a pre-constructed spatiotemporal feature extraction network within a pre-built model framework for spatiotemporal joint feature learning to obtain the original backbone features. The model framework also includes a physical attention module, a spatial feature enhancement network, and a prediction output layer. The current iterative calculation process is any one of multiple iterative calculations of the model framework. The original backbone features are input into the physical attention module to learn the physical attention weights of each physical factor among multiple physical factors related to the freezing rain formation mechanism, and the original backbone features are weighted and fused using the physical attention weights to obtain weighted backbone features.

[0006] The weighted backbone features are input into the spatial feature enhancement network to obtain deep spatial enhancement features, which are used to indicate the spatial correlation features and fine-grained spatial features between multiple sample regions. The deep spatial enhancement features are input into the prediction output layer to output the freezing rain probability of each sample region. The loss function value of the model framework is calculated based on the freezing rain probability and the true freezing rain label. During multiple iterations, when the loss function value meets the preset conditions, the freezing rain probability prediction model is obtained, which is used to predict the probability of freezing rain.

[0007] In some optional implementations, in scenarios where the complexity of the freezing rain process in multiple sample regions is less than or equal to a first value and exhibits a local temporal pattern, the spatiotemporal feature extraction network is a deep residual channel weighted network; or, in scenarios where the complexity of the freezing rain process in multiple sample regions is greater than the first value and less than or equal to a second value, and involves changes in atmospheric vertical structure, the spatiotemporal feature extraction network is a vertically perceptive temporal convolutional network; or, in scenarios where the complexity of the freezing rain process in multiple sample regions is greater than the second value and there is a global temporal dependency, the spatiotemporal feature extraction network is a multi-head self-attention temporal network.

[0008] In some optional implementations, multiple physical factors include supercooled water layer, ice-water cloud state, temperature inversion layer, and regional topographic prior. The original core features are input into a physical attention module to learn the physical attention weight of each physical factor among the multiple physical factors related to the freezing rain formation mechanism. This includes: performing supercooled water layer detection, ice-water cloud state detection, temperature inversion layer detection, and regional prior analysis on the original core features to obtain supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results. Each detection result and analysis result represents the contribution of the corresponding physical factor to freezing rain formation. The weight coefficients corresponding to the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results are obtained. Based on the weight coefficients, the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results are fused and weighted to obtain the physical attention weights corresponding to the supercooled water layer, ice-water cloud state, temperature inversion layer, and regional topographic prior.

[0009] In some optional implementations, the physical attention module integrates a dynamic weight predictor; the dynamic weight predictor sequentially includes a global average pooling operation unit, a first fully connected layer, an activation function unit, a second fully connected layer, and a soft maximization function; it obtains the weight coefficients corresponding to the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results, including: using the global average pooling operation unit to perform a global average pooling operation on the original backbone features, aggregating the global information of each channel to obtain the pooling result; after the pooling result is linearly mapped by the first fully connected layer, nonlinearly transformed by the activation function unit, and feature adjusted by the second fully connected layer, it is normalized by the soft maximization function to obtain the weight coefficients corresponding to the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results in probability distribution form.

[0010] In some optional implementations, the weighted backbone features correspond to the number of channels in the first channel. The weighted backbone features are input into a spatial feature enhancement network to obtain deep spatial enhancement features, including: performing convolutional mapping on the weighted backbone features in the first channel to obtain an initial feature map, which corresponds to the number of channels in the second channel, which is less than the number of channels in the first channel; sequentially performing convolutional operations, normalization, and nonlinear transformations on the initial feature map to obtain additional features; and fusing the additional features and the weighted backbone features using skip connections to obtain deep spatial enhancement features.

[0011] In some optional implementations, the loss function value of the model framework is calculated based on the freezing rain probability and the true freezing rain label, including: determining the class balance loss value of the model framework based on the spatial distribution information of the freezing rain probability; determining multiple predicted freezing rain areas in multiple sample areas based on the freezing rain probability, and determining the regional overlap loss value of the model framework according to the spatial overlap between the multiple predicted freezing rain areas and the multiple true freezing rain areas, with the true freezing rain label of each true freezing rain area being a preset label; determining the freezing rain classification result of each grid based on the freezing rain probability of each grid, and determining the grid-by-grid deviation between the freezing rain classification result and the true freezing rain label according to the freezing rain classification result and the true freezing rain label of each grid, and determining the basic classification loss value of the model framework, with each grid being a grid within each sample area; determining the physical constraint loss value of the model framework based on the freezing rain probability and the corresponding inversion intensity of each sample area; and calculating the loss function value of the model framework based on the class balance loss value, the regional overlap loss value, the basic classification loss value, and the physical constraint loss value.

[0012] In some optional implementations, during multiple iterations of calculation, when the loss function value meets a preset condition, a freezing rain probability prediction model is obtained, including: during multiple iterations of calculation, when the loss function value is less than a first loss value, or when the difference between the loss function value calculated in the current iteration and the loss function value calculated in the previous iteration is less than a second loss value, it is determined that the loss function value meets the preset condition, and a freezing rain probability prediction model is obtained. In some optional implementations, the method further includes: acquiring multi-source freezing rain data of the target area; inputting the multi-source freezing rain data of the target area into a freezing rain probability prediction model, and outputting the probability of freezing rain occurring in the target area.

[0013] Secondly, this application provides a training device for a prediction model, which includes: an acquisition module for acquiring multi-source freezing rain data and real freezing rain labels for each of multiple sample areas. The training module, during the current iteration, inputs multi-source freezing rain data into the spatiotemporal feature extraction network within the pre-built model framework for joint spatiotemporal feature learning, obtaining the original backbone features. The model framework also includes a physical attention module, a spatial feature enhancement network, and a prediction output layer. The current iteration is any one of multiple iterations of the model framework. The original backbone features are input into the physical attention module to learn the physical attention weights of each physical factor among multiple physical factors related to the freezing rain formation mechanism, and the original backbone features are weighted and fused using these physical attention weights to obtain weighted backbone features. The weighted backbone features are then input into the spatial feature enhancement network to obtain deep spatial enhancement features, which are used to indicate the spatial correlation features and fine-grained spatial features between multiple sample regions. The deep spatial enhancement features are input into the prediction output layer to output the freezing rain probability for each sample region. The loss function value of the model framework is calculated based on the freezing rain probability and the true freezing rain label. During multiple iterations, when the loss function value meets preset conditions, a freezing rain probability prediction model is obtained, which is used to predict the probability of freezing rain occurring.

[0014] In some optional implementations, in scenarios where the complexity of the freezing rain process in multiple sample regions is less than or equal to a first value and exhibits a local temporal pattern, the spatiotemporal feature extraction network is a deep residual channel weighted network; or, in scenarios where the complexity of the freezing rain process in multiple sample regions is greater than the first value and less than or equal to a second value, and involves changes in atmospheric vertical structure, the spatiotemporal feature extraction network is a vertically perceptive temporal convolutional network; or, in scenarios where the complexity of the freezing rain process in multiple sample regions is greater than the second value and there is a global temporal dependency, the spatiotemporal feature extraction network is a multi-head self-attention temporal network.

[0015] In some alternative implementations, multiple physical factors include supercooled water layers, ice-water cloud states, temperature inversion layers, and regional topographic priors.

[0016] The training module is specifically used to perform supercooled water layer detection, ice-water cloud state detection, temperature inversion layer detection, and regional prior analysis on the original backbone features, respectively, to obtain supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results. Each detection result and analysis result represents the contribution of the corresponding physical factor to the formation of freezing rain. The module obtains the weight coefficients corresponding to the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results. Based on the weight coefficients, the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results are fused and weighted to obtain the physical attention weights corresponding to the supercooled water layer, ice-water cloud state, temperature inversion layer, and regional topographic prior.

[0017] In some alternative implementations, the physical attention module integrates a dynamic weight predictor; the dynamic weight predictor sequentially includes a global average pooling operation unit, a first fully connected layer, an activation function unit, a second fully connected layer, and a soft maximization function.

[0018] The training module is specifically used to perform global average pooling on the original backbone features using the global average pooling operation unit, aggregating global information from each channel to obtain the pooling result. The pooling result is then linearly mapped through the first fully connected layer, nonlinearly transformed by the activation function unit, and feature adjusted through the second fully connected layer. Finally, it is normalized through the soft maximization function to obtain the weight coefficients corresponding to the probability distribution of the supercooled water layer detection result, the ice-water cloud state detection result, the inversion layer detection result, and the regional prior result.

[0019] In some optional implementations, the weighted backbone features correspond to the number of channels in the first channel; the training module is specifically used to perform convolutional mapping on the weighted backbone features in the first channel to obtain an initial feature map, which corresponds to the number of channels in the second channel, which is less than the number of channels in the first channel; the initial feature map is then subjected to convolutional operations, normalization, and nonlinear transformation to obtain augmented features; the augmented features and the weighted backbone features are fused using a skip connection method to obtain deep spatial enhancement features.

[0020] In some optional implementations, the training module is specifically used to determine the class balance loss value of the model framework based on the spatial distribution information of freezing rain probability; to determine multiple predicted freezing rain regions in multiple sample regions based on freezing rain probability, and to determine the region overlap loss value of the model framework based on the spatial overlap between the multiple predicted freezing rain regions and the multiple real freezing rain regions, with the real freezing rain label of each real freezing rain region being a preset label; to determine the freezing rain classification result of each grid based on the freezing rain probability of each grid, and to determine the grid-by-grid deviation between the freezing rain classification result and the real freezing rain label based on the freezing rain classification result and the real freezing rain label of each grid, thus determining the basic classification loss value of the model framework, with each grid being a grid within each sample region; to determine the physical constraint loss value of the model framework based on the freezing rain probability and the corresponding inversion intensity of each sample region; and to calculate the loss function value of the model framework based on the class balance loss value, the region overlap loss value, the basic classification loss value, and the physical constraint loss value.

[0021] In some optional implementations, the training module is specifically used to determine that the loss function value meets a preset condition and obtain a freezing rain probability prediction model when, during multiple iterations of calculation, the loss function value is less than a first loss value, or the difference between the loss function value calculated in the current iteration and the loss function value calculated in the previous iteration is less than a second loss value.

[0022] In some optional implementations, the acquisition module is also used to acquire multi-source freezing rain data of the target area; input the multi-source freezing rain data of the target area into the freezing rain probability prediction model, and output the probability of freezing rain weather occurring in the target area.

[0023] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the training method of the prediction model of the first aspect or any corresponding embodiment described above.

[0024] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute a training method for a prediction model according to the first aspect or any corresponding embodiment described above.

[0025] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute a training method for a prediction model of the first aspect or any corresponding embodiment described above.

[0026] The technical solution provided in this application has the following advantages compared with the prior art: The training method for the prediction model provided in this embodiment can construct a freezing rain probability prediction model through multi-source freezing rain data fusion, spatiotemporal joint feature learning, physical attention weighted fusion, spatial feature enhancement, and multi-constraint loss optimization.

[0027] By acquiring multi-source freezing rain data, we can comprehensively capture the meteorological environment, atmospheric state, and spatiotemporal changes related to freezing rain within the sample area, avoiding the problem of one-sided information from a single data source. Through spatiotemporal feature extraction networks, we can accurately uncover the spatiotemporal correlation patterns in the freezing rain formation process. Compared with the shortcomings of traditional numerical models that rely on solving physical equations and are difficult to characterize the fine mechanisms of small-scale extreme weather, we can effectively improve the representation ability of the original features and lay the foundation for subsequent accurate predictions.

[0028] Meanwhile, a physical attention module is introduced to learn the attention weights of multiple physical factors related to the formation mechanism of freezing rain, and these weights are used to perform weighted fusion of the original backbone features. This enables the trained model to focus on the core physical factors, follow the objective meteorological and physical laws of freezing rain formation, effectively avoid prediction results that violate physical common sense, and improve the accuracy of prediction results.

[0029] In addition, a spatial feature enhancement network is set up to further enhance the weighted backbone features, which can effectively extract the spatial correlation features between multiple sample regions and the fine-grained spatial features of a single sample region. This solves the problem that traditional models have difficulty capturing the spatial distribution details of small-scale freezing rain weather and also improves the accuracy of prediction results.

[0030] Finally, by quantifying the prediction bias through a multi-constraint loss function, the model prediction results are ensured to closely match the actual freezing rain situation and conform to the physical mechanism of freezing rain formation, which significantly reduces the forecast bias and improves the accuracy of freezing rain probability prediction. Attached Figure Description

[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0032] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart illustrating a training method for a prediction model according to an embodiment of this application; Figure 2 This is a flowchart illustrating another method for training a prediction model according to an embodiment of this application. Figure 3 This is a flowchart illustrating another method for training a prediction model according to an embodiment of this application; Figure 4 This is a structural block diagram of a training device for a prediction model provided in an embodiment of this application; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0034] To better understand the above-mentioned objectives, features, and advantages of this application, the solution of this application will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0035] Many specific details are set forth in the following description in order to provide a full understanding of this application, but this application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of this application, and not all embodiments.

[0036] The embodiments of this application are applied to scenarios where freezing rain weather is predicted using a freezing rain probability prediction model.

[0037] In related technologies, traditional numerical weather prediction models rely on solving physical equations. By coupling equations of thermodynamics, kinetics, and mass conservation, and combining them with parameterization schemes, they simulate atmospheric physical processes to predict freezing rain. However, for small-scale, highly localized extreme weather events like freezing rain, traditional parameterization schemes struggle to accurately characterize the fine physical mechanisms of its formation and evolution, easily leading to significant deviations in freezing rain weather predictions.

[0038] To address the aforementioned technical issues, this application provides a training method for a prediction model. This method constructs a freezing rain probability prediction model through multi-source freezing rain data fusion, spatiotemporal joint feature learning, physical attention weighted fusion, spatial feature enhancement, and multi-constraint loss optimization. This enables the trained model to fully explore the meteorological environment, atmospheric state, and spatiotemporal variation characteristics of freezing rain, accurately learn the weights of key physical factors of freezing rain, enhance spatial correlation between regions and fine-grained spatial feature expression, and effectively improve the accuracy of freezing rain probability prediction. At the same time, it can conform to the physical mechanism of freezing rain formation, improve the problems of large bias in small-scale extreme weather forecasts and missed detections caused by sample imbalance, and make the prediction results more accurate, reliable, and in line with physical laws, thus improving the overall predictive ability and practicality of the model for freezing rain weather.

[0039] The training method for the prediction model provided in this embodiment is executed by a prediction model training device, which can be any device with computing and communication functions. For example, the prediction model training device can be a server or a cloud server.

[0040] This embodiment provides a method for training a prediction model, which can be used in a training device for prediction models. Figure 1 This is a flowchart illustrating a training method for a prediction model according to an embodiment of this application; as shown below. Figure 1 As shown, the process includes the following steps: S101, obtain multi-source freezing rain data and real freezing rain labels for each sample area within multiple sample areas.

[0041] Multi-source freezing rain data is used to indicate the meteorological environment, atmospheric conditions, and spatiotemporal variations related to freezing rain within each sample area. Multi-source freezing rain data refers to spatiotemporal series data from different data sources, including but not limited to satellite data and reanalysis data. For example, satellite data could include 10.5μm brightness temperature data, 11.2μm brightness temperature data, cloud mask data, and total precipitable water data. Reanalysis data could include relative humidity, temperature, zonal wind, meridional wind, and vertical velocity at various altitude levels.

[0042] In this embodiment, the freezing rain real label is used to indicate whether freezing rain has occurred in each sample area. It is understood that the freezing rain real label is used as the target variable for supervised learning.

[0043] In this embodiment of the application, the sample area can be a geographical range of different regions defined according to actual needs.

[0044] In one example, multi-source freezing rain data is collected for each of multiple sample areas within a set historical time span; and a real freezing rain label for each sample area is generated based on historical disaster records or high-quality ground observation data.

[0045] Understandably, due to the differences in spatial resolution and temporal frequency among various types of freezing rain data, preprocessing such as spatiotemporal alignment, quality control, and format standardization is necessary for the collected multi-source freezing rain data. The multi-source freezing rain data for each sample region and its corresponding ground truth label constitute one sample, resulting in multiple samples. These multiple samples corresponding to multiple sample regions are used for subsequent model training.

[0046] Furthermore, each sample generates a dataset with a preset input format. The preset input format includes batch size (Batch), input sequence length (Seq_Len), number of pressure layers (Pressure), number of latitudinal grid points (Lat), number of meridional grid points (Lon), and number of feature channels (Channels).

[0047] For example, [Batch, Seq_Len=6, Pressure=4, Lat=161, Lon=281, Channels=9], where Batch is the batch size, Seq_Len corresponds to 6 time steps (time resolution of 30 minutes, total duration of 3 hours); Pressure includes four levels: 1000, 925, 850, and 700 hPa; Lat represents 161 grid points in the zonal direction and Lon represents 281 grid points in the meridional direction; Channels contains 9 feature variables for each grid point at each air pressure level and at each time point, covering various meteorological elements in satellite data and reanalysis data.

[0048] S102, in the current iterative calculation process, multi-source freezing rain data is input into the spatiotemporal feature extraction network in the pre-constructed model framework to perform spatiotemporal joint feature learning and obtain the original backbone features.

[0049] The model framework also includes a physical attention module, a spatial feature enhancement network, and a prediction output layer.

[0050] In this embodiment of the application, the current iterative calculation process is any one of the multiple iterative calculations of the model framework.

[0051] In this embodiment of the application, the original backbone features refer to the initial feature vector after preliminary processing by the spatiotemporal feature extraction network, which contains basic spatiotemporal information from multiple source data.

[0052] In this application, the spatiotemporal feature extraction network may include a three-dimensional convolutional layer for extracting spatial features and a temporal processing module for aggregating temporal features.

[0053] In one example, during the current iteration, multi-source freezing rain data is input into the spatiotemporal feature extraction network according to a preset input format. After convolution, activation, and temporal aggregation operations, spatiotemporal joint feature learning is performed, and the output is a feature map that has been adjusted or reduced in dimensionality, which is the original backbone feature. Understandably, the original backbone feature condenses the core meteorological information in the input data into a high-dimensional vector form, providing a data foundation for subsequent physical attention mechanism processing.

[0054] In some optional implementations, a type parameter (model_type) for the spatiotemporal feature extraction network can be set to support adaptive switching between three different original backbone feature extraction architectures to adapt to the temporal feature learning needs of different types of freezing rain processes. Different type parameters correspond to different types of spatiotemporal feature extraction networks. For example, the first type parameter corresponds to a deep residual channel weighted network (i.e., model_type='resnet'); the second type parameter corresponds to a vertically aware temporal convolutional network (model_type='convlstm'); and the third type parameter corresponds to a multi-head self-attention temporal network (model_type='transformer').

[0055] Specifically, in scenarios where the complexity of the freezing rain process is less than or equal to the first value and exhibits a local temporal pattern in multiple sample regions, the spatiotemporal feature extraction network is a deep residual channel weighted network.

[0056] Alternatively, in scenarios where the complexity of the freezing rain process is greater than the first value but less than or equal to the second value in multiple sample areas, and involves changes in the vertical structure of the atmosphere, the spatiotemporal feature extraction network is a vertically perceptive temporal convolutional network.

[0057] Alternatively, in scenarios where the complexity of the freezing rain process is greater than the second value in multiple sample regions and there is a global temporal dependency, the spatiotemporal feature extraction network is a multi-head self-attention temporal network.

[0058] The first and second values ​​can be set according to actual needs and are not restricted.

[0059] In this embodiment, the complexity of the freezing rain process is related to the atmospheric vertical temperature and humidity wind field structure, the frequency of precipitation phase transitions, the intensity of spatiotemporal evolution, the large-scale circulation configuration, and the characteristics of ground-borne disasters.

[0060] In this embodiment, the deep residual channel weighted network integrates a three-dimensional convolutional layer, a deep residual block (ResNet), and a channel attention module (Squeeze-and-Excitation, SE). Its structure can be constructed from one three-dimensional convolutional layer and four deep residual block examples, with each residual block followed by a channel weighted module.

[0061] The three-dimensional convolutional layer has a kernel size of 3×3×3, a padding size of 1×1×1, and uses the Rectified Linear Unit (ReLU) activation function.

[0062] In one example, during the current iteration of computation, multi-source freezing rain data is input into a 3D convolutional layer for preliminary spatiotemporal feature extraction, and then processed sequentially through four deep residual blocks. After that, a channel attention module is connected after each residual block to perform global average pooling and a fully connected layer to learn the importance of each feature channel, and the channel weights are calibrated accordingly to enhance the response to key channel features in freezing rain prediction and obtain the original backbone features.

[0063] The calculation process for the depth residual block is as follows:

[0064]

[0065] in, For the first The intermediate output of each residual block; For the first Input of each residual block; This represents an identity mapping. For the residual function, It is the weight of this layer. For the first The output of each residual block It is the ReLU activation function.

[0066] Understandably, deep residual blocks introduce identity mappings. and residual function This solves the gradient vanishing problem in deep networks and improves the optimization efficiency of the network, while the ReLU activation function is used to enhance the expressive power of the network.

[0067] In this embodiment, the channel attention module calculation process is as follows:

[0068]

[0069]

[0070] in, For the first The compressed channel descriptor for each channel. For the first The feature map has one channel, where H is the height of the feature map and W is the width of the feature map. For the first time learned The weight of each channel, It is the Sigmoid function. It is a bottleneck structure consisting of two fully connected layers, used to learn channel weights. and These are the weights of two fully connected layers. It is the ReLU activation function. For the weighted number of The feature map of each channel is the original backbone feature.

[0071] The aforementioned channel attention module uses global average pooling. The feature maps from each channel are aggregated into a global descriptor. It captures channel-level global statistical information. A weight learning mechanism is constructed using two fully connected layers and ReLU and Sigmoid activation functions. Capture the dependencies between channels and output the weights. Weights With original features Multiplication enhances key feature channels, improving the network's ability to extract key information for prediction tasks.

[0072] In this embodiment, the vertical sensing temporal convolutional network includes multiple temporal convolutional units; each temporal convolutional unit processes multi-source freezing rain data from a single pressure layer. During computation, each temporal convolutional unit generates a corresponding hidden state, which serves as an intermediate output containing temporal information from that pressure layer. By fusing the hidden states of all pressure layers, the temporal evolution characteristics across the entire meteorological vertical direction are integrated, providing a more accurate basis for tasks such as freezing rain forecasting.

[0073] Understandably, vertically-aware temporal convolutional networks explicitly calculate the vertical gradients of meteorological elements (such as temperature gradients) by performing convolution operations along pressure layer dimensions (e.g., 700 hPa and 850 hPa), and then concatenate these gradient features with the original features. The original features characterize the basic meteorological information at each pressure layer, while the gradient features highlight the changes in vertical structure. The combination of both integrates the original state and vertical variation information, enabling a more comprehensive description of meteorological conditions and enhancing the model's ability to capture vertical structures such as inversion layers, which are crucial for freezing rain formation.

[0074] In this embodiment, the multi-head self-attention temporal network can adaptively capture the global dependencies between all time steps in multi-source data, and is suitable for handling frontal freezing rain events triggered by drastic weather changes (such as the passage of a cold front) and sudden changes in meteorological signals, thereby improving the model's ability to model rapidly evolving weather processes.

[0075] S103, input the original backbone features into the physical attention module, learn the physical attention weight of each physical factor among multiple physical factors related to the freezing rain formation mechanism, and use the physical attention weight to perform weighted fusion of the original backbone features to obtain weighted backbone features.

[0076] In this embodiment, the physical attention module is an attention mechanism that integrates meteorological physics knowledge. Based on the meteorological patterns and domain knowledge of freezing rain formation, the physical attention module adaptively learns the importance weights of each physical factor in the original core features, making the model more focused on key features that conform to the physical mechanism.

[0077] The physical attention module integrates a dynamic weight predictor. The dynamic weight predictor sequentially comprises a global average pooling operation unit, a first fully connected layer, an activation function unit, a second fully connected layer, and a soft maximization function.

[0078] In this embodiment, the higher the physical attention weight, the stronger the correlation between the physical factor and the physical mechanism in freezing rain prediction.

[0079] In this embodiment, multiple physical factors include supercooled water layer, ice-water cloud state, temperature inversion layer, and regional topographic a priori factors. It is understood that a supercooled water layer is one of the key conditions for freezing rain formation, the ice-water cloud state has a direct impact on the freezing rain process, the temperature inversion layer constitutes a typical vertical structural feature for freezing rain formation, and the conditions for freezing rain formation may vary in different regions due to factors such as topography.

[0080] In some optional implementations, supercooled water layer detection, ice-water cloud state detection, temperature inversion layer detection, and regional prior analysis are performed on the original backbone features to obtain supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results; weight coefficients corresponding to the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results are obtained; based on the weight coefficients, the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results are fused and weighted to obtain the physical attention weights corresponding to the supercooled water layer, ice-water cloud state, temperature inversion layer, and regional terrain prior.

[0081] Each detection and analysis result represents the contribution of the corresponding physical factor to the formation of freezing rain.

[0082] Specifically, the original backbone features are used to detect the supercooled water layer using a first algorithm, which is shown below:

[0083] in, It is the attention weight corresponding to the supercooled water layer. This is the brightness temperature data for the 10.5μm channel of the satellite; Conv is the convolution operation. For activation function, This is the Sigmoid activation function.

[0084] Understandably, supercooled water layer detection involves identifying potential supercooled water regions using satellite 10.5μm brightness temperature data. Firstly, the brightness temperature data... Convolutional operations are performed to extract spatiotemporal features. Subsequently, features with positive responses are selected using the ReLU activation function, and higher-level feature representations are extracted through convolutional layers. Finally, the features are normalized to the [0,1] interval using the Sigmoid function to obtain attention weights that reflect the probability of supercooled water layers.

[0085] In one example, when When the K value is less than 263K, the physical attention weight corresponding to the supercooled water layer is assigned a high weight, which means that the sample area is a region where supercooled water may exist.

[0086] Specifically, the ice-water cloud state is detected using a second algorithm on the original backbone features. The second algorithm is shown below:

[0087] in, The attention weights corresponding to the state detection of ice-water clouds. = For dual-channel brightness temperature difference, This is the brightness temperature data for the 10.5μm channel of the satellite. The data represents the brightness temperature of the 11.2μm channel of the satellite. Conv is the convolution operation, ReLU is the activation function, and σ is the Sigmoid activation function.

[0088] Understandably, ice-water cloud state detection identifies the ice / water cloud phase by utilizing the brightness-temperature difference between 10.5μm and 11.2μm. First, the dual-channel brightness-temperature difference ΔT is calculated; a larger difference indicates a higher probability of ice clouds, which is more conducive to freezing rain formation. Features are extracted by convolution on ΔT, and positive features are filtered using the ReLU activation function. Further convolution is performed to extract high-level features, and finally, attention weights are obtained through Sigmoid function normalization. Regions with larger brightness-temperature differences (indicating ice clouds) are assigned higher weights.

[0089] Specifically, the inversion layer is detected using a third algorithm on the original backbone features. The third algorithm is shown below:

[0090]

[0091] in, Inversion layer strength, and Temperature data for the 700 hPa and 850 hPa pressure layers, respectively. Here, Conv represents the attention weights for detecting the temperature inversion layer, and Conv is the convolution operation. For activation function, This is the Sigmoid activation function.

[0092] Understandably, the inversion intensity is calculated based on reanalysis data, and a convolutional network is used to assign high weights to regions with high inversion intensity. First, the inversion intensity (Iinversion) is calculated based on the temperature data of the 700 hPa and 850 hPa pressure layers. If the value is less than 0, then 0 is used. Convolution, ReLU activation, re-convolution, and Sigmoid normalization are performed on the Iinversion layer to obtain attention weights, and high weights are assigned to regions with high inversion intensity.

[0093] Specifically, the original backbone features are analyzed using a fourth algorithm, which is shown below:

[0094] in, The attention weights are the regions corresponding to the priors. The learnable parameter matrix is ​​initialized as an elliptical geographic mask representing the high-incidence area of ​​freezing rain in central and eastern China. Conv is a convolution operation. For activation function, This is the Sigmoid activation function.

[0095] Understandably, based on historical high-frequency freezing rain areas, regional prior analysis is performed on the original backbone features to initialize a learnable parameter matrix for an elliptical geographic mask of high-incidence freezing rain areas. Based on this, convolution, ReLU activation, re-convolution, and Sigmoid normalization operations are performed to obtain the regional prior attention weights, highlighting the importance of historical high-frequency freezing rain regions in the model.

[0096] In some optional implementations, a global average pooling operation unit is used to perform a global average pooling operation on the original backbone features to aggregate the global information of each channel and obtain the pooling result. The pooling result is then linearly mapped through a first fully connected layer, nonlinearly transformed by an activation function unit, and feature adjusted through a second fully connected layer. Finally, it is normalized through a soft maximization function to obtain the weight coefficients corresponding to the probability distribution of the supercooled water layer detection result, the ice-water cloud state detection result, the inversion layer detection result, and the regional prior result.

[0097] Specifically, it can be achieved through the following algorithm:

[0098] GAP stands for Global Average Pooling, and FC stands for Fully Connected Layer.

[0099] Optionally, a residual feature modulation mechanism can be introduced to obtain the residual fusion parameter between the original backbone features and the weighted backbone features, and then perform weighted fusion based on this parameter. The specific formula is as follows:

[0100] in, denoted as the modulated weighted backbone feature, and x as the unmodulated weighted backbone feature. α represents the physical attention weights, and α is a learnable residual fusion parameter with an initial value of 0.5.

[0101] Understandably, by using residual connections to fuse the original backbone features and weighted backbone features proportionally, the model incorporates the guiding role of physical priors while avoiding excessive suppression of the original data during modulation. By preserving important information from the original data, the model can maintain the integrity of features while fusing physical constraints, thereby improving training stability.

[0102] S104. The weighted backbone features are input into the spatial feature enhancement network to obtain deep spatial enhancement features.

[0103] Among them, deep spatial enhancement features are used to indicate spatial correlation features and fine-grained spatial features between multiple sample regions. Understandably, this enhancement feature can improve the expressive power of input features in the spatial dimension, effectively capture local and global spatial correlations, and thus extract more discriminative high-level spatial features.

[0104] In this embodiment, the spatial feature enhancement network includes an initial convolutional layer and residual blocks.

[0105] In one optional implementation, the weighted backbone features with a first number of channels are subjected to convolutional mapping to obtain an initial feature map, which corresponds to a second number of channels, where the number of channels is less than the number of channels in the first layer. The initial feature map is then subjected to convolutional operations, normalization, and nonlinear transformation to obtain augmented features. The augmented features and the weighted backbone features are then fused using a skip connection method to obtain deep spatial enhancement features.

[0106] Among them, the weighted backbone feature corresponds to the number of channels in the first channel.

[0107] For example, the spatial feature enhancement network can be constructed using one convolutional layer and two deep residual blocks. The initial convolutional layer uses a 3×3 kernel, with 32×6=192 input channels and 128 output channels. Each residual block contains two 3×3 convolutional layers, maintaining 128 channels, and introduces batch normalization and ReLU activation functions, while utilizing skip connections for feature fusion. Its computation process can be represented as follows:

[0108] in, To enhance features in deep space, For weighted backbone features, Conv represents the convolution operation. For batch normalization, This is the activation function.

[0109] Optionally, it can be further refined through the Squeeze-and-Excitation (SE) attention mechanism. The calculation process is the same as the SE module of the deep residual channel weighted network, with a compression ratio of 16.

[0110] S105 inputs deep spatial enhancement features into the prediction output layer and outputs the freezing rain probability for each sample region.

[0111] In one example, according to a preset output algorithm, deep spatial enhancement features are input into the prediction output layer, which outputs the freezing rain probability for each sample region. The preset output algorithm is shown below:

[0112] in, To enhance deep spatial features, the first 3×3 convolutional layer outputs 32 channels, the second 3×3 convolutional layer outputs 16 channels, and finally a 1×1 convolutional layer maps the number of channels to 6, corresponding to 6 prediction time steps within the next 3 hours. Using the Sigmoid activation function, the output is constrained to the range [0,1] to represent the probability of freezing rain. The final output is... A sequence of freezing rain probability maps in the format [Batch,6,Lat,Lon].

[0113] S106, the loss function value based on the model framework for calculating the probability of freezing rain and the true label of freezing rain.

[0114] The loss function value reflects the degree of deviation between the predicted result and the actual situation. The smaller the loss function value, the more accurate the model prediction.

[0115] In some alternative implementations, a loss function is determined based on the characteristics of the freezing rain probability prediction task, and the predicted probability output by the model is compared with the true label to calculate the loss function value.

[0116] In other alternative implementations, the class balance loss value of the model framework is determined based on the spatial distribution information of freezing rain probability; multiple predicted freezing rain regions are identified in multiple sample regions based on freezing rain probability, and the region overlap loss value of the model framework is determined based on the spatial overlap between the multiple predicted freezing rain regions and the multiple real freezing rain regions; the freezing rain classification result of each grid is determined based on the freezing rain probability of each grid, and the grid-by-grid deviation between the freezing rain classification result and the real freezing rain label of each grid is determined based on the freezing rain classification result and the real freezing rain label of each grid, thus determining the basic classification loss value of the model framework; the physical constraint loss value of the model framework is determined based on the freezing rain probability and the corresponding inversion intensity of each sample region; and the loss function value of the model framework is calculated based on the class balance loss value, the region overlap loss value, the basic classification loss value, and the physical constraint loss value.

[0117] The actual freezing rain label (also called the actual label) for each actual freezing rain zone is a preset label. The actual freezing rain label can be 0 or 1.

[0118] Each grid is one grid within each sample region.

[0119] The class balance loss value is used to solve the problem of extreme class imbalance in samples; the region overlap loss value is used to enhance the overlap between the predicted region and the true label region; the basic classification loss value is used to indicate the basic loss of the binary classification task; the physical constraint loss value is determined to include at least the temperature inversion layer constraint loss.

[0120] Specifically, the formula for calculating the category balance loss is as follows:

[0121] in, The loss value represents the class balance, with α=2 and γ=3 as adjustment parameters. This represents the probability of freezing rain.

[0122] The formula for calculating the region overlap loss is shown below:

[0123] in, This represents the region overlap loss value. This represents the probability of freezing rain. For real labels, Prevent division by zero.

[0124] The formula for calculating the basic classification loss value is shown below:

[0125] in, Basic classification loss value, This represents the probability of freezing rain. This is a real label.

[0126] The formula for calculating the physical constraint loss value is shown below:

[0127] in, This represents the physical constraint loss value. For the sample size, For the first Inversion layer intensity for each sample This represents the mean probability of freezing rain.

[0128] In summary, the loss function value is a weighted combination of the class balance loss value, region overlap loss value, basic classification loss value, and physical constraint loss value, and the calculation formula is as follows:

[0129] in, For class-balanced loss values, This represents the region overlap loss value. Basic classification loss value, This represents the physical constraint loss value. Preset weights for class-balanced loss values, such as , Preset weights for the region overlap loss value, such as 2, The preset weights for the basic classification loss value, such as , Preset weights for physical constraint loss values, such as .

[0130] S107. During multiple iterations of calculation, when the loss function value meets the preset conditions, the freezing rain probability prediction model is obtained.

[0131] Among them, the freezing rain probability prediction model is used to predict the probability of freezing rain.

[0132] In some optional implementations, during multiple iterations of calculation, if the loss function value is less than the first loss value, or if the difference between the loss function value calculated in the current iteration and the loss function value calculated in the previous iteration is less than the second loss value, the loss function value is determined to meet the preset conditions, and the freezing rain probability prediction model is obtained.

[0133] Optionally, if the loss function value is greater than or equal to the first loss value, or if the difference between the loss function value calculated in the current iteration and the loss function value calculated in the previous iteration is greater than or equal to the second loss value, the backpropagation algorithm is used to calculate the gradient of the loss with respect to the model parameters, and the optimization algorithm is used to update the parameters to reduce the loss value, and iterative training continues until the model converges.

[0134] An optimizer can be used in the above iterative calculation process, with the following parameter configuration: initial learning rate 5×10⁻⁶. -5 Weight decay 10 -4 , β1=0.9, β2=0.999, ε=10 -8 The learning rate scheduling uses a cosine annealing strategy, with a minimum learning rate of 5×10. -7 Maximum learning rate 5×10 -5 The batch size is 1, the gradient accumulation steps are 8, the maximum gradient norm is 1.0, the number of training rounds is 100, the early stopping patience value is 20, mixed precision training is used to train FP16 to calculate forward propagation and loss, FP32 maintains sovereignty and re-updates, and dynamic loss scaling prevents gradient underflow.

[0135] Furthermore, after training the freezing rain probability prediction model, the training device for the prediction model can also acquire multi-source freezing rain data of the target area; inputting the multi-source freezing rain data of the target area into the freezing rain probability prediction model, the model outputs the probability of freezing rain occurring in the target area. Based on Figure 1 The method described herein constructs a freezing rain probability prediction model through multi-source freezing rain data fusion, spatiotemporal joint feature learning, physical attention weighted fusion, spatial feature enhancement, and multi-constraint loss optimization. The spatiotemporal feature extraction network efficiently processes multi-source data, automatically learning complex spatiotemporal features and evolution patterns, avoiding the reliance on parameterization schemes in traditional numerical weather prediction, thus overcoming the limitations of parameterization methods in refined freezing rain forecasting. The physical attention module generates attention weights based on the meteorological and physical mechanisms of freezing rain formation, dynamically weighting the original core features, enabling the model to integrate domain prior knowledge during learning and highlighting key features closely related to the physical processes of freezing rain. Furthermore, the spatial feature enhancement network strengthens the expressive power of features in the spatial dimension, and the prediction output layer generates multi-timestep freezing rain probabilities for each region. In addition, by designing a reasonable loss function and continuously optimizing model parameters, the model achieves good predictive performance when it reaches the preset convergence conditions, thereby improving the overall accuracy of freezing rain probability prediction and reducing forecast bias.

[0136] like Figure 2 As shown, Figure 2 This is a flowchart illustrating another training method for a prediction model provided in an embodiment of this application; Figure 2In this process, multi-source freezing rain data is input into a spatiotemporal feature extraction network. Feature extraction can be performed using any architecture among deep residual channel weighted networks (a temporal processing module based on 3D convolution), vertically perceptive temporal convolutional networks, or multi-head self-attention temporal networks, yielding the original backbone features. Subsequently, the original backbone features are processed by a physical attention module to obtain weighted backbone features. These weighted features are further optimized through a spatial feature enhancement network to form deep spatial enhancement features. Finally, a freezing rain probability sequence is generated through a multi-timestep prediction output layer.

[0137] like Figure 3 As shown, Figure 3 This is a flowchart illustrating another method for training a prediction model according to an embodiment of this application; Figure 3 In this model, the physical attention module comprises four branches: supercooled water layer detection, ice-water cloud differentiation, inversion layer detection, and region prior. Weight coefficients for each branch are generated using a dynamic weight predictor, and the outputs of each branch are weighted and summed to obtain the physical attention weights. These weights are used to weight and modulate the original backbone features, and a residual connection mechanism is introduced to achieve effective fusion and enhancement of feature information.

[0138] This embodiment also provides a training apparatus for a predictive model, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0139] This embodiment provides a training device for a prediction model, such as... Figure 4 As shown, Figure 4 This is a structural block diagram of a training apparatus for a prediction model provided according to an embodiment of this application; the training apparatus for the prediction model includes: The acquisition module 401 is used to acquire multi-source freezing rain data and freezing rain real labels for each sample area within multiple sample areas. The multi-source freezing rain data is used to indicate the meteorological environment, atmospheric state, and spatiotemporal variation characteristics related to freezing rain in each sample area, and the freezing rain real labels are used to indicate whether freezing rain has occurred in each sample area.

[0140] Training module 402 is used to input multi-source freezing rain data into the spatiotemporal feature extraction network in the pre-built model framework during the current iteration calculation process, perform spatiotemporal joint feature learning, and obtain the original backbone features. The model framework also includes a physical attention module, a spatial feature enhancement network, and a prediction output layer. The current iteration calculation process is any iteration of the model framework. The original backbone features are input into the physical attention module to learn the physical attention weight of each physical factor among multiple physical factors related to the freezing rain formation mechanism, and the original backbone features are weighted and fused using the physical attention weights to obtain weighted backbone features. The weighted backbone features are input into the spatial feature enhancement network to obtain deep spatial enhancement features, which are used to indicate the spatial correlation features and fine-grained spatial features between multiple sample areas. The deep spatial enhancement features are input into the prediction output layer to output the freezing rain probability of each sample area. The loss function value of the model framework is calculated based on the freezing rain probability and the true freezing rain label. During multiple iteration calculations, when the loss function value meets the preset conditions, a freezing rain probability prediction model is obtained, which is used to predict the probability of freezing rain.

[0141] In some optional implementations, in scenarios where the complexity of the freezing rain process in multiple sample regions is less than or equal to a first value and exhibits a local temporal pattern, the spatiotemporal feature extraction network is a deep residual channel weighted network; or, in scenarios where the complexity of the freezing rain process in multiple sample regions is greater than the first value and less than or equal to a second value, and involves changes in atmospheric vertical structure, the spatiotemporal feature extraction network is a vertically perceptive temporal convolutional network; or, in scenarios where the complexity of the freezing rain process in multiple sample regions is greater than the second value and there is a global temporal dependency, the spatiotemporal feature extraction network is a multi-head self-attention temporal network.

[0142] In some alternative implementations, multiple physical factors include supercooled water layers, ice-water cloud states, temperature inversion layers, and regional topographic priors.

[0143] Training module 402 is specifically used to perform supercooled water layer detection, ice-water cloud state detection, temperature inversion layer detection, and regional prior analysis on the original backbone features, respectively, to obtain supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results. Each detection result and analysis result represents the contribution of the corresponding physical factor to the formation of freezing rain. The module obtains the weight coefficients corresponding to the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results. Based on the weight coefficients, the supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results are fused and weighted to obtain the physical attention weights corresponding to the supercooled water layer, ice-water cloud state, temperature inversion layer, and regional topographic prior.

[0144] In some alternative implementations, the physical attention module integrates a dynamic weight predictor; the dynamic weight predictor sequentially includes a global average pooling operation unit, a first fully connected layer, an activation function unit, a second fully connected layer, and a soft maximization function.

[0145] Training module 402 is specifically used to perform global average pooling on the original backbone features using the global average pooling operation unit, aggregate the global information of each channel, and obtain the pooling result. The pooling result is then linearly mapped through the first fully connected layer, nonlinearly transformed by the activation function unit, and feature adjusted through the second fully connected layer. Finally, it is normalized through the soft maximization function to obtain the weight coefficients corresponding to the supercooled water layer detection result, ice-water cloud state detection result, inversion layer detection result, and regional prior result in probability distribution form.

[0146] In some optional implementations, the weighted backbone features correspond to the number of channels in the first channel; the training module 402 is specifically used to perform convolutional mapping processing on the weighted backbone features in the first channel to obtain an initial feature map, which corresponds to the number of channels in the second channel, which is less than the number of channels in the first channel; the initial feature map is sequentially processed by convolutional operation, normalization, and nonlinear transformation to obtain augmented features; the augmented features and the weighted backbone features are fused using a skip connection method to obtain deep spatial enhancement features.

[0147] In some optional implementations, the training module 402 is specifically used to determine the class balance loss value of the model framework based on the spatial distribution information of freezing rain probability; to determine multiple predicted freezing rain regions in multiple sample regions based on freezing rain probability, and to determine the region overlap loss value of the model framework based on the spatial overlap between the multiple predicted freezing rain regions and the multiple real freezing rain regions, with the real freezing rain label of each real freezing rain region being a preset label; to determine the freezing rain classification result of each grid based on the freezing rain probability of each grid, and to determine the grid-by-grid deviation between the freezing rain classification result and the real freezing rain label based on the freezing rain classification result and the real freezing rain label of each grid, thereby determining the basic classification loss value of the model framework, with each grid being a grid within each sample region; to determine the physical constraint loss value of the model framework based on the freezing rain probability and the corresponding inversion intensity of each sample region; and to calculate the loss function value of the model framework based on the class balance loss value, the region overlap loss value, the basic classification loss value, and the physical constraint loss value.

[0148] In some optional implementations, the training module 402 is specifically used to determine that the loss function value meets the preset conditions and obtain the freezing rain probability prediction model when the loss function value is less than the first loss value or the difference between the loss function value calculated in the current iteration and the loss function value calculated in the previous iteration is less than the second loss value during multiple iterations of calculation.

[0149] In some optional implementations, the acquisition module 401 is also used to acquire multi-source freezing rain data of the target area; input the multi-source freezing rain data of the target area into the freezing rain probability prediction model, and output the probability of freezing rain weather occurring in the target area.

[0150] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0151] In this embodiment, the training device for the prediction model is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0152] This application also provides an electronic device having the above-described features. Figure 4 The training apparatus for the prediction model is shown.

[0153] Please see Figure 5 , Figure 5 This is a schematic diagram of the hardware structure of the electronic device according to an embodiment of this application, such as... Figure 5 As shown, the electronic device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 10 as an example.

[0154] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0155] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0156] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 20 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 alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device 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.

[0157] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0158] The electronic device also includes a communication interface 30 for communicating with other devices or communication networks.

[0159] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0160] This application provides a computer program product, which includes computer instructions for causing a computer to execute the method of any embodiment of this application.

[0161] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0162] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for training a prediction model, characterized in that, The method includes: Acquire multi-source freezing rain data and real freezing rain labels for each of the multiple sample regions; In the current iterative calculation process, the multi-source freezing rain data is input into the spatiotemporal feature extraction network in the pre-constructed model framework to perform spatiotemporal joint feature learning and obtain the original backbone features. The model framework also includes a physical attention module, a spatial feature enhancement network and a prediction output layer. The current iterative calculation process is any one of the multiple iterative calculations of the model framework. The original backbone features are input into the physical attention module to learn the physical attention weight of each physical factor among multiple physical factors related to the freezing rain formation mechanism, and the original backbone features are weighted and fused using the physical attention weights to obtain weighted backbone features. The weighted backbone features are input into the spatial feature enhancement network to obtain deep spatial enhancement features, which are used to indicate the spatial correlation features and fine-grained spatial features between multiple sample regions. The deep spatial enhancement features are input into the prediction output layer to output the freezing rain probability for each sample region. The loss function value of the model framework is calculated based on the freezing rain probability and the true freezing rain label; During the multiple iterative calculations, when the loss function value meets the preset conditions, a freezing rain probability prediction model is obtained, which is used to predict the probability of freezing rain occurring.

2. The method according to claim 1, characterized in that, In scenarios where the complexity of the freezing rain process is less than or equal to the first value and exhibits a local temporal pattern in multiple sample regions, the spatiotemporal feature extraction network is a deep residual channel weighted network. Alternatively, in scenarios where the complexity of the freezing rain process is greater than the first value and less than or equal to the second value in multiple sample areas, and involves changes in the vertical structure of the atmosphere, the spatiotemporal feature extraction network is a vertically perceptual temporal convolutional network. Alternatively, in scenarios where the complexity of the freezing rain process is greater than the second value and there is a global temporal dependency in multiple sample regions, the spatiotemporal feature extraction network is a multi-head self-attention temporal network.

3. The method of claim 2, wherein, Several of the aforementioned physical factors include supercooled water layers, ice-water cloud states, temperature inversion layers, and regional topographic priors; The step of inputting the original backbone features into the physical attention module to learn the physical attention weight of each of the multiple physical factors related to the freezing rain formation mechanism includes: The original main features were subjected to supercooled water layer detection, ice-water cloud state detection, temperature inversion layer detection, and regional prior analysis to obtain supercooled water layer detection results, ice-water cloud state detection results, temperature inversion layer detection results, and regional prior results. Each detection result and analysis result represents the contribution of the corresponding physical factor to the formation of freezing rain. Obtain the weight coefficients corresponding to the supercooled water layer detection results, the ice-water cloud state detection results, the inversion layer detection results, and the regional prior results; Based on the weighting coefficients, the detection results of the supercooled water layer, the detection results of the ice-water cloud state, the detection results of the inversion layer, and the regional prior results are fused and weighted to obtain the physical attention weights corresponding to the supercooled water layer, the ice-water cloud state, the inversion layer, and the regional terrain prior.

4. The method of claim 3, wherein, The physical attention module integrates a dynamic weight predictor; the dynamic weight predictor sequentially includes a global average pooling operation unit, a first fully connected layer, an activation function unit, a second fully connected layer, and a soft maximization function; The acquisition of the weighting coefficients corresponding to the supercooled water layer detection results, the ice-water cloud state detection results, the inversion layer detection results, and the regional prior results includes: The global average pooling operation unit is used to perform a global average pooling operation on the original backbone features, and the global information of each channel is aggregated to obtain the pooling result. The pooling result is sequentially linearly mapped through the first fully connected layer, nonlinearly transformed by the activation function unit, and feature-adjusted through the second fully connected layer. Then, it is normalized through the soft maximization function to obtain the weight coefficients corresponding to the supercooled water layer detection result, the ice-water cloud state detection result, the inversion layer detection result, and the regional prior result in probability distribution form.

5. The method of claim 4, wherein, The weighted backbone features correspond to the number of channels in the first channel; the step of inputting the weighted backbone features into the spatial feature enhancement network to obtain deep spatial enhancement features includes: The weighted backbone features of the first number of channels are subjected to convolutional mapping to obtain an initial feature map, which corresponds to the number of channels of the second number of channels, which is less than the number of channels of the first number of channels. The initial feature map is sequentially processed by convolution, normalization, and nonlinear transformation to obtain additional features; The deep spatial enhancement features are obtained by fusing the augmented features and the weighted backbone features using a skip connection method.

6. The method of claim 5, wherein, The calculation of the loss function value of the model framework based on the freezing rain probability and the true freezing rain label includes: Based on the spatial distribution information of the freezing rain probability, the class balance loss value of the model framework is determined; Based on the freezing rain probability, multiple predicted freezing rain regions are determined in multiple sample regions, and the regional overlap loss value of the model framework is determined according to the spatial overlap between the multiple predicted freezing rain regions and the multiple real freezing rain regions. The real freezing rain label of each real freezing rain region is a preset label. Based on the freezing rain probability of each grid, the freezing rain classification result of each grid is determined, and based on the freezing rain classification result of each grid and the freezing rain true label of each grid, the grid-by-grid deviation between the freezing rain classification result and the freezing rain true label is determined, and the basic classification loss value of the model framework is determined, where each grid is a grid within each sample region; Based on the freezing rain probability and the corresponding temperature inversion intensity of each sample region, the physical constraint loss value of the model framework is determined; The loss function value of the model framework is calculated based on the category balance loss value, the region overlap loss value, the basic classification loss value, and the physical constraint loss value.

7. The method of claim 6, wherein, During the multiple iterative calculations, when the loss function value meets a preset condition, a freezing rain probability prediction model is obtained, including: During the multiple iterative calculations, if the loss function value is less than the first loss value, or if the difference between the loss function value calculated in the current iteration and the loss function value calculated in the previous iteration is less than the second loss value, the loss function value is determined to meet the preset conditions, and the freezing rain probability prediction model is obtained.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Acquire multi-source freezing rain data for the target area; The multi-source freezing rain data of the target area is input into the freezing rain probability prediction model, and the probability of freezing rain occurring in the target area is output.

9. A training device for a prediction model, characterized in that, The training device for the prediction model includes: The acquisition module is used to acquire multi-source freezing rain data and real freezing rain labels for each of the multiple sample areas; The training module, during the current iteration calculation, inputs the multi-source freezing rain data into the spatiotemporal feature extraction network of a pre-constructed model framework to perform spatiotemporal joint feature learning, obtaining the original backbone features. The model framework also includes a physical attention module, a spatial feature enhancement network, and a prediction output layer. The current iteration calculation process is any one of multiple iterations of the model framework. The original backbone features are input into the physical attention module to learn the physical attention weights of each of the multiple physical factors related to the freezing rain formation mechanism, and the physical attention weights are used to process the original backbone features. Weighted fusion is performed to obtain weighted backbone features; the weighted backbone features are input into the spatial feature enhancement network to obtain deep spatial enhancement features, which are used to indicate the spatial correlation features and fine-grained spatial features between multiple sample regions; the deep spatial enhancement features are input into the prediction output layer to output the freezing rain probability of each sample region; the loss function value of the model framework is calculated based on the freezing rain probability and the true freezing rain label; during multiple iterations of the calculation, when the loss function value meets a preset condition, a freezing rain probability prediction model is obtained, which is used to predict the probability of freezing rain.

10. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the training method of the prediction model according to any one of claims 1 to 8.