Lightning prediction method and device
Feature extraction and prediction of multi-site electric field data through stack autoencoder and convolutional neural network model is solved, and the problem of low accuracy of lightning prediction in the prior art is achieved, achieving more efficient and accurate thunderstorm lightning prediction.
Patent Information
- Application Number
- CN202210441910.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing atmospheric electric field method based on single-station observation is difficult to accurately predict the spatiotemporal characteristics of thunderstorms and lightning, resulting in low accuracy of lightning prediction, and insufficient in-depth mining of electric field data, which lacks good generalization performance.
The stack autoencoder is used to extract and dimensionally compress the electric field time series of multiple sites, generate two-dimensional electric field data and convert it into electric field images, and lightning prediction is performed in combination with the convolutional neural network model.
The accuracy of lightning prediction is improved, and the calculation volume and cost are reduced through deep feature extraction and data compression, achieving a more accurate and comprehensive prediction of thunderstorm lightning.
Smart Images

Figure CN114912670B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of lightning early warning, and more specifically, relates to a lightning prediction method and device. Background Art
[0002] Thunderstorms and lightning are extreme weather phenomena that occur naturally. With social progress and technological innovation, the hazards caused by thunderstorms and lightning have increased significantly in recent years, particularly in the aerospace, defense, communications, and power sectors. Highly accurate thunderstorm and lightning forecasts can help reduce the damage caused by thunderstorms and lightning. Currently, weather radar-based weather observation methods are more common, but there are fewer technologies that use atmospheric electric field instruments and lightning location data to study thunderstorm and lightning weather and their spatiotemporal characteristics.
[0003] The ground-based atmospheric electric field is a fundamental parameter of atmospheric electricity and plays a crucial role in thunderstorm electricity and lightning prediction. Existing thunderstorm and lightning observation methods based on the atmospheric electric field are mostly based on single-station observations. Single-station electric field instruments have a limited detection range, generally around 15-20 km, and can only make predictions for a limited area. It is difficult to grasp the entire process of thunderstorm cloud generation, development, and dissipation, resulting in low lightning prediction accuracy. Furthermore, domestic and foreign scholars have not delved deeply into electric field data. Most of them are based on setting atmospheric electric field thresholds, electric field change rates, polarity reversal methods, and other methods to forecast and warn thunderstorms by setting different thresholds. This method requires different warning methods to be set according to local conditions and does not have good generalization performance. Summary of the Invention
[0004] In response to the defects and improvement needs of the existing technology, the present invention provides a lightning prediction method and device, the purpose of which is to improve the accuracy of lightning prediction.
[0005] To achieve the above objectives, according to one aspect of the present invention, a lightning prediction method is provided, comprising: S1, obtaining electric field time series detected at each station in a target area, and using a stacked autoencoder to perform feature extraction and dimensionality compression on each of the electric field time series; S2, combining the dimensionally compressed electric field time series into two-dimensional electric field data, mapping the two-dimensional electric field data to the interval [0, 255], and converting the mapped two-dimensional electric field data into an electric field image; S3, inputting the electric field image into a preset trained lightning prediction model to predict the lightning level.
[0006] Furthermore, the stacked autoencoder includes three encoders connected in series, and each encoder uses a linear rectification function as an internal activation function of the network; in S1, each encoder extracts features of the electric field time series layer by layer and compresses the dimensions of the extracted features.
[0007] Furthermore, before executing S1, it also includes: training the stacked autoencoder, and training the lightning prediction model after the training is completed; the training of the stacked autoencoder includes: obtaining a data set containing multiple electric field time series samples, and inputting the electric field time series samples into the stacked autoencoder; using a decoder to decode and reconstruct the compressed features output by the stacked autoencoder to obtain reconstructed features; calculating the error between the reconstructed features and the electric field time series samples, and optimizing the model parameters of the stacked autoencoder with the goal of minimizing the error.
[0008] Furthermore, the decoder adopts a linear rectification function as an internal activation function of the network, and the output of the decoder adopts a tanh activation function.
[0009] Furthermore, mapping the two-dimensional electric field data to the interval [0, 255] in S2 includes: normalizing the two-dimensional electric field data to map each electric field data in the two-dimensional electric field data to the range [0, 1], and multiplying each normalized electric field data by 255 so that each electric field data corresponds to a pixel value of the grayscale image.
[0010] Furthermore, the lightning prediction model includes three groups of alternating convolutional layers and maximum pooling layers, and two fully connected layers connected in sequence to the output end of the last maximum pooling layer; the convolutional layer is used to perform convolution operations on the data at its input end to achieve feature extraction and output the corresponding feature map; the maximum pooling layer is used to reduce the dimension of the feature map output after the convolution operation; the fully connected layer is used to compress the high-dimensional features of its input end into a one-dimensional vector, and the last fully connected layer outputs the lightning level.
[0011] Furthermore, the lightning levels include four levels: LV0, LV1, LV2 and LV3. The number of lightning occurrences per minute at the LV0, LV1, LV2 and LV3 lightning levels are 0, 1, (1, 5], (5, +∞) respectively.
[0012] According to one aspect of the present invention, an electronic device is provided, comprising: a processor; and a memory storing a computer-executable program, wherein when the program is executed by the processor, the processor executes the lightning prediction method described above.
[0013] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:
[0014] (1) Using stacked autoencoders to extract and compress features from time series data measured synchronously at multiple sites, the method reduces the amount of data while learning the deep features of the electric field time series, and reduces the amount of computation and cost without affecting the prediction accuracy. The compressed data from multiple sites are combined and converted into images, thereby making lightning predictions based on the electric field data detected at multiple sites, improving the prediction accuracy.
[0015] (2) A convolutional neural network model for lightning prediction was designed. By performing a series of operations such as convolution and pooling on images composed of electric field time series data, the model obtained the results of graded warnings for future lightning. The model has good feasibility and effectiveness for lightning forecasting, and the prediction results are consistent with the actual situation. Experimental results show that there is a large correlation between the atmospheric electric field conversion image and weather samples of four lightning levels, and the classification accuracy is high.
[0016] (3) The presence or absence of lightning and the intensity of lightning are associated with the corresponding electric field measurement data, and a weather sample database is constructed. Based on this, the characteristics of ground electric field measurement data can be deeply explored, and graded warnings for lightning can be implemented to improve prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a lightning prediction method provided by an embodiment of the present invention;
[0018] Figure 2 A schematic diagram of the geographical location distribution of electric field measurement sites provided in an embodiment of the present invention;
[0019] Figure 3 A schematic diagram of lightning frequency distribution provided by an embodiment of the present invention;
[0020] Figure 4 A schematic diagram of the structure of a stacked autoencoder provided in an embodiment of the present invention;
[0021] Figure 5 A comparison chart of the original electric field data provided by an embodiment of the present invention and the data reconstructed by the stacked autoencoder;
[0022] Figure 6 A schematic diagram of converting an electric field time series into an electric field image according to an embodiment of the present invention;
[0023] Figure 7 A schematic diagram of the structure of a lightning prediction model provided by an embodiment of the present invention;
[0024] Figure 8 A confusion matrix consisting of the predicted results and the actual results provided by the embodiment of the present invention;
[0025] Figure 9 A block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0027] In the present invention, the terms "first", "second", etc. (if any) in the present invention and the drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0028] Figure 1 This is a flowchart of a lightning prediction method provided by an embodiment of the present invention. Figure 1 , combined with Figure 2-Figure 8 , the lightning prediction method in this embodiment is described in detail, and the method includes operations S1 to S3.
[0029] See Figure 2 Figure 1 shows the geographic distribution of sites used for electric field measurement. The circle represents the measurement range of a single site (the triangle within the circle), and the remaining triangles represent the distribution of individual sites. Taking Guangzhou as an example, the 30 sites essentially cover Huadu, Conghua, and Baiyun districts.
[0030] The lightning prediction method in this embodiment of the present invention requires the use of a stacked autoencoder and a lightning prediction model. Before performing operation S1, the stacked autoencoder must be trained. After the stacked autoencoder is trained, the lightning prediction model is trained. The following describes how to construct the samples required for training in this embodiment of the present invention.
[0031] Taking Guangzhou as an example, hundreds of lightning locators have been installed in and around the city, capable of detecting the time and longitude of each lightning strike within a large area. Given that most thunderstorm lightning typically lasts from tens of minutes to several hours from its inception to large-scale discharge, the length of the electric field time series is crucial. If the selected sequence is too long, rapid warning decisions cannot be made, while if it is too short, the accuracy and reliability of the forecast will be affected. Taking these factors into account, in this example, one hour of electric field data was selected to construct the weather sample database.
[0032] On the other hand, given the apparent temporal and spatial clustering of lightning, matching each lightning location data point with the electric field measurement data point by point would result in significant data redundancy, hindering model training and testing. Observational data show that in most cases, the number of thunderstorm lightning flashes per minute is less than 10, but can sometimes reach dozens or even hundreds.
[0033] See Figure 3 Figure 2 shows a violin plot based on lightning location data for Guangzhou throughout 2021, showing the distribution and probability density of the frequency of lightning occurrences per minute. Only the number of lightning occurrences is counted here, meaning the frequency of lightning is at least 1. The extended thin line represents the 95% confidence interval, indicating that the number of lightning occurrences per minute is mostly around 8, with a median of 2 and first and third quartiles of 1 and 4, respectively.
[0034] Combining the above data, we can classify lightning according to frequency. The specific classification criteria are shown in Table 1. Referring to Table 1, in this embodiment, lightning intensity is divided into four levels: LV0, LV1, LV2, and LV3. Higher levels indicate stronger thunderstorm lightning. The number of lightning occurrences per minute at LV0, LV1, LV2, and LV3 lightning levels is 0, 1, (1, 5], and (5, +∞), respectively. LV0 indicates no further lightning.
[0035] Table 1
[0036] frequency Warning level Label Sample size 0 Level 0 (1,0,0,0) 2580 1 LV1 (0,1,0,0) 3881 (1,5] Level 2 (0,0,1,0) 2611 (5,+∞) Level 3 (0,0,0,1) 1945
[0037] Furthermore, based on the lightning intensity classification shown in Table 1, a sample database was constructed using the following method. For LV1, LV2, and LV3 lightning, the specific time of the lightning strike was determined based on the lightning location data, and the measurement data from the electric field station over the past hour was retrieved accordingly. For LV0 lightning, a random sampling method was used to ensure data diversity. Specifically, networked data from all electric field stations over a period of one hour was randomly selected, ensuring that no lightning occurred within the half-hour before and after this time period.
[0038] In this embodiment, the atmospheric electric field instrument at each site has a sampling frequency of 1 Hz, for example, and can collect 3,600 data points per hour. For a total of 30 sites, the measurement data dimensions for all sites can reach 30 × 3,600. This massive amount of data is not conducive to model training and using the model for lightning prediction. Therefore, in this embodiment, a stacked autoencoder (SAE) is used to unsupervisedly learn the deep features of the electric field time series.
[0039] See Figure 4 In this embodiment, the stacked autoencoder consists of three serially connected encoders to extract features layer by layer. Each encoder uses a rectified linear unit (ReLU) as the internal activation function of the network, which increases the nonlinearity of the network, prevents gradient vanishing, and speeds up network training. The dimensionality of the electric field data sequence of a single site is continuously compressed, and the extracted feature dimension is 1×60.
[0040] According to an embodiment of the present invention, training a stacked autoencoder includes: obtaining a data set containing multiple electric field time series samples, and inputting the electric field time series samples into the stacked autoencoder; using a decoder to decode and reconstruct the compressed features output by the stacked autoencoder to obtain reconstructed features; calculating the error between the reconstructed features and the electric field time series samples, and optimizing the model parameters of the stacked autoencoder with the goal of minimizing the error.
[0041] The decoder uses the linear rectification function ReLU as the internal activation function of the network, and the output of the decoder uses the tanh activation function, so that its output is centered on 0, which can better map the characteristics of the original electric field data.
[0042] By extracting features through layer-by-layer compression, the reconstructed data provides a more comprehensive representation of the atmospheric electric field changes in a specific area. After the network training reaches stability, a batch of test set samples are randomly selected. The test results are as follows: Figure 5 For ease of display, the 1×3600 vector is reshaped to 60×60. Figure 5 ,It can be seen that the reconstructed data can basically represent the characteristics of the ,original data, and the effect of feature extraction is good.
[0043] After the stacked autoencoder and the lightning prediction model are trained, the trained stacked autoencoder and lightning prediction model can be used to perform operations S1 to S4 to perform lightning prediction.
[0044] Operation S1: Obtain the electric field time series detected by each station in the target area, and use a stacked autoencoder to perform feature extraction and dimension compression on each electric field time series in turn.
[0045] Specifically, in operation S1, each encoder in the stacked autoencoder extracts features from the electric field time series layer by layer and compresses the dimensions of the extracted features.
[0046] Operation S2 : Combining the dimensionally compressed electric field time series into two-dimensional electric field data, mapping the two-dimensional electric field data into the interval [0, 255], and converting the mapped two-dimensional electric field data into an electric field image.
[0047] For each electric field time series in operation S1, after passing through the stacked autoencoder, the dimension of each electric field time series is compressed from 1×3600 to 1×60. In operation S2, the dimensionally compressed electric field time series are combined into two-dimensional electric field data, that is, two-dimensional electric field data with a dimension of 30×60 is obtained.
[0048] For the two-dimensional electric field data after feature extraction, dimensionality compression and combination, it is first normalized to map each electric field data in the two-dimensional electric field data to the range of [0, 1], and each normalized electric field data is multiplied by 255 so that each electric field data corresponds to the pixel value of the grayscale image, realizing the conversion of electric field time data to a two-dimensional image.
[0049] In the field of image recognition and classification, the length and width of an image are usually between tens and hundreds (such as 60×60 or 224×224), and the length and width are usually kept consistent to facilitate model processing. By filling the blanks above and below the image, the core feature can be placed in the center of the image. Finally, in this embodiment, the image size of a single weather sample is, for example, 60×60. Figure 6 shown.
[0050] In operation S3 , the electric field image is input into a preset trained lightning prediction model to predict the lightning level.
[0051] In this embodiment, the lightning prediction model is a model based on a convolutional neural network, such as Figure 7 As shown, T is the convolution kernel size, S is the step size, N is the number of convolution kernels, and U is the number of units. Figure 7 The lightning prediction model consists of three sets of alternating convolutional and max pooling layers connected in series, followed by two fully connected layers connected to the output of the final max pooling layer. The convolutional layers perform convolution operations on their input data to extract features and output corresponding feature maps. The max pooling layers reduce the dimensionality of the feature maps output after the convolution operation. The fully connected layers compress the high-dimensional features of their input into one-dimensional vectors. The final fully connected layer outputs the lightning level.
[0052] Specifically, after the electric field image is input into the lightning prediction model, it passes through convolution layer 1, maximum pooling layer 1, convolution layer 2, maximum pooling layer 2, convolution layer 3, maximum pooling layer 3, fully connected layer 1 and fully connected layer 2 in sequence.
[0053] The main function of a convolutional layer is to perform a convolution operation on the data, aiming to extract distinct features from the input. The output is called a feature map. A single convolutional layer can only extract some low-level information, but stacking more convolutional layers can extract more complex features. Pooling layers are used to reduce the dimensionality of the data after the convolution operation while retaining its important features. Pooling layers can reduce model size, increase computing speed, and prevent overfitting. Pooling layers typically come in two forms: max pooling and average pooling, which extract the maximum value and average value within a local area, respectively. The data undergoes three sets of convolutional and max pooling layers to further extract deep features from the electric field time series data and reduce the data dimensionality.
[0054] Subsequently, the multi-dimensional data is expanded through the Flatten operation. Generally, after feature extraction such as convolutional neural networks, it will pass through one or two fully connected layers, or enter the classifier. Most of the time, it needs to be converted into a one-dimensional vector for subsequent operations. Finally, the data is sent to two fully connected layers. The first fully connected layer has 128 nodes, which compresses the data dimensions after the Flatten operation to a certain extent. The second fully connected layer has 4 nodes, corresponding to four different weather samples. The final prediction results are as follows. Figure 8 And shown in Table 2.
[0055] Table 2
[0056] Precision Recall F1-score Support Level 0 0.94 0.92 0.93 503 LV1 0.94 0.97 0.96 760 Level 2 0.78 0.73 0.75 509 Level 3 0.76 0.80 0.78 431 Accuracy - - 0.87 2203 Macro avg 0.85 0.85 0.85 2203 Weighted avg 0.87 0.87 0.87 2203
[0057] In a binary classification problem, assume that the samples have two categories: Positive and Negative. By combining the predicted results with the actual results, we can obtain four classification results: TP, TN, FP, and FN. Their concepts are defined as follows.
[0058] TP (True Positive): A thunderstorm was correctly identified as a thunderstorm. TN (True Negative): A non-thunderstorm was correctly identified as a non-thunderstorm. FP (False Positive): A non-thunderstorm was incorrectly identified as a thunderstorm. FN (False Negative): A thunderstorm was incorrectly identified as a non-thunderstorm.
[0059] The performance analysis of the model is evaluated through performance indicators, including (a) Recall, (b) Precision, (c) F-score, and (d) Accuracy. The calculation formula is as follows:
[0060]
[0061]
[0062]
[0063]
[0064] When it comes to multi-classification tasks, they are usually calculated by converting them into n binary tasks. For example, for LV0 level thunderstorms, LV0 is regarded as the "Positive" category, and LV1-LV3 are regarded as the "Negative" category, and then the corresponding results are obtained according to the above equation. In Table 2, Support represents the sample size of each label data; Precision represents the probability of a sample that is actually positive among all samples predicted to be positive; Recall represents the probability of a sample that is predicted to be positive among samples that are actually positive; F1-score takes into account the precision and recall rates, and is obtained by weighted average of the two; Accuracy is defined as the percentage of correctly predicted results in the total samples; Macroavg is the direct average of the scores of the above categories; Weighted avg is equal to the weighted average of the scores of the above categories, where the weight is the proportion of Support in all samples.
[0065] Experimental results show a strong correlation between the atmospheric electric field conversion image and the labels of the four thunderstorm levels, and the classification accuracy is high. The lightning prediction model proposed in this paper can predict the occurrence and intensity of future thunderstorms.
[0066] The embodiment of the present disclosure also shows an electronic device, such as Figure 9 As shown, the electronic device 900 includes a processor 910 and a readable storage medium 920. The electronic device 900 can execute the above Figures 1-8 The lightning prediction method described in .
[0067] Specifically, the processor 910 may include, for example, a general-purpose microprocessor, an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 910 may also include an onboard memory for cache purposes. The processor 910 may be a processor for executing reference Figures 1-8 The described method flow according to the embodiments of the present disclosure may be performed by a single processing unit or multiple processing units for different actions.
[0068] The readable storage medium 920 can be, for example, any medium capable of containing, storing, conveying, propagating, or transmitting instructions. For example, the readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, component, or propagation medium. Specific examples of readable storage media include: magnetic storage devices, such as magnetic tape or hard disk drives (HDDs); optical storage devices, such as compact discs (CD-ROMs); memory, such as random access memory (RAM) or flash memory; and / or wired or wireless communication links.
[0069] The readable storage medium 920 may include a computer program 921 that may include code / computer executable instructions that, when executed by the processor 910, cause the processor 910 to perform, for example, the above-mentioned combination of Figures 1-8 The described method sequence and any variations thereof.
[0070] The computer program 921 may be configured to have computer program code, for example, including computer program modules. For example, in an exemplary embodiment, the code in the computer program 921 may include one or more program modules, for example, 921A, 921B, etc. It should be noted that the division method and number of modules are not fixed, and those skilled in the art may use appropriate program modules or combinations of program modules according to actual circumstances. When these program module combinations are executed by the processor 910, the processor 910 may perform, for example, the above combination of Figures 1-8 The described method sequence and any variations thereof.
[0071] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A lightning prediction method, characterized in that: include: S1, obtaining the electric field time series detected by each station in the target area, and using a stacked autoencoder to extract features and compress dimensions of each electric field time series in turn; the stacked autoencoder includes three encoders connected in series, each of which uses a linear rectification function as an internal activation function of the network; each encoder extracts features from the electric field time series layer by layer, and compresses the dimensions of the extracted features; S2, combining the dimensionally compressed electric field time series into two-dimensional electric field data, mapping the two-dimensional electric field data into an interval of [0, 255], and converting the mapped two-dimensional electric field data into an electric field image; Mapping the two-dimensional electric field data to the interval [0, 255] in S2 includes: normalizing the two-dimensional electric field data to map each electric field data in the two-dimensional electric field data to the range [0, 1], and multiplying each normalized electric field data by 255 so that each electric field data corresponds to a pixel value of the grayscale image; S3, inputting the electric field image into a preset trained lightning prediction model to predict the lightning level; Before executing S1, the method further includes: training the stacked autoencoder, and training the lightning prediction model after the training is completed; the training of the stacked autoencoder includes: obtaining a data set including a plurality of electric field time series samples, and inputting the electric field time series samples into the stacked autoencoder; decoding and reconstructing the compressed features output by the stacked autoencoder using a decoder to obtain reconstructed features; calculating the error between the reconstructed features and the electric field time series samples, and optimizing the model parameters of the stacked autoencoder with the goal of minimizing the error; The decoder uses a linear rectification function as an internal activation function of the network, and the output of the decoder uses a tanh activation function.
2. The lightning prediction method according to claim 1, characterized in that: The lightning prediction model includes three groups of convolutional layers and maximum pooling layers connected in series alternately, and two fully connected layers connected in sequence to the output end of the last maximum pooling layer; The convolution layer is used to perform convolution operation on the data at its input end to realize feature extraction and output the corresponding feature map; The maximum pooling layer is used to reduce the dimension of the feature map output after the convolution operation; The fully connected layer is used to compress the high-dimensional features of its input end into a one-dimensional vector, and the last fully connected layer outputs the lightning level.
3. The lightning prediction method according to claim 1, characterized in that: The lightning levels include four levels: LV0, LV1, LV2 and LV3. The number of lightning occurrences per minute under the LV0, LV1, LV2 and LV3 lightning levels are 0, 1, (1, 5], (5, +∞) respectively.
4. An electronic device, characterized in that: include: processor; A memory storing a computer executable program, wherein when the program is executed by the processor, the processor executes the lightning prediction method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Lightning intensity value predicting method based on atmospheric electric field data
CN107728234A
Lightning early warning method and system
CN114252706A