Lightning prediction method based on K-CL network

By adopting K-CL network in lightning prediction and combining CNN, LSTM and KAN, the problems of insufficient prediction accuracy and insufficient adaptability in the prior art are solved, and higher prediction accuracy and generalization capabilities are achieved.

CN119937058APending Publication Date: 2025-05-06NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510004657.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Existing lightning prediction methods have limited performance in dealing with complex atmospheric physical parameters and space-time dependencies, resulting in insufficient prediction accuracy and insufficient model adaptability.

Method used

A lightning prediction method based on K-CL network is adopted, combining convolutional neural network (CNN), long and short-term memory network (LSTM) and Kolmogorov-Arnold network (KAN) to efficiently extract spatial and timing features and optimize model output through the KAN layer.

Benefits of technology

It significantly improves the accuracy and generalization ability of lightning prediction, reduces the interference of noise and outliers in the prediction results, and provides new technical means for accurate prediction and early warning of lightning activities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119937058A_ABST
    Figure CN119937058A_ABST
Patent Text Reader

Abstract

The invention discloses a lightning prediction method based on a K-CL network, and the method comprises the following steps: 1, selecting atmospheric physical parameters related to lightning, collecting the atmospheric physical parameters, and taking a lightning frequency corresponding to the atmospheric physical parameters as a data set; step 2, constructing a lightning prediction model for predicting lightning frequency; 3, dividing the data set into a training set and a verification set; atmospheric physical parameters in the data set serve as input data of the lightning prediction model, lightning frequency corresponding to the atmospheric physical parameters serves as output data of the lightning prediction model, the training set and the verification set are adopted to train and verify the lightning prediction model, and the trained lightning prediction model is obtained; and step 4, inputting atmospheric physical parameters to be predicted into the trained lightning prediction model, and predicting the lightning frequency. And the prediction precision and generalization ability of the model are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of meteorological forecasting, and in particular relates to a lightning forecasting method based on a K-CL network. Technical Background

[0002] Existing lightning potential and frequency prediction methods mainly rely on simple atmospheric parameter statistical models or traditional machine learning algorithms such as logistic regression, support vector machine and random forest. However, these methods are usually limited to analyzing a single lightning index and fail to fully integrate the impact of complex atmospheric physical parameters on lightning activity. In addition, traditional methods have limited performance in dealing with nonlinearity and spatiotemporal dependencies, making it difficult to accurately predict complex and changeable lightning events, resulting in insufficient prediction accuracy and weak generalization ability in region-specific lightning activities.

[0003] In recent years, deep learning models (such as convolutional neural networks (CNNs) and long short-term memory (LSTMs)) have made some progress in the field of lightning prediction. However, these models still have shortcomings in dealing with long-term series dependencies and local spatial features, and their ability to optimize different parameters is limited, which cannot effectively improve the robustness and accuracy of the models. Summary of the invention

[0004] The technical problem to be solved by the present invention is the insufficient prediction accuracy of lightning and the insufficient adaptability of the model. Specifically, the present invention proposes a lightning prediction method based on a K-CL network, comprising the following steps:

[0005] Step 1, selecting atmospheric physical parameters related to lightning, collecting the atmospheric physical parameters and lightning frequencies corresponding to the atmospheric physical parameters as a data set;

[0006] Step 2: construct a lightning prediction model to predict lightning frequency;

[0007] The lightning prediction model includes a convolutional neural network (CNN) module, a long short-term memory (LSTM) network module, and a KAN module connected in sequence;

[0008] Step 3, dividing the data set into a training set and a validation set; using the atmospheric physical parameters in the data set as input data of the lightning prediction model, and the lightning frequency corresponding to the atmospheric physical parameters as output data of the lightning prediction model, and using the training set and the validation set to train and validate the lightning prediction model respectively, to obtain a trained lightning prediction model;

[0009] Step 4: Input the atmospheric physical parameters to be predicted into the trained lightning prediction model to predict the lightning frequency.

[0010] The method of the present invention combines convolutional neural networks (CNN), long short-term memory networks (LSTM) and Kolmogorov-Arnold networks (KAN). The method of the present invention can efficiently extract spatial and temporal features, and optimize the output results through the KAN layer, thereby significantly improving the prediction accuracy and generalization ability of the model.

[0011] A hybrid structure of convolution and time series modeling designed for meteorological forecasting tasks: The lightning prediction model of the present invention specially designs a convolution layer (CNN) to process spatial features, uses an LSTM layer to capture time series dependencies, and further optimizes the model output through a KAN layer. This hybrid structure is specifically designed for forecasting meteorological data (such as the frequency of lightning occurrence, etc.), and can better adapt to the complexity and time series characteristics of meteorological data. Furthermore, the atmospheric physical parameters related to lightning are selected in step 1, specifically using the t-test method and the Pearson correlation coefficient method to perform a significance test on the atmospheric physical parameters to obtain the atmospheric physical parameters related to lightning.

[0012] Furthermore, the atmospheric physical parameters related to lightning described in step 1 are specifically the thickness of the CAPE layer Hd_EL, the Faust index, the Doswell cloud layer thickness Dc, the convective effective potential energy Cape, the temperature of the convective condensation height CCL_T, the generalized convective effective potential energy GCAPE, the lift index Ld_EL at the equilibrium level, the air pressure ELC_P of the equilibrium layer, the maximum convective stability index BIC, -30H, -20H, -40H, the integral quantity IntegralQ, the critical value of the integral quantity lQ, the downdraft convective available potential energy DCAPE and the octant aa8 of the convective available potential energy, totaling 16 atmospheric physical parameters.

[0013] Furthermore, the atmospheric physical parameters and lightning frequency data in the data set are data that have been cleaned, normalized and standardized, ensuring that the lightning prediction model of the present invention can be effectively trained on the normalized data and can capture complex spatial relationships.

[0014] Furthermore, the lightning-related atmospheric physical parameters selected in step 1 are verified using a random forest algorithm.

[0015] Furthermore, the convolutional neural network (CNN) module includes multiple convolutional layers and a pooling layer; the multiple convolutional layers are sequentially connected to perform multiple spatial feature extractions on the input atmospheric physical parameters, and the spatial features finally extracted are input to the pooling layer for pooling to obtain the feature Y output by the convolutional neural network (CNN) module. CNN ;

[0016] The feature Y CNNInput into the long short-term memory network LSTM module to extract long-term dependency information and obtain the feature h LSTM ;

[0017] The feature Y output by the convolutional neural network CNN module CNN The feature h extracted by the long short-term memory network LSTM module LSTM Input to the KAN module for optimization, as shown below:

[0018]

[0019] Among them, Optim() represents the optimization operation of the KAN module.

[0020] The present invention introduces a KAN layer on the features output by the LSTM network to perform full connection optimization. The design of the KAN layer aims to optimize the network structure and enhance the modeling capability of complex relationships in weather forecasting tasks.

[0021] Furthermore, the goal of the optimization operation is to minimize the following loss function l:

[0022]

[0023] Where N is the number of samples in the dataset, is the lightning frequency prediction value for the i-th group of samples output by KAN, y i is the actual lightning frequency in the i-th group of samples.

[0024] Furthermore, the Adam optimizer and the MSE loss function are used to train the lightning prediction model. The present invention adopts a strategy combining the Adam optimizer with the mean square error (MSE) loss function to ensure the balance between the model convergence speed and accuracy during the training process, thereby ensuring efficient training and better prediction performance of meteorological forecasting tasks.

[0025] In the process of model training and evaluation, a variety of evaluation indicators (such as MSE, RMSE, MAE and R 2 ) to comprehensively evaluate the model performance, ensure that the model's performance at different levels is fully evaluated, and provide a basis for subsequent model optimization.

[0026] Furthermore, suppose the lightning prediction model has a hyperparameter λ, and the candidate values ​​are {λ1, λ2, …, λ k}, using network search, the goal of grid search is to minimize the loss function l(λ).

[0027]

[0028] Here, l(λ) represents the loss function calculated for each hyperparameter combination λ.

[0029] Furthermore, the lightning prediction model is optimized using a Bayesian optimization method.

[0030] Beneficial effects: The present invention proposes a lightning prediction method based on the K-CL network. The lightning prediction method of the present invention combines the local feature extraction capability of the convolutional neural network, the time series modeling capability of the LSTM network, and the optimization capability of the Kolmogorov-Arnold network (KAN), overcoming the limitations of traditional methods in dealing with complex atmospheric physical parameters and spatiotemporal dependencies. Through this new method, the dynamic changes of lightning activities can be captured more accurately, and the generalization ability of the model in different regions and meteorological conditions can be improved. At the same time, the interference of noise and outliers in the prediction results can be reduced, providing new technical means and theoretical basis for the accurate prediction and early warning of lightning activities. In addition, the present invention also optimizes the computing efficiency, so that it has better application prospects on large-scale data sets, and can provide efficient technical support for meteorological disaster early warning systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a structural diagram of the lightning prediction model of the present invention; DETAILED DESCRIPTION

[0032] In order to make the purpose, technical scheme and advantages of the present invention clearer, the specific implementation of the present invention is described below in combination with the implementation mode and the accompanying drawings, so that those skilled in the art can better understand the present invention. It should be particularly noted that the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and are not intended to limit the scope of the invention claimed for protection. All other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The present invention is based on a method for predicting the potential and frequency of lightning based on atmospheric physical parameters. Specifically, the K-CL network model is used, combined with deep learning technology to analyze atmospheric physical data, to predict the potential and frequency of lightning. The method of the present invention can also be widely used in the fields of meteorological disaster warning, intelligent meteorological analysis and natural disaster prevention and control, and has important application value and social benefits.

[0033] Embodiment 1

[0034] The present invention provides a lightning prediction method based on a K-CL network, comprising the following steps:

[0035] Step 1: Data collection and preprocessing

[0036] (1) Data collection and processing

[0037] First, collect lightning frequency and atmospheric physical parameter data from multiple meteorological stations as raw data. The data sources should include radar data, satellite observation data, and real-time monitoring data from ground meteorological stations. The meaning of each collected atmospheric physical parameter is shown in Table 1:

[0038] Table 1

[0039]

[0040] (2) Data cleaning and denoising: Thoroughly clean the raw data and remove outliers and noise data to ensure the purity of the raw data. Statistical anomaly detection techniques such as the Z-score method or the box plot method can be used.

[0041] (3) Data normalization and standardization: In order to improve the training efficiency and stability of the model, all cleaned raw data are normalized or standardized.

[0042] Normalization methods, for example, compress the value of each data feature to the interval [0,1]. In this way, the distribution of data will be more concentrated, which will help speed up the convergence of the model. Standardization processing subtracts the mean of the data and divides it by the standard deviation, making the data feature have zero mean and unit variance, making the model insensitive to the scale change of the data and enhancing the generalization ability of the model. In addition, for time series data, the difference method can also be used to eliminate the seasonality and trend of the data, further improving the accuracy of the prediction.

[0043] Step 2: Select atmospheric physical parameters with predictive significance: The t-test method and Pearson correlation coefficient method were used to conduct significance tests on atmospheric physical parameters, and atmospheric physical parameters that can well distinguish the presence or absence of lightning activity were obtained.

[0044] Step 3, lightning potential prediction: The random forest algorithm is validated in past thunderstorm events using the above selected atmospheric physical parameters. For each event, the calculated potential lightning activity is compared with the actual observations. The prediction accuracy of potential lightning activity is evaluated and verified by comparing the predicted results with the actual observations.

[0045] Step 4: Lightning frequency prediction

[0046] Lightning prediction model architecture design, such as Figure 1 As shown, the lightning prediction model of the present invention includes a convolutional neural network (CNN) module, a long short-term memory network (LSTM) module and a Kolmogorov-Arnold network (KAN) module;

[0047] Prerequisites: You need to prepare the training dataset and divide it appropriately (for example, 70% for training and 30% for validation). Make sure that the deep learning framework used supports the implementation of CNN, LSTM, and KAN networks (such as TensorFlow or PyTorch).

[0048] (1) Convolutional Neural Network (CNN) Module: First, local features in the input data are extracted through the CNN layer. CNN can effectively process the spatial dependencies in the input data, especially when processing meteorological data, it can capture the local spatial relationship between different meteorological variables. The convolutional neural network (CNN) module includes several convolutional layers and pooling layers. In the present invention, the input data X is extracted with spatial features through several convolutional layers.

[0049] Convolutional layer calculation formula:

[0050] Y=Conv(X,W)+b

[0051] Among them, X is the input data, W is the convolution kernel weight, b is the bias, and Y is the output of the convolution layer.

[0052] The calculation formula of the pooling layer (such as maximum pooling) is:

[0053] Y CNN_i,j =max(Y i:i+k,j:j+l )

[0054] Among them, Y i:i+k,j:j+l represents the data from row i to row i+k-1 and column j to column j+l-1 in the output Y of the convolutional layer, k is the pooling window size, i:i+k represents the row range of the input data (from row i to row i+k-1), j:j+l represents the column range of the input data (from column j to column j+l-1), and max(·) represents the number of columns in the input data Y. i:i+k,j:j+l The maximum value in the window, Y CNN_i,j Output feature map Y after pooling operation CNN The value at position (i,j) in .

[0055] (2) Long short-term memory network (LSTM) module: The feature Y extracted by the convolutional neural network (CNN) module CNN The data is input into the LSTM layer to capture the long-term and short-term dependencies in the time series data. The LSTM module can remember the long-term dependency information in the time series and avoid the gradient vanishing problem through the gating mechanism. It is suitable for processing the time series characteristics of lightning activities.

[0056] The basic calculation of LSTM consists of the following parts:

[0057] Forget Gate:

[0058] f t =σ(W f [h t-1 ,x t ]+b f )

[0059] Input Gate:

[0060] i t =σ(W i [h t-1 ,x t ]+b i )

[0061]

[0062] Status Update:

[0063]

[0064] Input Gate:

[0065] o t =σ(W o [h t-1 ,x t ]+b0)

[0066] Final output:

[0067] h LSTM =o t tanh(C t )

[0068] Among them, h t is the hidden state at the current time step, x t is the current input, represented by Y CNN Provide, W f ,W i ,W C ,W o is the weight matrix of each gate, σ is the sigmoid activation function, tanh is the hyperbolic tangent activation function, and f t is the output of the forget gate, i t is the output of the input gate, is a candidate state, C t is the current state, o t is the output of the output gate, h LSTM is the final output of LSTM.

[0069] (3) Kolmogorov-Arnold network (KAN) module: The KAN module is introduced for global optimization to improve the robustness of the model. KAN optimizes the features of CNN and LSTM outputs, making the model more generalizable in lightning prediction tasks in different regions and reducing the impact of errors and noise. The core optimization process of KAN can be expressed by a formula with optimization operations:

[0070]

[0071] Among them, Y CNN is the feature extracted by CNN, h LSTM is the output of LSTM, It is the result of KAN layer optimization. Optim represents the optimization operation of KAN layer, which is usually to weight or fuse the features by the parameters learned through neural network.

[0072] Step 3: Train the lightning prediction model

[0073] (1) Data segmentation and training set preparation: The cleaned data is divided into a training set and a validation set according to a predetermined ratio. Typically, 70% of the data is used for model training, while the remaining 30% is used for validation.

[0074] (2) Model training: The lightning prediction model is trained using the Adam optimizer and mean square error (MSE) as the loss function. During the training process, the loss changes on the validation set are monitored to determine whether overfitting occurs.

[0075] The update rule of Adam optimizer is:

[0076]

[0077] Among them, J(θ) represents the loss function, also known as the objective function, which is used to measure the error between the current model prediction value and the target value, m t and v t are the moving average of the gradient and the moving average of the squared gradient, β1 and β2 are the decay rates that control these averages. Indicates that they are hyperparameters that control the moving average decay rate and determine the impact of gradient history information on the current update, θ t represents the parameters of the model, which are updated in each iteration. and is the corrected value of the bias, η is the learning rate, and ε is a constant to prevent division by zero.

[0078] Loss function (mean square error, MSE):

[0079]

[0080] Where N is the number of samples, is the lightning frequency prediction value for the i-th group of samples output by KAN, y i is the actual lightning frequency in the i-th group of samples, that is, the target value.

[0081] (3) Hyperparameter tuning: By adopting strategies such as grid search or Bayesian optimization, the hyperparameters of the lightning prediction model, such as the learning rate η, the convolution kernel size in the convolutional neural network, the number of LSTM units, etc., are adjusted to achieve optimal performance.

[0082] Grid search: Select the optimal parameter combination by exhaustively enumerating all possible hyperparameter combinations. Assume that there is a hyperparameter λ, whose candidate values ​​are {λ1, λ2, …, λ k}, then the goal of grid search is to minimize the loss function l(λ).

[0083]

[0084] Here, l(λ) represents the loss function calculated for each hyperparameter combination λ, and k represents the number of hyperparameters.

[0085] Bayesian optimization: Bayesian optimization uses a probabilistic model to describe the objective function and uses model uncertainty to select the hyperparameter combination that is most likely to improve performance. Assuming there is an objective function f(λ) that needs to be minimized, the goal of Bayesian optimization is to find the hyperparameter λ that minimizes f(λ). The steps of Bayesian optimization are:

[0086] In the lightning prediction model, Bayesian optimization is used to adjust the hyperparameter combination, such as the convolution kernel size of the CNN module, the number of units and the learning rate of the LSTM module, to minimize the loss function l(λ) on the validation set. By constructing the objective function f(λ), Bayesian optimization can efficiently explore the hyperparameter space and find the optimal hyperparameter combination, thereby improving the prediction performance of the K-CL network.

[0087] 1. Use the Bayesian formula to update the posterior distribution:

[0088]

[0089] Where D is the observed training data, P(λ) is the prior distribution of the hyperparameters, P(D|λ) is the likelihood function, and p(λ|D) is the posterior distribution.

[0090] 2. Choose the next optimal hyperparameter λ * :

[0091]

[0092] where Ε[l(λ)] is the expected value of the objective function, which is usually estimated by sampling and evaluating the posterior distribution.

[0093] Step 4: Prediction and Evaluation

[0094] Prediction stage: After the flash prediction model training is completed, the validation set is used for prediction.

[0095] The random forest algorithm is used to predict the potential of lightning, and the lightning prediction model of the present invention is used to predict the frequency of lightning occurrence.

[0096] According to actual needs, the random forest algorithm can be selected to output the probability value of lightning occurrence or the category label (such as whether lightning occurs or not).

[0097] Probability output: If the lightning prediction model outputs the probability P of lightning occurrence, then a threshold τ can be set for binary classification:

[0098]

[0099] in, is the prediction result of the random forest algorithm, 1 indicates that lightning occurs, 0 indicates that lightning does not occur, p is the probability of lightning occurrence output by the random forest algorithm, and τ is the set threshold.

[0100] Class label output: If the random forest algorithm directly outputs the class label (such as "lightning occurred" or "lightning did not occur"), the prediction result is:

[0101]

[0102] Among them, y pred is the category probability distribution output by the random forest algorithm, where each element represents the probability of belonging to the corresponding category. is the predicted final class label.

[0103] Performance evaluation: Multiple evaluation indicators are used to measure the performance of the lightning prediction model, including accuracy, precision, recall, F1 score, mean square error (MSE), etc., to comprehensively evaluate the prediction effect of the lightning prediction model.

[0104] Accuracy: Accuracy is the proportion of samples correctly predicted by the model to all samples.

[0105]

[0106] Among them, TP (True Positive) is a true positive example, TN (True Negative) is a true negative example, FP (False Positive) is a false positive example, and FN (False Negative) is a false negative example.

[0107] Precision: Precision measures the proportion of all predictions that are positive (lightning occurs) that are actually positive.

[0108]

[0109] Recall: Recall measures the proportion of samples that are correctly predicted as positive by the model among all samples that are actually positive.

[0110]

[0111] F1 Score: The F1 score is the harmonic mean of precision and recall, which is used to comprehensively measure the precision and recall capabilities of the model.

[0112]

[0113] Mean Squared Error (MSE): Mean squared error is used for regression problems and represents the average of the squares of the differences between the predicted values ​​and the true values.

[0114]

[0115] Among them, y i is the true value of the i-th sample, is the predicted value of the ith sample, and N is the total number of samples.

[0116] Embodiment 2

[0117] Step 1: Obtain lightning data from Yangjiang sounding station in Guangdong Province, which covers the time span from 2016 to 2021. Guangdong Province is located in the southern coastal area of ​​the People's Republic of China, bordering the South China Sea, and has a typical subtropical monsoon climate. The region is also hot and rainy in summer, and severe convective weather is active, resulting in frequent lightning events. These data contain 30 atmospheric physical parameters, as shown in Table 1 in Example 1. To ensure the accuracy of the data, outlier detection and data cleaning were performed. In the present invention, the situation where the total lightning frequency is greater than or equal to 1 time is defined as a lightning event, otherwise it is regarded as no lightning event. After screening, 1715 lightning samples and 2450 non-lightning samples were collected as raw data, and the corresponding 30 atmospheric physical parameter values ​​and the corresponding lightning frequencies were recorded in the raw data.

[0118] Step 2: Data Preprocessing

[0119] ① Data reading: read the required data columns, atmospheric physical parameters and corresponding lightning frequencies from the Excel file;

[0120] ②Data division: Divide the read data column into features (data_x) and targets (data_y), where atmospheric physical parameters are used as features and lightning frequency is used as the target.

[0121] ③ Training set and validation set division: Use train_test_split to divide the data according to the set ratio (such as 70% training set, 30% validation set).

[0122] ④ Normalization: Use MinMaxScaler to normalize the features and target values ​​to improve training efficiency and model stability. For the target value, the normalization formula is consistent with the normalization of the feature. Assuming the target value is y, the normalized target value y norm for:

[0123]

[0124] Among them, min(y) is the minimum value in the target data, and max(y) is the maximum value in the target data;

[0125] Step 3: Phase analysis of lightning activity

[0126] Correlation analysis between physical parameters and lightning activity: In order to identify key parameters that can reflect the potential of lightning, this study conducted an in-depth analysis of the relationship between 30 atmospheric physical parameters and ground lightning activity. The t-test and Pearson correlation coefficient methods were used to determine that the critical value of the correlation coefficient was 0.29 at a significance level of 0.001. By setting Y = 1 as a sample where lightning occurred and Y = 0 as a sample where lightning did not occur, a correlation analysis was conducted on 30 atmospheric physical parameters related to lightning activity. The results show that the correlation between the 30 atmospheric physical parameters and lightning activity ranges from 0.0005 to 0.5806. In the experiment of judging whether lightning occurs or not, 21 atmospheric physical parameters that passed the significance level α < 0.001 test and had a correlation coefficient greater than 0.29 were screened out. However, according to the analysis results of the box plot, the five parameters of the verified maximum hail diameter Dm, the total Richardson number BRN, the temperature of the free troposphere LFC_T, the air pressure of the equilibrium layer ELC_T, and the air pressure of the free troposphere LFC_P did not perform well in distinguishing the presence or absence of lightning activity. In contrast, the remaining 16 atmospheric physical parameters can effectively distinguish the presence or absence of lightning activity. Therefore, among all the atmospheric physical parameters, these 16 atmospheric physical parameters can not only effectively distinguish lightning activity, but also pass the test at the α<0.001 level, and the correlation coefficient exceeds 0.29. As shown in Table 2, these parameters include the thickness of the CAPE layer below the convective equilibrium layer Hd_EL, Faust index, Doswell cloud thickness Dc, convective effective potential energy Cape, temperature of convective condensation height CCL_T, generalized convective effective potential energy GCAPE, lift index Ld_EL at the equilibrium level, air pressure ELC_P of the equilibrium layer, maximum convective stability index BIC, -30H, -20H, -40H, integral quantity IntegralQ, critical value of integral quantity lQ, downdraft convective available potential energy DCAPE, octave of convective available potential energy aa8, a total of 16 atmospheric physical parameters;

[0127] Table 2 Correlation coefficients between atmospheric physical parameters and the presence or absence of lightning activity

[0128]

[0129] Step 4: Validation of Lightning Potential Prediction Model

[0130] Random forest validation was performed on past thunderstorm events using 16 selected atmospheric physical parameters. For each event, the calculated potential lightning activity was compared with the actual observations. The prediction accuracy of potential lightning activity was evaluated and verified by comparing the prediction results with the actual observations. The indicators for evaluating the algorithm are shown in Table 3:

[0131] Table 3 Random forest algorithm verification

[0132]

[0133]

[0134] The results show that the random forest algorithm performs best in predicting potential lightning strikes, with higher accuracy and stability. The accuracy of the random forest algorithm is as high as 98%, the recall rate is above 95%, and the F1 value exceeds 0.95.

[0135] Step 5: Use K-CL network to predict lightning frequency

[0136] (1) Lightning Classification

[0137] The median frequency of lightning occurrence is 19 times, and the percentile accounts for 57%, so the data with a percentile accounted for less than 60% are classified as low-frequency lightning data. The mean of the total lightning frequency is 445.4 times, which accounts for about 84% of the percentile, so the data with a lightning frequency between 60% and 85% are classified as medium-frequency lightning data, and the data with a total lightning frequency after 85% are classified as high-frequency lightning data.

[0138] (2) Defining the lightning prediction model structure

[0139] Defines the number of features of the input data. In this case, there are 16 features, such as: 'BI', 'BIC', 'BLI', 'BRN', 'Cape', 'CCL', 'CCL_P', 'CIN', 'Ct', 'Dc', 'DCAPE', 'DCI', 'EHI', 'ELC_P', 'ELC_T', 'Faust'. Use train_test_split to split the sample data into training and validation sets. By default, test_size = 0.3 represents 30% of the data. The data is used for testing, and 70% is used for training. The input features (atmospheric physical parameters) and target variables (lightning frequency) are normalized using MinMaxScaler, and the feature value range is scaled to [0, 1] to improve the efficiency of model training. (Both features and target variables are normalized using MinMaxScaler and the data is scaled to the range of [0, 1]) The input data is converted into a 3D tensor (batch_size, features, sequence_length) to adapt to the convolution layer.

[0140] ①KAN class: Construct a simple fully connected layer fc as a Kolmogorov-Arnold network (KAN) module for linear mapping. The fully connected layer receives high-level features extracted by CNN-LSTM as input and outputs predicted values ​​related to the target variable (such as lightning frequency).

[0141] ②CNN-LSTM-KAN model:

[0142] CNN module: Use one-dimensional convolution and pooling layers to extract spatial features, use Conv1d and MaxPool1d to extract spatial features. The convolution kernel size is 3, and padding=1 is used to maintain the input size.

[0143] LSTM module: Capture the dependencies in the time series through the long short-term memory network, pass the output of the convolution layer as input to the LSTM network, and capture the long-term and short-term dependencies in the time series data. Use hidden_size=50 and num_layers=1

[0144] KAN module: Globally optimizes LSTM output features to improve the robustness and generalization ability of predictions.

[0145] Using the KAN class, we retain one fully connected layer to map the output of the LSTM to the target space.

[0146] Step 6: Build the data loader

[0147] ①Package the normalized training data into TensorDataset.

[0148] ②Use DataLoader to create a data loader to support batch training.

[0149] Step 7: Train the Lightning Prediction Model

[0150] ① Initialization: Set the hyperparameters of the lightning prediction model (hidden layer size, learning rate, number of LSTM layers, etc.), define the loss function (mean square error MSELoss) and optimizer (Adam).

[0151] ②Training process:

[0152] Batch training: By iterating over the loader data, forward propagation, loss calculation, and gradient update are performed sequentially.

[0153] Loss recording: Calculate and record the average loss of each epoch for subsequent drawing analysis.

[0154] Step 8: Lightning Prediction Model Evaluation

[0155] ① Lightning prediction model prediction: Generate prediction values ​​on the validation set and training set respectively, and use y_scaler.inverse_transform to denormalize the prediction values ​​and true values.

[0156] ② Calculate evaluation indicators: mean square error (MSE), mean absolute error (MAE), determination coefficient (R2 Score

[0157] The prediction results are shown in Table 4:

[0158] Table 4 Lightning prediction evaluation results of the lightning prediction model of the present invention

[0159]

[0160] The comparison with other models is shown in Table 5.

[0161] Table 5 Comparison results

[0162]

[0163]

[0164] The K-CL lightning prediction method of the present invention has the following advantages:

[0165] 1. Significantly improved prediction accuracy

[0166] The lightning prediction model of the present invention integrates deep learning technology, especially combines the characteristics of CNN (convolutional neural network), LSTM (long short-term memory network) and KAN (knowledge augmented network). Among them, the CNN module is good at extracting spatial features, the LSTM module specializes in processing the dependencies of time series data, and the introduction of the KAN module further optimizes the model and enhances its robustness and generalization ability. The lightning prediction model combines the characteristics of CNN, LSTM and KAN. When processing complex meteorological data, it can more accurately reveal the potential laws of lightning occurrence, and accurately predict the potential risks and occurrence frequency of lightning in the intricate spatiotemporal dependency structure. Experimental results show that compared with traditional lightning prediction methods, such as using CNN, LSTM or Transformer alone, the lightning prediction model of the present invention has achieved a significant improvement in prediction accuracy.

[0167] Improved prediction results: In comparative experiments, the lightning prediction model has improved the accuracy of lightning occurrence prediction by about 30% compared with the traditional CNN model, and has improved the overall lightning frequency prediction by more than 20%.

[0168] 2. Enhance the generalization ability of the model

[0169] Traditional lightning prediction models usually have poor generalization capabilities in different regions and meteorological conditions, resulting in unreliable prediction results in new environments. The lightning prediction model of the present invention optimizes features through the KAN module, so that the model can not only maintain high accuracy when facing different meteorological environments, but also reduce the prediction error caused by environmental differences, effectively improving the model's adaptability to lightning activities in different regions.

[0170] Regional adaptability: When tested at multiple meteorological sites (including Guangdong and Jiangsu in China), the lightning prediction model’s prediction accuracy in new areas was about 15% higher than traditional methods.

[0171] 3. Improve computing efficiency and real-time performance

[0172] Traditional lightning prediction methods require a lot of computing resources and a long computing process. The K-CL model of the present invention optimizes the CNN-LSTM-KAN network architecture and uses multi-level feature extraction and optimization to effectively reduce redundant calculations in the lightning prediction model, thereby significantly improving computing efficiency and real-time performance while ensuring prediction accuracy.

[0173] Improved computing efficiency: Compared with traditional prediction methods based on numerical weather prediction (NWP) or a single deep learning model, the lightning prediction model of the present invention shortens the training time by about 30% and reduces the time overhead in the prediction stage by about 25%.

[0174] 4. Enhance the robustness and anti-interference ability of the model

[0175] In meteorological data, there are interference factors such as outliers and noise, which usually affect the accuracy of the prediction model. The present invention uses the KAN module to globally optimize the features of CNN and LSTM outputs, effectively suppressing the noise components in the data and enhancing the robustness of the model, so that it can still maintain a high prediction accuracy under the interference of noise and outliers.

[0176] Anti-interference ability: When evaluated using a validation set containing abnormal data, the K-CL model reduced the prediction error by about 15% compared with traditional models (such as CNN and LSTM), indicating that it has stronger anti-interference ability in complex and irregular data.

[0177] 5. Broad application prospects and practical significance

[0178] The present invention can be applied not only to the prediction of lightning potential and frequency, but also to many fields such as meteorological disaster warning, environmental monitoring, intelligent meteorological system, etc. Its model architecture enables good adaptability and efficient prediction capabilities in multiple meteorological forecasting tasks.

[0179] Application example: In the meteorological disaster warning system, the lightning prediction model can provide more accurate warning information for various weather disasters (such as lightning and rainstorms), helping relevant departments to carry out pre-disaster deployment and emergency response. Its high efficiency enables the model to process large-scale meteorological data in real time and provide timely support for meteorological decision-making.

Claims

1. A lightning prediction method based on K-CL network, characterized in that: The steps include: Step 1, selecting atmospheric physical parameters related to lightning, collecting the atmospheric physical parameters and lightning frequencies corresponding to the atmospheric physical parameters as a data set; Step 2: construct a lightning prediction model to predict lightning frequency; The lightning prediction model includes a convolutional neural network (CNN) module, a long short-term memory (LSTM) network module, and a KAN module connected in sequence; Step 3, dividing the data set into a training set and a validation set; using the atmospheric physical parameters in the data set as input data of the lightning prediction model, and the lightning frequency corresponding to the atmospheric physical parameters as output data of the lightning prediction model, and using the training set and the validation set to train and validate the lightning prediction model respectively, to obtain a trained lightning prediction model; Step 4: Input the atmospheric physical parameters to be predicted into the trained lightning prediction model to predict the lightning frequency.

2. A lightning prediction method based on K-CL network according to claim 1, characterized in that: The atmospheric physical parameters related to lightning are selected in step 1, specifically, a t-test method and a Pearson correlation coefficient method are used to perform a significance test on the atmospheric physical parameters to obtain the atmospheric physical parameters related to lightning.

3. The lightning prediction method based on K-CL network according to claim 1, characterized in that: The atmospheric physical parameters related to lightning described in step 1 are specifically the thickness of the CAPE layer Hd_EL, the Faust index, the Doswell cloud layer thickness Dc, the convective effective potential energy Cape, the temperature of the convective condensation height CCL_T, the generalized convective effective potential energy GCAPE, the lift index Ld_EL at the equilibrium level, the air pressure ELC_P of the equilibrium layer, the maximum convective stability index BIC, -30H, -20H, -40H, the integral quantity IntegralQ, the critical value of the integral quantity lQ, the downdraft convective available potential energy DCAPE and the octant aa8 of the convective available potential energy.

4. The lightning prediction method based on K-CL network according to claim 1, characterized in that: The atmospheric physical parameters and lightning frequency data in the dataset are data that have been cleaned, normalized and standardized.

5. The lightning prediction method based on K-CL network according to claim 1, characterized in that: The lightning-related atmospheric physical parameters selected in step 1 are verified using a random forest algorithm.

6. The lightning prediction method based on K-CL network according to claim 1, characterized in that: The convolutional neural network (CNN) module includes multiple convolutional layers and a pooling layer; the multiple convolutional layers are sequentially connected to extract multiple spatial features of the input atmospheric physical parameters, and the finally extracted spatial features are input to the pooling layer for pooling to obtain the feature Y output by the convolutional neural network (CNN) module. CNN ; The feature Y CNN Input into the long short-term memory network LSTM module to extract long-term dependency information and obtain the feature h LSTM ; The feature Y output by the convolutional neural network CNN module CNN The feature h extracted by the long short-term memory network LSTM module LSTM Input to the KAN module for optimization, as shown below: Among them, Optim() represents the optimization operation of the KAN module.

7. The lightning prediction method based on K-CL network according to claim 1, characterized in that: The goal of the optimization operation is to minimize the following loss function l: Where N is the number of samples in the dataset, is the lightning frequency prediction value for the i-th group of samples output by KAN, y i is the actual lightning frequency in the i-th group of samples.

8. A lightning prediction method based on K-CL network according to claim 7, characterized in that: The Adam optimizer is also used to train the lightning prediction model.

9. A lightning prediction method based on K-CL network according to claim 7, characterized in that: Assume that the lightning prediction model has a hyperparameter λ, and the candidate values ​​are {λ1, λ2, …, λ k }, using network search, the goal of grid search is to minimize the loss function l(λ); Here, l(λ) represents the loss function calculated for each hyperparameter combination λ.

10. A lightning prediction method based on K-CL network according to claim 7, characterized in that: The lightning prediction model is optimized using the Bayesian optimization method.