Power grid meteorological disaster damage grade prediction method and system based on LightGBM model

By adopting a two-level classification architecture based on the LightGBM model and key feature filtering, the problems of low recall and class imbalance in power grid disaster level prediction are solved, achieving high-precision disaster level prediction and supporting power grid emergency response and resource scheduling.

CN121502556APending Publication Date: 2026-02-10NANCHANG KECHEN ELECTRIC POWER TEST & RES CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511688690.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In the prediction of power grid disaster levels, existing technologies suffer from low recall rates and high false negative risks due to the scarcity of severe disaster samples. Directly using multi-classification models in this context also fails to effectively address class imbalance issues and results in poor model recognition of a few classes.

Method used

A two-level classification architecture based on the LightGBM model is adopted, including binary classification (severe vs. non-severe) and tri-class classification (moderate vs. mild vs. normal). Combining positive sample weights, early shutdown mechanism, regularization strategy and threshold optimization, key meteorological features are screened through Pearson correlation coefficient to construct grid-level disaster-bearing body comprehensive index, and refined processing is performed on power grid equipment data.

Benefits of technology

It significantly improves the ability to identify severe disaster events, reduces the risk of missed reports, improves the accuracy of power grid meteorological disaster early warning and emergency response efficiency, ensures that the forecast results are consistent with the actual operation and maintenance needs of the power grid, and supports the rapid output of disaster level to assist emergency decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502556A_ABST
    Figure CN121502556A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid meteorological disaster damage grade prediction method and system based on a LightGBM model, and belongs to the field of power system disaster early warning. The method comprises the following steps: preprocessing meteorological elements, power grid distribution transformer faults, equipment and regional data; calculating the exposure degree and the vulnerability to obtain a grid-level disaster-bearing body index, aggregating data, and screening key features through correlation analysis; defining disaster damage labels according to the number of power failure users, establishing a two-stage classification data set, configuring and training LightGBM two-stage and three-stage classification models, and optimizing a two-stage classification threshold value; and deploying the model, processing real-time meteorological data, and sequentially reasoning and outputting disaster damage levels. The method solves the problems of low recall, scene separation and poor precision of traditional prediction of serious disaster damage, improves the recognition and prediction precision, fits the operation and maintenance of the power grid, supports emergency decision, and improves the early warning and emergency efficiency of power grid disasters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system disaster early warning technology, specifically to a method and system for predicting the meteorological disaster level of power grids based on the LightGBM model. Background Technology

[0002] Currently, power grid disaster loss prediction typically relies on historical disaster loss data and meteorological data, employing a single machine learning model for multi-class classification prediction. The existing patent, "Distribution Network Disaster Loss Prediction under Extreme Weather Based on Adaptive Random Forest Algorithm," processes and filters data from three categories of disaster-causing variables: severe weather, distribution lines and equipment, and geographical environment. It also improves and optimizes the decision tree construction and voting mechanism of the random forest algorithm, proposing a dual-weighted improved adaptive random forest algorithm for distribution network disaster loss prediction under extreme weather conditions. However, a problem exists: in disaster loss level prediction, due to the scarcity of severe disaster loss samples, directly using a multi-class classification model leads to low recall of severe disaster events, a high risk of missed reports, and an inability to effectively handle class imbalance issues; the model also exhibits poor identification ability for a few classes. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides a method and system for predicting the meteorological disaster level of power grids based on the LightGBM model, aiming to solve the problems in the background technology.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for predicting the meteorological disaster level of power grids based on the LightGBM model, comprising the following steps: Step S1: Collect meteorological element text data, power grid transformer fault records, power grid equipment data, and regional data, and perform preprocessing. Step S2: Based on the preprocessed equipment data, calculate the exposure and vulnerability, and then multiply the exposure and vulnerability to obtain the grid-level disaster-bearing body comprehensive index; Step S3: Based on meteorological data and comprehensive indicators of disaster-bearing bodies, aggregate meteorological data and power outage data by region, and screen key features through correlation analysis; Step S4: Based on the aggregated data and key features selected in Step S3, define disaster damage labels according to the number of users experiencing power outages and construct a two-level classification dataset; Step S5: Use the LightGBM model as the classification model, and configure the parameters of the binary classification model and the tri-class classification model respectively for the two-level classification dataset; Step S6: Based on the two-level classification dataset and the configured model parameters, first train the binary classification model, then train the three-level classification model, and use an early stopping mechanism to prevent overfitting. Step S7: Calculate the weighted indexes of the binary classification model and the three-class classification model, adjust the binary classification threshold, and obtain the optimized binary classification model and the three-class classification model; Step S8: Deploy the optimized binary and tri-classification models, obtain real-time meteorological data, process it through steps S1-S3, and input it into the binary and tri-classification models for inference, outputting the power grid disaster level.

[0005] Furthermore, the specific process of step S1 is as follows: collect text data of various meteorological elements from the meteorological center, power grid transformer fault records, power grid equipment data, and regional data; based on the latitude and longitude coordinate information of the regional data, create grid vectorized data, convert the text data of various meteorological elements from the meteorological center into grid data files covering the entire region, and merge the meteorological elements and grid surface coordinates at a unified time point; perform coordinate verification on the power grid equipment data, and unify all data into a coordinate system.

[0006] Furthermore, in step S2: Calculate exposure: Divide the study area into grids and calculate the exposure for each grid cell. : ; In the formula, Indicates the first The length or number of grid-like equipment within the grid; Indicates the first Weights for different types of power grid equipment; Indicates the first Voltage level weighting; Indicates the grid area; Vulnerability calculation: First, calculate the vulnerability index for individual devices, then calculate the vulnerability index at the grid level. : ; ; In the formula, Indicates the weight of the years since commissioning; Indicates the first Vulnerability index of grid-like equipment; Calculating the comprehensive index of grid-level disaster-bearing bodies: Multiply the exposure level by the vulnerability level to obtain the grid-level disaster-bearing body index. .

[0007] Furthermore, the specific process of step S3 is as follows: Meteorological data aggregation: Read the gridded data file and vectorized data from step S1, determine the region to which each grid belongs through spatial connection, group and aggregate by region and date, and calculate the average and maximum values ​​of daily meteorological elements for each region; Power outage data aggregation: Aggregate the power grid distribution transformer fault records from step S1 by region and day, and count the total number of power outage users in each region per day; Feature selection: Calculate the Pearson correlation coefficient between aggregated meteorological features, disaster-bearing body indicators, and the total number of users experiencing power outages. ,reserve The features include maximum wind speed, maximum precipitation, average temperature, and average humidity, with redundant features removed.

[0008] Furthermore, the specific process of step S4 is as follows: Based on the feature data aggregated in step S3 and the total number of users experiencing power outages, a two-level classification dataset is constructed and divided: Define disaster loss level labels: set the number of power outage users in each area as "severe" disaster loss if it is greater than 20,000, "moderate" disaster loss if it is greater than 5,000 but less than 20,000, "mild" disaster loss if it is greater than 1,000 but less than 5,000, and "normal" disaster loss if it is less than 1,000. Divide the dataset into categories: Construct a first-level binary classification dataset with sample labels "severe" vs "non-severe" and a second-level tri-class classification dataset with sample labels "moderate" vs "mild" vs "normal". Data subset splitting: The two-level classification dataset is divided into training set, validation set and test set according to time order.

[0009] Furthermore, the specific process of step S5 is as follows: Using the LightGBM model as the classification model, the LightGBM model parameters are configured for the two-level classification dataset constructed in step S4: Level 1 binary classification model: Set the learning objective as "binary" and the evaluation metric as binary log loss; limit the maximum number of leaf nodes and learning rate of a single decision tree; introduce a regularization strategy; handle class imbalance by using positive sample weight coefficients; fix the random number generator seed and suppress unnecessary log output; The second-level three-class classification model is identical to the first-level two-class classification model except that the learning objective is set to "multi-class classification", the evaluation metric is set to multi-class log loss and the total number of classes is automatically identified.

[0010] Furthermore, the specific process of step S6 is as follows: Based on the dataset from step S4 and the model configuration from step S5, train the two-level LightGBM model in stages: Training the first-level binary classification model: Use the binary classification training set from step S4 to train the model, set the total number of iterations, and use an early stopping mechanism to monitor performance on the validation set to prevent overfitting. After training, save the model as bst1; input all input samples into bst1 and initially classify them into "severe" disaster damage samples and "non-severe" disaster damage samples. Training the second-level three-class classification model: Extract the samples that bst1 judged as "non-severe" in step S6, train the model using the three-class classification training set in step S4, and adopt the same total number of iterations and early stopping mechanism as the first-level two-class classification model. After training, save the model and denote it as bst2 to further subdivide the disaster damage levels from the "non-severe" samples into "moderate", "mild" and "normal".

[0011] A power grid meteorological disaster damage level prediction system based on the LightGBM model includes: The data acquisition module is used to collect meteorological element text data, power grid transformer fault records, power grid equipment data and regional data, and to perform preprocessing. The index calculation module is used to calculate exposure and vulnerability based on preprocessed equipment data, and then multiply the exposure and vulnerability to obtain the grid-level disaster-bearing body comprehensive index. The feature filtering module is used to aggregate meteorological data and power outage data by region based on meteorological data and comprehensive indicators of disaster-bearing bodies, and filter key features through correlation analysis. The dataset construction module is used to define disaster damage labels based on the number of power outage users and construct a two-level classification dataset based on the aggregated data and the key features selected; The model configuration module is used to configure the parameters of the binary classification model and the ternary classification model for a two-level classification dataset, using the LightGBM model as the classification model. The model training module is used to train a binary classification model first, and then a three-class classification model, based on a two-level classification dataset and configured model parameters, and adopts an early stopping mechanism to prevent overfitting. The model optimization module is used to calculate the weighted index of the binary classification model and the three-class classification model, adjust the binary classification threshold, and obtain the optimized binary classification model and the three-class classification model. The model deployment module is used to deploy the optimized binary and tri-classification models. After real-time meteorological data is acquired and processed by the data acquisition module, index calculation module, and feature screening module, it is sequentially input into the binary and tri-classification models for inference and outputs the power grid disaster level.

[0012] An electronic device includes a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program code, and the processor is used to call the program code stored in the memory to execute a power grid meteorological disaster damage level prediction method based on the LightGBM model.

[0013] A non-volatile computer storage medium storing computer-executable instructions that execute a power grid meteorological disaster level prediction method based on the LightGBM model.

[0014] Compared with existing technologies, the present invention has the following advantages: (1) This invention integrates innovations such as refined data processing, screening of key meteorological features, two-level LightGBM classification, positive sample weighting / early shutdown / regularization / threshold optimization, and model deployment to solve the problems of low recall, detachment from the scenario, and poor accuracy in traditional prediction of severe disaster damage. It not only improves the accuracy of severe disaster damage identification and prediction, but also fits the power grid operation and maintenance, and can quickly output the disaster damage level to support emergency decision-making, thus comprehensively improving the efficiency of power grid meteorological disaster early warning and emergency response.

[0015] (2) In view of the shortcomings of existing technologies, such as low recall rate and high risk of missed reporting of severe disaster events due to the scarcity of severe disaster samples, the present invention adopts a two-level classification architecture of "binary classification (severe vs. non-severe) + three-level classification (moderate vs. mild vs. normal)", with positive sample weight coefficient to deal with the class imbalance problem, and optimizes the balance between false alarm and missed reporting risk through binary classification threshold. This can significantly improve the identification ability of severe disaster events, reduce the hidden danger of missed judgment of high-risk accidents in the power grid, and make up for the technical shortcomings of traditional models in identifying a few severe disaster categories.

[0016] (3) This invention uses Pearson correlation coefficient to screen key meteorological features (maximum wind speed, maximum precipitation, average temperature, and average humidity) and eliminates redundant information to reduce noise interference to the model. At the same time, an early stopping mechanism is introduced during the model training stage to prevent overfitting. A regularization strategy is configured (randomly select feature subsets and randomly sample training samples), and the training set, validation set, and test set are divided according to time order to effectively ensure the model's generalization ability and improve the accuracy of power grid meteorological disaster level prediction, thus providing reliable technical support for power grid disaster assessment.

[0017] (4) Based on power grid equipment data (equipment type, voltage level, and years of operation) and regional latitude and longitude information, this invention produces grid vectorized data and unifies it to the WGS84 coordinate system. It calculates grid-level exposure and vulnerability in detail, and then obtains the comprehensive index of disaster-bearing body by multiplying the two. It fully integrates the real disaster resistance capability of power grid equipment with regional geographical features, so that the prediction process closely follows the actual operation and maintenance needs of the power grid, avoids the problem of abstraction that traditional prediction methods are divorced from the actual scenario, and improves the practical value of the technical solution.

[0018] (5) The optimized two-level LightGBM model of this invention can be deployed to the production environment. Based on real-time or forecast meteorological data, after preprocessing, calculation of disaster-bearing body indicators, and feature screening, it uses a binary classification model and a tri-class classification model to infer sequentially and quickly output the regional power grid disaster level (severe / moderate / mild / normal), realizing the forward-looking prediction of disaster damage. The prediction results can directly provide a clear basis for the allocation of power grid maintenance resources and the formulation of emergency response plans, which helps to reduce power outage losses caused by disasters and improve the efficiency of power grid emergency response and resource utilization. Attached Figure Description

[0019] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0020] like Figure 1 As shown, the present invention provides a technical solution: a method for predicting the meteorological disaster level of power grids based on the LightGBM model, comprising the following steps:

[0021] Step S1: Collect meteorological element text data, power grid transformer fault records, power grid equipment data and regional data, and perform preprocessing.

[0022] Step S2: Based on the preprocessed equipment data, calculate the exposure and vulnerability, and then multiply the exposure and vulnerability to obtain the grid-level disaster-bearing body comprehensive index.

[0023] Step S3: Based on meteorological data and comprehensive indicators of disaster-bearing bodies, aggregate meteorological data and power outage data by region, and screen key features through correlation analysis.

[0024] Step S4: Based on the aggregated data and key features selected in Step S3, define disaster damage labels according to the number of users experiencing power outages, and construct a two-level classification dataset.

[0025] Step S5: Use the LightGBM model as the classification model, and configure the parameters of the binary classification model and the tri-class classification model respectively for the two-level classification dataset.

[0026] Step S6: Based on the two-level classification dataset and the configured model parameters, first train the binary classification model, then train the three-level classification model, and use an early stopping mechanism to prevent overfitting.

[0027] Step S7: Calculate the weighted indexes of the binary and ternary classification models, adjust the binary classification threshold, and obtain the optimized binary and ternary classification models.

[0028] Step S8: Deploy the optimized binary and tri-classification models, obtain real-time meteorological data and process it through steps S1-S3, then input it into the binary and tri-classification models for inference, and output the power grid disaster level.

[0029] The specific process of step S1 is as follows: collect text data of various meteorological elements from the meteorological center, power grid transformer fault records, power grid equipment data, and regional data; based on the latitude and longitude coordinate information of the regional data, create grid vectorized data with 0.05 degrees × 0.05 degrees as a grid point; convert the text data of various meteorological elements from the meteorological center into GeoJSON format grid data files covering the entire region, and merge meteorological elements such as wind speed, temperature, humidity, and precipitation with grid surface coordinates at a unified time point; perform coordinate verification on the power grid equipment data, unify all data to the WGS84 coordinate system, ensure data integrity and consistency, and provide a standardized data foundation for the subsequent construction of the power grid disaster-bearing body.

[0030] In step S2: Exposure calculation: The study area was divided into 5km×5km grids, and the exposure of each grid was calculated according to formula (1). ; (1); In the formula, Indicates the first The length or number of grid-like equipment within the grid; Indicates the first Weights for different types of power grid equipment (underground cable section weight 2, above-ground tower weight 10, above-ground span weight 6); Indicates the first Voltage level weights (AC 10kV 0.5, 35kV 1, 110kV 2, 220kV 5, 500kV 7, 750kV 10, 1000kV 20, DC 800kV 7); This represents the area of ​​the grid.

[0031] Vulnerability calculation: First, calculate the vulnerability index of a single device according to formula (2), and then calculate the vulnerability index at the grid level according to formula (3). .

[0032] (2); (3); In the formula, The weighting is based on the number of years the equipment has been in operation (1 for less than 5 years, 1.2 for 6-10 years, 1.5 for 11-20 years, and 2.0 for more than 20 years). Indicates the first Vulnerability index of grid-like equipment.

[0033] Calculate the comprehensive index of grid-level disaster-bearing bodies: Multiply the exposure and vulnerability according to formula (4) to obtain the index of grid-level disaster-bearing bodies. .

[0034] (4).

[0035] The specific process of step S3 is as follows: Meteorological data aggregation: Read the GeoJSON format grid data file and vectorized data from step S1, determine the region to which each grid belongs through spatial connection, group and aggregate by region and date, and calculate the average and maximum values ​​of daily meteorological elements for each region.

[0036] Power outage data aggregation: Aggregate the power grid transformer fault records from step S1 by region and day, and count the total number of power outage users in each region per day.

[0037] Feature selection: Calculate the Pearson correlation coefficient between aggregated meteorological features, disaster-bearing body indicators, and the total number of users experiencing power outages. ,reserve The features (including maximum wind speed, maximum precipitation, average temperature, and average humidity) are used to remove redundant features, providing an optimized input feature set for the subsequent construction of hierarchical classification datasets.

[0038] The specific process of step S4 is as follows: Based on the feature data aggregated in step S3 and the total number of users experiencing power outages, a two-level classification dataset is constructed and divided: Define disaster loss level labels: set the number of power outage users in each area as "severe" disaster loss if it is greater than 20,000, "moderate" disaster loss if it is greater than 5,000 but less than 20,000, "mild" disaster loss if it is greater than 1,000 but less than 5,000, and "normal" disaster loss if it is less than 1,000.

[0039] Divide the dataset into categories: construct a first-level binary classification dataset (sample labels are "severe" vs "non-severe") and a second-level ternary classification dataset (sample labels are "moderate" vs "mild" vs "normal").

[0040] Data subset splitting: The two-level classification datasets are divided into training set, validation set and test set in chronological order, with a ratio of 6:2:2, to provide data support for subsequent LightGBM model training and evaluation.

[0041] The specific process of step S5 is as follows: The LightGBM model is used as the classification model. For the two-level classification dataset constructed in step S4, the LightGBM (Gradient Boosting Decision Tree, GBDT) model parameters are configured as follows: The first-level binary classification model sets the learning objective to "binary" and the evaluation metric to binary log loss. It limits the maximum number of leaf nodes (num_leaves) in a single decision tree to 31 and the learning rate (learning_rate) to 0.05. A regularization strategy is introduced: a feature subset is randomly selected at a ratio of 0.9 (feature_fraction=0.9), and training samples are randomly sampled at a ratio of 0.8 (bagging_fraction=0.8), executed once every 5 iterations (bagging_freq=5). The class imbalance problem is addressed using a positive sample weight coefficient (scale_pos_weight). The random number generator seed is fixed (random_state=42), and unnecessary log output is suppressed (verbose=-1).

[0042] The second-level three-class classification model: except that the learning objective is set to "multiclass classification", the evaluation metric is set to multi-class log loss, and the total number of classes is automatically identified (num_class), the other parameters (num_leaves, learning_rate, regularization strategy, etc.) are the same as the first-level two-class classification model, providing parameter configuration for the training of subsequent hierarchical classification models.

[0043] The specific process of step S6 is as follows: Based on the dataset from step S4 and the model configuration from step S5, train the two-level LightGBM model in stages: Training the first-level binary classification model: Use the binary classification training set from step S4 to train the model, set the total number of iterations (num_boost_round=100), and use an early stopping mechanism (early_stopping_rounds=10) to monitor performance on the validation set to prevent overfitting. After training, save the model (denoted as bst1); input all input samples into bst1 and initially classify them into "severe" disaster damage samples and "non-severe" disaster damage samples.

[0044] Training the second-level three-class classification model: Extract the samples that bst1 judged as "non-severe" in step S6, train the model using the three-class classification training set in step S4, and adopt the same total number of iterations and early stopping mechanism as the first-level two-class classification model. After training, save the model (denoted as bst2) to further subdivide the "non-severe" samples into "moderate", "mild" and "normal" disaster damage levels.

[0045] The specific process of step S7 is as follows: Based on the test set from step S4 and the trained model from step S6, evaluate the performance and optimize the threshold. Calculate the evaluation metrics: Based on the confusion matrix (the matrix generated by the hierarchical classification model (including the binary classification model bst1 and the tri-class classification model bst2) trained in step S6 and the prediction results on the test set in step S4, the true positives (TP), false positives (FP), and false negatives (FN) are calculated. Recall is calculated according to formula (5), precision is calculated according to formula (6), and F1-score is calculated according to formula (7). Each category is assigned a weight according to its business importance ("severe" 0.4, "moderate" 0.25, "mild" 0.2, "normal" 0.15) to achieve the weighted metric calculation: (5); (6); (7).

[0046] Optimize binary classification thresholds: Test five probability thresholds: 0.3, 0.4, 0.5, 0.6, and 0.7. Convert the predicted probabilities output by bst1 into binary labels (probabilities ≥ the threshold are judged as "severe", otherwise as "non-severe"). Calculate the weighted recall, precision, and F1-score for each threshold. Select the optimal threshold that balances false positives and false negatives for "severe" disaster damage to improve the model's ability to identify high-risk events.

[0047] The specific process of step S8 is as follows: deploy bst1 and bst2, which have been trained in step S6 and optimized in step S7, to the production environment; input the meteorological forecast data for the next day, and obtain standardized input features through preprocessing in step S1, disaster-bearing body calculation in step S2, aggregation and feature filtering in step S3; input the input features into bst1 and bst2 in sequence for inference: if bst1 determines it to be "severe", directly output the "severe" disaster damage level; if bst1 determines it to be "non-severe", then bst2 further outputs the "moderate", "mild" or "normal" disaster damage level, realizing the forward-looking prediction of the meteorological disaster damage level of the regional power grid, and providing support for power grid emergency decision-making and resource scheduling.

[0048] A power grid meteorological disaster damage level prediction system based on the LightGBM model includes: The data acquisition module is used to collect meteorological element text data, power grid transformer fault records, power grid equipment data and regional data, and to perform preprocessing. The index calculation module is used to calculate exposure and vulnerability based on preprocessed equipment data, and then multiply the exposure and vulnerability to obtain the grid-level disaster-bearing body comprehensive index. The feature filtering module is used to aggregate meteorological data and power outage data by region based on meteorological data and comprehensive indicators of disaster-bearing bodies, and filter key features through correlation analysis. The dataset construction module is used to define disaster damage labels based on the number of power outage users and construct a two-level classification dataset based on the aggregated data and the key features selected; The model configuration module is used to configure the parameters of the binary classification model and the ternary classification model for a two-level classification dataset, using the LightGBM model as the classification model. The model training module is used to train a binary classification model first, and then a three-class classification model, based on a two-level classification dataset and configured model parameters, and adopts an early stopping mechanism to prevent overfitting. The model optimization module is used to calculate the weighted index of the binary classification model and the three-class classification model, adjust the binary classification threshold, and obtain the optimized binary classification model and the three-class classification model. The model deployment module is used to deploy the optimized binary and tri-classification models. After real-time meteorological data is acquired and processed by the data acquisition module, index calculation module, and feature screening module, it is sequentially input into the binary and tri-classification models for inference and outputs the power grid disaster level.

[0049] An electronic device includes a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program code, and the processor is used to call the program code stored in the memory to execute a power grid meteorological disaster damage level prediction method based on the LightGBM model.

[0050] A non-volatile computer storage medium storing computer-executable instructions that execute a power grid meteorological disaster level prediction method based on the LightGBM model.

[0051] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for predicting the meteorological disaster level of power grids based on the LightGBM model, characterized in that, Includes the following steps: Step S1: Collect meteorological element text data, power grid transformer fault records, power grid equipment data, and regional data, and perform preprocessing. Step S2: Based on the preprocessed equipment data, calculate the exposure and vulnerability, and then multiply the exposure and vulnerability to obtain the grid-level disaster-bearing body comprehensive index; Step S3: Based on meteorological data and comprehensive indicators of disaster-bearing bodies, aggregate meteorological data and power outage data by region, and screen key features through correlation analysis; Step S4: Based on the aggregated data and key features selected in Step S3, define disaster damage labels according to the number of users experiencing power outages and construct a two-level classification dataset; Step S5: Use the LightGBM model as the classification model, and configure the parameters of the binary classification model and the tri-class classification model respectively for the two-level classification dataset; Step S6: Based on the two-level classification dataset and the configured model parameters, first train the binary classification model, then train the three-level classification model, and use an early stopping mechanism to prevent overfitting. Step S7: Calculate the weighted indexes of the binary classification model and the three-class classification model, adjust the binary classification threshold, and obtain the optimized binary classification model and the three-class classification model; Step S8: Deploy the optimized binary and tri-classification models, obtain real-time meteorological data and process it through steps S1-S3, then input it into the binary and tri-classification models for inference, and output the power grid disaster level.

2. The method for predicting the meteorological disaster level of power grids based on the LightGBM model according to claim 1, characterized in that: The specific process of step S1 is as follows: collect text data of various meteorological elements from the meteorological center, power grid transformer fault records, power grid equipment data and regional data; based on the latitude and longitude coordinate information of the regional data, create grid vectorized data, convert the text data of various meteorological elements from the meteorological center into grid data files covering the entire region, and merge the meteorological elements and grid surface coordinates according to a unified time point; perform coordinate verification on the power grid equipment data, and unify all data into a coordinate system.

3. The method for predicting the meteorological disaster level of power grids based on the LightGBM model according to claim 2, characterized in that: In step S2: Calculate exposure: Divide the study area into grids and calculate the exposure for each grid cell. : ; In the formula, Indicates the first The length or number of grid-like equipment within the grid; Indicates the first Weights for different types of power grid equipment; Indicates the first Voltage level weighting; Indicates the grid area; Vulnerability calculation: First, calculate the vulnerability index for individual devices, then calculate the vulnerability index at the grid level. : ; ; In the formula, Indicates the weight of the years since commissioning; Indicates the first Vulnerability index of grid-like equipment; Calculating the comprehensive index of grid-level disaster-bearing bodies: Multiply the exposure level by the vulnerability level to obtain the grid-level disaster-bearing body index. .

4. The method for predicting the meteorological disaster level of power grids based on the LightGBM model according to claim 3, characterized in that: The specific process of step S3 is as follows: Meteorological data aggregation: Read the gridded data file and vectorized data from step S1, determine the region to which each grid belongs through spatial connection, group and aggregate by region and date, and calculate the average and maximum values ​​of daily meteorological elements for each region; Power outage data aggregation: Aggregate the power grid distribution transformer fault records from step S1 by region and day, and count the total number of power outage users in each region per day; Feature selection: Calculate the Pearson correlation coefficient between aggregated meteorological features, disaster-bearing body indicators, and the total number of users experiencing power outages. ,reserve The features include maximum wind speed, maximum precipitation, average temperature, and average humidity, with redundant features removed.

5. The method for predicting the meteorological disaster level of power grids based on the LightGBM model according to claim 4, characterized in that: The specific process of step S4 is as follows: Based on the feature data aggregated in step S3 and the total number of users experiencing power outages, a two-level classification dataset is constructed and divided: Define disaster loss level labels: set the number of power outage users in each area as "severe" disaster loss if it is greater than 20,000, "moderate" disaster loss if it is greater than 5,000 but less than 20,000, "mild" disaster loss if it is greater than 1,000 but less than 5,000, and "normal" disaster loss if it is less than 1,000. Divide the dataset into categories: Construct a first-level binary classification dataset with sample labels "severe" vs "non-severe" and a second-level tri-class classification dataset with sample labels "moderate" vs "mild" vs "normal". Data subset splitting: The two-level classification dataset is divided into training set, validation set and test set according to time order.

6. The method for predicting the meteorological disaster level of power grids based on the LightGBM model according to claim 5, characterized in that: The specific process of step S5 is as follows: Using the LightGBM model as the classification model, the LightGBM model parameters are configured for the two-level classification dataset constructed in step S4: Level 1 binary classification model: Set the learning objective as "binary" and the evaluation metric as binary log loss; limit the maximum number of leaf nodes and learning rate of a single decision tree; introduce a regularization strategy; handle class imbalance by using positive sample weight coefficients; fix the random number generator seed and suppress unnecessary log output; The second-level three-class classification model is identical to the first-level two-class classification model except that the learning objective is set to "multi-class classification", the evaluation metric is set to multi-class log loss and the total number of classes is automatically identified.

7. The method for predicting the meteorological disaster level of power grids based on the LightGBM model according to claim 6, characterized in that: The specific process of step S6 is as follows: Based on the dataset from step S4 and the model configuration from step S5, train the two-level LightGBM model in stages: Training the first-level binary classification model: Use the binary classification training set from step S4 to train the model, set the total number of iterations, and use an early stopping mechanism to monitor performance on the validation set to prevent overfitting. After training, save the model as bst1; input all input samples into bst1 and initially classify them into "severe" disaster damage samples and "non-severe" disaster damage samples. Training the second-level three-class classification model: Extract the samples that bst1 judged as "non-severe" in step S6, train the model using the three-class classification training set in step S4, and adopt the same total number of iterations and early stopping mechanism as the first-level two-class classification model. After training, save the model and denote it as bst2 to further subdivide the "non-severe" samples into "moderate", "mild" and "normal" disaster damage levels.

8. A power grid meteorological disaster damage level prediction system based on the LightGBM model, characterized in that, include: The data acquisition module is used to collect meteorological element text data, power grid transformer fault records, power grid equipment data and regional data, and to perform preprocessing. The index calculation module is used to calculate exposure and vulnerability based on preprocessed equipment data, and then multiply the exposure and vulnerability to obtain the grid-level disaster-bearing body comprehensive index. The feature filtering module is used to aggregate meteorological data and power outage data by region based on meteorological data and comprehensive indicators of disaster-bearing bodies, and filter key features through correlation analysis. The dataset construction module is used to define disaster damage labels based on the number of power outage users and construct a two-level classification dataset based on the aggregated data and the key features selected; The model configuration module is used to configure the parameters of the binary classification model and the ternary classification model for a two-level classification dataset, using the LightGBM model as the classification model. The model training module is used to train a binary classification model first, and then a three-class classification model, based on a two-level classification dataset and configured model parameters, and adopts an early stopping mechanism to prevent overfitting. The model optimization module is used to calculate the weighted index of the binary classification model and the three-class classification model, adjust the binary classification threshold, and obtain the optimized binary classification model and the three-class classification model. The model deployment module is used to deploy the optimized binary and tri-classification models. After real-time meteorological data is acquired and processed by the data acquisition module, index calculation module, and feature screening module, it is sequentially input into the binary and tri-classification models for inference and outputs the power grid disaster level.

9. An electronic device, characterized in that, The system includes a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, the memory is used to store a set of program code, and the processor is used to call the program code stored in the memory to execute a power grid meteorological disaster damage level prediction method based on the LightGBM model as described in any one of claims 1-7.

10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer can execute instructions to perform a power grid meteorological disaster damage level prediction method based on the LightGBM model as described in any one of claims 1-7.

Citation Information

Cited By

  • Forest fire grading prediction method based on cascade machine learning

    CN122050045A