Power distribution network line loss risk prediction method and system based on multi-model fusion
By employing a multi-model fusion method for predicting line loss risks, and using LightGBM and CatBoost algorithms to train machine learning models, combined with grid search to optimize parameters, the method addresses the issues of lag and accuracy in traditional line loss management. This enables early warning and accurate assessment of line loss risks in distribution networks, thereby optimizing power grid operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional line loss management methods are lagging and cannot achieve early warning and refined management of line loss risks. The accuracy of existing forecasting methods is limited by data integrity issues.
A multi-model fusion approach is adopted. By acquiring line-related data, multiple machine learning models are trained using LightGBM and CatBoost algorithms, and the parameters are optimized using a grid search algorithm to construct a line loss risk prediction model. The multiple models are then combined in a weighted manner to improve prediction accuracy.
It enables early warning and accurate assessment of distribution network line loss risks, improves the accuracy and reliability of forecasts, helps power companies optimize operating strategies, reduce line losses, and promotes the development of the power grid towards intelligence and greenness.
Smart Images

Figure CN121660434A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution network technology, and in particular to a method and system for predicting line loss risk in power distribution networks based on multi-model fusion. Background Technology
[0002] In pursuit of improved energy efficiency, the power industry needs to reform its existing management models. To meet the demands of energy conservation and emission reduction, an action plan has been proposed to reduce distribution network line loss rates to below a specific percentage by a certain point in time. Research shows that even a small reduction in line loss rates can significantly reduce electricity loss, equivalent to saving a substantial amount of standard coal resources. This is of great significance for reducing costs, improving economic efficiency, and reducing carbon emissions.
[0003] However, traditional line loss management methods primarily rely on data analysis of power supply and sales volume in distribution network lines. Line loss rates are calculated using specific formulas, and lines are categorized into high-loss, low-loss, and normal states based on set line loss rate thresholds. This post-hoc data analysis method suffers from significant lag and cannot achieve early warning and refined management of line loss risks. Furthermore, although patent CN119884588A proposes a transmission line loss rate prediction method based on power consumption and ledger information, which can predict daily line loss rates to some extent, its accuracy is limited because it still requires determining risky lines based on line loss rate thresholds and faces data integrity issues.
[0004] Therefore, it is necessary to design a new method to achieve more intelligent and efficient line loss risk prediction and promote the development of the power grid towards intelligence and greenness. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for predicting line loss risk in distribution networks based on multi-model fusion.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for predicting line loss risk in distribution networks based on multi-model fusion, comprising: Obtain relevant data for the circuit to be diagnosed; Based on the relevant data, basic information features of the route, features of the previous day's data, and features of the same period last year's data are extracted to obtain multi-dimensional features; The multi-dimensional features are input into the line loss risk prediction model to predict line loss risk and obtain the prediction results. The training process of the line loss risk prediction model includes: Based on historical data, multi-dimensional features are selected, and multiple machine learning models are trained using LightGBM and CatBoost algorithms based on these features. A grid search algorithm is then used to fine-tune the parameters of the machine learning models to obtain their optimal parameters. Finally, the line loss risk prediction model is determined by weighting the machine learning models.
[0007] The further technical solution is as follows: the relevant data includes at least one of the following: line ledger, distribution transformer ledger, historical line loss data, power data, meteorological data, seasonal data, and switch position data.
[0008] The further technical solution is as follows: the basic information feature indicators include at least one of the following: total line length, average line length, line power supply radius, number of distribution transformers, and average capacity of distribution transformers; The data characteristic indicators of the previous day include at least one of the following: the daily line loss rate of the previous day, the average line loss rate of the previous 7 days, the standard deviation of the line loss rate of the previous 7 days, the integrated power of the line on the previous day, the power fluctuation rate of the line on the previous day, the peak-valley ratio of the line power on the previous day, the total integrated power of the distribution transformer on the previous day, the maximum load rate of the distribution transformer on the previous day, the average load rate of the distribution transformer on the previous day, the average temperature of the previous day, the rainfall of the previous day, the season of the previous day, and whether there was a switch change on the previous day. The data characteristic indicators for the same period last year include at least one of the following: daily line loss rate for the same period last year, average line loss rate for the first 7 days of the same period last year, standard deviation of line loss rate for the first 7 days of the same period last year, line integrated power consumption for the same period last year, line power fluctuation rate for the same period last year, line power peak-valley ratio for the same period last year, total integrated power consumption of distribution transformers for the same period last year, maximum load rate of distribution transformers for the same period last year, average load rate of distribution transformers for the same period last year, average temperature for the same period last year, rainfall for the same period last year, season for the same period last year, and whether there was a switch change in the same period last year.
[0009] The further technical solution is as follows: Based on historical data, multi-dimensional features are selected; multiple machine learning models are trained using LightGBM and CatBoost algorithms based on these multi-dimensional features; a grid search algorithm is used for parameter tuning to obtain the optimal parameters of the machine learning models; and the line loss risk prediction model is determined based on the weighted average of the machine learning models, including: Obtain historical sample data labeled with high loss, negative loss, and normal line loss risk tags; Based on the historical sample data, extract the corresponding multi-dimensional features, use the multi-dimensional features as the model input, use the labels of high loss, negative loss and normal line loss risk as the model output, and use random forest to train the model to obtain a trained random forest model. The feature indicators corresponding to the trained random forest model are sorted according to feature importance, and the feature indicators with ranking load requirements are selected as key feature indicators. Using LightGBM and CatBoost classification algorithms, the key feature indicators are used as model inputs, and the labels of high loss, negative loss, and normal line loss risk are used as model outputs. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are tuned using a grid search algorithm to determine multiple tuned machine learning models. The multiple optimized machine learning models are combined according to their corresponding weights to obtain the line loss risk prediction model.
[0010] The further technical solution is as follows: The LightGBM and CatBoost classification algorithms are used, with the key feature indicators as model input and the labels indicating high loss, negative loss, and normal line loss risk as model output. A machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to determine multiple fine-tuned machine learning models, including: Using the LightGBM classification algorithm, the key feature indicators are used as model input, and the labels of high loss, negative loss, and normal line loss risk are used as model output. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to obtain the LightGBM distribution network line loss risk prediction model. Using the CatBoost classification algorithm, the key feature indicators are used as model input, and the labels indicating high loss, negative loss, and normal line loss risk are used as model output. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to obtain the CatBoost distribution network line loss risk prediction model.
[0011] The further technical solution is as follows: After using the LightGBM classification algorithm, taking the key feature indicators as model input, and labeling the line loss risk as high loss, negative loss, and normal as model output, training the machine learning model based on the historical samples, and optimizing the machine learning model parameters using a grid search algorithm to obtain the LightGBM distribution network line loss risk prediction model, the solution further includes: The LightGBM distribution network line loss risk prediction model was applied to the test set, and a weighted average was calculated. The score is used to obtain the first score; The process of using the CatBoost classification algorithm, taking the key feature indicators as model input, and labeling line loss risks (high loss, negative loss, and normal) as model output, training a machine learning model based on historical samples, and then fine-tuning the machine learning model parameters using a grid search algorithm to obtain the CatBoost distribution network line loss risk prediction model, further includes: The CatBoost distribution network line loss risk prediction model was applied to the test set, and a weighted average was calculated. The score is used to obtain the second score.
[0012] The further technical solution is as follows: combining the multiple optimized machine learning models according to their corresponding weights to obtain the line loss risk prediction model includes: The corresponding weights are determined based on the proportions of the first score and the second score in the sum of the two. The multiple optimized machine learning models are combined by combining the weights to obtain the line loss risk prediction model.
[0013] The further technical solution is as follows: the prediction result is obtained by weighted summation of multiple optimized machine learning models using the weights.
[0014] This invention also provides a distribution network line loss risk prediction system based on multi-model fusion, including: The acquisition unit is used to acquire relevant data of the circuit to be diagnosed. The feature extraction unit is used to extract basic information features of the route, data features of the previous day, and data features of the same period last year based on the relevant data, so as to obtain multi-dimensional features; The prediction unit is used to input the multi-dimensional features into the line loss risk prediction model to predict the line loss risk and obtain the prediction result. Also includes: The model training unit is used to select multi-dimensional features based on historical data, train multiple machine learning models based on the multi-dimensional features using LightGBM and CatBoost algorithms, and use a grid search algorithm to fine-tune the parameters to obtain the optimal parameters of the machine learning models. The line loss risk prediction model is determined based on the weighted average of the machine learning models.
[0015] Its further technical solution is: the model training unit is used for: Obtain historical sample data labeled with high loss, negative loss, and normal line loss risk tags; Based on the historical sample data, extract the corresponding multi-dimensional features, use the multi-dimensional features as the model input, use the labels of high loss, negative loss and normal line loss risk as the model output, and use random forest to train the model to obtain a trained random forest model. The feature indicators corresponding to the trained random forest model are sorted according to feature importance, and the feature indicators with ranking load requirements are selected as key feature indicators. Using LightGBM and CatBoost classification algorithms, the key feature indicators are used as model inputs, and the labels of high loss, negative loss, and normal line loss risk are used as model outputs. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are tuned using a grid search algorithm to determine multiple tuned machine learning models. The multiple optimized machine learning models are combined according to their corresponding weights to obtain the line loss risk prediction model.
[0016] The beneficial effects of this invention compared to existing technologies are as follows: This invention acquires and analyzes relevant data of the line to be diagnosed, extracting multi-dimensional features including basic line information, data from the previous day and the same period last year. These features are then used to train multiple machine learning models based on LightGBM and CatBoost algorithms. Parameters are optimized using a grid search algorithm to ensure model accuracy. Finally, a weighted combination of the performance of each model is used to form a comprehensive prediction model for predicting line loss risk. This method not only achieves early warning and accurate assessment of distribution network line loss risk, improving the accuracy and reliability of predictions, but also enables power companies to take timely measures to adjust operating strategies and optimize grid operating efficiency, thereby effectively reducing line losses, promoting the development of the power grid towards intelligence and greenness, and improving the economic efficiency and environmental friendliness of the power grid system.
[0017] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating the method for predicting line loss risk in distribution networks based on multi-model fusion, as provided in an embodiment of the present invention. Figure 2 A schematic block diagram of a distribution network line loss risk prediction system based on multi-model fusion provided in an embodiment of the present invention; Figure 3 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0022] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0024] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a multi-model fusion-based distribution network line loss risk prediction method provided in this embodiment of the invention. This method is applied in a server. The server interacts with the terminal, collecting and analyzing multi-dimensional feature information including historical line loss data, power data, and meteorological data. Multiple machine learning models are trained using LightGBM and CatBoost algorithms, and parameters are optimized using a grid search algorithm. Finally, a weighted average method is combined to form a comprehensive line loss risk prediction model. This method not only improves the accuracy of line loss risk prediction but also effectively identifies high-loss, negative-loss, and normal line loss states, providing intelligent decision support for the power system. This helps achieve efficient operation and management of the power grid and promotes its development towards intelligence and greenness. More accurate risk prediction can optimize power resource allocation, reduce energy losses, and thus promote the achievement of sustainable development goals.
[0025] Figure 1 This is a flowchart illustrating the method for predicting line loss risk in distribution networks based on multi-model fusion, provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S130.
[0026] S110. Obtain relevant data for the circuit to be diagnosed.
[0027] In this embodiment, the relevant data includes at least one of the following: line ledger, distribution transformer ledger, historical line loss data, power data, meteorological data, seasonal data, and switch position change data.
[0028] Specifically, the power line register is a record of basic information about power lines, including but not limited to the total length of the line, the average length of the line, and the power supply radius of the line. This information is crucial for understanding the basic structure and layout of the power lines.
[0029] Distribution transformer ledger: This refers to relevant information about distribution transformers, such as the number of transformers and their average capacity. The data in the distribution transformer ledger helps us understand the specific parameters and operating status of each transformer, which is crucial for accurately calculating line loss risk.
[0030] Historical line loss data: This includes past line loss data, such as the previous day's daily line loss rate and the average line loss rate over the previous 7 days. This historical data provides the basis for time-series analysis of line loss patterns and helps identify potential risk trends.
[0031] Power data: This includes 96 power data points (sampled every 15 minutes), which reflects the real-time load and fluctuation characteristics of the line. Power data is crucial for assessing the current operating status of the line and potential future changes in line losses.
[0032] Meteorological data, such as the previous day's average temperature and rainfall, are crucial factors in predicting line loss risk. Weather conditions directly impact electricity demand and transmission efficiency.
[0033] Seasonal data: Considering the impact of different seasons on electricity consumption patterns, seasonal variations are also a factor that cannot be ignored. By converting dates to corresponding seasonal information, the impact of seasonal changes can be better captured.
[0034] Switch position change data: This records the switching operations in the power system, such as whether a switch position change occurred. This information is particularly useful for analyzing changes in power flow over a specific time period.
[0035] By comprehensively collecting the aforementioned data, S110 not only provides the necessary input for subsequent steps but also lays a solid foundation for improving the accuracy of line loss risk prediction. Furthermore, this method ensures that the constructed model more closely reflects reality, thereby achieving the goals of early warning and optimized management. In short, as the first step in the entire process, the importance of S110 is self-evident.
[0036] S120. Based on the relevant data, extract the basic information features of the route, the data features of the previous day, and the data features of the same period last year to obtain multi-dimensional features.
[0037] In this embodiment, multi-dimensional features refer to a variety of feature indicators extracted from three dimensions: basic line information, previous day's operating data, and data from the same period last year, in order to comprehensively assess and predict the line loss risk of the distribution network.
[0038] Specifically, the basic information characteristic indicators include at least one of the following: total line length, average line length, line power supply radius, number of distribution transformers, and average capacity of distribution transformers. The data characteristic indicators of the previous day include at least one of the following: the daily line loss rate of the previous day, the average line loss rate of the previous 7 days, the standard deviation of the line loss rate of the previous 7 days, the integrated power of the line on the previous day, the power fluctuation rate of the line on the previous day, the peak-valley ratio of the line power on the previous day, the total integrated power of the distribution transformer on the previous day, the maximum load rate of the distribution transformer on the previous day, the average load rate of the distribution transformer on the previous day, the average temperature of the previous day, the rainfall of the previous day, the season of the previous day, and whether there was a switch change on the previous day. The data characteristic indicators for the same period last year include at least one of the following: daily line loss rate for the same period last year, average line loss rate for the first 7 days of the same period last year, standard deviation of line loss rate for the first 7 days of the same period last year, line integrated power consumption for the same period last year, line power fluctuation rate for the same period last year, line power peak-valley ratio for the same period last year, total integrated power consumption of distribution transformers for the same period last year, maximum load rate of distribution transformers for the same period last year, average load rate of distribution transformers for the same period last year, average temperature for the same period last year, rainfall for the same period last year, season for the same period last year, and whether there was a switch change in the same period last year.
[0039] In this embodiment, step S120 (or S2) is a crucial step following data collection in step S110. The goal of this step is to extract multi-dimensional feature indicators from the acquired relevant data that are helpful for predicting line loss risk. These feature indicators are divided into three main categories: basic information features, previous day's data features, and data features from the same period last year. In this way, various factors affecting line loss can be comprehensively captured, providing high-quality input for subsequent model training.
[0040] Basic information characteristic indicators mainly describe the basic structure and configuration of power lines. Specifically, they include, but are not limited to, the following: Total line length: Obtained directly from the line ledger data, reflecting the physical length of the entire line.
[0041] Average line length: It is calculated by dividing the total line length by the number of distribution transformers under the line, providing a measure of line layout density.
[0042] Line power supply radius: Also obtained from line ledger data, it indicates the range of power supply coverage.
[0043] Number of distribution transformers: This records the total number of distribution transformers connected to the line, which is crucial for understanding the load distribution of the line.
[0044] Average transformer capacity: This is calculated by summing the capacities of all transformers and dividing by the number of transformers, and is used to assess the overall power supply capacity of the line.
[0045] The previous day's data characteristics focus on the operational status within the most recent time window, aiming to capture short-term trends. These indicators include, but are not limited to: Previous day's line loss rate: Calculated based on historical line loss data, used to measure the line's loss situation the previous day.
[0046] Average loss rate over the past 7 days: Calculates the average daily loss rate over the past week to help identify recent loss fluctuation trends.
[0047] The standard deviation of line loss rate over the past 7 days measures the volatility of line loss rate over the past week and reveals its stability.
[0048] Line integrated power consumption of the previous day: The active power of the previous day is integrated using the rectangular area method to reflect the total power consumption.
[0049] Previous day's line power fluctuation rate: The ratio of the standard deviation to the average value of the previous day's active power, reflecting the degree of power change.
[0050] Peak-to-valley power ratio of the previous day: the ratio of the absolute values of the maximum and minimum active power, showing the load difference within a day.
[0051] Total active power consumption of distribution transformers on the previous day: This summarizes the active power consumption of each distribution transformer on the previous day and provides detailed information on energy usage.
[0052] The previous day's maximum / average load rate of the distribution transformer: These represent the maximum and average load ratios of the distribution transformer, respectively, reflecting the workload of the equipment.
[0053] The previous day's average temperature and rainfall: historical data from the meteorological system, which indirectly affect electricity demand and transmission efficiency.
[0054] The previous day's season, whether there was a switch change the previous day: further refine the impact of environmental conditions and operational changes.
[0055] The same period last year's data characteristics indicators focus on historical data within the same time period, making it easier to compare differences between years. These indicators are similar to the previous day's data characteristics, but focus on data from the same day last year.
[0056] By comprehensively extracting the three types of feature indicators mentioned above, S120 not only provides rich data support for subsequent random forest feature selection, but also ensures that the constructed prediction model has high accuracy and generalization ability. Furthermore, this method enables the model to adapt to different environments and operating conditions, thereby improving its reliability and effectiveness in practical applications. In conclusion, S120, as a key link in the entire process, is of great significance for improving the quality of line loss risk prediction.
[0057] S130. Input the multi-dimensional features into the line loss risk prediction model to predict the line loss risk and obtain the prediction result.
[0058] In this embodiment, the prediction result refers to the classification label of the line loss risk of the line to be diagnosed, output by the multi-model fusion-based distribution network line loss risk prediction model after analyzing the multi-dimensional features of the input. Specifically, the prediction result includes, but is not limited to, the following: Line loss risk category: The prediction results will classify the line to be diagnosed into one of three risk categories: high loss, negative loss, and normal. This represents the type of line loss condition that the line is likely to fall into in the future, based on the input data and model analysis.
[0059] Probability values: In addition to providing the final line loss risk category, the prediction results also include the predicted probability for each category. These probabilities reflect the model's confidence level for each line loss risk category, that is, how likely the model believes the line belongs to a particular line loss risk category. For example, the probability of a line being predicted as having high loss is 30%, the probability of normal risk is 65%, and the probability of negative loss is 5%.
[0060] Weighted average prediction probability: Based on multi-model fusion methods (such as the LightGBM and CatBoost models in the example above), the final line loss risk label is determined by calculating the weighted average prediction probability of each model. This is achieved by comprehensively considering the prediction results of different models and assigning weights according to their performance metrics (such as F-1 scores).
[0061] Decision Support Information: Forecast results can also provide additional information to help power companies make more accurate management decisions. For example, for lines predicted to have high or negative loss risks, the specific factors leading to these risks (such as excessively long line length, excessively high load rate, etc.) can be further analyzed, thereby enabling targeted measures to reduce line losses.
[0062] In summary, the forecast results aim to identify lines that may experience line loss problems in advance, so that power companies can adjust their operating strategies in a timely manner, reduce line loss rates, and improve the operating efficiency and service quality of the distribution network.
[0063] The training process of the line loss risk prediction model includes: Based on historical data, multi-dimensional features are selected, and multiple machine learning models are trained using LightGBM and CatBoost algorithms based on these features. A grid search algorithm is then used to fine-tune the parameters of the machine learning models to obtain their optimal parameters. Finally, the line loss risk prediction model is determined by weighting the machine learning models.
[0064] In one embodiment, multi-dimensional features are selected based on historical data, and multiple machine learning models are trained based on the multi-dimensional features using LightGBM and CatBoost algorithms. The parameters are then fine-tuned using a grid search algorithm to obtain the optimal parameters of the machine learning models. The line loss risk prediction model is determined based on the weighted average of the machine learning models, which may include steps S131 to S135.
[0065] S131. Obtain relevant historical sample data labeled with high loss, negative loss, and normal line loss risk tags.
[0066] In this embodiment, historical sample-related data refers to, but is not limited to, line ledgers, distribution transformer ledgers, historical line loss data, power data, meteorological data, seasonal data, and switch position data. This data is used to identify whether the line is in a high-loss, low-loss, or normal state, and serves as the basis for training the machine learning model.
[0067] S132. Based on the relevant historical sample data, extract the corresponding multi-dimensional features, use the multi-dimensional features as model input, use the labels of high loss, negative loss, and normal line loss risk as model output, and use random forest to train the model to obtain a trained random forest model.
[0068] Extract basic information features of the line (such as total line length), data features of the previous day (such as the previous day's daily line loss rate), and data features of the same period last year (such as the same period last year's daily line loss rate) from relevant historical sample data.
[0069] The above feature indicators were trained using a random forest algorithm to identify which features are most important for distinguishing different types of line loss risk.
[0070] S133. Sort the feature indicators corresponding to the trained random forest model according to feature importance, and select the feature indicators with ranking load requirements as key feature indicators.
[0071] In this embodiment, key feature metrics refer to the most representative features selected based on feature importance scores after training the random forest model. Examples include total line length, the previous day's daily line loss rate, and the standard deviation of the previous 7-day line loss rate. These key features will be used in subsequent steps to train a more accurate prediction model.
[0072] S134. Using LightGBM and CatBoost classification algorithms, the key feature indicators are used as model inputs, and the labels indicating high loss, negative loss, and normal line loss risk are used as model outputs. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are tuned using a grid search algorithm to determine multiple tuned machine learning models.
[0073] In one embodiment, step S134 described above may include steps S1341 to S1342.
[0074] S1341. Using the LightGBM classification algorithm, the key feature indicators are used as model input, and the labels of high loss, negative loss, and normal line loss risk are used as model output. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are tuned using the grid search algorithm to obtain the LightGBM distribution network line loss risk prediction model.
[0075] In this embodiment, the LightGBM distribution network line loss risk prediction model refers to the LightGBM model with optimized parameters through a grid search algorithm. This model can accurately predict the line loss risk category based on key characteristic indicators, and its performance is measured by weighted averaging. The scores are evaluated.
[0076] S1342. Apply the LightGBM distribution network line loss risk prediction model to the test set and calculate the weighted average. The score is used to obtain the first score; The LightGBM model with optimal parameters was applied to the test set, and its weighted average was calculated. The score is the first score, which reflects the model's performance on the test set.
[0077] S1343. Using the CatBoost classification algorithm, the key feature indicators are used as model input, and the labels of high loss, negative loss, and normal line loss risk are used as model output. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are tuned using the grid search algorithm to obtain the CatBoost distribution network line loss risk prediction model.
[0078] In this embodiment, the CatBoost distribution network line loss risk prediction model refers to the CatBoost model that has also been optimized using the grid search algorithm. It also predicts line loss risk based on the same key feature indicators and uses a weighted average. Its accuracy is measured by scores.
[0079] S1344. Apply the CatBoost distribution network line loss risk prediction model to the test set and calculate the weighted average. The score is used to obtain the second score.
[0080] Similarly, the CatBoost model with optimal parameters is applied to the test set, and its weighted average is calculated. The score is used to obtain the second score.
[0081] S135. Combine the multiple optimized machine learning models according to their corresponding weights to obtain the line loss risk prediction model.
[0082] In one embodiment, step S135 described above may include steps S1351 to S1352.
[0083] S1351. Determine the corresponding weights based on the proportions of the first score and the second score in the sum of the two.
[0084] The weights of the first and second scores are determined based on their proportions in the total. For example, if the first score of the LightGBM model is 91.4% and the second score of the CatBoost model is 93.5%, their weights would be 0.49 and 0.51, respectively.
[0085] S1352. Combine the multiple optimized machine learning models with the weights to obtain the line loss risk prediction model.
[0086] The above prediction results are obtained by weighted summation of multiple optimized machine learning models using the aforementioned weights.
[0087] By combining the determined weights, the results from the LightGBM and CatBoost models are weighted and summed to form the final line loss risk prediction model. This model can provide more accurate line loss risk prediction results because it combines the advantages of two different but complementary machine learning methods.
[0088] Through the above steps, a line loss risk prediction model based on multi-model fusion was constructed. This model can not only predict potential line loss problems in advance, but also improve the accuracy and reliability of the prediction, thereby helping power companies to formulate more effective operation strategies, reduce line loss rates, and improve management efficiency.
[0089] In this embodiment, 31,636 line samples with historically marked high-loss, negative-loss, and normal line loss risk labels were obtained from a certain province, with a ratio of 1:2:6 for high-loss, negative-loss, and normal lines. Historical samples were obtained from the PMS (Equipment Asset Management) system and the marketing system, involving line ledgers and distribution transformer ledgers; from the D5000 system, historical samples involved 96 points of power data for the lines, with a sampling interval of 15 minutes for the measurement data; from the electricity consumption data acquisition system, historical samples involved 96 points of power data for the distribution transformers, with a sampling interval of 15 minutes for the measurement data; from the line loss system, historical samples involved historical line loss rates and line loss risk label data; from the meteorological system, historical samples involved meteorological data; historical samples obtained by date involved seasonal data; and from the distribution automation system, historical samples involved switch position data.
[0090] We extracted feature indicators from three dimensions: basic line information features, previous day's data features, and data features from the same period last year. The basic information feature indicators include: total line length, average line length, line power supply radius, number of distribution transformers, and average distribution transformer capacity. Specific indicator definitions are as follows: Total line length: The total line length is obtained directly from the line ledger data; Average line length: Total line length divided by the number of distribution transformers under the line; Power supply radius of the line: The power supply radius of the line is obtained directly from the line ledger data; Number of distribution transformers: The total number of distribution transformers connected to the line; Average transformer capacity: the sum of the capacities of all transformers along the line divided by the number of transformers; The data characteristics of the previous day include: the previous day's daily line loss rate, the previous 7-day average line loss rate, the previous 7-day standard deviation of the line loss rate, the previous day's integrated line power consumption, the previous day's line power fluctuation rate, the previous day's line power peak-valley ratio, the previous day's total integrated distribution transformer power consumption, the previous day's maximum distribution transformer load rate, the previous day's average distribution transformer load rate, the previous day's average temperature, the previous day's rainfall, the previous day's seasonality, and whether there was a switch change on the previous day. Specific indicator definitions are as follows: Previous day's daily line loss rate: The previous day's daily line loss rate is obtained directly from historical line loss data. This daily line loss rate is calculated by using the input power, output power, and sales power of the line and distribution transformer meter readings. Then, the input power is subtracted from the output power and sales power, and then divided by the input power. Average daily loss rate over the previous 7 days: The average daily loss rate over the previous 7 days; Standard deviation of daily line loss rate over the previous 7 days: Standard deviation of daily line loss rate over the previous 7 days; Line integrated power of the previous day: Based on the line power data of the previous day, the active power of the line is integrated using the rectangular area method to obtain the line integrated power of the previous day. Previous day's line power fluctuation rate: the standard deviation of the previous day's line active power divided by the average of the previous day's line active power; Peak-valley ratio of line power on the previous day: the maximum absolute value of the line active power on the previous day divided by the minimum absolute value of the line active power on the previous day; Total integrated power of distribution transformers on the previous day: Based on the power data of all distribution transformers under the line on the previous day, the active power of each distribution transformer is integrated and then summed using the rectangular area method to obtain the total integrated power of distribution transformers; The maximum load rate of the distribution transformer on the previous day is calculated by taking the square root of the sum of the squares of the active and reactive power of the distribution transformer on the previous day and dividing it by the rated capacity. The maximum value of the distribution transformer load rate on the previous day is taken as the maximum load rate of the distribution transformer on the previous day. Average load rate of distribution transformers on the previous day: The average value of the distribution transformer load rate on the previous day is used as the average load rate of distribution transformers on the previous day. Average temperature of the previous day: The highest and lowest temperatures of the previous day in the districts and counties to which the route is located are obtained from the meteorological system, and the average of the two is used as the average temperature of the previous day; Rainfall of the previous day: The rainfall of the previous day in the districts and counties to which the line is located is obtained from the meteorological system as the rainfall of the previous day; Previous day's season: Convert the previous day's date and time to the corresponding season; Was there a switch change the day before? Was there a switch change on the line the day before? The data characteristic indicators for the same period last year include: daily line loss rate for the same period last year, average line loss rate for the previous 7 days of the same period last year, standard deviation of line loss rate for the previous 7 days of the same period last year, line integrated power consumption for the same period last year, line power fluctuation rate for the same period last year, line power peak-valley ratio for the same period last year, total integrated power consumption of distribution transformers for the same period last year, maximum load rate of distribution transformers for the same period last year, average load rate of distribution transformers for the same period last year, average temperature for the same period last year, rainfall for the same period last year, season for the same period last year, and whether there was a switch change in the same period last year. The specific indicator definitions are the same as the data characteristic indicators for the previous day mentioned above. The same period last year refers to the same day of the same period last year. You only need to replace the previous day with the same period last year.
[0091] In this embodiment, for 31,636 historical samples of lines, 31 characteristic indicators, such as the previous day's daily line loss rate and the same period last year's daily line loss rate, were extracted according to the above indicator definition.
[0092] Based on historical samples, the aforementioned feature indicators are used as model input, and the daily line loss risk labels (high loss, negative loss, and normal loss) are used as model output. Random forest is used for model feature selection to identify key feature indicators; specifically including: The aforementioned feature indicators are used as input to the model, and the risk labels for high loss, negative loss, and normal loss on the same day are used as output to train the model using random forest. The feature indicators corresponding to the trained random forest model are sorted according to feature importance, and the top 15 feature indicators are selected as key feature indicators.
[0093] In this embodiment, the above method is used to select the top 15 characteristic indicators as key characteristic indicators. The key characteristic indicators are: total line length, average transformer capacity, daily line loss rate of the previous day, standard deviation of line loss rate of the previous 7 days, line integrated power of the previous day, total integrated power of transformers of the previous day, maximum load rate of transformers of the previous day, average temperature of the previous day, season of the previous day, whether there was a switch change of position of the previous day, daily line loss rate of the same period last year, line integrated power of the same period last year, line power fluctuation rate of the same period last year, total integrated power of transformers of the same period last year, and maximum load rate of transformers of the same period last year.
[0094] Using LightGBM and CatBoost classification algorithms respectively, the aforementioned key feature indicators were used as model inputs, and the daily line loss risk labels (high loss, negative loss, and normal loss) were used as model outputs. The distribution network line loss risk prediction model was trained based on historical samples, and the model parameters were fine-tuned using a grid search algorithm to select the optimal LightGBM and CatBoost distribution network line loss risk prediction models. Specifically, this included: Using the LightGBM classification algorithm, the aforementioned key feature indicators are used as model input, and the current day's line loss risk labels (high loss, negative loss, normal loss) are used as model output. The distribution network line loss risk prediction model is trained based on historical samples, and the model parameters are fine-tuned using a grid search algorithm to select the optimal LightGBM distribution network line loss risk prediction model. Specifically, this involves: acquiring key feature indicators and line loss risk label data from historical samples labeled with high loss, negative loss, and normal loss risks; randomly partitioning the historical sample dataset to select a portion as the training set and the remaining samples as the test set; using the key feature indicators from the training set as model input and the current day's line loss risk labels (high loss, negative loss, normal loss) as model output, inputting these into the LightGBM classification algorithm for training the distribution network line loss risk prediction model based on LightGBM classification; fine-tuning the model parameters using a grid search algorithm to select the optimal LightGBM distribution network line loss risk prediction model; and applying the optimal LightGBM distribution network line loss risk prediction model to the test set and calculating the weighted average. Fractions; their definition is as follows: In the formula, Weighted average of the LightGBM model Fraction, These represent high loss, negative loss, and normal loss, respectively. The model will actually be Predicted as The number of; To make the model non-existent Predicted as The number of; The model will actually be Predicted as not The number of; The total number of samples in the test set. The risk label for line loss is The number of samples; The optimal LightGBM distribution network line loss risk prediction model and weighted average Fraction Save it.
[0095] Using the CatBoost classification algorithm, the aforementioned key feature indicators are used as model input, and the daily line loss risk labels (high loss, negative loss, and normal loss) are used as model output. The distribution network line loss risk prediction model is trained based on historical samples, and the model parameters are fine-tuned using a grid search algorithm to select the optimal CatBoost distribution network line loss risk prediction model. Specifically, this includes: Obtain key feature indicators and line loss risk label data of historical samples labeled with high loss, negative loss, and normal line loss risk tags; select a portion of the historical sample dataset as the training set and the remaining samples as the test set using a random partitioning method; use the key feature indicators in the training set as model input and the line loss risk tags labeled with high loss, negative loss, and normal on the current day as model output, and input them into the CatBoost classification algorithm to train a distribution network line loss risk prediction model based on CatBoost classification; use a grid search algorithm to fine-tune the model parameters and select the optimal CatBoost distribution network line loss risk prediction model; apply the optimal CatBoost distribution network line loss risk prediction model to the test set and calculate the weighted average. Fractions; their definition is as follows: In the formula, Weighted average of the CatBoost model Fraction, These represent high loss, negative loss, and normal loss, respectively. The model will actually be Predicted as The number of; To make the model non-existent Predicted as The number of; The model will actually be Predicted as not The number of; The total number of samples in the test set. The risk label for line loss is The number of samples; the optimal CatBoost distribution network line loss risk prediction model and weighted average Fraction Save it.
[0096] In this embodiment, the test set is a dataset divided from historical sample-related datasets after extracting corresponding features.
[0097] In this embodiment, 31,636 historical line samples from a certain province were obtained, labeled with high loss, negative loss, and normal line loss risk tags, with a ratio of 1:2:6. A random partitioning method was used to select 80% of the historical sample dataset as the training set, and the remaining 20% as the test set. Key feature indicators from the training set were used as model inputs, and the daily line loss risk labels (high loss, negative loss, normal loss) were used as model outputs. These were then input into the LightGBM and CatBoost classification algorithms, respectively, to train the LightGBM and CatBoost distribution network line loss risk prediction models. The number of trees and maximum depth parameters of the decision tree were set to {60, 90, 120, 150, 180, 210, 240} and {4, 6, 8, 10, 12, 14}, respectively. A grid search algorithm was used to fine-tune the model parameters. The optimal parameters for the LightGBM and CatBoost distribution network line loss risk prediction models were {150, 6} and {120, 8}, respectively. The models with the optimal parameters were used as the optimal LightGBM and CatBoost distribution network line loss risk prediction models, respectively. The optimal LightGBM and CatBoost distribution network line loss risk prediction models were then applied to the test set, and the weighted average was calculated. Fraction , The figures are 91.4% and 93.5% respectively.
[0098] The optimal LightGBM and CatBoost distribution network line loss risk prediction models are combined according to their weights to form a multi-model fusion-based distribution network line loss risk prediction model. Specifically, this includes: The weighted average of the above-mentioned optimal LightGBM and CatBoost distribution network line loss risk prediction models Scores are used to calculate the weights of each model; the weights are defined as follows: ; In the formula, , These are the weights for the LightGBM model and the CatBoost model, respectively. , Weighted averages of the LightGBM model and the CatBoost model, respectively. Fraction; Using the optimal LightGBM and CatBoost distribution network line loss risk prediction models described above, the predicted probabilities of each line loss risk label for the LightGBM and CatBoost models are output respectively. Based on the weights of each model, the weighted average predicted probability of each line loss risk label is calculated, defined as follows: In the formula, These represent high loss, negative loss, and normal loss, respectively. The risk label for line loss is The weighted average predicted probability; , These are the weights for the LightGBM model and the CatBoost model, respectively. , The LightGBM model and CatBoost model respectively predict line loss risk labels as follows: The predicted probability; The line loss risk label corresponding to the maximum weighted average predicted probability is used as the line loss risk prediction result for the distribution network based on multi-model fusion. In the model training of this embodiment, a weighted average of the LightGBM and CatBoost distribution network line loss risk prediction models is used. Fraction , The weights of the LightGBM and CatBoost distribution network line loss risk prediction models were calculated to be 0.49 and 0.51, respectively. Following the above method, a multi-model fusion-based distribution network line loss risk prediction model was developed and applied to the test set, where a weighted average was calculated. The score was 94.8%.
[0099] The line loss risk prediction model trained above can then be applied to the prediction process. For example, data from five power lines in a province can be obtained as the model application dataset. The application dataset obtained from the PMS (Equipment Asset Management) system and marketing system involves line ledgers and distribution transformer ledgers; the application dataset obtained from the D5000 system involves 96 points of power data for the lines, with a sampling interval of 15 minutes; the application dataset obtained from the electricity consumption data acquisition system involves 96 points of power data for the distribution transformers, with a sampling interval of 15 minutes; the application dataset obtained from the line loss system involves historical line loss rate data; the application dataset obtained from the meteorological system involves meteorological data; the application dataset obtained by date involves seasonal data; and the application dataset obtained from the distribution automation system involves switch position data.
[0100] For five lines in a certain province that need to be diagnosed, key feature indicators selected by random forest were extracted: total line length, average transformer capacity, daily line loss rate of the previous day, standard deviation of line loss rate of the previous 7 days, line integral power of the previous day, total integrated power of transformers of the previous day, maximum load rate of transformers of the previous day, average temperature of the previous day, season of the previous day, whether there was a switch change of position of the previous day, daily line loss rate of the same period last year, line integral power of the same period last year, line power fluctuation rate of the same period last year, total integrated power of transformers of the same period last year, and maximum load rate of transformers of the same period last year. The calculation process of the indicators is the same as step 2 in Part 1.
[0101] The trained LightGBM distribution network line loss risk prediction model, CatBoost distribution network line loss risk prediction model, and multi-model fusion-based distribution network line loss risk prediction model were used to predict the line loss risk of five lines to be diagnosed in a certain province. The results are shown in Table 1. Table 1 shows that the multi-model fusion-based distribution network line loss risk prediction model for the five lines to be diagnosed yielded results consistent with the actual line loss risk labels, achieving an accuracy of 100%. The LightGBM and CatBoost models each made errors in predicting one line, with accuracies of 80% and 80%, respectively.
[0102] Table 1. Application Results of the Distribution Network Line Loss Risk Prediction Model Based on Multi-Model Fusion
[0103] The method in this embodiment addresses the issues of lag and low accuracy in existing power distribution network line loss risk prediction, predicting lines that may face line loss risks in advance and with relatively high accuracy. This not only helps relevant personnel adjust operating strategies in a timely manner to reduce the line loss rate of the power distribution network, but also improves the ability to manage line losses in a refined manner. Specifically, by integrating multi-dimensional features from historical data and using advanced machine learning algorithms (such as LightGBM and CatBoost), it can identify potentially high-loss, negative-loss, or normal-state risk lines before problems occur. This method effectively solves the lag problem in traditional line loss risk calculation, achieving forward-looking risk prediction.
[0104] Specifically, this paper proposes combining two efficient machine learning models, LightGBM and CatBoost, with specific weights to form a comprehensive line loss risk prediction model based on multi-model fusion. By weighted summation of the outputs of the two models, this method significantly improves the accuracy and reliability of predictions. This fusion strategy fully utilizes the advantages of each model, overcomes the limitations of a single model, and thus provides more accurate prediction results.
[0105] The design concept emphasizes simplicity and ease of implementation; its calculation process is intuitive, clear, and easy to understand and implement. Furthermore, because it is based on well-defined mathematical principles and a clear technical framework, it is highly suitable for practical engineering applications. It enables power companies to take timely measures based on forecast results to optimize grid operation, effectively reduce line losses, and thus improve the economic efficiency and management level of the entire power grid system.
[0106] In summary, the method presented in this embodiment not only achieves early warning and accurate assessment of line loss risks in distribution networks at the technical level, but also demonstrates significant potential in terms of practicality. By adopting the solution proposed in this invention, power companies can better address line loss issues and further promote the development of power grids towards intelligent and refined management.
[0107] The aforementioned multi-model fusion-based distribution network line loss risk prediction method acquires and analyzes relevant data of the lines to be diagnosed, extracting multi-dimensional features including basic line information and data from the previous day and the same period last year. These features are then used to train multiple machine learning models based on LightGBM and CatBoost algorithms. Parameters are optimized using a grid search algorithm to ensure model accuracy. Finally, a weighted combination of the performance of each model is used to form a comprehensive prediction model for line loss risk prediction. This method not only achieves early warning and accurate assessment of distribution network line loss risks, improving the accuracy and reliability of predictions, but also enables power companies to take timely measures to adjust operating strategies and optimize grid operating efficiency, thereby effectively reducing line losses, promoting the development of the power grid towards intelligence and greenness, and improving the economic efficiency and environmental friendliness of the power grid system.
[0108] Figure 2 This is a schematic block diagram of a distribution network line loss risk prediction system 300 based on multi-model fusion provided in an embodiment of the present invention. Figure 2 As shown, corresponding to the above-described multi-model fusion-based distribution network line loss risk prediction method, this invention also provides a multi-model fusion-based distribution network line loss risk prediction system 300. This multi-model fusion-based distribution network line loss risk prediction system 300 includes a unit for executing the above-described multi-model fusion-based distribution network line loss risk prediction method, and the system can be configured in a server. Specifically, please refer to... Figure 2 The distribution network line loss risk prediction system 300 based on multi-model fusion includes an acquisition unit 301, a feature extraction unit 302, and a prediction unit 303.
[0109] The acquisition unit 301 is used to acquire relevant data of the line to be diagnosed; the feature extraction unit 302 is used to extract basic information features of the line, data features of the previous day, and data features of the same period last year based on the relevant data to obtain multi-dimensional features; the prediction unit 303 is used to input the multi-dimensional features into the line loss risk prediction model to predict the line loss risk and obtain the prediction result. Also includes: The model training unit is used to select multi-dimensional features based on historical data, train multiple machine learning models based on the multi-dimensional features using LightGBM and CatBoost algorithms, and use a grid search algorithm to fine-tune the parameters to obtain the optimal parameters of the machine learning models. The line loss risk prediction model is determined based on the weighted average of the machine learning models.
[0110] In one embodiment, the model training unit is used for: Historical sample data labeled with high loss, negative loss, and normal line loss risk tags are obtained. Multi-dimensional features are extracted based on this historical data. These features are used as model input, and the labels indicating high loss, negative loss, and normal line loss risk are used as model output. A random forest model is trained to obtain a trained random forest model. The feature indicators corresponding to the trained random forest model are sorted according to feature importance, and feature indicators with ranking load requirements are selected as key feature indicators. LightGBM and CatBoost classification algorithms are used, with the key feature indicators as model input and the labels indicating high loss, negative loss, and normal line loss risk as model output. A machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to determine multiple fine-tuned machine learning models. These multiple fine-tuned machine learning models are combined according to their corresponding weights to obtain the line loss risk prediction model.
[0111] In one embodiment, the model training unit is further configured to: Using the LightGBM classification algorithm, the key feature indicators are used as model input, and the labels indicating high loss, negative loss, and normal line loss risk are used as model output. A machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to obtain the LightGBM distribution network line loss risk prediction model. Similarly, using the CatBoost classification algorithm, the key feature indicators are used as model input, and the labels indicating high loss, negative loss, and normal line loss risk are used as model output. A machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to obtain the CatBoost distribution network line loss risk prediction model.
[0112] In one embodiment, the model training unit is further configured to: apply the LightGBM distribution network line loss risk prediction model to the test set and calculate a weighted average. The score is used to obtain the first score; In one embodiment, the model training unit is further configured to: apply the CatBoost distribution network line loss risk prediction model to the test set and calculate a weighted average. The score is used to obtain the second score.
[0113] In one embodiment, the model training unit is further configured to: determine the corresponding weights based on the proportions of the first score and the second score in the sum of the two; and combine the multiple optimized machine learning models in combination with the weights to obtain the line loss risk prediction model.
[0114] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned multi-model fusion-based distribution network line loss risk prediction system 300 and its various units can be found in the corresponding descriptions in the aforementioned method embodiments. For the sake of convenience and brevity, these details will not be repeated here.
[0115] The aforementioned multi-model fusion-based distribution network line loss risk prediction system 300 can be implemented as a computer program, which can be used in various ways, such as... Figure 3 It runs on the computer device shown.
[0116] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0117] See Figure 3 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0118] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for predicting line loss risk in a distribution network based on multi-model fusion.
[0119] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0120] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for predicting the line loss risk of a distribution network based on multi-model fusion.
[0121] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0122] The processor 502 is used to run the computer program 5032 stored in the memory to implement all the steps of the multi-model fusion-based distribution network line loss risk prediction method.
[0123] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0124] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0125] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform all steps of the multi-model fusion-based distribution network line loss risk prediction method.
[0126] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0127] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0128] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of each unit is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0129] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the system of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0130] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0131] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting line loss risk in distribution networks based on multi-model fusion, characterized in that, include: Obtain relevant data for the circuit to be diagnosed; Based on the relevant data, basic information features of the route, features of the previous day's data, and features of the same period last year's data are extracted to obtain multi-dimensional features; The multi-dimensional features are input into the line loss risk prediction model to predict line loss risk and obtain the prediction results. The training process of the line loss risk prediction model includes: Based on historical data, multi-dimensional features are selected, and multiple machine learning models are trained using LightGBM and CatBoost algorithms based on these features. A grid search algorithm is then used to fine-tune the parameters of the machine learning models to obtain their optimal parameters. Finally, the line loss risk prediction model is determined by weighting the machine learning models.
2. The method for predicting line loss risk in distribution networks based on multi-model fusion according to claim 1, characterized in that, The relevant data includes at least one of the following: line ledger, distribution transformer ledger, historical line loss data, power data, meteorological data, seasonal data, and switch position data.
3. The method for predicting line loss risk in distribution networks based on multi-model fusion according to claim 1, characterized in that, The basic information characteristic indicators include at least one of the following: total line length, average line length, line power supply radius, number of distribution transformers, and average distribution transformer capacity. The data characteristic indicators of the previous day include at least one of the following: the daily line loss rate of the previous day, the average line loss rate of the previous 7 days, the standard deviation of the line loss rate of the previous 7 days, the integrated power of the line on the previous day, the power fluctuation rate of the line on the previous day, the peak-valley ratio of the line power on the previous day, the total integrated power of the distribution transformer on the previous day, the maximum load rate of the distribution transformer on the previous day, the average load rate of the distribution transformer on the previous day, the average temperature of the previous day, the rainfall of the previous day, the season of the previous day, and whether there was a switch change on the previous day. The data characteristic indicators for the same period last year include at least one of the following: daily line loss rate for the same period last year, average line loss rate for the first 7 days of the same period last year, standard deviation of line loss rate for the first 7 days of the same period last year, line integrated power consumption for the same period last year, line power fluctuation rate for the same period last year, line power peak-valley ratio for the same period last year, total integrated power consumption of distribution transformers for the same period last year, maximum load rate of distribution transformers for the same period last year, average load rate of distribution transformers for the same period last year, average temperature for the same period last year, rainfall for the same period last year, season for the same period last year, and whether there was a switch change in the same period last year.
4. The method for predicting line loss risk in distribution networks based on multi-model fusion according to claim 1, characterized in that, The process involves selecting multi-dimensional features based on historical data, training multiple machine learning models using LightGBM and CatBoost algorithms based on these features, and fine-tuning parameters using a grid search algorithm to obtain the optimal parameters for each machine learning model. The final line loss risk prediction model is then determined based on a weighted average of these machine learning models. Obtain historical sample data labeled with high loss, negative loss, and normal line loss risk tags; Based on the historical sample data, extract the corresponding multi-dimensional features, use the multi-dimensional features as the model input, use the labels of high loss, negative loss and normal line loss risk as the model output, and use random forest to train the model to obtain a trained random forest model. The feature indicators corresponding to the trained random forest model are sorted according to feature importance, and the feature indicators with ranking load requirements are selected as key feature indicators. Using LightGBM and CatBoost classification algorithms, the key feature indicators are used as model inputs, and the labels of high loss, negative loss, and normal line loss risk are used as model outputs. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are tuned using a grid search algorithm to determine multiple tuned machine learning models. The multiple optimized machine learning models are combined according to their corresponding weights to obtain the line loss risk prediction model.
5. The method for predicting line loss risk in distribution networks based on multi-model fusion according to claim 4, characterized in that, The LightGBM and CatBoost classification algorithms are used, with the key feature indicators as model input and the labels indicating high loss, negative loss, and normal line loss risk as model output. The machine learning model is trained based on historical samples, and the parameters are fine-tuned using a grid search algorithm to determine multiple optimized machine learning models, including: Using the LightGBM classification algorithm, the key feature indicators are used as model input, and the labels of high loss, negative loss, and normal line loss risk are used as model output. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to obtain the LightGBM distribution network line loss risk prediction model. Using the CatBoost classification algorithm, the key feature indicators are used as model input, and the labels indicating high loss, negative loss, and normal line loss risk are used as model output. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are fine-tuned using a grid search algorithm to obtain the CatBoost distribution network line loss risk prediction model.
6. The method for predicting line loss risk in distribution networks based on multi-model fusion according to claim 5, characterized in that, The process of using the LightGBM classification algorithm, taking the key feature indicators as model input, and labeling line loss risks (high loss, negative loss, and normal) as model output, training a machine learning model based on historical samples, and then fine-tuning the machine learning model parameters using a grid search algorithm to obtain the LightGBM distribution network line loss risk prediction model, further includes: The LightGBM distribution network line loss risk prediction model was applied to the test set, and a weighted average was calculated. The score is used to obtain the first score; The process of using the CatBoost classification algorithm, taking the key feature indicators as model input, and labeling line loss risks (high loss, negative loss, and normal) as model output, training a machine learning model based on historical samples, and then fine-tuning the machine learning model parameters using a grid search algorithm to obtain the CatBoost distribution network line loss risk prediction model, further includes: The CatBoost distribution network line loss risk prediction model was applied to the test set, and a weighted average was calculated. The score is used to obtain the second score.
7. The method for predicting line loss risk in distribution networks based on multi-model fusion according to claim 4, characterized in that, The step of combining the multiple optimized machine learning models according to their corresponding weights to obtain the line loss risk prediction model includes: The corresponding weights are determined based on the proportions of the first score and the second score in the sum of the two. The multiple optimized machine learning models are combined by combining the weights to obtain the line loss risk prediction model.
8. The method for predicting line loss risk in distribution networks based on multi-model fusion according to claim 7, characterized in that, The prediction result is obtained by weighted summation of multiple optimized machine learning models using the weights.
9. A distribution network line loss risk prediction system based on multi-model fusion, characterized in that, include: The acquisition unit is used to acquire relevant data of the circuit to be diagnosed. The feature extraction unit is used to extract basic information features of the route, data features of the previous day, and data features of the same period last year based on the relevant data, so as to obtain multi-dimensional features; The prediction unit is used to input the multi-dimensional features into the line loss risk prediction model to predict the line loss risk and obtain the prediction result. Also includes: The model training unit is used to select multi-dimensional features based on historical data, train multiple machine learning models based on the multi-dimensional features using LightGBM and CatBoost algorithms, and use a grid search algorithm to fine-tune the parameters to obtain the optimal parameters of the machine learning models. The line loss risk prediction model is determined based on the weighted average of the machine learning models.
10. The distribution network line loss risk prediction system based on multi-model fusion according to claim 9, characterized in that, The model training unit is used for: Obtain historical sample data labeled with high loss, negative loss, and normal line loss risk tags; Based on the historical sample data, extract the corresponding multi-dimensional features, use the multi-dimensional features as the model input, use the labels of high loss, negative loss and normal line loss risk as the model output, and use random forest to train the model to obtain a trained random forest model. The feature indicators corresponding to the trained random forest model are sorted according to feature importance, and the feature indicators with ranking load requirements are selected as key feature indicators. Using LightGBM and CatBoost classification algorithms, the key feature indicators are used as model inputs, and the labels of high loss, negative loss, and normal line loss risk are used as model outputs. The machine learning model is trained based on the historical samples, and the parameters of the machine learning model are tuned using a grid search algorithm to determine multiple tuned machine learning models. The multiple optimized machine learning models are combined according to their corresponding weights to obtain the line loss risk prediction model.
Citation Information
Patent Citations
Power transmission line loss rate prediction method and system based on electric quantity and machine account information
CN119884588A