A recognition method for extreme low temperature rain and snow combined events based on neural network contrast learning
Through the neural network-based comparison learning method, the circulation characteristics of extreme low-temperature rain and snow composite events are directly learned from the input data, which solves the difficulties in predicting compound events in the existing technology, and realizes the accurate identification of extreme low-temperature rain and snow composite events.
Patent Information
- Application Number
- CN202410652944.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-05-24
AI Technical Summary
The prior art is difficult to accurately predict extreme low-temperature rain and snow composite events, and due to insufficient data volume, it is difficult to use neural networks to learn to identify composite events.
A neural network-based comparison learning method is adopted to solve the problem of too small training data by learning the atmospheric circulation characteristics and wind field convergence when extreme low-temperature rain and snow composite events occur from the input data.
The identification of extremely low temperature rain and snow composite events is realized, and the circulation characteristics when the event occurs are directly learned from the input data, and the research on physical mechanisms is skipped, which improves the accuracy and generalization ability of recognition.
Smart Images

Figure CN118445720B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of identification of extreme low temperature rain and snow compound events, and in particular to an identification method of extreme low temperature rain and snow compound events based on neural network contrast learning. Background Art
[0002] In the context of global warming, the compound effects of compound extreme events that lead to social and environmental risks are often greater than the superposition effects of simple extreme events. Accurate forecasting of extreme compound weather is an important scientific and technological issue that needs to be solved urgently. Since the formation mechanism and physical mechanism that lead to the occurrence of extreme low temperature rain and snow compound events have not been fully studied, it is difficult to effectively predict such compound events. And because the probability of extreme compound events is low, the amount of data available for training is far less than the amount of data required for general machine learning, which increases the difficulty of using neural networks to learn and identify compound events. Summary of the invention
[0003] Purpose of the invention: The purpose of the present invention is to provide a method for identifying extreme low-temperature rain and snow compound events based on neural network contrast learning. On the one hand, the atmospheric circulation characteristics and wind field convergence when such compound events occur can be directly learned from the input data, solving the problem that the physical mechanism of the compound event has not been clearly studied; on the other hand, the neural network contrast learning method is used to construct positive and negative sample training sets and test sets to solve the problem of too little training data.
[0004] Technical solution: The present invention discloses a method for identifying extreme low temperature rain and snow compound events based on neural network contrast learning, comprising the following steps:
[0005] (1) Obtaining extreme low temperature rain and snow composite event data sets and collecting reanalysis data;
[0006] (2) The extracted 500 hPa circulation field and 850 hPa wind field of the composite event were subjected to dimensionality reduction and cluster analysis to obtain three types of extreme low temperature rain and snow composite events with different circulation situation combinations, and each event was classified and marked;
[0007] (3) Use the obtained labels to construct the positive and negative sample training sets required for Contrastive Learning;
[0008] (4) Build a neural network model of convolutional neural network;
[0009] (5) Training based on training sets and models;
[0010] (6) Identify extreme low temperature rain and snow complex events based on unlabeled reanalysis data.
[0011] Furthermore, step (2) is as follows: the nonlinear dimensionality reduction method t-SNE is used to reduce the dimensionality of the three elements in the reanalysis data, retaining the structure and similarity in the high-dimensional data; the K-means clustering method is used to simultaneously perform cluster analysis on the three element fields, and the error sum of squares and silhouette coefficient method are used to obtain the optimal number of clusters, i.e., the labels of the three types of extreme low-temperature rain and snow composite events; wherein the three elements include: 500hPa geopotential height, 850hPa meridional wind and zonal wind.
[0012] Furthermore, the nonlinear dimensionality reduction method t-SNE is used to reduce the dimensionality of the three elements in the reanalysis data as follows: Assume that the high-dimensional data set is , while reducing the dimension, the position relationship of each point in the original high-dimensional data set is maintained. The reduced-dimensional data set ;
[0013] Then for two points in a high-dimensional data set , define the following formula:
[0014] ;
[0015] in, represent yes The probability of being a "neighbor" of yes The closest The variance value of the points, where is a hyperparameter defined as perplexity;
[0016] Two points in a low-dimensional dataset , the definition formula is as follows:
[0017] ;
[0018] in, represent yes The probability of being a "neighbor" of
[0019] Define KL divergence as the loss function:
[0020] ;
[0021] Use the gradient descent method to minimize the KL divergence, update the position of the point in the low-dimensional space, and solve the gradient formula for each element of the low-dimensional data set as follows:
[0022] ;
[0023] in, Represents the coordinates of each point in the input low-dimensional space, is the similarity between points in low-dimensional space, given by Calculated; It is the similarity between points in high-dimensional space.
[0024] Furthermore, the formula for the sum of squared errors is as follows:
[0025] ;
[0026] The Euclidean distance calculation formula is as follows:
[0027] ;
[0028] in, is the data element, For the Cluster centers, is the dimension of the data element, , for and No. attribute value;
[0029] The silhouette coefficient method formula is as follows:
[0030] ;
[0031] The average silhouette coefficient for the entire dataset:
[0032] ;
[0033] in, Representation sample The average value of the dissimilarity to other points in the same cluster. Representation sample The minimum average dissimilarity to other clusters.
[0034] Furthermore, step (3) is as follows: the 500 hPa geopotential height, 850 hPa meridional wind and zonal wind at the same time are recorded as a group of data; at the same time, two groups of data at different times are selected for comparison: if the two groups of data belong to the same category of composite events after classification, they are recorded as positive samples; otherwise, the two groups of data come from different categories and are recorded as negative samples; then, positive and negative sample training sets and test sets are constructed.
[0035] Furthermore, step (4) is as follows: a neural network model of a convolutional neural network is constructed, including: a convolutional layer, a pooling layer, an expansion layer, and a fully connected layer; a function for calculating the Euclidean distance is introduced after the fully connected layer, and a function for reducing the distance between approximate samples is written; the contrast loss for expanding the distance between dissimilar samples is used as the loss function; the formula is as follows:
[0036] ;
[0037] in, is the network weight, is a pair of labels, if Belong to the same category, then =0; if they belong to different categories, =1; yes and The Euclidean distance in the latent variable space; when =0, the adjustment parameter is minimized and The distance between =1, and If the distance between them is greater than m, no optimization is performed; and If the distance between them is less than m, increase the distance between them to m.
[0038] Furthermore, step (5) is as follows: adjusting the model structure and parameters including: convolution layer settings, pooling layer settings, convolution kernel size, number of channels, learning rate, number of margins in the loss function, continuously optimizing the algorithm, and training to obtain the model with the highest accuracy.
[0039] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: directly learning the atmospheric circulation characteristics and wind field convergence when an extreme low-temperature rain and snow compound event occurs from the input data, skipping the study of the physical mechanism of the compound event, and directly learning the circulation characteristics when the extreme compound weather occurs, so as to identify such events; adopting the idea of contrastive learning method to construct training sets and test sets. Contrastive learning usually only requires a small amount of paired data (positive and negative sample pairs), and by comparing the similarities between data points, a more generalized representation is learned. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0041] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0042] like Figure 1 As shown, an embodiment of the present invention provides a method for identifying extreme low temperature rain and snow compound events based on neural network contrast learning, comprising the following steps:
[0043] (1) Obtain a spatiotemporal dataset of extreme low-temperature rain-snow composite events in winter in southern China, and collect winter reanalysis data from 1961 to 2023;
[0044] (2) The extracted 500 hPa circulation field and 850 hPa wind field of the composite event were subjected to dimensionality reduction and cluster analysis to obtain three types of extreme low temperature rain and snow composite events with different circulation situation combinations, and each event was classified and labeled; specifically: the nonlinear dimensionality reduction method t-SNE was used to reduce the dimensionality of the three elements in the reanalysis data, retaining the structure and similarity in the high-dimensional data; the K-means clustering method was used to perform cluster analysis on the three element fields at the same time, and the error sum of squares and silhouette coefficient method were used to obtain the optimal number of clusters, i.e. the labels of the three types of extreme low temperature rain and snow composite events; among them, the three elements include: 500 hPa potential height, 850 hPa meridional wind and zonal wind. The details are as follows: the nonlinear dimensionality reduction method t-SNE method is used to reduce the dimensionality of the three elements in the reanalysis data, retaining the structure and similarity in the high-dimensional data; the K-means clustering method is used to cluster the three element fields at the same time, and the error square sum silhouette coefficient method is used to obtain the optimal number of clusters, that is, the labels of the three types of extreme low temperature rain and snow composite events; among them, the three elements include: 500hPa potential height, 850hPa meridional wind and zonal wind; including the following steps:
[0045] (21) The nonlinear dimensionality reduction method t-SNE is used to reduce the dimensionality of the three elements in the reanalysis data as follows: Assume that the high-dimensional data set is , while reducing the dimension, the position relationship of each point in the original high-dimensional data set is maintained. The reduced-dimensional data set ;
[0046] Then for two points in a high-dimensional data set , define the following formula:
[0047] ;
[0048] in, represent yes The probability of being a "neighbor" of yes The closest The variance value of the points, where is a hyperparameter defined as perplexity;
[0049] Two points in a low-dimensional dataset , the definition formula is as follows:
[0050] ;
[0051] in, represent yes The probability of being a "neighbor" of
[0052] Define KL divergence as the loss function:
[0053] ;
[0054] Use the gradient descent method to minimize the KL divergence, update the position of the point in the low-dimensional space, and solve the gradient formula for each element of the low-dimensional data set as follows:
[0055] ;
[0056] in, Represents the coordinates of each point in the input low-dimensional space, is the similarity between points in low-dimensional space, given by Calculated; It is the similarity between points in high-dimensional space.
[0057] Due to the crowding problem that occurred during the solution process, the formula was modified to the following:
[0058] ;
[0059] The gradient solution is replaced by:
[0060] ;
[0061] in, Represents the coordinates of each point in the input low-dimensional space, is the similarity between points in low-dimensional space, given by Calculated; It is the similarity between points in high-dimensional space.
[0062] (22) The three sets of two-dimensional data after dimensionality reduction are clustered using the K-means clustering method. The details are as follows: First, k initial cluster centers are randomly selected from the data set. , calculate the remaining data objects and cluster centers Euclidean distance (generally used as a measure of similarity between data elements, similarity is inversely proportional to the distance between data objects, the greater the similarity, the smaller the distance), find the cluster center closest to the target data object , and assign data objects to cluster centers The corresponding clusters are then assigned to similar samples. Then the average value of the samples in each cluster is calculated as the new cluster center, and the next iteration is performed until the cluster center no longer changes or the maximum number of iterations is reached. At this time, the difference between elements in the same cluster is the smallest, while the difference between elements in different clusters is the largest. The Euclidean distance calculation formula between the data sample and the cluster center in space is as follows:
[0063] ;
[0064] in, is the data element, For the Cluster centers, is the dimension of the data element, , for and No. attribute value.
[0065] Since this clustering algorithm cannot directly derive the optimal number of clusters, two judgment methods are selected:
[0066] The formula for the sum of squared errors is as follows:
[0067] ;
[0068] The Euclidean distance calculation formula is as follows:
[0069] ;
[0070] in, is the data element, For the Cluster centers, is the dimension of the data element, , for and No. attribute value;
[0071] The silhouette coefficient method formula is as follows:
[0072] ;
[0073] The average silhouette coefficient for the entire dataset:
[0074] ;
[0075] in, Representation sample The average value of the dissimilarity to other points in the same cluster. Representation sample The minimum average dissimilarity to other clusters.
[0076] (3) Using the obtained labels, construct the positive and negative sample training sets required for Contrastive Learning; specifically, record the 500 hPa geopotential height, 850 hPa meridional wind, and zonal wind at the same time as a group of data; and select two groups of data at different times for comparison: if the two groups of data belong to the same composite event category after classification, they are recorded as positive samples; otherwise, the two groups of data come from different categories and are recorded as negative samples; then construct the positive and negative sample training sets and test sets.
[0077] (4) Build a neural network model of a convolutional neural network; the neural network model of a convolutional neural network includes: convolution layer, pooling layer, expansion layer and fully connected layer; introduce a function for calculating the Euclidean distance after the fully connected layer, and write a function to reduce the distance between approximate samples; use the contrast loss that expands the distance between dissimilar samples as the loss function;
[0078] ;
[0079] in, is the network weight, is a pairwise label, if This pair of samples belongs to the same class, then =0, belonging to different classes, =1; yes The Euclidean distance in the latent variable space; when =0, the adjustment parameter is minimized and The distance between =1, and If the distance between them is greater than m, no optimization is performed. and If the distance between them is less than m, increase the distance between them to m.
[0080] (5) Training is performed based on the training set and model; specifically, the following steps are performed: adjusting the model structure and parameters, including: convolution layer settings, pooling layer settings, convolution kernel size, number of channels, learning rate, and the contrast loss function that expands the distance between dissimilar samples (the number of margins in the loss function). The algorithm is continuously optimized to obtain the most accurate model through training.
[0081] (6) Identify extreme low temperature rain and snow complex events based on unlabeled reanalysis data.
Claims
1. A method for identifying extreme low temperature rain and snow compound events based on neural network contrast learning, characterized in that: The following steps are involved: (1) Obtaining extreme low temperature rain and snow composite event data sets and collecting reanalysis data; (2) The extracted 500hPa circulation field and 850hPa wind field of the composite event were reduced in dimension and clustered to obtain three types of extreme low temperature rain and snow composite events with different circulation situation combinations, and each event was classified and labeled; the details are as follows: the nonlinear dimensionality reduction method t-SNE method was used to reduce the dimension of the three elements in the reanalysis data, retaining the structure and similarity in the high-dimensional data; the K-means clustering method was used to cluster the three element fields at the same time, and the error sum of squares and silhouette coefficient method were used to obtain the optimal number of clusters, i.e. the labels of the three types of extreme low temperature rain and snow composite events; among them, the three elements include: 500hPa potential height, 850hPa meridional wind and zonal wind; the nonlinear dimensionality reduction method t-SNE method was used to reduce the dimension of the three elements in the reanalysis data as follows: assuming that the high-dimensional data set is , while reducing the dimension, the position relationship of each point in the original high-dimensional data set is maintained. The reduced-dimensional data set ; Then for two points in a high-dimensional data set , define the following formula: ; in, represent yes The probability of being a "neighbor" of yes The closest The variance value of the points, where is a hyperparameter defined as perplexity; Two points in a low-dimensional dataset , the definition formula is as follows: ; in, represent yes The probability of being a "neighbor" of Define KL divergence as the loss function: ; Use the gradient descent method to minimize the KL divergence, update the position of the point in the low-dimensional space, and solve the gradient formula for each element of the low-dimensional data set as follows: ; in, Represents the coordinates of each point in the input low-dimensional space, is the similarity between points in low-dimensional space, given by Calculated; It is the similarity between points in high-dimensional space; Among them, the K-means clustering method is used to perform cluster analysis on the three element fields at the same time. The specific steps are as follows: First, k initial cluster centers are randomly selected from the data set. , , calculate the Euclidean distance between the remaining data objects and the cluster center to find the cluster center closest to the target data object , and assign data objects to cluster centers In the corresponding cluster, similar samples are classified into the same cluster, and then the average value of samples in each cluster is calculated as the new cluster center, and the next iteration is performed until the cluster center no longer changes or the maximum number of iterations is reached. At this time, the difference between elements in the same cluster is the smallest, and the difference between elements in different clusters is the largest; (3) Using the obtained labels, construct the positive and negative sample training sets required for Contrastive Learning; specifically, record the 500hPa geopotential height, 850hPa meridional wind and zonal wind at the same time as a set of data; and select two sets of data at different times for comparison: if the two sets of data belong to the same composite event category after classification, they are recorded as positive samples; otherwise, the two sets of data come from different categories and are recorded as negative samples; then construct the positive and negative sample training sets and test sets; (4) Build a neural network model of a convolutional neural network; specifically, the neural network model of a convolutional neural network includes: a convolutional layer, a pooling layer, an expansion layer, and a fully connected layer; introduce a function for calculating the Euclidean distance after the fully connected layer, and write a function to reduce the distance between approximate samples; use the contrast loss that expands the distance between dissimilar samples as the loss function; the formula is as follows: ; in, is the network weight, is a pair of labels, if Belong to the same category, then =0; if they belong to different categories, =1; yes and The Euclidean distance in the latent variable space; when =0, the adjustment parameter is minimized and The distance between =1, and If the distance between them is greater than m, no optimization is performed; and If the distance between them is less than m, increase the distance between them to m; (5) Perform training based on the training set and model; specifically: adjust the model structure and parameters including: convolution layer settings, pooling layer settings, convolution kernel size, number of channels, learning rate, number of margins in the loss function, continuously optimize the algorithm, and train to obtain the most accurate model; (6) Identify extreme low temperature rain and snow complex events based on unlabeled reanalysis data.
Citation Information
Patent Citations
Weather forecasting method and device based on multi-scale numerical weather forecasting mode fusion
CN114386654A