A lightning automatic prediction method based on prediction highly abstract feature network
By constructing a highly abstract feature network based on prediction, the problems of high complexity and misjudgment in lightning prediction are solved, and efficient and accurate automatic lightning prediction is achieved, which is suitable for practical applications.
Patent Information
- Application Number
- CN202310528208.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-05-11
AI Technical Summary
The existing lightning prediction methods have high complexity and low computing efficiency, and cannot effectively identify multi-scale and multi-resolution thunderstorms. In addition, deep learning methods have problems of misjudgment and misjudgment in long-term prediction.
Using a method based on prediction of highly abstract feature networks, we use 6 types of meteorological element data to determine data preprocessing, extract and fuse abstract features, build a multi-GRU unit network for prediction, and calibrate the output with a bias corrector, and finally achieve lightning prediction within 6 hours.
It realizes efficient and accurate automatic lightning prediction, replaces manual prediction, improves the accuracy of lightning prediction, and is suitable for practical applications.
Smart Images

Figure CN116611023B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ground meteorological observation in atmospheric detection, and in particular relates to an automatic lightning prediction method based on a prediction highly abstract feature network. Background Art
[0002] In atmospheric science, lightning is a product of atmospheric instability and a severe weather phenomenon that accompanies the development of thunderstorms. Lightning is primarily a discharge between thunderstorm clouds and the ground. Its fundamental cause is the upward flow of air within thunderstorm clouds, which creates a potential difference between the clouds. When this potential difference exceeds a certain threshold, lightning can occur. As a natural disaster, lightning not only impacts people's daily lives and economic production, but also causes significant damage to national defense and the military. Lightning causes significant loss of life, property, and financial and economic losses to countries worldwide. Therefore, to ensure the safety of people and property and mitigate the significant impact of lightning on society and the nation, timely and reliable lightning warnings and forecasts are essential, providing more accurate, reliable, and efficient lightning forecasts. In recent years, China has implemented large-scale deployment and network observation of the ADTD lightning location system for lightning monitoring. This system can monitor the occurrence and development of thunderstorms in real time, providing reliable data support for lightning monitoring, warning, and scientific research, and is also of great significance for lightning weather forecasting.
[0003] Traditional lightning prediction methods primarily rely on theoretical research into the mechanisms of lightning generation and the construction of numerical calculation models. Theoretical research on lightning generation mechanisms primarily combines meteorological atmospheric motion processes with in-depth studies of the mechanisms involved in lightning generation, discharge, and development trends. However, because this type of research is limited to theoretical analysis, its application in actual lightning prediction remains challenging and requires a transition from theoretical to practical application. my country's current mainstream lightning prediction methods utilize real-time ADTD lightning location data and lightning echo data, supplemented by a variety of meteorological and physical parameters closely related to lightning. These methods construct prediction models through mathematical theories such as differential equations and Markov random fields to perform short-term lightning predictions. However, this approach often results in "missed" and "misjudgment" of lightning, a problem characterized by high randomness and contingency.
[0004] With the widespread application of deep learning in atmospheric science research, various deep learning methods have achieved remarkable results in meteorological forecasting. For example, the use of convolutional neural networks to extract spatial features and recurrent neural networks to construct time series networks have achieved certain results. However, due to the variability of atmospheric activity, the randomness and contingency of lightning generation make traditional numerical calculation methods and deep learning methods unreliable for actual lightning forecasting, often resulting in "missed" and "misjudgment" of lightning. Therefore, it is necessary to continuously analyze the shortcomings of numerical calculation methods and deep learning methods and make substantial improvements in their practical applications. Summary of the Invention
[0005] Purpose of the Invention: The technical problems to be solved by this invention are the high complexity and low computational efficiency of numerical lightning calculations, the inability to effectively identify multi-scale and multi-resolution thunderstorms, and the problems of poor long-term prediction results, complex networks, and "misjudgment" of strong non-lightning meteorological element characteristics when using deep learning methods, as well as "missed judgment" of lightning with weak meteorological element characteristics. To solve the above technical problems, the present invention adopts a technical solution: providing an automatic lightning prediction method based on a highly abstract feature network, which includes the following steps:
[0006] Step 1: Determine the input data as six types of meteorological element data and divide the data set: determine the input meteorological elements related to lightning, download the data set, and divide the data set into training and testing;
[0007] Step 2: Preprocess the input data: The preprocessing of meteorological element data first involves gridding the data, finding the gradient, and normalizing it. After gridding, the label data is converted into a form represented by 0 and 1.
[0008] Step 3: Extract abstract features of the six meteorological elements: Construct an encoder with two layers of convolution and excitation functions and one pooling operation to continuously downsample the six meteorological elements to extract highly abstract features;
[0009] Step 4: Fusion of the abstract features of the six meteorological elements: Adaptively fuse the abstract features of the six meteorological elements by assigning weights to the six meteorological elements;
[0010] Step 5: Construct an abstract feature prediction network: Use a prediction network with a multi-GRU unit network stacked in series to predict highly abstract features within 6 hours.
[0011] Step 6: Restore the predicted highly abstract features: Use the constructed decoder to restore the highly abstract features output by the prediction network;
[0012] Step 7: Train the prediction network: Initialize the network parameters first, then calculate the total loss of network prediction and label according to the designed loss function, then use the designed optimization method to gradually update the network parameters according to the size of the loss, and finally use the test data to select the optimal prediction network;
[0013] Step 8: Calibrate the network output and output the final lightning prediction result: Use the deviation corrector to check and correct the output of the prediction network;
[0014] Step 9: Output the lightning prediction result within X1 (the value is 6 in this invention) hours:
[0015] Step 1 includes the following steps:
[0016] Step 1-1: Determine the input data as six meteorological element data at one-hour intervals. The six meteorological element data are temperature T, horizontal wind speed U, vertical wind speed V, specific humidity Q, radar echo intensity R, and aerosol concentration A. Collect input data from the last 10 years to form a dataset. The lightning labels used correspond one-to-one with the dataset in both time and space.
[0017] In step 1-2, the dataset is divided using the holdout method.
[0018] Step 1-2 includes the following steps:
[0019] In step 1-2-1, randomly select one year of data from the dataset as the test set, and the remaining nine years of data as the training set;
[0020] In step 1-2-2, use the test set to test the prediction accuracy of the network after each update of the network parameters and record the results. Then, put the test set back into the entire data set and return to step 1-2-1 for partitioning.
[0021] Step 1-2-3, repeat steps 1-2-1 to 1-2-2 until all 6 types of meteorological element data sets have only one test set.
[0022] Step 2 includes the following steps:
[0023] Step 2-1, gridding data: using the nearest neighbor method to grid the six types of meteorological element data and corresponding label data according to actual needs;
[0024] Step 2-2, converting the gridded lightning data into a representation of 0 and 1, where 0 represents no lightning and 1 represents lightning;
[0025] Step 2-3: Calculate the gradient values corresponding to the gridded data of the six types of meteorological elements:
[0026]
[0027] Among them, Gradu is the gradient value; Find the partial derivative of u with respect to x; Find the partial derivative of u with respect to y; Find the partial derivative of u with respect to z; To find the partial derivative with respect to x; To find the partial derivative with respect to y; To find the partial derivative with respect to z.
[0028] Step 2-4, normalize the gradient value to [0,1]: Use the maximum value normalization method to normalize the grid gradient data values of the six types of meteorological elements. The calculation formula is:
[0029]
[0030] in Indicates the value of the meteorological element gradient at the ijth grid point after normalization by the maximum value, where i represents a row of grid points in the identified area, j represents a column of grid points in the identified area, the minimum value of i is 1, and the maximum value is the total number of rows of grid points in the identified area, and the minimum value of j is 1, and the maximum value is the total number of columns of grid points in the identified area; Represents the unnormalized gradient value of the meteorological element at the original ij grid point; max f Indicates the maximum gradient before normalization; mix f is the minimum gradient before normalization.
[0031] Step 3 includes the following steps:
[0032] Step 3-1, build the encoder: The encoder's structural unit uses a double-layer series of ordinary convolution operations and activation operations. The activation function is the ReLU function. The convolution kernel is set to 3×3, the stride is set to 2, and the padding is set to 1. Finally, a maximum pooling operation is performed with the kernel size set to 2×2, the stride is set to 2, and the padding is set to 1.
[0033] Step 3-2, use the encoder to extract the abstract features of the six types of meteorological elements: The encoder of this method is composed of Y1 (the value is 4 in the invention) structural units in series. The number of structural units depends on the size of the lightning prediction area and the number of grid points after gridding. If the prediction area is small and the number of grid points is small, it can be connected by 3 structural units in series. Similarly, if the prediction area is large and the number of grid points is large, more structural units in series are added. The input data is reduced to 1 / 2 of its original size after passing through each structural unit. After passing through the encoder with 4 structural units, the size of the input data becomes one-sixteenth of the original size, thereby obtaining the abstract features of the six types of meteorological elements. Finally, the highly abstract feature data of the six types of meteorological elements are input into the adaptive fusion network for fusion.
[0034] Step 4 includes:
[0035] Fusion of abstract features of 6 types of meteorological elements: Adopting adaptive fusion method to fuse the abstract features of 6 types of meteorological elements, the mathematical formula is as follows:
[0036]
[0037] where y ij Represents the result after adaptive fusion, n represents the total number of abstract features of the six types of multi-meteorological elements input, and in this method, n is 6. is the category weight, It is the data of 6 types of meteorological elements, where n represents temperature, horizontal wind speed, vertical wind speed, specific humidity, radar echo intensity and aerosol concentration.
[0038] Step 5 includes the following steps:
[0039] In step 5-1, the predicted highly abstract feature network uses a gated recurrent unit (GRU) network: the update gate update and the reset gate rest in the GRU network are calculated as follows:
[0040] update=σ(w1[h t-1 ,x t ]+b2),
[0041] rest=σ(w2[h t-1 ,x t ]+b2);
[0042] Among them, σ is a parameter value from 0 to 1, which controls the content written into the memory and the content retained in the previous memory; w1 and w2 are parameter values from 0 to 1, which control the hidden layer at the previous moment; h t-1 is the hidden layer at the previous moment, x t is the input at the current moment; b2 is the bias parameter.
[0043] In step 5-2, the structure of the predicted highly abstract feature network adopts a serial stacking structure, and n (abstract feature number) unit GRU networks are divided into six groups and stacked together in series, and each group of GRU networks outputs 1 hour of predicted abstract features.
[0044] Step 6 includes the following steps:
[0045] Step 6-1, construct the decoder: The decoder's structural unit uses the same two-layer cascaded convolution operation and activation operation as the encoder. The convolution kernel is set to 3×3, the stride is set to 2, and the padding is set to 1. The activation function is the ReLU function. Finally, unlike the encoder, the deconvolution operation is performed, with the convolution kernel size set to 2×2, the stride is set to 2, and the padding is set to 1.
[0046] Step 6-2, restore the predicted highly abstract features: Use the decoder to restore the highly abstract features predicted by the prediction highly abstract feature network, where the number of structural units in the decoder is the same as the number of structural units in the encoder. Each time the input data passes through a structural unit, the shape and size are expanded to twice the original size. After passing through the decoder with Y1 structural units, the size of the input data is the same as the original.
[0047] Step 7 includes the following steps:
[0048] Step 7-1: Initialize the network parameters for predicting highly abstract features: Kaiming initialization is used for parameter initialization, and the following formula is used to calculate the network parameters: Variance
[0049]
[0050] Among them, M l-1 To predict the number of neurons in the l-1 layer of the highly abstract feature network, the calculation method is to multiply the square of the kernel by the number of channels plus the bias number (equal to the number of channels). For example, this method calculates it as 3*3*1*6+6=60; the uniform distribution in the interval [-r, r] is used to initialize the parameters. The parameters
[0051] Step 7-2, use mini-batch gradient descent to optimize the learning of network parameters: the mini-batch gradient descent method calculation expression is:
[0052]
[0053] Where L(w i ,B) is the small batch loss, w i is the network parameter, B is the bias term, Y i is the prediction result, Y is the true label, and the batch size K adopts the linear scaling rule. K is calculated according to the following equation:
[0054] K=N*I / E
[0055] Where N is the number of training sets; I is the number of iterations; E is the number of training rounds;
[0056] Step 7-3, adjust the learning rate: The learning rate is adjusted based on Zeiler's 2012 improvement on the AdaGrad algorithm. It mainly adjusts the learning rate by taking the exponentially decaying moving average of the squared gradient. The specific calculation method is as follows:
[0057] First, calculate the gradient g at each iteration t The squared exponentially decaying moving average is calculated as:
[0058]
[0059] Where t is the current time, ⊙ is the element-wise product, g τ is the gradient of the τth iteration, β is the decay rate, which is 0.9 in this method.
[0060] Next, calculate the exponentially decayed weighted moving average of the square of the difference △θ for each parameter update:
[0061]
[0062] Finally, the parameter update difference is calculated as:
[0063]
[0064] in, is the exponentially decayed weighted moving average of the parameter update difference △θ; g t is the gradient of each iteration; G t
[0065] The gradient g for each iteration t The exponential decay moving average of the square; ε is a very small constant set to maintain numerical stability, generally set to e -7 to e -10 , this method takes the value of e -8 .
[0066] Step 7-4, layer-by-layer normalization: After predicting the activation function of each layer of the highly abstract feature network, the local response normalization method of Krizhevsky et al. is used to perform local normalization on the adjacent feature maps. The purpose is to balance and constrain the activity values of adjacent neurons and enhance the generalization of the network. It is expressed as follows:
[0067]
[0068] Among them, Y' p To perform local normalization on adjacent feature maps, Y is the output feature map of the convolution layer. (output feature map space); Y p is an output feature map, n, k, α, β are hyperparameters, n is the local normalized feature window size, this method adopts the values in AlexNet, n is 5, k is 2, α is 10e -4 , β is 0.75;
[0069] Step 7-5, use the dual loss function to calculate the loss: The first type of loss function uses the DiceLoss loss function DLoss proposed by Milletari et al. in 2016. Its mathematical calculation formula is as follows:
[0070]
[0071] Where y represents the recognition result, represents the sample label, Indicates that y and The number of intersection points between |y| and denote the number of grid points in y and The number of grid points, smooth is the smoothing parameter (set to 0.1 in this invention). The second type of loss function uses the binary cross entropy loss function L, and the mathematical calculation formula is as follows:
[0072]
[0073] Among them, N is the total number of training data input to the network in a batch, y i is the category of the i-th sample, p i is the predicted value of the i-th sample, which is a probability value.
[0074] Step 7-6, regularize the network: use an elastic network regularization method that adds both l1 and l2 regularization, which is expressed mathematically as:
[0075]
[0076] Among them, θ * is the result of network parameter regularization, arg θ min is the parameter combination function that minimizes the loss. is the loss function, f(.) is the neural network to be learned, θ is the network parameter, l is the norm function, λ1 and λ2 are the coefficients of the two regularization terms l1(θ) and l2(θ) respectively.
[0077] Step 8 includes the following steps:
[0078] Step 8-1, determine the structure of the corrector: the corrector includes a predictor, a discriminator, and a logic operator, wherein the predictor and the discriminator are divided into three categories: water vapor content, vertical wind speed, and electric field strength;
[0079] Step 8-2, determine the input of the deviation corrector: The input of the deviation corrector includes four categories. The first category is the water vapor content within 6 hours, which can be measured by instruments such as microwave radiation sensors. The second category is the vertical wind speed within 6 hours. The third category is the electric field strength within 6 hours, which can be measured by instruments such as airborne electric field detectors. The fourth category is the lightning result predicted by the high-abstract feature network.
[0080] Step 8-3, determine the fitting function of the predictor: The predictor uses the fitting function to predict the data input by the corrector for 1 to 6 hours. The fitting function used by the predictor is a four-parameter fitting regression equation:
[0081]
[0082] Where x is the input data, y is the prediction result at the next moment, and the four parameters A, B, C, and D are obtained by the following steps:
[0083] The first step is to find the values of A, D, C, and B using the following linear form:
[0084]
[0085] The initial value of D is set to the maximum value of the input y value plus 1, and the initial value of A is set to the minimum value of the input y value minus 0.1.
[0086] Step 2: Take partial differentials of the four parameters in the first step equation to obtain the Taylor series expansion of the increments of the given coefficients of y (△A, △D, △C, △B):
[0087]
[0088] Convert the curve regression to a multiple linear regression, iterating the calculations to obtain the variables of the four parameters and gradually correcting the values of the four parameters. Multiple linear regression is similar to the polynomial fitting method. Each iteration calculates the value of the parameter variable, and the new parameter value is the superposition of the original parameter value and the variable value.
[0089] Step 3: Introduce the coefficient k, initially set to 2. Multiply k by the parameter variable matrix to calculate the correlation coefficient. k = k / 2. Repeat 10 times, halving the value of k each time. Take the variable matrix [△A, △D, △C, △B] with the largest correlation coefficient.
[0090] Step 4: The default total number of iterations is 1000, or the iteration stops when the correlation coefficient no longer decreases. The four parameter values are returned.
[0091] In step 8-4, the deviation corrector first uses the predictor to predict the water vapor, vertical wind speed and electric field strength within 6 hours, then inputs the prediction result into the discriminator for judgment, and then inputs the judgment result into the logic operator for logical judgment, and outputs the final prediction result.
[0092] The beneficial effects of the present invention are: the present method can replace manual lightning prediction, and has the advantages of automation and accurate prediction; the present method integrates multiple meteorological elements and predicts lightning within 6 hours by predicting highly abstract features, and has the advantage of high efficiency; the present method is realized on the basis of scientific technical improvements and scientific experiments in many aspects based on the analysis of the advantages and disadvantages of some current automatic lightning prediction methods, and its lightning prediction accuracy is relatively high. Therefore, the present method is very effective in the actual application of automatic prediction within 6 hours and is worthy of promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more apparent.
[0094] Figure 1 It is a schematic flow chart of the method of the present invention.
[0095] Figure 2 It is a schematic diagram of the abstract feature prediction network.
[0096] Figure 3 It is a schematic diagram of the structural unit of the encoder.
[0097] Figure 4 This is a schematic diagram of the encoder structure.
[0098] Figure 5 It is a schematic diagram of the adaptive fusion feature module.
[0099] Figure 6 This is a schematic diagram of the GRU network unit.
[0100] Figure 7 This is a schematic diagram of the GRU stacking network.
[0101] Figure 8 It is a structural diagram of the decoder.
[0102] Figure 9 It is a schematic diagram of the structural unit of the decoder.
[0103] Figure 10 This is the working process diagram of the deviation corrector. DETAILED DESCRIPTION
[0104] The present invention provides a method for automatic lightning prediction based on a prediction highly abstract feature network, comprising the following steps:
[0105] Step 1: Determine the input data as 6 types of meteorological element data and divide the data set into a training set and a test set;
[0106] Step 2, preprocessing input data;
[0107] Step 3, extract the abstract features of 6 types of meteorological elements;
[0108] Step 4: Fusion of abstract features of six types of meteorological elements;
[0109] Step 5: Build a prediction network for highly abstract features;
[0110] Step 6, restore abstract features;
[0111] Step 7: training a network to predict highly abstract features;
[0112] Step 8: calibrate the network to predict lightning results;
[0113] Step 9: Output the lightning prediction results within X1 hours.
[0114] Step 1 includes the following steps:
[0115] Step 1-1: Determine the input data as six meteorological element data at one-hour intervals. The six meteorological element data are temperature T, horizontal wind speed U, vertical wind speed V, specific humidity Q, radar echo intensity R, and aerosol concentration A. Collect input data from the last 10 years to form a dataset. The lightning labels used correspond one-to-one with the dataset in both time and space.
[0116] In step 1-2, the dataset is divided using the holdout method.
[0117] Step 1-2 includes the following steps:
[0118] In step 1-2-1, randomly select one year of data from the dataset as the test set, and the remaining nine years of data as the training set;
[0119] In step 1-2-2, use the test set to test the prediction accuracy of the network after each update of the network parameters and record the results. Then, put the test set back into the entire data set and return to step 1-2-1 for partitioning.
[0120] Step 1-2-3, repeat steps 1-2-1 to 1-2-2 until all 6 types of meteorological element data are used as test sets only once.
[0121] Step 2 includes the following steps:
[0122] Step 2-1, gridding data: using the nearest neighbor method to grid the six types of meteorological element data and corresponding label data according to actual needs;
[0123] Step 2-2, converting the gridded lightning data into a representation of 0 and 1, where 0 represents no lightning and 1 represents lightning;
[0124] Step 2-3: Calculate the gradient values corresponding to the gridded data of the six types of meteorological elements:
[0125]
[0126] Among them, Gradu is the gradient value; Find the partial derivative of u with respect to x; Find the partial derivative of u with respect to y; Find the partial derivative of u with respect to z; To find the partial derivative with respect to x; To find the partial derivative with respect to y; To find the partial derivative with respect to z;
[0127] Step 2-4, normalize the gradient value to [0,1]: Use the maximum value normalization method to normalize the grid gradient data values of the six types of meteorological elements. The calculation formula is:
[0128]
[0129] in Indicates the value of the meteorological element gradient at the ijth grid point after normalization by the maximum value, where i represents a row of grid points in the identified area, j represents a column of grid points in the identified area, the minimum value of i is 1, and the maximum value is the total number of rows of grid points in the identified area, and the minimum value of j is 1, and the maximum value is the total number of columns of grid points in the identified area; Represents the unnormalized gradient value of the meteorological element at the original ij grid point; max f Indicates the maximum gradient before normalization; mix f is the minimum gradient before normalization.
[0130] Step 3 includes the following steps:
[0131] Step 3-1, build the encoder: The structural unit of the encoder adopts a double-layer convolution operation and activation operation in series, the activation function selects the ReLU function, and finally performs a maximum pooling operation;
[0132] Step 3-2, use the encoder to extract the abstract features of 6 types of meteorological elements: the encoder is composed of Y1 structural units connected in series. Each time the input data passes through a structural unit, the shape and size are reduced to 1 / 2 of the original. After passing through Y1 structural units, the abstract features of 6 types of meteorological elements are obtained.
[0133] Step 4 includes:
[0134] Fusion of abstract features of 6 types of meteorological elements: Adopting adaptive fusion method to fuse the abstract features of 6 types of meteorological elements, the mathematical formula is as follows:
[0135]
[0136] where y ij represents the result after adaptive fusion, n represents the total number of abstract features of the six types of multi-meteorological elements input, is the category weight, It is the data of 6 types of meteorological elements, where n represents temperature, horizontal wind speed, vertical wind speed, specific humidity, radar echo intensity and aerosol concentration.
[0137] Step 5 includes the following steps:
[0138] In step 5-1, the predicted highly abstract feature network uses a gated recurrent unit (GRU) network: the update gate update and the reset gate rest in the GRU network are calculated as follows:
[0139] update=σ(w1[h t-1 ,x t ]+b2),
[0140] rest=σ(w2[h t-1 ,x t ]+b2);
[0141] Among them, σ is a parameter value from 0 to 1, which controls the content written into the memory and the content retained in the previous memory; w1 and w2 are parameter values from 0 to 1, which control the hidden layer at the previous moment; h t-1 is the hidden layer at the previous moment, x t is the input at the current moment; b2 is the bias parameter;
[0142] In step 5-2, the structure of the predicted highly abstract feature network adopts a serial stacking structure, and n unit GRU networks are divided into six groups and stacked together in series, and each group of GRU networks outputs 1 hour of predicted abstract features.
[0143] Step 6 includes the following steps:
[0144] Step 6-1, build the decoder: The decoder's structural unit uses the same two-layer series convolution operation and activation operation as the encoder. The activation function uses the ReLU function. Unlike the encoder, it performs deconvolution operation.
[0145] Step 6-2, restore the predicted highly abstract features: Use the decoder to restore the highly abstract features predicted by the prediction highly abstract feature network, where the number of structural units in the decoder is the same as the number of structural units in the encoder. Each time the input data passes through a structural unit, the shape and size are expanded to twice the original size. After passing through the decoder with Y1 structural units, the size of the input data is the same as the original.
[0146] Step 7 includes the following steps:
[0147] Step 7-1: Initialize the network parameters for predicting highly abstract features: Kaiming initialization is used for parameter initialization, and the following formula is used to calculate the network parameters: Variance
[0148]
[0149] Among them, M l-1 To predict the number of neurons in the l-1 layer of the highly abstract feature network, the calculation method is to multiply the square of the kernel by the number of channels plus the bias number (equal to the number of channels). For example, this method calculates it as 3*3*1*6+6=60; the uniform distribution in the interval [-r, r] is used to initialize the parameters. The parameters
[0150] Step 7-2, use mini-batch gradient descent to optimize the learning of network parameters: the mini-batch gradient descent method calculation expression is:
[0151]
[0152] Where L(w i ,B) is the small batch loss, w i is the network parameter, B is the bias term, Y i is the prediction result, Y is the true label, and the batch size K adopts the linear scaling rule. K is calculated according to the following equation:
[0153]
[0154] Where N is the number of training sets; I is the number of iterations; E is the number of training rounds;
[0155] Step 7-3, adjust the learning rate. Use Zeiler's 2012 improvement on the AdaGrad algorithm to adjust the learning rate by taking the exponentially decaying moving average of the squared gradient. The specific calculation method is as follows:
[0156] Calculate the gradient g at each iteration t Squared exponentially decaying moving average:
[0157]
[0158] Where t is the current time, ⊙ is the element-wise product, g τ is the gradient of the τth iteration, β is the decay rate;
[0159] Calculate the exponentially decayed weighted moving average of the square of the difference between each parameter update as:
[0160]
[0161] Calculate the parameter update difference Δθ t for:
[0162]
[0163] Among them, t-1 represents the previous moment; At the tth iteration, the parameter update difference Δθ t The exponentially decaying weighted moving average of the square of g t is the gradient of each iteration; G t The gradient g for each iteration t The exponentially decaying moving average of the square; ε is a constant set to maintain numerical stability;
[0164] Step 7-4, layer-by-layer normalization: After predicting the activation function of each layer of the highly abstract feature network, the local response normalization method is used to locally normalize the adjacent feature maps, which can be expressed as follows:
[0165]
[0166] where Y' p To perform local normalization on adjacent feature maps, Y is the output feature map of the convolution layer. is the output feature map space of M'×N'×P dimensions; Y p is an output feature map, Y j Yes and Y p Different output feature maps, j represents a row and column position under a certain data channel, n, k, α, β are hyperparameters, n is the local normalized feature window size;
[0167] Step 7-5, use the dual loss function to calculate the loss: the first type of loss function uses the DiceLoss loss function DLoss, and the calculation formula is as follows:
[0168]
[0169] Where y represents the recognition result, represents the sample label, Indicates that y and The number of intersection points between |y| and denote the number of grid points in y and The number of grid points, smooth is the smoothing parameter; the second type of loss function uses the binary cross entropy loss function L, and the mathematical calculation formula is as follows:
[0170]
[0171] Among them, N is the total number of training data input to the network in a batch, y i is the category of the i-th sample, p i is the predicted value of the i-th sample, which is a probability value;
[0172] Step 7-6, regularize the network: use the elastic network regularization method proposed by Zou et al. in 2005, which adds both l1 and l2 regularization. The mathematical formula is:
[0173]
[0174] where θ * is the result of network parameter regularization, arg θ min is the parameter combination function that minimizes the loss.
[0175] is the loss function, f(.) is the neural network to be learned, θ is the network parameter, l is the norm function, λ1 and λ2 are the coefficients of the two regularization terms l1(θ) and l2(θ) respectively.
[0176] Step 8 includes the following steps:
[0177] Step 8-1, determine the structure of the corrector: the corrector includes a predictor, a discriminator, and a logical AND operator, wherein the predictor and the discriminator are divided into three categories: water vapor content, vertical wind speed, and electric field strength;
[0178] Step 8-2, determine the input of the deviation corrector: The input of the deviation corrector includes four categories: the first category is the water vapor content within 6 hours, the second category is the vertical wind speed within 6 hours, the third category is the electric field intensity within 6 hours, and the fourth category is the lightning result predicted by the prediction high-abstract feature network;
[0179] Step 8-3, determine the fitting function of the predictor: The predictor uses the fitting function to predict the data input by the corrector for 1 to 6 hours. The fitting function used by the predictor is a four-parameter fitting regression equation:
[0180]
[0181] Where x is the input data, y is the prediction result at the next moment, and the four parameters A, B, C, and D are obtained by the following steps:
[0182] The first step is to find the values of A, D, C, and B using the following linear form:
[0183]
[0184] The initial value of D is set to the maximum value of the input y value plus 1, and the initial value of A is set to the minimum value of the input y value minus 0.1;
[0185] Step 2: Take partial differentials of the four parameters in the first step equation to obtain the Taylor series expansion of the increments of the given coefficients of y (△A, △D, △C, △B):
[0186]
[0187] Convert the curve regression to a multiple linear regression, iterating the calculations to obtain the variables of the four parameters and gradually correcting the values of the four parameters. Multiple linear regression is similar to the polynomial fitting method. Each iteration calculates the value of the parameter variable, and the new parameter value is the superposition of the original parameter value and the variable value.
[0188] Step 3: Introduce the coefficient k, initially set to 2. Multiply k by the parameter variable matrix to calculate the correlation coefficient. k = k / 2. Repeat 10 times, halving the value of k each time. Take the variable matrix [△A, △D, △C, △B] with the largest correlation coefficient.
[0189] Step 4: The default total number of iterations is 1000, or the iteration stops when the correlation coefficient no longer decreases.
[0190] Return the four parameter values obtained;
[0191] In step 8-4, the deviation corrector first uses the predictor to predict the water vapor, vertical wind speed and electric field strength within 6 hours, then inputs the prediction result into the discriminator for judgment, and then inputs the judgment result into the logic operator for logical judgment, and outputs the final prediction result.
[0192] Example
[0193] like Figure 1 As shown, this embodiment provides a method for automatic lightning prediction based on a prediction highly abstract feature network, and the specific implementation includes the following steps:
[0194] Step 1: Network training and testing: First, the downloaded dataset of six meteorological elements from previous years is gridded, its gradients are calculated, and it is normalized before being used as the network input. Next, after initializing the network, the network parameters are trained using the training sample set. Finally, the test sample set is used to select the parameter network with the highest lightning prediction accuracy as the automatic lightning prediction network.
[0195] Step 2, network application prediction: First, input the real-time meteorological element data in the area where lightning prediction is required into the optimal prediction network obtained in step 1; then, input the lightning results predicted by the prediction network into the corrector for judgment; finally, the corrector outputs the final lightning prediction results within six hours.
[0196] Step 1 includes the following steps:
[0197] Step 1-1, determine input data and divide the dataset: determine the input meteorological elements related to lightning, download the dataset, and divide the dataset into training and testing;
[0198] Step 1-1 includes the following steps:
[0199] In step 1-1-1, the input data is determined to be six meteorological element data at one-hour intervals: temperature (T), horizontal wind speed (U), vertical wind speed (V), specific humidity (Q), radar echo intensity (R), and aerosol concentration (A). The entire dataset spans 10 years, and the lightning labels used correspond one-to-one with this dataset in both time and space.
[0200] Step 1-1-2, the method of dividing the data set is to use the classic holdout method to divide the 10-year data set, which specifically includes the following steps:
[0201] Step 1-1-2-1: randomly select one year of data from the 10-year data set as the test set, and the remaining 9 years of data as the training set;
[0202] In step 1-1-2-2, use the test set to test the prediction accuracy of the network after each update of the network parameters and record the results. Then, put the test set back into the entire data set and return to step 1-2-1 to divide it again;
[0203] Step 1-1-2-3, repeat the above two steps until all 6 types of meteorological element data sets have only one test set;
[0204] Step 1-2, preprocessing input data: The preprocessing of meteorological element data first involves gridding the data, calculating the gradient and normalizing it. After gridding, the label data is converted into a form represented by 0 and 1;
[0205] Step 1-2 includes the following steps:
[0206] Step 1-2-1, gridding data: using the nearest neighbor method to grid the six types of meteorological element data and corresponding label data according to actual needs;
[0207] Step 1-2-2: Convert the gridded lightning label data into a representation of 0 and 1, where 0 indicates no lightning and 1 indicates lightning;
[0208] Step 1-2-2, calculate the gradient values corresponding to the gridded data of the six types of meteorological elements: the gradient calculation method is as follows;
[0209]
[0210] Among them, Gradu is the gradient value; Find the partial derivative of u with respect to x; Find the partial derivative of u with respect to y; Find the partial derivative of u with respect to z; To find the partial derivative with respect to x; To find the partial derivative with respect to y; To find the partial derivative with respect to z.
[0211] The fourth dimension of the data is 6, which means the data of the forecast area of 6 types of meteorological elements at the current time and the previous 5 hours are input; the third dimension of the data is 6, which means 6 types of meteorological elements; the first and second dimensions represent the size of the forecast area; the shape and size of the entire input data can be expressed as 6*6*h*w;
[0212] Step 1-2-3, normalize the gradient value to [0,1]: Use the maximum value normalization method to normalize the grid gradient data values of the six types of meteorological elements. The calculation formula is:
[0213]
[0214] in Indicates that the meteorological element gradient value at the ijth grid point is normalized to the maximum value; Represents the unnormalized gradient value of the meteorological element at the original ij grid point; max f Indicates the maximum gradient before normalization; mix f is the minimum gradient before normalization.
[0215] Steps 1-3, extract the abstract features of 6 types of meteorological elements: construct Figure 4 The encoder shown has two layers of convolution and excitation functions and one pooling operation, which downsamples the six types of meteorological elements four times to extract highly abstract features;
[0216] Steps 1-3 include the following steps:
[0217] Step 1-3-1, build the encoder: the structure of the encoder is as follows Figure 4 As shown, its units are as follows Figure 3 The figure shows a double-layer series of ordinary convolution operations and activation operations, where the activation function selects the ReLU function, and finally the maximum pooling operation is performed;
[0218] Step 1-3-2, use the encoder to extract the abstract features of 6 types of meteorological elements: The encoder of this method is as follows Figure 4 As shown in the figure, it is composed of 4 structural units in series. In actual application, the number of structural units depends on the size of the lightning prediction area and the number of grid points after gridding. If the prediction area is small and the number of grid points is small, 3 structural units can be connected in series. Similarly, if the prediction area is large and the number of grid points is large, more structural units in series are added. The input data is reduced to 1 / 2 of its original size after passing through each structural unit. After passing through the encoder with 4 structural units, the size of the input data becomes one sixteenth of the original size. Finally, the highly abstract feature data of these 6 types of meteorological elements are input into the adaptive fusion network for fusion. The data shape is
[0219] Steps 1-4, integrating the abstract features of 6 types of meteorological elements: using Figure 5 The method shown (summation means summation) adaptively fuses the abstract features of the six meteorological elements by assigning weights to the six meteorological elements;
[0220] Steps 1-4 include the following steps:
[0221] Step 1-4-1, fusion of the abstract features of the gradients of the six types of meteorological elements: the adaptive fusion method is used to fuse the abstract features of the gradients of the six types of meteorological elements, which can be expressed by the following mathematical formula:
[0222]
[0223] where y ij It represents the result after adaptive fusion, n represents the total number of input multiple meteorological elements, which is 6 in this method. is the category weight, It is 6 types of meteorological element data, where n represents temperature, horizontal wind speed, vertical wind speed, specific humidity, radar echo intensity and aerosol concentration; after the adaptive fusion module, the data shape is
[0224] Steps 1-5, such as Figure 2 As shown, construct an abstract feature prediction network: use Figure 7 The method shown predicts highly abstract features within 6 hours by stacking multiple GRU unit networks in series.
[0225] Steps 1-5 include the following steps:
[0226] Step 1-5-1, the prediction network structure unit uses the Gated Recurrent Unit (GRU) network: GRU network unit is as follows Figure 6 As shown, the update gate (update) and reset gate (rest) are calculated as follows:
[0227] update=σ(w1[h t-1 ,x t ]+b2)
[0228] rest=σ(w2[h t-1 ,x t ]+b2)
[0229] Among them, σ is a parameter value from 0 to 1, which controls the content written into the memory and the content retained in the previous memory; w1 and w2 are parameter values from 0 to 1, which control the hidden layer at the previous moment; h t-1 is the hidden layer at the previous moment, x t is the input at the current moment; b2 is the bias parameter.
[0230] Step 1-5-2, the prediction network structure adopts a series stacking structure: Figure 7 As shown, n (abstract feature number) unit GRU networks are divided into six groups and stacked in series. The output of each group of GRU networks is the predicted abstract features of 1 hour. At this time, the data shape is That is, it represents the prediction results of six highly abstract lightning features at 1 to 6 hours.
[0231] Steps 1-6, restore the predicted highly abstract features: Use the constructed decoder to restore the highly abstract features output by the prediction network;
[0232] Steps 1-6 include the following steps:
[0233] Step 1-6-1, construct the decoder: The structural unit of the decoder adopts the following Figure 9 The figure shows the same double-layer convolution operation and activation operation as the encoder, where the activation function uses the ReLU function. The final deconvolution operation is different from the encoder.
[0234] Step 1-6-2, restore the highly abstract features after prediction: use Figure 8The decoder shown here restores the highly abstract features predicted by the prediction network. The decoder has the same number of structural units as the encoder. The input data doubles in size after each structural unit. After passing through the decoder with four structural units, the input data remains the same size, with a shape of 6*h*w.
[0235] Steps 1-7, training the prediction network: first initialize the network parameters, then calculate the network loss function according to the designed loss function, then use the designed optimization method to update the network parameters, and finally use the test data to select the optimal prediction network;
[0236] Steps 1-7 include the following steps:
[0237] Step 1-7-1, initialize network parameters: Kaiming initialization is used for network training, where network parameters The variance can be calculated using the following formula:
[0238]
[0239] Among them, M l-1 To predict the number of neurons in the l-1 layer of the highly abstract feature network, the calculation method is to multiply the square of the kernel by the number of channels plus the bias number (equal to the number of channels). For example, this method calculates it as 3*3*1*6+6=60. The parameters are initialized using a uniform distribution in the interval [-r, r]. in
[0240] Step 1-7-2, use mini-batch gradient descent to optimize the learning of network parameters: the mini-batch gradient descent method calculation expression is:
[0241]
[0242] Where L(w i ,B) is the small batch loss, w i is the network parameter, B is the bias term, Y i is the prediction result, Y is the true label, and the batch size K adopts a linear scaling rule, and its value is calculated according to the following equation:
[0243] K=N*I / E
[0244] Where K is the batch size; N is the number of training sets; I is the number of iterations; and E is the number of training rounds.
[0245] Step 1-7-3, adjust the learning rate: use Zeiler 2012's improvement on the AdaGrad algorithm to adjust the learning rate by the exponentially decaying moving average of the squared gradient. The specific calculation method is as follows:
[0246] First, calculate the gradient g at each iteration t The squared exponentially decaying moving average is calculated as:
[0247]
[0248] Where t is the current time, ⊙ is the element-wise product, g τ is the gradient of the τth iteration, β is the decay rate, which is 0.9 in this method.
[0249] Next, calculate the exponentially decayed weighted moving average of the square of the difference △θ for each parameter update:
[0250]
[0251] Finally, the parameter update difference is calculated as:
[0252]
[0253] Where t-1 represents the previous moment, At the tth iteration, the parameter update difference Δθ t The exponentially decaying weighted moving average of the square of is the exponentially decayed weighted moving average of the parameter update difference △θ; g t is the gradient of each iteration; G t The gradient g for each iteration t The exponential decay moving average of the square; ε is a very small constant set to maintain numerical stability, generally set to e -7 to e -10 , this method takes the value of e -8 .
[0254] Step 1-7-4, layer-by-layer normalization: After the activation function of each layer, the local response normalization method of Krizhevsky et al. is used to perform local normalization on the adjacent feature maps. The purpose is to balance and constrain the activity values of adjacent neurons and enhance the generalization of the network. It is expressed as follows:
[0255]
[0256] where Y' p To perform local normalization on adjacent feature maps, Y is the output feature map of the convolution layer. Y p is an output feature map n, k, α, β are hyperparameters, n is the local normalized feature window size, this method adopts the values in AlexNet, n is 5, k is 2, α is 10e -4 , β is 0.75;
[0257] Step 1-7-5, use the dual loss function to calculate the loss: The first type of loss function uses the DiceLoss loss function proposed by Milletari et al. in 2016, and its mathematical calculation formula is as follows:
[0258]
[0259] Where y represents the recognition result, represents the sample label, Indicates that y and The number of intersection points between |y| and Represents y and The number of grid points, smooth is the smoothing parameter (set to 0.1 in this paper).
[0260] The total loss for the first category is calculated as the sum of the labels and predictions from 1 to 6 hours Where y represents the true value and y' represents the predicted value.
[0261] The second type of loss function uses the binary cross entropy loss function, and its mathematical calculation formula is as follows:
[0262]
[0263] Among them, N is the total number of training data input to the network in a batch, y i is the category of the i-th sample, p i is the predicted value of the i-th sample, which is a probability value.
[0264] The total loss for the second category is calculated as the sum of labels and predictions from 1 to 6 hours Where y represents the true value and y' represents the predicted value.
[0265] Finally, the loss of the entire network is
[0266] Step 1-7-6, regularize the network: use an elastic network regularization method that adds both l1 and l2 regularization, which is expressed mathematically as follows:
[0267]
[0268] where θ * is the result of network parameter regularization, arg θ min is the parameter combination function that minimizes the loss. is the loss function, N is the number of training samples, f(.) is the neural network to be learned, θ is the network parameter, l is the norm function, λ1 and λ2 are the coefficients of the two regularization terms respectively.
[0269] Step 2 includes the following steps:
[0270] Step 2-1: Read the six types of meteorological element data within the lightning forecast area: temperature (T), horizontal wind speed (U), vertical wind speed (V), specific humidity (Q), radar echo intensity (R), and aerosol concentration (A) data at the current time and the previous five hours. After data preprocessing, input the data into the optimal network selected in step 1.
[0271] Step 2-2, forward propagation: After the data passes through the forward propagation calculation of the optimal network, the Sigmoid function is used to obtain a two-class lightning 3D probability map within the prediction area;
[0272] Step 2-3, determine the prediction results of lightning in the prediction area: use the 3D probability map output by the prediction network through the Max function to determine the lightning results of each grid point in the prediction area;
[0273] Step 2-4, calibrate the network output and output the final lightning prediction result: Figure 10 The corrector shown checks and corrects the output of the prediction network;
[0274] Steps 2-4 include the following steps:
[0275] Step 2-4-1, determine the structure of the corrector: the corrector is mainly composed of Figure 10 The predictor, discriminator and logic operator shown are composed of the following: the predictor and discriminator are divided into three categories: water vapor content, vertical wind speed and electric field strength.
[0276] Step 2-4-2, determine the input of the corrector: There are four main types of inputs to the corrector. The first type is the water vapor content within 6 hours, which can be measured by instruments such as microwave radiation sensors. The second type is the vertical wind speed within 6 hours. The third type is the electric field strength within 6 hours, which can be measured by instruments such as airborne electric field detectors. The fourth type is the lightning result predicted by the network.
[0277] Step 2-4-3, determine the fitting function of the predictor: the predictor uses the fitting function to predict the data input by the corrector for 1 to 6 hours. The fitting function used by the predictor in this method is a four-parameter fitting regression equation, which is expressed as follows:
[0278]
[0279] Where x is the input data, y is the prediction result at the next moment, and the four parameters A, B, C, and D are obtained by the following steps:
[0280] The first step is to find the values of A, D, C, and B using the following linear form:
[0281]
[0282] The initial value of D is set to the maximum value of the input y value plus 1, and the initial value of A is set to the minimum value of the input y value minus 0.1.
[0283] Step 2: Take partial differentials of the four parameters in the first step equation to obtain the Taylor series expansion of the increments of the given coefficients of y (△A, △D, △C, △B):
[0284]
[0285] Convert the curve regression to a multiple linear regression, iterating the calculations to obtain the variables of the four parameters and gradually correcting the values of the four parameters. Multiple linear regression is similar to the polynomial fitting method. Each iteration calculates the value of the parameter variable, and the new parameter value is the superposition of the original parameter value and the variable value.
[0286] Step 3: Introduce the coefficient k, initially set to 2. Multiply k by the parameter variable matrix to calculate the correlation coefficient. k = k / 2. Repeat 10 times, halving the value of k each time. Take the variable matrix [△A, △D, △C, △B] with the largest correlation coefficient.
[0287] Step 4: The default total number of iterations is 1000, or the iteration stops when the correlation coefficient no longer decreases. The four parameter values are returned.
[0288] In order to achieve better fitting results, other better fitting functions can also be used.
[0289] Step 2-4-4, the working mode of the deviation corrector: Figure 10 The corrector shown first uses a predictor to predict water vapor, vertical wind speed, and electric field strength within six hours. The predicted results are then fed into three discriminators for evaluation. The water vapor content discriminator has a threshold of 90%; if it is greater than or equal to 90%, the output is 1, otherwise it is 0. The vertical wind speed discriminator has a threshold of 0.5 m / s; if it is greater than 0.5 m / s, the output is 1, otherwise it is 0. The electric field strength discriminator has a threshold of 3 kV / mm; if it is greater than 3 kV / mm, the output is 1, otherwise it is 0. Finally, a logic operator performs an AND operation on the prediction results of the highly abstract feature network and the output of the discriminator to output the final lightning prediction result for the predicted area.
[0290] The present invention provides a method for automatic lightning prediction based on a highly abstract feature network. There are many methods and approaches for implementing this technical solution. The above is only a preferred embodiment of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention. Any components not specified in this embodiment may be implemented using existing technologies.
Claims
1. A lightning automatic prediction method based on a prediction highly abstract feature network, characterized in that: The following steps are involved: Step 1: Determine the input data as 6 types of meteorological element data and divide the data set into a training set and a test set; Step 2, preprocessing input data; Step 3, extracting abstract features of 6 types of meteorological elements; Step 4: Fusion of abstract features of six types of meteorological elements; Step 5: Construct a prediction network for highly abstract features; Step 6, restore abstract features; Step 7: training a network to predict highly abstract features; Step 8: Calibrate the network to predict lightning results; Step 9: Output the lightning prediction results within X1 hours; Step 5 includes the following steps: In step 5-1, the predicted highly abstract feature network uses a gated recurrent unit (GRU) network. The calculation of the update gate (update) and the reset gate (rest) in the GRU network is as follows: update=σ(w1[h t-1 ,x t ]+b2), rest=σ(w2[h t-1 ,x t ]+b2); Among them, σ is a parameter value from 0 to 1, which controls the content written into the memory and the content retained in the previous memory; w1 and w2 are parameter values from 0 to 1, which control the hidden layer at the previous moment; h t-1 is the hidden layer at the previous moment, x t is the input at the current moment; b2 is the bias parameter; Step 5-2: The structure of the predicted highly abstract feature network adopts a serial stacking structure, wherein n units of GRU networks are divided into six groups and stacked in series, and each group of GRU networks outputs an hour of predicted abstract features; Step 6 includes the following steps: Step 6-1, build the decoder: The decoder's structural unit uses the same two-layer series convolution operation and activation operation as the encoder. The activation function uses the ReLU function. Unlike the encoder, it performs deconvolution operation. Step 6-2, restore the predicted highly abstract features: Use the decoder to restore the highly abstract features predicted by the prediction highly abstract feature network, where the number of structural units in the decoder is the same as the number of structural units in the encoder. Each time the input data passes through a structural unit, the shape and size are expanded to twice the original size. After passing through the decoder with Y1 structural units, the size of the input data is the same as the original.
2. The method according to claim 1, characterized in that Step 1 includes the following steps: Step 1-1: Determine the input data as six meteorological element data at one-hour intervals. The six meteorological element data are temperature T, horizontal wind speed U, vertical wind speed V, specific humidity Q, radar echo intensity R, and aerosol concentration A. Collect the input data to form a dataset. The lightning labels used correspond one-to-one with the dataset in both time and space. In step 1-2, the dataset is divided using the holdout method.
3. The method according to claim 2, characterized in that Step 1-2 includes the following steps: In step 1-2-1, randomly select one year of data from the dataset as the test set, and the remaining data as the training set; In step 1-2-2, use the test set to test the prediction accuracy of the network after each update of the network parameters and record the results. Then, put the test set back into the entire data set and return to step 1-2-1 for partitioning. Step 1-2-3, repeat steps 1-2-1 to 1-2-2 until all 6 types of meteorological element data are used as test sets only once.
4. The method according to claim 3, characterized in that Step 2 includes the following steps: Step 2-1, gridding data: using the nearest neighbor method to grid the six types of meteorological element data and corresponding label data according to actual needs; Step 2-2, converting the gridded lightning data into a representation of 0 and 1, where 0 represents no lightning and 1 represents lightning; Step 2-3: Calculate the gradient values corresponding to the gridded data of the six types of meteorological elements: Among them, Gradu is the gradient value; Find the partial derivative of u with respect to x; Find the partial derivative of u with respect to y; Find the partial derivative of u with respect to z; To find the partial derivative with respect to x; To find the partial derivative with respect to y; To find the partial derivative with respect to z; Step 2-4, normalize the gradient value to [0,1]: Use the maximum value normalization method to normalize the grid gradient data values of the six types of meteorological elements. The calculation formula is: in Indicates the value of the meteorological element gradient at the ijth grid point after normalization by the maximum value, where i represents a row of grid points in the identified area, j represents a column of grid points in the identified area, the minimum value of i is 1, and the maximum value is the total number of rows of grid points in the identified area, and the minimum value of j is 1, and the maximum value is the total number of columns of grid points in the identified area; Represents the unnormalized gradient value of the meteorological element at the original ij grid point; max f Indicates the maximum gradient before normalization; mix f is the minimum gradient before normalization.
5. The method according to claim 4, characterized in that Step 3 includes the following steps: Step 3-1, build the encoder: The structural unit of the encoder adopts a double-layer convolution operation and activation operation in series, the activation function selects the ReLU function, and finally performs a maximum pooling operation; Step 3-2, use the encoder to extract the abstract features of 6 types of meteorological elements: the encoder is composed of Y1 structural units connected in series. Each time the input data passes through a structural unit, the shape and size are reduced to 1 / 2 of the original. After passing through Y1 structural units, the abstract features of 6 types of meteorological elements are obtained.
6. The method according to claim 5, characterized in that Step 4 includes: Fusion of abstract features of 6 types of meteorological elements: Adopting adaptive fusion method to fuse the abstract features of 6 types of meteorological elements, the mathematical formula is as follows: where y ij represents the result after adaptive fusion, n represents the total number of abstract features of the six types of multi-meteorological elements input, is the category weight, It is the data of 6 types of meteorological elements, where n represents temperature, horizontal wind speed, vertical wind speed, specific humidity, radar echo intensity and aerosol concentration.
7. The method according to claim 6, characterized in that Step 7 includes the following steps: Step 7-1: Initialize the network parameters for predicting highly abstract features: Kaiming initialization is used for parameter initialization, and the following formula is used to calculate the network parameters: Variance Among them, M l-1 To predict the number of neurons in the l-1 layer of the highly abstract feature network, the uniform distribution in the interval [-r, r] is used to initialize the parameters The parameters Step 7-2, use mini-batch gradient descent to optimize the learning of network parameters: the mini-batch gradient descent method calculation expression is: Where L(w i ,B) is the small batch loss, w i is the network parameter, B is the bias term, Y i is the prediction result, Y is the true label, and the batch size K adopts the linear scaling rule. K is calculated according to the following equation: K=N*I / E Where N is the number of training sets; I is the number of iterations; E is the number of training rounds; Step 7-3, adjust the learning rate. The specific calculation method is as follows: Calculate the gradient g at each iteration t Squared exponentially decaying moving average: Where t is the current time, ⊙ is the element-wise product, g τ is the gradient of the τth iteration, β is the decay rate; Calculate the exponentially decayed weighted moving average of the square of the difference between each parameter update as: Calculate the parameter update difference Δθ t for: Among them, t-1 represents the previous moment; At the tth iteration, the parameter update difference Δθ t The exponentially decaying weighted moving average of the square of g t is the gradient of each iteration; G t The gradient g for each iteration t The exponentially decaying moving average of the square; Y is a constant set to maintain numerical stability; Step 7-4, layer-by-layer normalization: After predicting the activation function of each layer of the highly abstract feature network, the local response normalization method is used to locally normalize the adjacent feature maps, which can be expressed as follows: where Y' p To perform local normalization on adjacent feature maps, Y is the output feature map of the convolution layer. is the output feature map space of M,×N,×P dimensions; p is an output feature map, Y j Yes and Y p A different output feature map, n, k, α, β are hyperparameters, n is the local normalized feature window size; Step 7-5, use the dual loss function to calculate the loss: the first type of loss function uses the DiceLoss loss function DLoss, and the calculation formula is as follows: Where y represents the recognition result, represents the sample label, Indicates that y and The number of intersection points between |y| and denote the number of grid points in y and The number of grid points, smooth is the smoothing parameter; the second type of loss function uses the binary cross entropy loss function L, and the mathematical calculation formula is as follows: Among them, N is the total number of training data input to the network in a batch, y i is the category of the i-th sample, p i is the predicted value of the i-th sample, which is a probability value; Step 7-6, regularize the network: use an elastic network regularization method that adds both l1 and l2 regularization, which can be expressed mathematically as follows: where θ * is the result of network parameter regularization, arg θ min is the parameter combination function that minimizes the loss. is the loss function, f(.) is the neural network to be learned, θ is the network parameter, l is the norm function, λ1 and λ2 are the coefficients of the two regularization terms l1(θ) and l2(θ), respectively.
8. The method according to claim 7, characterized in that Step 8 includes the following steps: Step 8-1, determine the structure of the corrector: the corrector includes a predictor, a discriminator, and a logical AND operator, wherein the predictor and the discriminator are divided into three categories: water vapor content, vertical wind speed, and electric field strength; Step 8-2, determine the input of the deviation corrector: The input of the deviation corrector includes four categories: the first category is the water vapor content within 6 hours, the second category is the vertical wind speed within 6 hours, the third category is the electric field intensity within 6 hours, and the fourth category is the lightning result predicted by the prediction high-abstract feature network; Step 8-3, determine the fitting function of the predictor: The predictor uses the fitting function to predict the data input by the corrector for 1 to 6 hours. The fitting function used by the predictor is a four-parameter fitting regression equation: Where x is the input data, y is the prediction result at the next moment, and the four parameters A, B, C, and D are obtained by the following steps: The first step is to find the values of A, D, C, and B using the following linear form: The initial value of D is set to the maximum value of the input y value plus 1, and the initial value of A is set to the minimum value of the input y value minus 0.1; Step 2: Take partial differentials of the four parameters in the first step equation to obtain the Taylor series expansion of the increments △A, △D, △C, and △B of the given coefficients of y: Convert the curve regression into multiple linear regression, obtain the variables of four parameters through iterative calculation, and gradually correct the values of the four parameters; Step 3: Introduce the coefficient k, set its initial value to 2, multiply k by the variable matrix of the parameter, calculate the correlation coefficient, k = k / 2, repeat 10 times, halve the value of k each time, and take the variable matrix [△A, △D, △C, △B] with the largest correlation coefficient obtained in the cycle; Step 4: The default total number of iterations is 1000, or when the correlation coefficient no longer decreases, the iteration stops; the four parameter values are returned; In step 8-4, the deviation corrector first uses the predictor to predict the water vapor, vertical wind speed and electric field strength within 6 hours, then inputs the prediction result into the discriminator for judgment, and then inputs the judgment result into the logic operator for logical judgment, and outputs the final prediction result.
Citation Information
Patent Citations
Lightning automatic prediction method based on multi-gradient feature fusion network
CN115859222A
Neural network for predicting lightning
US5140523A