Lightning position prediction method, device and storage medium

By dividing the target area into grids and performing location and time aggregation processing, the problem of inaccurate lightning location prediction in existing technologies is solved, and high-precision lightning location prediction is achieved.

CN119809044BActive Publication Date: 2025-10-24BEIJING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411904737.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-10-24
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

The accuracy of existing lightning location prediction methods is low, mainly because radar echoes cannot accurately reflect lightning phenomena, leading to inaccurate prediction results.

Method used

The target area is divided into multiple grids, and the lightning events in each grid within a preset time window are counted. A lightning density map is generated through position aggregation processing, and time clustering is performed based on the temporal relationship of the statistical period to predict the movement path and future location of lightning clusters.

Benefits of technology

It improves the accuracy of lightning location prediction, avoids errors in radar data acquisition, and achieves high-precision lightning location prediction by combining the temporal and spatial patterns of lightning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809044B_ABST
    Figure CN119809044B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, in particular to a lightning position prediction method and device and a storage medium. The method comprises the following steps: determining a target area and dividing the target area into multiple grids; counting the statistical result of lightning events in each grid in a preset time window according to a statistical period; in each statistical period, performing position aggregation processing on the multiple grids according to the statistical result to obtain a lightning density map corresponding to the target area in each statistical period; based on the time sequence relationship of the statistical periods, performing time clustering processing on lightning clusters in each lightning density map to determine the moving path of each lightning cluster in the time sequence of the statistical periods; and predicting the position of each lightning cluster at a future moment based on the moving path of each lightning cluster in the time sequence of the statistical periods. The embodiment of the application can improve the accuracy of predicting the lightning position.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and particularly relates to a lightning position prediction method and device and storage medium. BACKGROUND

[0002] Lightning is a strong discharge phenomenon randomly occurring in the atmosphere, which has significant destructive power, for example, may cause forest fires, power line failures, etc., thereby posing a serious threat to the natural world and human society. Therefore, studying the characteristics of lightning and making effective prediction and early warning are important tasks for disaster prevention and mitigation.

[0003] Currently, for lightning position prediction, real-time data is usually collected by radar, and then machine learning is performed according to the collected data to predict the future lightning position. However, since the radar echo usually reflects the process of a storm, it cannot accurately reflect lightning, and therefore, the current lightning position prediction method has low accuracy in predicting the lightning position. SUMMARY

[0004] To solve the above technical problems, the present application provides a lightning position prediction method, device and storage medium, which can improve the accuracy of predicting the lightning position.

[0005] In a first aspect, the present application provides a lightning position prediction method, comprising: determining a target area and dividing the target area into a plurality of grids; according to a statistical period, counting a statistical result of each grid in a preset time window; in each statistical period, performing position aggregation processing on the plurality of grids according to the statistical result to obtain a lightning density map corresponding to the target area in each statistical period; one statistical period corresponds to one lightning density map, and one lightning density map includes a plurality of lightning clusters, and one lightning cluster includes at least one grid where a lightning event has occurred; based on the time sequence relationship of the statistical periods, performing time clustering processing on the lightning clusters in each lightning density map to determine the moving path of each lightning cluster in the time sequence of the statistical periods; and based on the moving path of each lightning cluster in the time sequence of the statistical periods, predicting the position of each lightning cluster at a future time.

[0006] In some embodiments, the statistical result includes a lightning event occurring in a grid and a lightning event not occurring in a grid; and in each statistical period, a plurality of grids are subjected to position aggregation processing according to the statistical result, to obtain a lightning density map corresponding to a target region in each statistical period, including: for a target region corresponding to any statistical period, determining a target grid in the target region, and performing the following first aggregation operation on the target grid until all target grids have been subjected to the first aggregation operation, to obtain the lightning density map corresponding to the target region in the statistical period; the target grid is a grid in the target region that has not been subjected to the aggregation operation; and the first aggregation operation includes: taking the target grid as a centroid grid, aggregating neighborhood grids for the centroid grid based on the eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate neighborhood grids for the centroid grid based on the eight-neighborhood method until there is no neighborhood grid for all centroid grids, and determining a grid group composed of the centroid grid and the neighborhood grid as a lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistical result is a lightning event occurring in the grid.

[0007] In some embodiments, the statistical result includes a lightning event occurring in a grid and a lightning event not occurring in a grid; and in each statistical period, a plurality of grids are subjected to position aggregation processing according to the statistical result, to obtain a lightning density map corresponding to a target region in each statistical period, including: for a target region corresponding to any statistical period, determining a target grid in the target region, and performing the following second aggregation operation on the target grid until all target grids have been subjected to the second aggregation operation, to obtain an initial lightning density map corresponding to the target region in the statistical period; the target grid is a grid in the target region that has not been subjected to the aggregation operation; and the second aggregation operation includes: taking the target grid as a centroid grid, aggregating neighborhood grids for the centroid grid based on the eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate neighborhood grids for the centroid grid based on the eight-neighborhood method until there is no neighborhood grid for all centroid grids, and determining a grid group composed of the centroid grid and the neighborhood grid as an initial lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistical result is a lightning event occurring in the grid; determining the similarity between any two initial lightning clusters in the initial lightning density map, and merging initial lightning clusters with a similarity greater than a similarity threshold into a final lightning cluster, to obtain the lightning density map corresponding to the target region in the statistical period.

[0008] In some embodiments, determining the similarity between any two initial lightning clusters in the initial lightning density map includes: determining the nearest distance between a grid in a first initial lightning cluster and a grid in a second initial lightning cluster, and determining the reciprocal of the nearest distance as the similarity between the two initial lightning clusters; the first initial lightning cluster and the second initial lightning cluster are different initial lightning clusters.

[0009] In some embodiments, the lightning cluster in each lightning density map is time-clustered based on the time sequence relationship of the statistical periods, and a moving path of each lightning cluster in the time sequence of the statistical periods is determined, including: taking the time sequence relationship of the statistical periods as a guide, for two lightning density maps in any adjacent time sequence statistical period, performing the following third aggregation operation to determine the moving path of the lightning cluster in the lightning density map in the adjacent time sequence statistical period; the third aggregation operation includes: determining the distance between each lightning cluster in the two lightning density maps corresponding to the adjacent time sequence statistical period; determining two lightning clusters with a distance less than a distance threshold as the same lightning cluster, and determining the position of the lightning cluster in front of the time sequence as the first position of the lightning cluster, and determining the position of the lightning cluster behind the time sequence as the second position of the lightning cluster; determining the moving path of the lightning cluster in the adjacent time sequence statistical period as moving from the first position to the second position; and determining the moving path of each lightning cluster in the time sequence of the statistical periods based on the time sequence relationship of the statistical periods and the moving path of the lightning cluster in the lightning density map in all adjacent time sequence statistical periods.

[0010] In some embodiments, the moving path includes the position of the lightning cluster in each statistical period corresponding lightning density map; and predicting the position of each lightning cluster at a future time based on the moving path of each lightning cluster in the time sequence of the statistical periods, including: for each lightning cluster, determining the moving speed of the lightning cluster in a target statistical period set corresponding to a target time window; the target statistical period set is a statistical period set closest to the target time window in the time sequence, and the target time window includes multiple future times; inputting the moving speed of the lightning cluster in the target statistical period set into a preset speed prediction model to predict the speed of the lightning cluster in the target time window; and determining the position of the lightning cluster corresponding to the target time window based on the position of the lightning cluster in the target statistical period set and the speed of the lightning cluster in the target time window.

[0011] In some embodiments, before inputting the moving speed of the lightning cluster in the target statistical period set into the preset speed prediction model, the prediction method further includes: determining the moving speed of each lightning cluster between each adjacent statistical period based on the position of the lightning cluster in each statistical period corresponding lightning density map; and constructing and training the preset speed prediction model by inputting the moving speed of the lightning cluster in a first statistical period set as input and the moving speed of the lightning cluster in a second statistical period set as input based on the time sequence relationship of the statistical periods; the statistical periods in the first statistical period set are all arranged before the statistical periods in the second statistical period set in the time sequence relationship; the first statistical period set includes at least three time-adjacent statistical periods, and the second statistical period set includes at least two time-adjacent statistical periods.

[0012] In some embodiments, the positions of the lightning clusters include boundary grid positions; after predicting the positions of the lightning clusters at the future time, the prediction method further comprises: collecting actual boundary grid positions of the lightning clusters at the future time; based on the predicted boundary grid positions and the actual boundary grid positions of the lightning clusters, counting the number of hits of the lightning clusters in the prediction result; determining that the lightning clusters hit in the prediction result when there is an overlap between the predicted boundary grid positions and the actual boundary grid positions of the lightning clusters; or, determining that the lightning clusters hit in the prediction result when the ratio of the predicted boundary grid area and the actual boundary grid area of the lightning clusters is greater than a ratio threshold; determining the accuracy of the speed prediction model according to the number of hits and the total number of the lightning clusters in the prediction result; and optimizing the speed prediction model according to the accuracy.

[0013] In a second aspect, the present application provides a lightning position prediction device, comprising: a determination module configured to determine a target area and divide the target area into a plurality of grids; a statistics module configured to count a statistics result of each grid in a preset time window according to a statistics period; a position processing module configured to, in each statistics period, perform position aggregation processing on the plurality of grids according to the statistics result, to obtain a lightning density map corresponding to the target area in each statistics period; one statistics period corresponds to one lightning density map, and one lightning density map includes a plurality of lightning clusters, and one lightning cluster includes at least one grid in which a lightning event occurs; a time processing module configured to, based on a time sequence relationship of the statistics periods, perform time clustering processing on the lightning clusters in each lightning density map to determine a moving path of each lightning cluster in the time sequence of the statistics periods; and a prediction module configured to predict the positions of the lightning clusters at a future time based on the moving path of each lightning cluster in the time sequence of the statistics periods.

[0014] In some embodiments, the statistics result includes a lightning event occurring in a grid and a lightning event not occurring in a grid; and the position processing module is specifically configured to, for the target area corresponding to any statistics period, determine a target grid in the target area, and perform the following first aggregation operation on the target grid until all target grids have been executed by the first aggregation operation to obtain the lightning density map corresponding to the target area in the statistics period; the target grid is a grid in the target area that has not been executed by the aggregation operation; wherein the first aggregation operation includes: taking the target grid as a centroid grid, aggregating neighborhood grids for the centroid grid based on the eight-neighborhood method, and taking the neighborhood grids as new centroid grids, continuing to aggregate neighborhood grids for the centroid grid based on the eight-neighborhood method, until all centroid grids do not have neighborhood grids, and determining the grid group composed of the centroid grids and the neighborhood grids as one lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistics result is a lightning event occurring in the grid.

[0015] In some embodiments, the statistical result includes lightning events occurring in the grid and lightning events not occurring in the grid; the position processing module includes an aggregation submodule and a merging submodule; the aggregation submodule is configured to, for a target region corresponding to any statistical period, determine a target grid in the target region, and perform the following second aggregation operation on the target grid until the second aggregation operation is performed on all target grids to obtain an initial lightning density map corresponding to the target region in the statistical period; the target grid is a grid in the target region that has not been subjected to the aggregation operation; the second aggregation operation includes: taking the target grid as a centroid grid, aggregating neighborhood grids of the centroid grid based on the eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate neighborhood grids of the centroid grid based on the eight-neighborhood method until there is no neighborhood grid for the centroid grid, and determining a grid group composed of the centroid grid and the neighborhood grid as an initial lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistical result is a lightning event; the merging submodule is configured to determine the similarity between any two initial lightning clusters in the initial lightning density map, and merge the initial lightning clusters with a similarity greater than a similarity threshold into a final lightning cluster to obtain a lightning density map corresponding to the target region in the statistical period.

[0016] In some embodiments, the merging submodule is specifically configured to determine the nearest distance between the grid in the first initial lightning cluster and the grid in the second initial lightning cluster, and determine the reciprocal of the nearest distance as the similarity between the two initial lightning clusters; the first initial lightning cluster and the second initial lightning cluster are different initial lightning clusters in the two initial lightning clusters.

[0017] In some embodiments, the time processing module is specifically configured to: taking the time sequence relationship of the statistical periods as a guide, for two lightning density maps in any adjacent time sequence statistical period, perform the following third aggregation operation to determine the movement path of the lightning cluster in the lightning density map in the adjacent time sequence statistical period; the third aggregation operation includes: determining the distance between each lightning cluster in the two lightning density maps corresponding to the adjacent time sequence statistical period; determining two lightning clusters with a distance less than a distance threshold as the same lightning cluster, and determining the position of the lightning cluster in the time sequence as the first position of the lightning cluster, and determining the position of the lightning cluster in the time sequence as the second position of the lightning cluster; determining the movement path of the lightning cluster in the adjacent time sequence statistical period as moving from the first position to the second position; determining the movement path of each lightning cluster in the time sequence of the statistical period based on the time sequence relationship of the statistical periods and the movement paths of the lightning clusters in the lightning density maps in all adjacent time sequence statistical periods.

[0018] In some embodiments, the movement path comprises positions of the lightning cluster in the lightning density map corresponding to each statistical period; the prediction module comprises a constructing sub-module, a determining sub-module, and a predicting sub-module; the determining sub-module is configured to determine, for each lightning cluster, a movement speed of the lightning cluster in a target statistical period set corresponding to a target time window; the target statistical period set is a statistical period set closest in time sequence to the target time window, and the target time window comprises a plurality of future time points; the predicting sub-module is configured to input the movement speed of the lightning cluster in the target statistical period set into a preset speed prediction model to predict a speed of the lightning cluster in the target time window; and the determining sub-module is further configured to determine a position of the lightning cluster in the target time window based on the positions of the lightning cluster in the target statistical period set and the speed of the lightning cluster in the target time window.

[0019] In some embodiments, the lightning position prediction apparatus further comprises a constructing module; the determining module is further configured to determine, based on the positions of the lightning cluster in the lightning density map corresponding to each statistical period, a movement speed of each lightning cluster between adjacent statistical periods; and the constructing module is configured to construct and train the preset speed prediction model by inputting the movement speeds of the lightning clusters in a first statistical period set and the movement speeds of the lightning clusters in a second statistical period set based on a time sequence relationship of the statistical periods; the statistical periods in the first statistical period set are all arranged before the statistical periods in the second statistical period set in the time sequence relationship; the first statistical period set comprises at least three time-sequentially adjacent statistical periods; and the second statistical period set comprises at least two time-sequentially adjacent statistical periods.

[0020] In some embodiments, the position of the lightning cluster comprises a boundary grid position; the lightning position prediction apparatus further comprises an acquiring module; the acquiring module is configured to collect actual boundary grid positions of each lightning cluster at the future time point after predicting the position of each lightning cluster at the future time point; the statistical module is further configured to count a hit number of the lightning cluster in the prediction result based on the predicted boundary grid position and the actual boundary grid position of each lightning cluster; the lightning cluster is determined to be hit in the prediction result when the predicted boundary grid position of the lightning cluster overlaps with the actual boundary grid position; or the lightning cluster is determined to be hit in the prediction result when a ratio of a predicted boundary grid area of the lightning cluster to an actual boundary grid area of the lightning cluster is greater than a ratio threshold; the determining module is further configured to determine an accuracy of the speed prediction model according to the hit number and a total number of the lightning clusters in the prediction result; and the constructing module is further configured to optimize the speed prediction model according to the accuracy.

[0021] In a third aspect, the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the lightning position prediction method of any one of the embodiments of the first aspect is implemented.

[0022] In a fourth aspect, the present application provides a computer readable storage medium, comprising: a computer program stored on the computer readable storage medium, the computer program being executed by a processor to implement the lightning location prediction method according to any one of the first aspect.

[0023] In a fifth aspect, the present application provides a computer program product, comprising: when the computer program product is run on a computer, causing the computer to implement the lightning location prediction method according to any one of the first aspect.

[0024] The technical scheme provided by the present application has the following advantages compared with the prior art: first, a target area is determined, and the target area is divided into a plurality of grids. Then, the statistical results of lightning events in each grid in a preset time window are counted according to a statistical period, and in each statistical period, the plurality of grids are subjected to position aggregation processing according to the statistical results, to obtain a lightning density map corresponding to the target area in each statistical period. One statistical period corresponds to one lightning density map, and one lightning density map includes a plurality of lightning clusters, and one lightning cluster includes at least one grid where a lightning event has occurred. Finally, based on the time sequence relationship of the statistical periods, the lightning clusters in each lightning density map are subjected to time clustering processing, the moving path of each lightning cluster in the time sequence of the statistical periods is determined, and the position of each lightning cluster at a future time is predicted based on the moving path of each lightning cluster in the time sequence of the statistical periods. In this way, on the one hand, the position of each lightning cluster at a future time can be predicted according to the statistical results of lightning events in each grid in a preset time window, avoiding the use of data collected by a radar to predict the position of lightning, and improving the accuracy of predicting the position of lightning; on the other hand, the grids can be aggregated in the position dimension first to determine the lightning clusters, and then the lightning clusters can be aggregated in the time dimension to determine the positions of the lightning clusters in the time dimension, and then the positions of the lightning clusters at a future time are predicted according to these positions, effectively combining the time regularity and spatial regularity of lightning in the process of predicting the position of lightning, and further improving the accuracy of predicting the position of lightning. BRIEF DESCRIPTION OF DRAWINGS

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

[0026] In order to more clearly illustrate the technical schemes in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those skilled in the art without creative labor.

[0027] Figure 1 One of the flowcharts of the lightning location prediction method provided by the embodiments of the present application;

[0028] Figure 2 A schematic diagram of a lightning density map provided by an embodiment of the present application;

[0029] Figure 3 A schematic diagram of a lightning density map provided by an embodiment of the present application;

[0030] Figure 4 A schematic diagram of a lightning density map provided by an embodiment of the present application;

[0031] Figure 5 A schematic diagram of a lightning position prediction method provided by an embodiment of the present application;

[0032] Figure 6 A schematic diagram of a lightning density map provided by an embodiment of the present application;

[0033] Figure 7 A schematic diagram of a lightning position prediction method provided by an embodiment of the present application;

[0034] Figure 8 A schematic diagram of a lightning position prediction method provided by an embodiment of the present application;

[0035] Figure 9 A schematic diagram of a lightning position prediction method provided by an embodiment of the present application;

[0036] Figure 10 A schematic diagram of a lightning position prediction method provided by an embodiment of the present application;

[0037] Figure 11 A schematic diagram of a lightning position prediction method provided by an embodiment of the present application;

[0038] Figure 12 A schematic diagram of a lightning position prediction device provided by an embodiment of the present application;

[0039] Figure 13 A schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the solutions of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0041] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. However, the present application can be practiced according to other embodiments that can not be described in detail herein; and, obviously, modifications and adaptations of the embodiments described herein are intended to be within the scope of the present application.

[0042] Thunderstorm activities pose a significant threat to the safe operation of power systems, and more than 60% of transmission line failures are caused by lightning strikes. As one of the direct manifestations of thunderstorm activities, lightning is mainly divided into cloud-to-cloud lightning and cloud-to-ground lightning (also known as ground lightning) according to its discharge type. Accurate prediction of lightning location can help provide real-time lightning path monitoring and early warning services for power systems, promote differentiated protection strategies for transmission lines based on lightning warning technology, and reduce economic losses caused by lightning strikes. Currently, the lightning protection planning of power systems mainly relies on the lightning density and the distribution of lightning days. However, these traditional indicators fail to fully reflect the spatio-temporal evolution characteristics of individual thunderstorm activities.

[0043] In addition, the current prediction of lightning location usually uses radar to collect real-time data, and then performs machine learning based on the collected data to predict the future lightning location. However, since the radar echo usually reflects the process of the storm, it cannot accurately reflect the lightning, and therefore, the current prediction method of lightning location has a low accuracy in predicting the lightning location.

[0044] To solve the above problems, the embodiment of the present application provides a lightning position prediction method, device and storage medium. The method comprises the following steps. Firstly, a target area is determined, and the target area is divided into a plurality of grids. Then, the statistical results of lightning events in each grid in a preset time window are counted according to a statistical period, and in each statistical period, the plurality of grids are subjected to position aggregation processing according to the statistical results, to obtain a lightning density map corresponding to the target area in each statistical period. One statistical period corresponds to one lightning density map, and one lightning density map comprises a plurality of lightning clusters, and one lightning cluster comprises at least one grid where a lightning event has occurred. Finally, the lightning clusters in the lightning density maps are subjected to time clustering processing based on the time sequence relationship of the statistical periods, the moving paths of the lightning clusters in the time sequence of the statistical periods are determined, and the positions of the lightning clusters at a future time are predicted based on the moving paths of the lightning clusters in the time sequence of the statistical periods. In this way, on the one hand, the positions of the lightning clusters at a future time can be predicted according to the statistical results of lightning events in each grid in a preset time window, avoiding the problem of signal attenuation or distortion in the detection range when the lightning position is predicted using the data collected by the radar, which is affected by the terrain or building obstruction, and improving the accuracy of predicting the lightning position. On the other hand, the grids can be aggregated in the position dimension horizontally first to determine the lightning clusters, and then the lightning clusters can be aggregated in the time dimension vertically to determine the positions of the lightning clusters in the time dimension, and then the positions of the lightning clusters at a future time are predicted according to these positions. In the process of predicting the lightning position, the time rule and the space rule of lightning are effectively combined, and the accuracy of predicting the lightning position is further improved.

[0045] The lightning position prediction method provided by the embodiment of the present application is mainly suitable for the scene of predicting the lightning position at a future time when the lightning speed at a historical time is known. The lightning position prediction method provided by the embodiment of the present application can be executed by a lightning position prediction device. The lightning position prediction device can be hardware or software. When the lightning position prediction device is hardware, it can be various electronic devices with the function of predicting the lightning position, including but not limited to computers, computers, tablet computers and the like. When the lightning position prediction device is software, it can be installed in the above-mentioned electronic devices. It can be implemented as a plurality of software or software modules, or as a single software or software module. No specific limitation is made here.

[0046] Figure 1 The flowchart of the lightning position prediction method provided by the embodiment of the present application is shown in FIG. 1. Figure 1 The lightning position prediction method can comprise the following steps.

[0047] S11, a target area is determined, and the target area is divided into a plurality of grids.

[0048] Firstly, a target area is determined. Specifically, when lightning occurs, an area within a preset distance range around the area where lightning occurs is determined as the target area. The value of the preset distance is preset, for example, a default value, or a value set by relevant personnel according to actual conditions.

[0049] Secondly, the target area is divided into multiple grids. Specifically, the target area can be divided into multiple grids according to the latitude and longitude of the target area, for example, the size of the grid is set to a grid with a latitude and longitude of 0.01°, that is, the size of the grid is 0.01°x0.01°; or the target area can be divided into multiple grids according to a preset size shape, for example, a square with a size of 1x1 kilometer (km), a triangle with a height of 1 km, a regular hexagon with a side of 1 km, etc.

[0050] S12, according to the statistical period, the statistical result of each grid in the preset time window is counted.

[0051] The length of the statistical period and the preset time window is preset, for example, a default value, or a value set by relevant personnel according to actual conditions. For example, the statistical period is 6 minutes (min) and the preset time window is 30 min. The statistical result includes the occurrence of lightning events in the grid and the non-occurrence of lightning events in the grid.

[0052] Specifically, the way of counting the statistical result of each grid in the preset time window according to the statistical period can be to use a special collection device to count the statistical result of each grid in the preset time window according to the statistical period. For example, the collection device can be a short baseline very low frequency (VLF) / low frequency (LF) three-dimensional lightning detection network (VLF / LF Lightning Detection Network), a VHF interferometer lightning detection system, etc.

[0053] S13, in each statistical period, according to the statistical result, the multiple grids are subjected to position aggregation processing, and the lightning density map corresponding to the target area in each statistical period is obtained.

[0054] Wherein, one statistical period corresponds to one lightning density map, and one lightning density map includes multiple lightning clusters, and one lightning cluster includes at least one grid where lightning events have occurred.

[0055] Specifically, for a certain statistical period, the adjacent grids with the statistical result of lightning events in the grid can be aggregated into the same lightning cluster to obtain the lightning density map corresponding to the target area in the statistical period. For example, Figure 2 is the statistical result of lightning events in each grid in the target area in a statistical period. For example,Figure 2 As shown, the grids 1-19 are grids in which lightning events occur in the statistical period, and the remaining grids are grids in which lightning events do not occur in the statistical period. As can be seen, the grids in the grids 1-12 are adjacent to each other, and therefore the grids 1-12 can be aggregated into the same lightning cluster; similarly, the grids in the grids 13-19 are adjacent to each other, and therefore the grids 13-19 can be aggregated into the same lightning cluster.

[0056] In some embodiments, in each statistical period, the lightning density map corresponding to the target region in the statistical period can be obtained by performing position aggregation on the plurality of grids according to the statistical result in a manner that, for the target region corresponding to any statistical period, target grids in the target region are determined, and the following first aggregation operation is performed on the target grids until all the target grids have been subjected to the first aggregation operation, thereby obtaining the lightning density map corresponding to the target region in the statistical period; the target grid is a grid in the target region that has not been subjected to the aggregation operation. The first aggregation operation includes: taking a target grid as a centroid grid, aggregating neighborhood grids of the centroid grid based on the eight-neighborhood method, and taking a neighborhood grid as a new centroid grid, and continuing to aggregate neighborhood grids of the centroid grid based on the eight-neighborhood method, until there is no neighborhood grid for any centroid grid, and a grid group composed of the centroid grid and the neighborhood grid is determined as a lightning cluster in the lightning density map. The neighborhood grid is a grid in which lightning events occur according to the statistical result, and the eight-neighborhood method aggregates neighborhood grids means that whether there is a neighborhood grid in the eight adjacent grids (i.e., up, down, left, right, and four diagonal directions) of the centroid grid is found, and if there is, the centroid grid and the neighborhood grid are aggregated, and if there is not, the finding is stopped, thereby obtaining a lightning cluster.

[0057] In the above scheme, on the one hand, the position dimension of the grid can be aggregated horizontally to identify the lightning cluster in the target region, so as to provide data support for subsequent prediction of the position of the lightning cluster, thereby avoiding the problem of signal attenuation or distortion in the detection range caused by the influence of terrain or building shielding when the data collected by the radar is used to predict the position of lightning, and improving the accuracy of predicting the position of lightning. On the other hand, the grid can also be aggregated by the eight-neighborhood method, which effectively aggregates discrete grid units into continuous lightning clusters, better captures the overall distribution and local features of spatial data, reduces the influence of noise and isolated points, and further indirectly improves the accuracy of predicting the position of lightning.

[0058] S14, based on the time sequence relationship of the statistical periods, performing time clustering on the lightning clusters in each lightning density map to determine the moving path of each lightning cluster in the time sequence of the statistical periods.

[0059] Specifically, based on the time sequence relationship of the statistical periods, the distance between each lightning cluster in the previous statistical period and each lightning cluster in the next statistical period of the target region is calculated, and two lightning clusters with close distance (e.g., less than a distance threshold) are determined as the same lightning cluster, so as to obtain the moving path of the lightning cluster from the previous statistical period to the next statistical period.

[0060] Exemplarily, Figure 3 The lightning density maps corresponding to two adjacent statistical periods provided by the embodiments of the present application include, as shown in Figure 3 the lightning density map of the first statistical period and the lightning density map of the second statistical period, the first statistical period includes the first lightning cluster 31 and the second lightning cluster 32, and the second statistical period includes the third lightning cluster 33 and the fourth lightning cluster 34. Then, the distances between the first lightning cluster 31 and the third lightning cluster 33 and the fourth lightning cluster 34, and the distances between the second lightning cluster 32 and the third lightning cluster 33 and the fourth lightning cluster 34 are calculated respectively; the third lightning cluster 33 and the fourth lightning cluster 34 with the closest distance to the first lightning cluster 31 are determined as the same lightning cluster as the first lightning cluster 31; and the third lightning cluster 33 and the fourth lightning cluster 34 with the closest distance to the second lightning cluster 32 are determined as the same lightning cluster as the second lightning cluster 32.

[0061] For example, when the distance between the first lightning cluster 31 and the third lightning cluster 33 is a, the distance between the first lightning cluster 31 and the fourth lightning cluster 34 is b, a is less than b, and a is less than a preset threshold, the third lightning cluster 33 and the first lightning cluster 31 are determined as the same lightning cluster, as shown in Figure 4 the first lightning cluster 31 in the second statistical period moves from the first position 401 in the first statistical period to the second position 402 in the second statistical period; similarly, when the distance between the second lightning cluster 32 and the third lightning cluster 33 is c, the distance between the second lightning cluster 32 and the fourth lightning cluster 34 is d, c is greater than b, and c is less than a preset threshold, the fourth lightning cluster 34 and the second lightning cluster 32 are determined as the same lightning cluster, as shown in Figure 4 the second lightning cluster 32 in the second statistical period moves from the third position 411 in the first statistical period to the fourth position 412 in the second statistical period.

[0062] Based on the above method, the time clustering processing is performed on the lightning clusters in each lightning density map to obtain the moving path of each lightning cluster in all statistical periods.

[0063] S15, based on the moving path of each lightning cluster in the time sequence of the statistical periods, predicting the position of each lightning cluster at a future time.

[0064] Specifically, the way of predicting the positions of the lightning clusters at the future moment based on the moving paths of the lightning clusters at the statistical period time sequence can be inputting the moving paths of the lightning clusters at the statistical period time sequence into a pre-trained position prediction model to obtain the positions of the lightning clusters at the future moment, or can be calculating the moving speeds of the lightning clusters according to the moving paths of the lightning clusters at the statistical period time sequence and the statistical period, predicting the moving speeds at the future moment according to the historical moving speeds, and then calculating the positions of the lightning clusters at the future moment according to the moving speeds at the future moment and the positions of the current lightning clusters.

[0065] In the above scheme, first, a target area is determined, and the target area is divided into a plurality of grids. Then, the statistical results of lightning events occurring in each grid within a preset time window are counted according to a statistical period, and the plurality of grids are subjected to position aggregation processing according to the statistical results within each statistical period to obtain lightning density maps corresponding to the target area within each statistical period. One statistical period corresponds to one lightning density map, and one lightning density map includes a plurality of lightning clusters, and one lightning cluster includes at least one grid in which a lightning event has occurred. Finally, the lightning clusters in each lightning density map are subjected to time clustering processing based on the time sequence relationship of the statistical periods, the moving paths of the lightning clusters at the statistical period time sequence are determined, and the positions of the lightning clusters at the future moment are predicted based on the moving paths of the lightning clusters at the statistical period time sequence. In this way, on the one hand, the positions of the lightning clusters at the future moment can be predicted according to the statistical results of lightning events occurring in each grid within the preset time window, avoiding the use of data collected by a radar to predict lightning positions, and improving the accuracy of predicting lightning positions. On the other hand, the grids can be aggregated in the position dimension first to determine the lightning clusters, and then the lightning clusters can be aggregated in the time dimension to determine the positions of the lightning clusters in the time dimension, and then the positions of the lightning clusters at the future moment can be predicted according to these positions, effectively combining the time regularity and the spatial regularity of lightning in the process of predicting lightning positions, and further improving the accuracy of predicting lightning positions. On the other hand, the time resolution and the spatial resolution can be unified to predict lightning positions, i.e., the embodiment of the present application provides a lightning position prediction method with high accuracy and high time-space resolution, which provides an important reference for subsequent monitoring and early warning of severe convective weather.

[0066] In some embodiments, the statistical results include lightning events occurring in the grids and lightning events not occurring in the grids. Figure 5 As shown in the figure, the way of aggregating the plurality of grids according to the statistical results to obtain the lightning density maps corresponding to the target area within each statistical period includes the following steps:

[0067] S131. For a target area corresponding to any statistical period, determine a target grid in the target area, and perform the following second aggregation operation on the target grid until the second aggregation operation is performed on all target grids, thereby obtaining an initial lightning density map corresponding to the target area within the statistical period.

[0068] The target grid is the grid in the target area that has not been aggregated. The second aggregation operation includes: using the target grid as the centroid grid, aggregating neighboring grids for the centroid grid based on the eight-neighborhood method, and using the neighboring grid as the new centroid grid. The eight-neighborhood method is continued to aggregate neighboring grids for the centroid grid until all centroid grids have no neighboring grids. The grid group composed of the centroid grid and the neighboring grid is determined as an initial lightning cluster in the lightning density map. The neighboring grid is the grid where the statistical result shows that a lightning event occurred.

[0069] S132. Determine the similarity between any two initial lightning clusters in the initial lightning density map, and merge the initial lightning clusters whose similarity is greater than a similarity threshold into an ultimate lightning cluster to obtain a lightning density map corresponding to the target area within the statistical period.

[0070] The similarity threshold is preset, for example, a default value, or a value set by relevant personnel according to actual conditions. For another example, the similarity threshold is the reciprocal of the distance between the two grids.

[0071] In some embodiments, a method for determining the similarity between any two initial lightning clusters in the initial lightning density map may be: determining the shortest distance between a grid in a first initial lightning cluster and a grid in a second initial lightning cluster, and determining the reciprocal of the shortest distance as the similarity between the two initial lightning clusters; the first initial lightning cluster and the second initial lightning cluster are different initial lightning clusters in the two initial lightning clusters.

[0072] For example, Figure 6 This is the initial lightning density map within a statistical period provided by the embodiment of this application. Figure 6The fifth lightning cluster 61, the sixth lightning cluster 62, and the seventh lightning cluster 63 are determined, and the similarity between the fifth lightning cluster 61 and the sixth lightning cluster 62 can be determined by calculating the reciprocal of the distance between the grids in the fifth lightning cluster 61 and the sixth lightning cluster 62; similarly, the similarity between the fifth lightning cluster 61 and the seventh lightning cluster 63 and the similarity between the sixth lightning cluster 62 and the seventh lightning cluster 63 can also be calculated in the above manner. Then, if the reciprocal of the distance between the grids in the fifth lightning cluster 61 and the sixth lightning cluster 62 is greater than the similarity threshold, the fifth lightning cluster 61 and the sixth lightning cluster 62 are merged into one ultimate lightning cluster, otherwise no merging is performed; similarly, the fifth lightning cluster 61 and the seventh lightning cluster 63 and the sixth lightning cluster 62 and the seventh lightning cluster 63 are also merged according to the similarity to obtain the lightning density map in the statistical period.

[0073] In the above scheme, on the basis of combining the eight-neighborhood method to aggregate the grids, the initial lightning clusters are further aggregated by calculating the similarity between the initial lightning clusters, so that the initial lightning clusters are aggregated into larger lightning clusters, thereby avoiding the problem that the lightning clusters determined by only the eight-neighborhood method may be many dense but discrete points, greatly reducing the subsequent operation amount and saving the computing resources while ensuring the aggregation accuracy.

[0074] In some embodiments, as shown in Figure 7 The way of performing the time clustering processing on the lightning clusters in each lightning density map based on the time sequence relationship of the statistical period to determine the moving path of each lightning cluster in the time sequence of the statistical period can include the following steps:

[0075] S141, taking the time sequence relationship of the statistical period as a guide, for two lightning density maps in any adjacent time sequence statistical period, performing the following third aggregation operation to determine the moving path of the lightning clusters in the lightning density maps in the adjacent time sequence statistical period.

[0076] As shown in Figure 8 The third aggregation operation includes the following steps:

[0077] S1411, determining the distance between the lightning clusters in the two lightning density maps corresponding to the adjacent time sequence statistical period.

[0078] Specifically, the way of determining the distance between the lightning clusters in the two lightning density maps corresponding to the adjacent time sequence statistical period can be to determine the distance between the lightning clusters in the adjacent time sequence statistical period according to the number of grids and the size of the grids between the same lightning clusters in the two lightning density maps corresponding to the adjacent time sequence statistical period. For example, as shown in Figure 4In the illustrated scenario, the second lightning cluster 32 moves from the third position 411 in the first statistical period to the fourth position 412 in the second statistical period. It can be seen that the number of grids between the third position 411 and the fourth position 412 is 5, and thus the distance between the third position 411 and the fourth position is 5*n, where n is the size of a grid.

[0079] S1412, determine two lightning clusters with a distance less than the distance threshold as the same lightning cluster, and determine the position of the lightning cluster earlier in time sequence as the first position of the lightning cluster and the position of the lightning cluster later in time sequence as the second position of the lightning cluster.

[0080] In the formula, the preset threshold is a preset value, for example, a default value, or a value determined by a relevant person according to actual conditions, for example, the preset threshold is 10 km.

[0081] For example, in the illustrated scenario, the position of the first lightning cluster 31 earlier in time sequence in the first statistical period is determined as the first position of the lightning cluster, and the position of the third lightning cluster 33 later in time sequence in the second statistical period is determined as the second position of the lightning cluster. Figure 3 In the illustrated scenario, the position of the first lightning cluster 31 earlier in time sequence in the first statistical period is determined as the first position of the lightning cluster, and the position of the third lightning cluster 33 later in time sequence in the second statistical period is determined as the second position of the lightning cluster. Similarly, the position of the second lightning cluster 32 earlier in time sequence in the first statistical period is determined as the first position of the lightning cluster, and the position of the fourth lightning cluster 34 later in time sequence in the second statistical period is determined as the second position of the lightning cluster.

[0082] S1413, determine the moving path of the lightning cluster in adjacent time sequence statistical periods as moving from the first position to the second position.

[0083] S142, determine the moving path of each lightning cluster in time sequence of the statistical period based on the time sequence relationship of the statistical period and the moving path of the lightning cluster in the lightning density map in all adjacent time sequence statistical periods.

[0084] Specifically, based on the above manner, the third aggregation operation is performed on the lightning cluster in each lightning density map to obtain the moving path of each lightning cluster in all statistical periods.

[0085] In the above scheme, the lightning cluster can be aggregated in the time dimension in the longitudinal direction, and each position of the lightning cluster in the time dimension is determined, so as to provide data support for subsequent prediction of the position of the lightning cluster, and the problem that the signal is attenuated or distorted in the detection range due to the influence of the terrain or the building shielding when the data collected by the radar is used to predict the lightning position is avoided, and the accuracy of predicting the lightning position is improved.

[0086] In some embodiments, the moving path includes the position of the lightning cluster in each statistical period corresponding lightning density map. For example, Figure 9As shown, the way of predicting the position of each lightning cluster at a future time based on the moving path of each lightning cluster at the statistical period timing includes the following steps:

[0087] S151, for each lightning cluster, determining the moving speed of the lightning cluster in the target statistical period set corresponding to the target time window.

[0088] The target statistical period set is the statistical period set closest to the target time window in timing, the target time window includes multiple future times, and the length of the target time window is the same as the length of the statistical period.

[0089] The target statistical period set includes multiple statistical periods in timing, and the moving speed of the lightning cluster between each two adjacent statistical periods in timing may not be the same. Therefore, when determining the moving speed of the lightning cluster in the target statistical period set corresponding to the target time window, the moving speed of the lightning cluster between each two adjacent statistical periods in the target statistical period set needs to be determined.

[0090] Specifically, the way of determining the moving speed of the lightning cluster between each two adjacent statistical periods in the target statistical period set can be to determine the moving distance of the lightning cluster between the two adjacent statistical periods according to the number of grids passed by the moving path of the lightning cluster in the two adjacent statistical periods and the size of the grid. Then, the moving speed of the lightning cluster between the two adjacent statistical periods is determined according to the moving distance and the length of time between the two statistical periods (i.e. the length of one statistical period).

[0091] In some embodiments, the moving speed of the lightning cluster between the two adjacent statistical periods can be calculated according to the following formula.

[0092]

[0093] wherein, is used to represent the moving speed of the lightning cluster i between the two adjacent statistical periods, Δt is used to represent the length of time between the two statistical periods, i.e. the length of one statistical period, current_lon i is used to represent the longitude of the lightning cluster in the statistical period later in timing, prev_lon i is used to represent the longitude of the lightning cluster in the statistical period earlier in timing, current_lat i is used to represent the latitude of the lightning cluster in the statistical period later in timing, prev_lat i is used to represent the latitude of the lightning cluster in the statistical period earlier in timing.

[0094] S152, input the moving speed of the lightning cluster in the target statistical period set into a preset speed prediction model to predict the speed of the lightning cluster in the target time window.

[0095] The speed prediction model is trained according to the moving speed of the lightning cluster in the historical statistical period set.

[0096] S153, determine the position of the lightning cluster in the target time window based on the position of the lightning cluster in the target statistical period set and the speed of the lightning cluster in the target time window.

[0097] Specifically, the position of the lightning cluster in the target time window can be calculated according to the following formula.

[0098]

[0099] wherein, is used to represent the position of the lightning cluster i in the target time window, is used to represent the speed of the lightning cluster i in the target time window, and Δt is the length of the target time window, i.e. the length of a statistical period.

[0100] In some embodiments, the position of the lightning cluster includes the position of the lightning cluster boundary grid and the position of the mass center grid.

[0101] In the above scheme, the moving speed of the lightning cluster can be determined according to the moving path of each lightning cluster in the statistical period sequence and the length of the statistical period, the moving speed of the lightning cluster at the future time can be predicted according to the moving speed of the lightning cluster corresponding to the historical statistical period, and then the position of the lightning cluster at the future time can be calculated according to the moving speed of the lightning cluster at the future time and the position of the lightning cluster corresponding to the historical statistical period. In this way, the time regularity and the space regularity of lightning are effectively combined in the process of predicting the position of lightning, and the accuracy of predicting the position of lightning is further improved.

[0102] In some embodiments, before step S152, as shown in Figure 10 the lightning position prediction method further includes the following steps:

[0103] S1521, determine the moving speed of each lightning cluster between adjacent statistical periods based on the position of each lightning cluster in the lightning density map corresponding to each statistical period.

[0104] Specifically, the way of determining the moving speed of each lightning cluster between adjacent statistical periods is the same as the way of determining the moving speed of the lightning cluster between two adjacent statistical periods in step S151, which will not be described here.

[0105] S1522. Based on the temporal relationship of the statistical periods, the moving speed of the lightning clusters in the first statistical period set is used as input, and the moving speed of the lightning clusters in the second statistical period set is used as input to construct and train a preset speed prediction model.

[0106] The number of statistical periods in the first statistical period set is preset and greater than 2, for example, 3. The statistical periods in the first statistical period set are all arranged before the statistical periods in the second statistical period set in a temporal relationship; the first statistical period set includes at least three statistical periods that are adjacent in temporal sequence, and the second statistical period set includes at least two statistical periods that are adjacent in temporal sequence.

[0107] For example, when the number of statistical periods in the first statistical period set is 3, the speed prediction model can be described as the following formula:

[0108]

[0109] in, It is used to represent the predicted moving speed of lightning cluster i, It is used to indicate the speed of lightning cluster i between the two statistical periods with the later timing in the three statistical periods. It is used to represent the speed of lightning cluster i between the two statistical periods with the earliest time series among the three statistical periods. k is a hyperparameter of the speed prediction model, and k<1.

[0110] In some embodiments, the loss function of the speed prediction model can be expressed as the following formula:

[0111]

[0112] Among them, N is used to represent the number of samples; Used to indicate the actual position of the lightning cluster in the target time window. It is used to represent the predicted position of the lightning cluster in the target time window; the predicted position of the lightning cluster in the target time window can be calculated according to the formula in step S153.

[0113] In the above scheme, a preset speed prediction model can be pre-trained according to the speed of lightning clusters corresponding to historical time periods, which significantly reduces the time cost and computing cost of real-time calculation while ensuring the accuracy of the model.

[0114] In some embodiments, as Figure 11 As shown, after step S153, the lightning position prediction method further includes the following steps:

[0115] S161. Collect the actual boundary grid positions of each lightning cluster at a future moment.

[0116] S162, based on the predicted boundary grid position of each lightning cluster and the actual boundary grid position, counting the number of hits of the lightning cluster in the prediction result.

[0117] wherein, when the predicted boundary grid position of the lightning cluster coincides with the actual boundary grid position, it is determined that the lightning cluster hits in the prediction result; or, when the ratio of the predicted boundary grid area of the lightning cluster to the actual boundary grid area is greater than the ratio threshold, it is determined that the lightning cluster hits in the prediction result.

[0118] S163, determining the accuracy of the speed prediction model according to the number of hits and the total number of lightning clusters in the prediction result.

[0119] Specifically, the accuracy of the speed prediction model can be calculated according to the formula POD = hits / (hits+false). Wherein, POD is used to represent the accuracy of the speed prediction model, hits is used to represent the number of hits of the lightning cluster in the prediction result, and false is used to represent the number of misses of the lightning cluster in the prediction result.

[0120] S164, optimizing the speed prediction model according to the accuracy.

[0121] Specifically, when the accuracy is less than the accuracy threshold, the hyperparameters in the speed prediction model are adjusted, and the position of the lightning cluster is predicted again. Wherein, the accuracy threshold is preset, for example, it is a default value, or a value set by relevant personnel according to actual situation.

[0122] In the above scheme, the speed prediction model can be corrected in real time according to the prediction result of the lightning position, further improving the accuracy of the speed prediction model.

[0123] The embodiments of the present application can divide the functional modules of the lightning position prediction device according to the above method examples, for example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing unit. The above integrated modules can be realized in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical functional division, and actual implementation can have another division method.

[0124] As shown in Figure 12 The lightning position prediction device provided by the embodiments of the present application includes a determination module 51, a counting module 52, a position processing module 53, a time processing module 54, and a prediction module 55.

[0125] The determining module 51 is configured to determine a target area and divide the target area into a plurality of grids; the counting module 52 is configured to count, according to a statistical period, a statistical result of lightning events of each grid in a preset time window; the position processing module 53 is configured to, in each statistical period, perform position aggregation processing on the plurality of grids according to the statistical result, to obtain a lightning density map corresponding to the target area in each statistical period; one statistical period corresponds to one lightning density map, and one lightning density map includes a plurality of lightning clusters, and one lightning cluster includes at least one grid in which a lightning event occurs; the time processing module 54 is configured to, based on a time sequence relationship of the statistical periods, perform time clustering processing on the lightning clusters in each lightning density map, to determine a moving path of each lightning cluster in the time sequence of the statistical periods; and the prediction module 55 is configured to, based on the moving path of each lightning cluster in the time sequence of the statistical periods, predict a position of each lightning cluster at a future time.

[0126] In the above scheme, first, a target area is determined and the target area is divided into a plurality of grids. Then, a statistical result of lightning events of each grid in a preset time window is counted according to a statistical period, and in each statistical period, position aggregation processing is performed on the plurality of grids according to the statistical result, to obtain a lightning density map corresponding to the target area in each statistical period. Wherein, one statistical period corresponds to one lightning density map, and one lightning density map includes a plurality of lightning clusters, and one lightning cluster includes at least one grid in which a lightning event occurs. Finally, based on a time sequence relationship of the statistical periods, time clustering processing is performed on the lightning clusters in each lightning density map, to determine a moving path of each lightning cluster in the time sequence of the statistical periods, and based on the moving path of each lightning cluster in the time sequence of the statistical periods, a position of each lightning cluster at a future time is predicted. In this way, on the one hand, the position of each lightning cluster at a future time can be predicted according to the statistical result of lightning events of each grid in a preset time window, avoiding the use of data collected by a radar to predict the position of lightning, and improving the accuracy of predicting the position of lightning; on the other hand, the grids can be aggregated in the position dimension first to determine the lightning clusters, and then the lightning clusters can be aggregated in the time dimension to determine the positions of the lightning clusters in the time dimension, and then the positions are used to predict the positions of the lightning clusters at a future time, effectively combining the time rule and the space rule of lightning in the process of predicting the position of lightning, and further improving the accuracy of predicting the position of lightning.

[0127] In some embodiments, the statistical result includes a lightning event occurring in a grid and a lightning event not occurring in a grid; the position processing module 53 is specifically configured to, for a target region corresponding to any statistical period, determine a target grid in the target region, and perform the following first aggregation operation on the target grid until all target grids have been executed by the first aggregation operation, to obtain a lightning density map corresponding to the target region in the statistical period; the target grid is a grid in the target region that has not been executed by the aggregation operation; wherein the first aggregation operation includes: taking the target grid as a centroid grid, aggregating neighborhood grids for the centroid grid based on the eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate neighborhood grids for the centroid grid based on the eight-neighborhood method until all centroid grids have no neighborhood grid, and determining a grid group composed of the centroid grid and the neighborhood grid as a lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistical result is a lightning event occurring in the grid.

[0128] In some embodiments, the statistical result includes a lightning event occurring in a grid and a lightning event not occurring in a grid; as shown in Figure 12 the position processing module 53 includes an aggregation submodule and a merging submodule; the aggregation submodule is configured to, for a target region corresponding to any statistical period, determine a target grid in the target region, and perform the following second aggregation operation on the target grid until all target grids have been executed by the second aggregation operation, to obtain an initial lightning density map corresponding to the target region in the statistical period; the target grid is a grid in the target region that has not been executed by the aggregation operation; wherein the second aggregation operation includes: taking the target grid as a centroid grid, aggregating neighborhood grids for the centroid grid based on the eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate neighborhood grids for the centroid grid based on the eight-neighborhood method until all centroid grids have no neighborhood grid, and determining a grid group composed of the centroid grid and the neighborhood grid as an initial lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistical result is a lightning event occurring in the grid; the merging submodule is configured to determine the similarity between any two initial lightning clusters in the initial lightning density map, and merge the initial lightning clusters with a similarity greater than a similarity threshold into a final lightning cluster, to obtain a lightning density map corresponding to the target region in the statistical period.

[0129] In some embodiments, the merging submodule is specifically configured to determine the nearest distance between a grid in a first initial lightning cluster and a grid in a second initial lightning cluster, and determine the reciprocal of the nearest distance as the similarity between the two initial lightning clusters; the first initial lightning cluster and the second initial lightning cluster are different initial lightning clusters of the two initial lightning clusters.

[0130] In some embodiments, the time processing module 54 is specifically configured to: in the time sequence relationship of the statistical periods as guidance, for any two lightning density maps in adjacent time sequence statistical periods, perform the following third aggregation operation to determine the moving path of the lightning cluster in the lightning density map in the adjacent time sequence statistical periods; the third aggregation operation includes: determining the distance between each lightning cluster in the two lightning density maps corresponding to the adjacent time sequence statistical periods; determining two lightning clusters with a distance less than a distance threshold as the same lightning cluster, and determining the position of the lightning cluster in front of the time sequence as the first position of the lightning cluster, and determining the position of the lightning cluster behind the time sequence as the second position of the lightning cluster; determining the moving path of the lightning cluster in the adjacent time sequence statistical periods as moving from the first position to the second position; and determining the moving path of each lightning cluster in the time sequence of the statistical periods based on the time sequence relationship of the statistical periods and the moving paths of the lightning clusters in the lightning density maps in all adjacent time sequence statistical periods.

[0131] In some embodiments, the moving path includes the position of the lightning cluster in each statistical period corresponding lightning density map; as Figure 12 The prediction module 55 includes a construction submodule, a determination submodule, and a prediction submodule, as shown. The determination submodule is configured to determine, for each lightning cluster, the moving speed of the lightning cluster in a target statistical period set corresponding to a target time window; the target statistical period set is a statistical period set closest in time sequence to the target time window, and the target time window includes a plurality of future time instants. The prediction submodule is configured to input the moving speed of the lightning cluster in the target statistical period set into a preset speed prediction model to predict the speed of the lightning cluster in the target time window. The determination submodule is further configured to determine the position of the lightning cluster in the target time window based on the position of the lightning cluster in the target statistical period set and the speed of the lightning cluster in the target time window.

[0132] In some embodiments, as Figure 12 The lightning position prediction device further includes a construction module 57, as shown. The determination module 51 is further configured to determine, based on the position of each lightning cluster in each statistical period corresponding lightning density map, the moving speed of each lightning cluster between each adjacent statistical period. The construction module 57 is configured to input, based on the time sequence relationship of the statistical periods, the moving speed of the lightning cluster in a first statistical period set as input and the moving speed of the lightning cluster in a second statistical period set as input, construct and train a preset speed prediction model. The statistical periods in the first statistical period set are all earlier in time sequence than the statistical periods in the second statistical period set in the time sequence relationship. The first statistical period set includes at least three time sequence adjacent statistical periods, and the second statistical period set includes at least two time sequence adjacent statistical periods.

[0133] In some embodiments, the position of the lightning cluster includes a boundary grid position; as Figure 12As shown, the lightning position prediction device also includes an acquisition module 56; the acquisition module 56 is configured to, after predicting the position of each lightning cluster at the future moment, collect the actual boundary grid position of each lightning cluster at the future moment; the statistical module 52 is further configured to, based on the predicted boundary grid position and the actual boundary grid position of each lightning cluster, count the number of hits of the lightning cluster in the prediction result; when the predicted boundary grid position of the lightning cluster and the actual boundary grid position coincide, it is determined that the lightning cluster hits in the prediction result; or when the ratio of the predicted boundary grid area of the lightning cluster and the actual boundary grid area is greater than the ratio threshold, it is determined that the lightning cluster hits in the prediction result; the determination module 51 is further configured to determine the accuracy of the speed prediction model according to the number of hits and the total number of lightning clusters in the prediction result; and the construction module 57 is further configured to optimize the speed prediction model according to the accuracy.

[0134] The lightning position prediction device provided by the embodiment can execute the lightning position prediction method provided by the method embodiment, and the implementation principle and technical effects are similar to the above method, which will not be repeated here.

[0135] Figure 13 An electronic device according to an example embodiment is shown. The electronic device can include a processor 802 configured to execute application code to implement the lightning position prediction method of the present application.

[0136] The processor 802 can be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0137] As shown in Figure 13 The electronic device can also include a memory 803. The memory 803 is used to store the application code for executing the program of the present application, and is controlled by the processor 802 to execute.

[0138] The memory 803 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 803 may exist independently and be connected to the processor 802 via the bus 804. The memory 803 may also be integrated with the processor 802.

[0139] like Figure 13 As shown, the electronic device may further include a communication interface 801, wherein the communication interface 801, the processor 802, and the memory 803 may be coupled to each other, for example, via a bus 804. The communication interface 801 is used to exchange information with other devices, for example, to support information exchange between the electronic device and other devices.

[0140] It should be pointed out that Figure 13 The device structure shown in the figure does not constitute a limitation on the electronic device, except Figure 13 In addition to the components shown, the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. Furthermore, the electronic device provided in this embodiment can execute the lightning location prediction method provided in the above-mentioned method embodiment. Its implementation principles and technical effects are similar to those of the above-mentioned method and are not further described here.

[0141] An embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the computer program implements the various processes of the lightning location prediction method in the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it is not described here.

[0142] The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0143] The embodiment of the present application provides a kind of computer program product, the computer program product stores computer program, computer program is executed when processor realizes each process of the prediction method of lightning position in above-mentioned method embodiment, and can achieve identical technical effect, to avoid repetition, here no longer repeat.

[0144] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0145] In the present application, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0146] In the present application, the memory can include a non-persistent memory in a computer readable medium, random access memory (RAM) and / or non-volatile memory, etc. in the form of read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer readable medium.

[0147] In this application, computer readable medium includes permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, which can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable medium does not include transitory media such as modulated data signal and carrier wave.

[0148] It should be noted that the relational terms herein such as "first" and "second" and the like are used solely to distinguish one from another entity or action, without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.

[0149] The above description is merely that of a particular implementation of the present application and as such is not to be taken in a limiting sense. Various modifications to the implementations described in this document will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other implementations without departing from the spirit or scope of the application. Accordingly, the present application is not intended to be limited to the implementations described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of predicting a location of lightning, characterized by, The method comprises the following steps: determining a target area and dividing the target area into a plurality of grids; counting a statistical result of each grid in a preset time window in a statistical period; in each statistical period, performing position aggregation processing on the plurality of grids according to the statistical result to obtain a lightning density map corresponding to the target area in each statistical period; one statistical period corresponds to one lightning density map, and one lightning density map comprises a plurality of lightning clusters, and one lightning cluster comprises at least one grid in which a lightning event occurs; based on the time sequence relationship of the statistical periods, performing time clustering processing on the lightning clusters in each lightning density map to determine a moving path of each lightning cluster in the time sequence of the statistical periods; based on the moving path of each lightning cluster in the time sequence of the statistical periods, predicting the position of each lightning cluster at a future time; the statistical result comprises a lightning event occurring in a grid and a lightning event not occurring in a grid; in each statistical period, performing position aggregation processing on the plurality of grids according to the statistical result to obtain a lightning density map corresponding to the target area in each statistical period, comprising: for any target area corresponding to a statistical period, determining a target grid in the target area, and performing the following first aggregation operation on the target grid until all target grids have been executed the first aggregation operation to obtain a lightning density map corresponding to the target area in the statistical period; the target grid is a grid in the target area that has not been executed the aggregation operation; wherein the first aggregation operation comprises: taking the target grid as a centroid grid, aggregating neighborhood grids for the centroid grid based on the eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate neighborhood grids for the centroid grid based on the eight-neighborhood method, until all centroid grids do not have neighborhood grids, and determining a grid group composed of the centroid grid and the neighborhood grid as one lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistical result is a lightning event occurring in the grid; the moving path comprises the position of the lightning cluster in each statistical period corresponding to the lightning density map; based on the moving path of each lightning cluster in the time sequence of the statistical periods, the position of each lightning cluster at a future time is predicted, comprising: for each lightning cluster, determining a moving speed of the lightning cluster in a target statistical period set corresponding to a target time window; the target statistical period set is a statistical period set closest to the target time window in the time sequence, and the target time window comprises a plurality of future times; inputting the moving speed of the lightning cluster in the target statistical period set into a preset speed prediction model to predict the speed of the lightning cluster in the target time window; based on the position of the lightning cluster in the target statistical period set and the speed of the lightning cluster in the target time window, determining the position of the lightning cluster corresponding to the target time window.

2. The prediction method of claim 1, wherein, the statistical result comprises a lightning event occurring in a grid and a lightning event not occurring in a grid; the position aggregation processing on the plurality of grids according to the statistical result in each statistical period to obtain a lightning density map corresponding to the target area in each statistical period, comprising: For any target area corresponding to a statistical period, a target grid is determined in the target area, and the following second aggregation operation is performed on the target grid until all target grids are executed by the second aggregation operation, obtaining an initial lightning density map corresponding to the target area in the statistical period; the target grid is a grid in the target area that has not been executed by the aggregation operation; wherein the second aggregation operation comprises: taking the target grid as a centroid grid, aggregating neighborhood grids for the centroid grid based on an eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate neighborhood grids for the centroid grid based on the eight-neighborhood method until there is no neighborhood grid for all centroid grids, and determining a grid group composed of the centroid grid and the neighborhood grid as an initial lightning cluster in the lightning density map; the neighborhood grid is a grid in which a lightning event occurs in the statistical result; Determine the similarity of any two initial lightning clusters in the initial lightning density map, and merge the initial lightning clusters with a similarity greater than a similarity threshold into a final lightning cluster to obtain a lightning density map corresponding to the target area in the statistical period.

3. The prediction method of claim 2, wherein, The determination of the similarity of any two initial lightning clusters in the initial lightning density map comprises: Determine the nearest distance between the grids in the first initial lightning cluster and the grids in the second initial lightning cluster, and determine the reciprocal of the nearest distance as the similarity between the two initial lightning clusters; the first initial lightning cluster and the second initial lightning cluster are different initial lightning clusters in the two initial lightning clusters.

4. The prediction method of claim 1, wherein, Based on the time sequence relationship of the statistical period, the lightning clusters in each lightning density map are time clustered to determine the moving path of each lightning cluster in the time sequence of the statistical period, comprising: With the time sequence relationship of the statistical period as a guide, for any two lightning density maps in adjacent time sequence statistical periods, the following third aggregation operation is performed to determine the moving path of the lightning clusters in the lightning density maps in the adjacent time sequence statistical periods; the third aggregation operation comprises: determining the distance between each lightning cluster in the two lightning density maps corresponding to the adjacent time sequence statistical periods; determining two lightning clusters with a distance less than a distance threshold as the same lightning cluster, and determining the position of the lightning cluster in the time sequence as the first position of the lightning cluster, and determining the position of the lightning cluster in the time sequence as the second position of the lightning cluster; the moving path of the lightning cluster in the adjacent time sequence statistical period is determined as moving from the first position to the second position; Based on the time sequence relationship of the statistical period and the moving path of the lightning clusters in the lightning density maps in all adjacent time sequence statistical periods, the moving path of each lightning cluster in the time sequence of the statistical period is determined.

5. The prediction method of claim 1, wherein, Before inputting the moving speed of the lightning cluster in the target statistical period set into a preset speed prediction model, the prediction method further comprises: Based on the position of the lightning cluster in each statistical period corresponding lightning density map, the moving speed of each lightning cluster between each adjacent statistical period is determined; Based on the time sequence relationship of the statistical periods, a speed prediction model is constructed and trained by taking the moving speed of the lightning clusters in a first set of statistical periods as input and taking the moving speed of the lightning clusters in a second set of statistical periods as input; the time sequence of the statistical periods in the first set of statistical periods is earlier than the time sequence of the statistical periods in the second set of statistical periods in the time sequence relationship; the first set of statistical periods includes at least three time-sequentially adjacent statistical periods, and the second set of statistical periods includes at least two time-sequentially adjacent statistical periods.

6. The prediction method of claim 5, wherein, The position of the lightning cluster includes a boundary grid position; after predicting the position of each lightning cluster at a future time, the prediction method further comprises: collecting the actual boundary grid position of each lightning cluster at the future time; based on the predicted boundary grid position of each lightning cluster and the actual boundary grid position, counting the number of hits of lightning clusters in the prediction result; when the predicted boundary grid position of the lightning cluster coincides with the actual boundary grid position, it is determined that the lightning cluster hits in the prediction result; or, when the ratio of the predicted boundary grid area of the lightning cluster to the actual boundary grid area is greater than a ratio threshold, it is determined that the lightning cluster hits in the prediction result; determining the accuracy of the speed prediction model according to the number of hits and the total number of lightning clusters in the prediction result; optimizing the speed prediction model according to the accuracy.

7. A lightning position prediction device characterized by comprising: comprises: a determination module configured to determine a target area and divide the target area into a plurality of grids; a statistical module configured to count a statistical result of each grid in a preset time window in which a lightning event occurs according to a statistical period; a position processing module configured to, in each statistical period, perform position aggregation processing on the plurality of grids according to the statistical result to obtain a lightning density map corresponding to the target area in each statistical period; one statistical period corresponds to one lightning density map, and one lightning density map includes a plurality of lightning clusters, and one lightning cluster includes at least one grid in which a lightning event occurs; a time processing module configured to, based on the time sequence relationship of the statistical periods, perform time clustering processing on the lightning clusters in each lightning density map to determine the moving path of each lightning cluster in the time sequence of the statistical periods; a prediction module configured to predict the position of each lightning cluster at a future time based on the moving path of each lightning cluster in the time sequence of the statistical periods; the statistical result includes a lightning event occurring in a grid and a lightning event not occurring in a grid; the position processing module is specifically configured to: for a target area corresponding to any statistical period, determining a target grid in the target area and performing the following first aggregation operation on the target grid until all target grids have been executed by the first aggregation operation to obtain a lightning density map corresponding to the target area in the statistical period; The target grid is a grid in the target area that has not been subjected to an aggregation operation; wherein the first aggregation operation comprises: taking the target grid as a centroid grid, aggregating a neighborhood grid for the centroid grid based on an eight-neighborhood method, and taking the neighborhood grid as a new centroid grid, continuing to aggregate a neighborhood grid for the centroid grid based on the eight-neighborhood method until all centroid grids do not have a neighborhood grid, and determining a grid group composed of the centroid grid and the neighborhood grid as a lightning cluster in the lightning density map; the neighborhood grid is a grid in which the statistical result is a grid in which a lightning event occurs; The movement path comprises a position of the lightning cluster in each statistical period corresponding lightning density map; the prediction module comprises a construction submodule, a determination submodule, and a prediction submodule; The construction submodule is configured to determine, for each lightning cluster, a movement speed of the lightning cluster in a target statistical period set corresponding to a target time window; the target statistical period set is a statistical period set closest in time sequence to the target time window, and the target time window comprises a plurality of future time points; The determination submodule is configured to input the movement speed of the lightning cluster in the target statistical period set into a preset speed prediction model to predict a speed of the lightning cluster in the target time window; The prediction submodule is configured to determine a position of the lightning cluster corresponding to the target time window based on the position of the lightning cluster in the target statistical period set and the speed of the lightning cluster in the target time window.

8. An electronic device, comprising: The computer program is executed by the processor to implement the lightning position prediction method according to any one of claims 1 to 6. The computer program is executed by the processor to implement the lightning position prediction method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, When the computer program product is executed on the computer, the computer is caused to implement the lightning position prediction method according to any one of claims 1 to 6. ​ 10. A computer program product, characterised in that, ​