Lightning activity meteorological association rule mining method and device and electronic equipment
Through the combination of Bi-Eclat algorithm and KNN model, meteorological correlation rules for lightning activities are generated, which solves the problem of low correlation analysis of lightning activities and meteorological conditions in the existing technology, and realizes efficient lightning warning and meteorological correlation rules mining , improves the accuracy and applicability of lightning warnings.
Patent Information
- Application Number
- CN202411211210.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-06
AI Technical Summary
The existing correlation analysis method of lightning activity and meteorological conditions is inefficient when processing large-scale data sets, and performs poorly when the data set is sparse, and cannot effectively utilize the structural information of the data set, resulting in the inability to effectively warning and mitigate lightning disasters. The impact of power systems.
Using the method of combining Bi-Eclat algorithm and KNN model, we generate meteorological correlation rules for lightning activities by obtaining meteorological factor data and lightning activity data, and using the advantages of Bi-Eclat algorithm to narrow the search space. The KNN model determines the neighbors of the grid Domain grid, intersection obtains the final meteorological correlation rules, improving analysis efficiency and applicability.
It realizes the mining of meteorological correlation rules for efficient lightning activities on large-scale data sets, overcomes the problems of inefficiency, large memory usage and limited adaptability of traditional methods, and improves the accuracy and efficiency of lightning warnings.
Smart Images

Figure CN119090000A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to lightning warning technology, and in particular to a method, device and electronic equipment for mining meteorological association rules of lightning activities. Background Art
[0002] Lightning activity is one of the important factors affecting the stability and safety of power systems. Severe thunderstorms often cause transmission line tripping and equipment damage. Therefore, in order to ensure the safe operation of transmission lines, it is necessary to take effective measures to prevent and mitigate the impact of lightning disasters on power systems. Among them, monitoring and early warning of lightning activity is particularly important.
[0003] To evaluate the impact of lightning activity on the power system, factors such as geographical location, climate, and transmission line design are often considered. Among them, meteorological conditions are one of the most influential environmental factors on lightning activity and an important reference for lightning activity warning. Therefore, it is necessary to conduct a correlation analysis between lightning activity and meteorological conditions and obtain multi-parameter meteorological driving parameters of lightning activity.
[0004] There are many studies on the correlation analysis between lightning activity and meteorological conditions. Most of these analysis methods are based on entropy weight method, chi-square test, etc., which often require multiple scans of the data set and generate a large number of candidate sets. When processing large-scale data sets, it will lead to high time and space complexity and reduce analysis efficiency. In addition, these methods perform worse when the data set is sparse and cannot effectively utilize the structural information of the data set. Some other novel mining methods are also not ideal in terms of applicability to large data sets. Summary of the invention
[0005] Based on this, the present invention aims to provide a method, device and electronic equipment for mining meteorological association rules of lightning activity, which can accurately and efficiently mine multi-parameter strongly correlated meteorological factors of lightning activity based on a large-capacity lightning meteorological data set.
[0006] In a first aspect, the present invention provides a method for mining meteorological association rules of lightning activities, comprising:
[0007] Obtain meteorological factor data and lightning activity data in the target area;
[0008] Taking meteorological factor data as independent variables and lightning activity data as dependent variables, the Bi-Eclat algorithm is used to mine the association rules of lightning activities and generate the first meteorological association rules of lightning activities.
[0009] The target area is divided into several grids, and the KNN model is used to classify the grids into two categories to determine the grids belonging to the minefield and their K neighboring grids.
[0010] Traversing the meteorological factor data of K neighboring grids corresponding to the grid belonging to the thunder-prone area, and generating a second meteorological association rule of lightning activity according to the meteorological factor data of the K neighboring grids;
[0011] The intersection of the first meteorological association rule and the second meteorological association rule is obtained to obtain a third meteorological association rule, and the third meteorological association rule is the final meteorological association rule of lightning activity.
[0012] Furthermore, the Bi-Eclat algorithm is used to mine the association rules of lightning activities, and the first meteorological association rules between meteorological factors and lightning activities are generated, including:
[0013] Determine an input data set according to the meteorological factor data and the lightning activity data, wherein the input data set represents a mapping relationship between the meteorological factor data and the lightning activity data;
[0014] Based on the input data set, frequent 1-item sets are identified and sorted in descending order of support;
[0015] Let any two subsets of length k-1 belonging to the k-item set intersect to obtain the support of all k-item sets in each class;
[0016] The k-item sets are traversed in ascending order of support and the items below the support threshold are deleted. Then, the frequent item sets are mined based on the Eclat algorithm to generate the first meteorological association rule of lightning activity.
[0017] Furthermore, the training process of the KNN model includes:
[0018] Construct a KNN model, use different distance metrics and distance weight combinations to train the initial KNN model, take the highest accuracy and the lowest falsehood as the training goal, and obtain the distance metric and distance weight combination that optimizes the hyperparameters of the KNN model, as well as the optimal range of K values.
[0019] Furthermore, the trained KNN model uses Euclidean distance or block distance as the distance metric, inverse distance squared as the distance weight, and the K value ranges from 8 to 18.
[0020] Furthermore, the KNN model is used to classify the grids into two categories, and the grids belonging to the minefields and their corresponding K neighboring grids are determined to include:
[0021] Classify the grid into multiple minefields and other minefields according to the lightning activity data, and generate the minefield classification label of the grid;
[0022] Use the KNN model to generate minefield classification results for each grid;
[0023] Determine the grid that is correctly classified as a multi-mine area according to the mine area classification label of the grid and the mine area classification result;
[0024] For the grid correctly classified as a multi-mine area, the KNN model is used again to determine its K neighboring grids, and the neighboring grid belonging to the multi-mine area is determined based on the mine area classification labels of the K neighboring grids.
[0025] Furthermore, the minefield classification label of each grid is determined based on the lightning activity data, including:
[0026] Gridding the lightning activity data according to the grid division accuracy, and determining the lightning activity data corresponding to each grid, wherein the lightning activity data includes the lightning ground flash density;
[0027] Compare the lightning ground-to-ground flash density and ground-to-ground flash density threshold corresponding to each grid, and classify the grids with lightning ground-to-ground flash density higher than the ground-to-ground flash density threshold as multiple minefields, otherwise they are classified as other minefields.
[0028] Furthermore, traversing the meteorological factor data of K neighboring grids corresponding to the grid belonging to the thunder-prone area to generate the second meteorological association rule of lightning activity includes:
[0029] Traversing the meteorological factor data of the neighboring grids belonging to the thunder-prone area among the K neighboring grids, determining the minimum and maximum values of each meteorological factor according to the meteorological factor data of the traversed neighboring grids, and determining the value range of each meteorological factor based on the minimum and maximum values of each meteorological factor;
[0030] The second meteorological association rule of lightning activity is generated according to the value range of each meteorological factor.
[0031] In a second aspect, the present invention provides an association rule mining device for mining meteorological association rules of lightning activities, comprising:
[0032] A data acquisition module is used to acquire meteorological factor data and lightning activity data of the target area;
[0033] The first association rule mining module is used to mine the association rules of lightning activities using the Bi-Eclat algorithm with the meteorological factor data as the independent variable and the lightning activity data as the dependent variable, so as to generate the first meteorological association rules of lightning activities;
[0034] The minefield classification module is used to divide the target area into several grids, and use the KNN model to classify the grids into two categories to determine the grids belonging to the multi-minefield and their K neighboring grids;
[0035] The second association rule mining module is used to traverse the meteorological factor data of K neighboring grids corresponding to the grid belonging to the multi-mine area to generate the second meteorological association rule of lightning activity;
[0036] The rule merging module is used to obtain the intersection of the first meteorological association rule and the second meteorological association rule to obtain a third meteorological association rule, and the third meteorological association rule is the final meteorological association rule for lightning activity.
[0037] In a third aspect, the present invention provides an electronic device, comprising a memory storing computer executable instructions and a processor, wherein when the computer executable instructions are executed by the processor, the device executes each step of the method for mining meteorological association rules of lightning activity provided in the first aspect.
[0038] In a fourth aspect, the present invention provides a readable storage medium storing a computer executable program, which, when executed, can implement the various steps of the method for mining meteorological association rules of lightning activity provided in the first aspect.
[0039] It can be seen from the above technical solutions that the present invention has the following beneficial effects:
[0040] The present invention provides a method for mining meteorological association rules of lightning activities. Firstly, the bidirectional expansion advantage of the Bi-Eclat algorithm is used to find infrequent item sets as early as possible for pruning, so as to mine the first meteorological association rule of lightning activities. Compared with the conventional Eclat algorithm, the search space is gradually narrowed, the redundancy is reduced, the memory is reduced and the mining efficiency is improved. On this basis, the neighborhood grid of each geographic grid is determined by using the KNN model, and the meteorological factor data of the neighborhood grid is used to mine the second meteorological association rule of lightning activities. The intersection of the first meteorological association rule and the second meteorological association rule is obtained to obtain the final meteorological association rule. The mining results of the Bi-Eclat algorithm and the KNN model are mutually corrected, so as to overcome the shortcomings of the traditional method such as low efficiency, large memory occupation, sensitivity to data density, limited adaptability, and the need for multiple data scanning, and achieve higher efficiency and stronger applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 It is a flowchart of an implementation method of mining meteorological association rules of lightning activities provided by an embodiment of the present application;
[0043] Figure 2 This is a comparison chart of the optimization results of the KNN model provided in the embodiment of the present application for different numbers of neighboring points;
[0044] Figure 3It is a schematic diagram of the structure of an association rule mining device provided in an embodiment of the present application;
[0045] Figure 4 This is a diagram of the electronic device architecture provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] See also Figure 1 An embodiment of the present invention provides a method for mining meteorological association rules of lightning activities, comprising the following steps:
[0048] Step S110: Acquire meteorological factor data and lightning activity data of the target area.
[0049] In this step, the relevant meteorological data of the target area is obtained according to the analysis requirements. For example, when a lightning warning is required for a transmission line, the meteorological data of the area where the transmission line is located can be selected. Meteorological factor data is embodied as information used to describe and analyze the state of the atmosphere and its changes, mainly basic meteorological parameters, such as temperature, humidity, air pressure, wind speed, wind direction, precipitation, solar radiation intensity, etc. In order to more completely mine the association rules between the meteorology and lightning occurrence in the target area, the meteorological parameters of the atmosphere at different altitudes can be obtained. This part of the data can be obtained from local meteorological centers; lightning activity data is embodied as historical lightning activities in the target area. The lightning positioning system can record the time, location, lightning intensity, ground flash density and other information of each lightning activity. Therefore, lightning activity data often have at least spatiotemporal data.
[0050] Step S120: Taking the meteorological factor data as the independent variable and the lightning activity data as the dependent variable, the Bi-Eclat algorithm is used to mine the association rules of lightning activities to generate the first meteorological association rules of lightning activities.
[0051] In this step, the embodiment of the present invention adopts the Bi-Eclat algorithm to mine association rules. The inventor of the present invention has found that a subset of items with high support is more likely to become part of a long frequent item set, while a subset with low support is less likely to become part of a long frequent item set. Based on this, frequent item sets are mined, and the candidate item set is reduced by traversing in ascending order according to the support of the items, as well as the cross operation of the items. Compared with the conventional Eclat algorithm in dictionary order, the number of traversed items can be reduced, thereby reducing the number of redundant checks. In addition, after the transaction is cached, it is stored in the vertical data set TID-list in descending order according to the support. This is because the intersection operation on the subset with high support is often more than the cross operation on the subset with low support, which makes the access to the subset with high support more frequent, and the descending order can reduce the running time.
[0052] Step S130: Divide the target area into several grids, use the KNN model to classify the grids into two categories, and determine the grids belonging to the minefield and their K neighboring grids.
[0053] In this step, the KNN model is used to classify minefields. In the embodiment of the present invention, the spatiotemporal grid points are used as sample points for KNN model analysis. Therefore, the target area needs to be divided into spatiotemporal grids, and then the KNN model is used to analyze and determine the grids belonging to the multi-minefield and their K neighboring grids. The K value is the number of neighboring points of the sample points obtained after the KNN model is trained. In the embodiment of the present invention, it represents the K grids closest to the currently analyzed grid. Since more attention is paid to the meteorological association rules of lightning activity, the grids classified as multi-minefields are mainly analyzed in this step.
[0054] Step S140: traverse the meteorological factor data of K neighboring grids corresponding to the grid belonging to the area with many lightning, and generate a second meteorological association rule of lightning activity according to the meteorological factor data of the K neighboring grids.
[0055] Specifically, the minimum and maximum values of each meteorological factor are determined according to the meteorological factor data of the traversed neighborhood grids, and the value range of each meteorological factor is determined based on the minimum and maximum values of each meteorological factor. According to the value range of each meteorological factor, the second meteorological association rule of lightning activity is generated. Taking the temperature meteorological factor as an example, the temperature data of each neighborhood grid is traversed to determine the minimum and maximum values of the temperature. These two maximum values are used as the endpoints of the value range of the temperature meteorological factor. Since the traversed grid is a neighborhood grid with multiple lightning zones, it is considered that the temperature value range is the association rule of lightning activity, and lightning will occur when the temperature is within this range.
[0056] Step S150: Obtain an intersection of the first meteorological association rule and the second meteorological association rule to obtain a third meteorological association rule, where the third meteorological association rule is the final meteorological association rule for lightning activity.
[0057] In this step, the association rules obtained by using the Bi-Eclat algorithm and the KNN model are merged, and the output results of the two algorithms are mutually corrected to improve the accuracy of the obtained association rules. For example, it is assumed that the frequent item set output by the Bi-Eclat algorithm is "when the meteorological factor A is in the range of xx1∪xx2, and when the meteorological factor B is in the range of yyy, and the meteorological factor C is in the range of zzz, ..., the output lightning ground flash density is in the range of aaa", and the value range of each meteorological factor obtained by traversing the meteorological factor data of the neighborhood grid of the multi-mine area grid using the KNN model is "the meteorological factor A is in the range of Q1, the meteorological factor B is in the range of Q2, the meteorological factor C is in the range of Q3, ..., the intersection of the two association rules is obtained, and the final multi-mine area meteorological association rule is output as "when the meteorological factor A is in the range of (xx1∪xx2)∩Q1, and when the meteorological factor B is in the range of yyy∩Q2, and the meteorological factor C is in the range of zzz∩Q3, ..., the area belongs to the multi-mine area".
[0058] In a further embodiment, the process of mining the first meteorological association rule using Bi-Eclat in step S120 includes the following steps:
[0059] Step S121. Determine an input data set according to the meteorological factor data and the lightning activity data, where the input data set represents a mapping relationship between the meteorological factor data and the lightning activity data.
[0060] Step S122: Based on the input data set, identify and obtain frequent one-item sets arranged in descending order of support.
[0061] Step S123: Let any two subsets of length k-1 belonging to the k-item set intersect to obtain the support of all k-item sets in each class.
[0062] Step S124: traverse the k item sets in ascending order of support and delete items below the support threshold, and then mine the frequent item sets based on the Eclat algorithm to generate the first meteorological association rule of lightning activity.
[0063] Specifically, after studying the Eclat algorithm, it is believed that subsets with high support are more likely to become part of long frequent itemsets, while subsets with low support have a lower probability of becoming part of long frequent itemsets, and the subsequent itemset expansion is carried out based on this idea. When calculating the support of candidate itemsets, in order to decide which candidates are included in a given transaction, partial traversal operations must be performed. In order to minimize the traversal workload, items are selected in ascending order of the support of the itemsets instead of the dictionary order in the traditional Eclat algorithm to reduce the crossover operations of candidate itemsets and items. In addition, crossover operations on subsets with high support are often more than those on subsets with low support. In other words, subsets with high support are accessed more frequently in the transaction cache. Therefore, it is believed that arranging the transaction cache in descending order of frequency is conducive to storage compactness and efficiency. Therefore, transactions are cached in descending order of support, and support counts are cross-operated in ascending order of support during the itemset expansion process. Entries are stored in the vertical data set TID-list in descending order of support after being inserted into the cache. Infrequent itemsets can be found by reversing the entries when retrieving each transaction from the cache.
[0064] In some embodiments, the target area can be first gridded, and the meteorological factor data and lightning activity data can be gridded according to the grid division accuracy. For example, a 1 km grid is used for lightning activity data to calculate the ground lightning density. For the meteorological factor data, a 3 km grid is used to calculate the average value of each meteorological factor in each grid as the representative value of the meteorological factor in the grid. If the meteorological factor is a vector, it can be decomposed, for example, the wind speed can be decomposed into the east-west direction and the north-south direction.
[0065] In the embodiment of the present invention, the above steps S121 to S124 run the Bi-Eclat algorithm in the following process:
[0066] The meteorological factor data of each grid is taken as the independent variable, and the lightning ground flash density of the same grid is taken as the dependent variable. The mapping relationship between the meteorological factor data and the lightning activity data in each grid is constructed. This mapping relationship of all grids is the overall data set, from which each frequent item is identified, and the tid-list list of the subset is sorted in descending order according to the support number. That is, after dynamically converting the data format vertically, the tid-list list of the item is scanned in turn, and compared with the support threshold, the frequent 1-item set sorted in descending order of support is obtained.
[0067] Construct an equivalence class lattice to generate candidate item sets, that is, start from the set of class subsets arranged in ascending order of support, construct an equivalence class lattice, generate item sets in the form of unions of subsets in subset sets, and then calculate the support of item sets by the intersection of subset lists. In actual operation, by intersecting every two subsets of length k-1 in the tid-list, the support of all k item sets in each class can be obtained.
[0068] After arranging them in ascending order of support, infrequent candidate item sets are deleted to reduce redundant intersections, and all frequent item sets are mined recursively.
[0069] In a further embodiment, in order to reduce the redundancy of frequent item sets, the value ranges of the same meteorological factors in each frequent item set may be merged. For example, two frequent item sets are output, namely:
[0070] a. When meteorological factor A is in the range of xx1, and when meteorological factor B is in the range of yyy, and when meteorological factor C is in the range of zzz, ..., the output lightning ground flash density is in the range of aaa;
[0071] b. When meteorological factor A is in the range of xx2, and when meteorological factor B is in the range of yyy, and when meteorological factor C is in the range of zzz, ..., the output lightning ground flash density is in the range of aaa.
[0072] By merging the value ranges of the same meteorological factors, the final output frequent item set can be expressed as "when meteorological factor A is in the range of xx1∪xx2, and when meteorological factor B is in the range of yyy, and meteorological factor C is in the range of zzz, ..., the output lightning ground flash density is in the range of aaa".
[0073] In a further embodiment, the KNN model has the following training process:
[0074] Construct a KNN model, use different distance metrics and distance weight combinations to train the initial KNN model, take the highest accuracy and the lowest falsehood as the training goal, and obtain the distance metric and distance weight combination that optimizes the hyperparameters of the KNN model, as well as the optimal range of K values.
[0075] Specifically, the classification effect of the KNN model is closely related to the distribution of sample points and the selection of the number of neighboring points. The important hyperparameters of the model include the number of neighboring points K, the distance metric and the distance weight. In an embodiment of the present invention, before running the KNN model to classify the grid, the grid is first classified into a multi-mine area and other mine areas according to the lightning activity data. The training purpose of the KNN model is to classify the grid into a multi-mine area by binary classification. Different distance metrics, distance weights and K values will affect the classification accuracy of the model. Therefore, different distance metrics and distance weight combinations are used to train the initial KNN model during training. The training goals are to achieve the highest accuracy and the lowest falseness, so as to obtain the distance metric and distance weight combination that optimizes the hyperparameters of the KNN model and the optimal value range of the K value.
[0076] Among them, the distance metric is used to calculate the distance between each sample point, which determines the overall distribution form of the classified sample points. The embodiment of the present invention considers three distance metric forms when training the KNN model: Euclidean distance, block distance and cosine distance; the distance weight is used to measure the decision power of the nearest neighbor sample point in determining the type of the sample point to be sought. When there is a distance weight, the closer the known sample point is to the sample point to be sought, the greater the decision power in determining the type of the sample point to be sought. The embodiment of the present invention considers three methods: equal distance weight (no weight), inverse distance weight and inverse distance square weight when training the KNN model; the number of neighbor points K is the evaluation range when the model determines the classification result. The smaller the K value, the smaller the evaluation range, the more sensitive the model is to local features when making predictions, and the more refined the classification results, but at the same time, it may cause local outliers and noise pollution, resulting in reduced model accuracy or overfitting. A higher K value will make the model pay more attention to the overall sample distribution, and reduce the sensitivity to the influence of local outliers and noise, but it will also ignore local features, which may lead to underfitting.
[0077] An optimizable model is used to determine the optimal hyperparameter combination, and the highest accuracy (POD) and the lowest false alarm rate (FAR) are used as training objectives. POD represents the proportion of grids that are actually mine-prone areas classified as mine-prone areas by the model, and FAR represents the proportion of grids that are actually non-mine-prone areas classified as mine-prone areas. Table 1 below shows the model training results for different hyperparameter combinations.
[0078] Table 1
[0079]
[0080] From the analysis in Table 1, it can be found that under the condition of small K value, the POD of various models is significantly improved. Horizontally comparing the three weighting schemes of equal distance, inverse distance and inverse distance square, under the Euclidean distance and block distance measurement schemes, the POD of the inverse distance square weight exceeded 70%, which is the highest predicted POD, and the FAR of both schemes is 30.85%. Compared with other models, this model has obvious advantages. At the same time, the cosine distance KNN model under the inverse distance weight has a small K value prediction POD of 69.21% and a FAR of 30.98%, which is a suboptimal model. Therefore, based on these three types of hyperparameter models, the number of neighboring points K that makes the model prediction rate the best is found. Under the condition of small K value, modeling training is carried out at ten points of K=2, 5, 8, 10, 12, 15, 18, 20, 22, 25, and the calculation results are as follows Figure 2 shown.
[0081] Depend on Figure 2It can be seen that the training results of the cosine distance / equidistance model fluctuate greatly with the number of neighboring points, and the POD is generally significantly lower than the first two models. The POD and FAR of the two types of models using inverse distance square weights are similar in size and change. The prediction probability is stable above 69% in the range of K value 8~18, while its FAR gradually decreases with the increase of K value, and is in the range of 30%~31%. Therefore, using the distance metric of Euclidean distance or block distance, the distance weighting scheme of inverse distance square scheme, and setting the number of neighboring points K to a hyperparameter range of 8~18 for modeling can achieve a relatively optimal model effect, with an accuracy of about 69% and a false degree of about 30%.
[0082] In some embodiments, based on the training process and hyperparameter selection of the above-mentioned KNN model, the KNN model is used to perform binary classification on the grids, and determining the grids belonging to the minefield and their corresponding K neighboring grids includes the following steps:
[0083] Step S131. Classify the grid into multiple minefields and other minefields according to the lightning activity data, and generate a minefield classification label for the grid.
[0084] Step S132: Generate minefield classification results for each grid using the KNN model.
[0085] Step S133: Determine the grid that is correctly classified as a multi-minefield based on the minefield classification label and minefield classification result of the grid.
[0086] Step S134: For the grid correctly classified as a minefield, the KNN model is used again to determine its K neighboring grids, and the neighboring grids belonging to the minefield are determined according to the minefield classification labels of the K neighboring grids.
[0087] Specifically, since the accuracy of the trained KNN model is about 69%, it is considered that 69% of the grids are correctly classified as mine-prone areas. For these correctly classified grids, the KNN model classification is performed again to determine the K neighboring grids of these grids, thereby obtaining the meteorological factor data of these K neighboring grids.
[0088] In a further embodiment, step S131 includes the following steps:
[0089] Gridding the lightning activity data according to the grid division accuracy, and determining the lightning activity data corresponding to each grid, wherein the lightning activity data includes the lightning ground flash density;
[0090] Compare the lightning ground-to-ground flash density and ground-to-ground flash density threshold corresponding to each grid, and classify the grids with lightning ground-to-ground flash density higher than the ground-to-ground flash density threshold as multiple minefields, otherwise they are classified as other minefields.
[0091] Specifically, ground-to-ground lightning density refers to the number of lightning strikes that occur per unit area within a certain period of time. When the number is greater than a set threshold, the grid can be considered to belong to a minefield, otherwise it is classified as other minefields.
[0092] When the KNN model is run again, for a grid i to be classified, after determining its K domain grids, select the grids that are actually minefields among the K domain grids. Assume that there are M grids, and M≤K. Obtain the meteorological factor data of these M grids, find the minimum and maximum values of each meteorological factor, and obtain the value range of each meteorological factor. Use it as the meteorological association rule of grid i, recorded as Q i , which is actually the value range of each meteorological factor.
[0093] Assuming that there are n correctly classified grids, we will get n meteorological association rules, namely Q1, Q2, ..., Q i , ..., Q n , the intersection of these n meteorological association rules and the frequent item set Q mined by the Bi-Eclat algorithm is obtained. Here, the frequent item set Q also represents the value range of each meteorological factor, that is, the same meteorological factor is intersected. For example, the value range of meteorological factor A in Q1 intersects with the value range of meteorological factor A in Q, and the value range of meteorological factor B in Q1 intersects with the value range of meteorological factor B in Q, and so on. For the convenience of representation, it is recorded as Q1∩Q. Similarly, there is Q2∩Q, ..., Q i ∩Q,……,Q n ∩Q. The meteorological association rules of lightning activity can be expressed as Q end =(Q1∩Q)∪(Q2∩Q)∪…∪(Q i ∩Q)∪…∪(Q n ∩Q).
[0094] The above embodiments describe a method for mining meteorological association rules for lightning activity. First, the bidirectional expansion advantage of the Bi-Eclat algorithm is used to find infrequent item sets as early as possible for pruning, thereby mining the first meteorological association rule of lightning activity. Compared with the conventional Eclat algorithm, the search space is gradually narrowed, redundancy is reduced, memory is reduced, and mining efficiency is improved. On this basis, the KNN model is used to determine the neighborhood grid of each geographic grid, and the meteorological factor data of the neighborhood grid is used to mine the second meteorological association rule of lightning activity. The intersection of the first meteorological association rule and the second meteorological association rule is obtained to obtain the final meteorological association rule. The mining results of the Bi-Eclat algorithm and the KNN model correct each other, overcoming the shortcomings of the traditional method such as low efficiency, large memory usage, sensitivity to data density, limited adaptability, and the need for multiple data scans, thereby achieving higher efficiency and stronger applicability.
[0095] The above disclosed embodiment describes in detail a method for mining meteorological association rules of lightning activity. The above disclosed method can be implemented using various forms of equipment. Therefore, the present invention also discloses an association rule mining device corresponding to the above method. A specific embodiment is given below for detailed description.
[0096] like Figure 3 As shown, an embodiment of the present invention provides an association rule mining device 300, comprising:
[0097] The data acquisition module 301 is used to acquire meteorological factor data and lightning activity data of the target area;
[0098] The first association rule mining module 302 is used to mine the association rules of lightning activities using the Bi-Eclat algorithm with the meteorological factor data as the independent variable and the lightning activity data as the dependent variable, so as to generate the first meteorological association rules of lightning activities;
[0099] The minefield classification module 303 is used to divide the target area into a number of grids, and use the KNN model to perform binary classification on the grids to determine the grids belonging to the multi-minefield and their K neighboring grids;
[0100] The second association rule mining module 304 is used to traverse the meteorological factor data of K neighboring grids corresponding to the grid belonging to the thunder-prone area to generate the second meteorological association rule of the thunder and lightning activity;
[0101] The rule merging module 305 is used to obtain the intersection of the first meteorological association rule and the second meteorological association rule to obtain a third meteorological association rule, and the third meteorological association rule is the final meteorological association rule of lightning activity.
[0102] The implementation principle and technical effects of the device provided in the embodiments of the present application are the same as those of the aforementioned method embodiments. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiments.
[0103] The following embodiments are described by taking the method applied to a computer device as an example. It can be understood that the computer device can be any device with computing and processing functions, and can be but not limited to a server or a personal laptop computer, etc. In one embodiment, the computer device can be an application server, and the application server can be a server for running an application to be tested.
[0104] See also Figure 4, which shows a hardware block diagram of an electronic device, the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0105] like Figure 4 As shown, the electronic device includes: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0106] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0107] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0108] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0109] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to implement each processing flow of the aforementioned lightning activity meteorological association rule mining solution.
[0110] An embodiment of the present invention also provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the various processing flows of the lightning activity meteorological association rule mining solution provided in the above embodiment and / or any possible implementation method in combination with the embodiment are implemented.
[0111] The above-mentioned embodiments have described the present invention in particular detail with respect to possible scenarios, and those skilled in the art will recognize that the present invention can be practiced through other embodiments. The specific naming of components, the capitalization of terms, attributes, data structures, or any other programming or structural aspects are not mandatory or important, and the mechanisms or features of the present invention may have different names, forms, or procedures. The system may be implemented by a combination of hardware and software (as described), entirely by hardware elements, or entirely by software elements. The specific division of functions between the various system components described herein is exemplary only and not mandatory; on the contrary, the functions performed by a single system component may be performed by multiple components, or the functions performed by multiple components may be performed by a single component.
[0112] Those skilled in the art should understand that the various steps of the above disclosed method can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented with program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0113] These computing device executable programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors, and these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0114] Certain aspects of the present invention include process steps and instructions described herein in the form of algorithms. It should be noted that the process steps and instructions of the present invention can be implemented in software, firmware and / or hardware, and when implemented by software, it can be downloaded, stored on different platforms used by various operating systems and operated from the platforms.
[0115] Those skilled in the art will understand that the structures shown in the accompanying drawings are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
[0116] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "possible design" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0117] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0118] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for mining meteorological association rules of lightning activity, characterized in that: include: Obtain meteorological factor data and lightning activity data in the target area; Taking the meteorological factor data as an independent variable and the lightning activity data as a dependent variable, the Bi-Eclat algorithm is used to mine the association rules of lightning activities to generate the first meteorological association rules of lightning activities; The target area is divided into several grids, and the grids are classified into two categories using the KNN model to determine the grids belonging to the minefield area and their K neighboring grids; Traversing the meteorological factor data of K neighboring grids corresponding to the grid belonging to the thunder-prone area, and generating a second meteorological association rule of lightning activity according to the meteorological factor data of the K neighboring grids; The intersection of the first meteorological association rule and the second meteorological association rule is obtained to obtain a third meteorological association rule, and the third meteorological association rule is the final meteorological association rule of lightning activity.
2. The method according to claim 1, characterized in that The use of the Bi-Eclat algorithm to mine the association rules of lightning activities and generate the first meteorological association rules between meteorological factors and lightning activities includes: Determine an input data set according to the meteorological factor data and the lightning activity data, wherein the input data set represents a mapping relationship between the meteorological factor data and the lightning activity data; Based on the input data set, frequent 1-item sets are identified and sorted in descending order of support; Let any two subsets of length k-1 belonging to the k-item set intersect to obtain the support of all k-item sets in each class; The k-item sets are traversed in ascending order of support and the items below the support threshold are deleted. Then, the frequent item sets are mined based on the Eclat algorithm to generate the first meteorological association rule of lightning activity.
3. The method according to claim 1, characterized in that The training process of the KNN model includes: Construct a KNN model, use different distance metrics and distance weight combinations to train the initial KNN model, take the highest accuracy and the lowest falsehood as the training goal, and obtain the distance metric and distance weight combination that makes the hyperparameters of the KNN model optimal, as well as the range of K values.
4. The method according to claim 3, characterized in that The trained KNN model uses Euclidean distance or block distance as the distance metric, inverse distance square as the distance weight, and the K value ranges from 8 to 18.
5. The method according to claim 3 or 4, characterized in that: The KNN model is used to classify the grids into two categories, and the grids belonging to the minefield and their corresponding K neighboring grids are determined to include: Classifying the grid into multiple minefields and other minefields according to the lightning activity data, and generating a minefield classification label for the grid; Generate minefield classification results for each grid using the trained KNN model; Determine the grid that is correctly classified as a multi-minefield according to the minefield classification label of the grid and the minefield classification result; The trained KNN model is used again to determine K neighboring grids of the grid correctly classified as a minefield, and the neighboring grids belonging to the minefield are determined according to the minefield classification labels of the K neighboring grids.
6. The method according to claim 5, characterized in that The classification of the grid into multiple minefields and other minefields according to the lightning activity data includes: Gridding the lightning activity data according to the grid division accuracy, and determining the lightning activity data corresponding to each grid, wherein the lightning activity data includes lightning-to-ground flash density; Compare the lightning ground-to-ground flash density and ground-to-ground flash density threshold corresponding to each grid, and classify the grids with lightning ground-to-ground flash density higher than the ground-to-ground flash density threshold as multiple minefields, otherwise they are classified as other minefields.
7. The method according to claim 1, characterized in that The step of traversing the meteorological factor data of K neighboring grids corresponding to the grid belonging to the thunder-prone area to generate the second meteorological association rule of the lightning activity includes: Traversing the meteorological factor data of the neighboring grids belonging to the thunder-prone area among the K neighboring grids, determining the minimum and maximum values of each meteorological factor according to the meteorological factor data of the traversed neighboring grids, and determining the value range of each meteorological factor based on the minimum and maximum values of each meteorological factor; The second meteorological association rule of lightning activity is generated according to the value range of each meteorological factor.
8. An association rule mining device, characterized in that: The device is used to mine meteorological association rules of lightning activities, including: A data acquisition module is used to acquire meteorological factor data and lightning activity data of the target area; The first association rule mining module is used to mine the association rules of lightning activities using the Bi-Eclat algorithm with the meteorological factor data as the independent variable and the lightning activity data as the dependent variable, so as to generate the first meteorological association rules of lightning activities; The minefield classification module is used to divide the target area into several grids, and use the KNN model to classify the grids into two categories to determine the grids belonging to the multi-minefield and their K neighboring grids; The second association rule mining module is used to traverse the meteorological factor data of K neighboring grids corresponding to the grid belonging to the multi-mine area to generate the second meteorological association rule of lightning activity; The rule merging module is used to obtain the intersection of the first meteorological association rule and the second meteorological association rule to obtain a third meteorological association rule, and the third meteorological association rule is the final meteorological association rule for lightning activity.
9. An electronic device, characterized in that: The device comprises a memory storing computer executable instructions and a processor. When the computer executable instructions are executed by the processor, the device executes the method for mining meteorological association rules of lightning activities as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that: A computer executable program is stored, and when the program is executed, the method for mining meteorological association rules of lightning activities as described in any one of claims 1 to 7 can be implemented.
Citation Information
Patent Citations
Method and device for realizing thunder and lightning early warning based on thunder and lightning data mining and storage medium
CN109738970A
Water traffic accident hotspot water area identification and accident analysis processing method and system
CN118429909A
Transfer Learning For Predictive Model Development
US20150235143A1
Cited By
KNN-based engine residual life prediction method, system and device and computer readable storage medium
CN119830751A
A method, system, device, and computer-readable storage medium for predicting engine remaining life based on KNN.
CN119830751B
