Line loss rate prediction value determination method and device, and electronic equipment

CN122986339APending Publication Date: 2026-10-27STATE GRID BEIJING ELECTRIC POWER CO +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611112283.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本发明实施例提供了一种线损率预测值确定方法、装置以及电子设备,以至少解决相关技术中,线损率预测不准确的技术问题

Benefits of technology

[0324](1)实现不同类别台区的最优模型自适应选择;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122986339A_ABST
    Figure CN122986339A_ABST
Patent Text Reader

Abstract

The application discloses a line loss rate prediction value determination method and device and electronic equipment. The method comprises the following steps: obtaining target operation data of a to-be-predicted station area in a power distribution network station area; determining target clustering features corresponding to a plurality of target clustering items and target prediction features corresponding to a plurality of target prediction items according to the target operation data; determining a target station area category to which the to-be-predicted station area belongs according to the target clustering features; calling a target prediction model corresponding to the target station area category, wherein the target prediction model is selected from a plurality of trained models according to the difference between the corresponding predicted line loss rate and the real line loss rate, and the plurality of trained models are respectively provided with different model architectures; and inputting the target prediction features into the target prediction model to obtain the line loss rate prediction value of the to-be-predicted station area. The application solves the technical problem of inaccurate line loss rate prediction in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and more specifically, to a method, apparatus, and electronic device for determining the predicted value of line loss rate. Background Technology

[0002] As a core operational indicator for measuring the economic efficiency and management level of power system operation, the distribution network line loss rate not only affects the economic benefits of power grid companies but also serves as a crucial basis for electricity price calculation in the electricity market. With the accelerated construction of new power systems and the widespread integration of large-scale wind and solar energy, distributed power sources, and new energy storage, the power flow of the distribution network exhibits complex characteristics such as bidirectional flow and random fluctuations. This leads to increasingly complex causes of line losses, making it difficult to accurately predict medium- and long-term trends using traditional methods. Simultaneously, the integration of diversified loads exacerbates frequent fluctuations in operating conditions, resulting in the superposition of factors increasing and decreasing losses. Traditional management models struggle to accurately capture these dynamic changes, directly impacting the fairness and stability of market-based electricity prices for users. Furthermore, under the backdrop of energy conservation and carbon reduction policies, line loss electricity, as a major component of the power grid company's total energy consumption (accounting for over 90%), demands higher standards for the refinement and intelligence of loss reduction efforts through its full life-cycle carbon emission management. Existing technologies for predicting line loss rates are inaccurate and can no longer meet the urgent needs of future low-carbon and efficient power grid operation.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a method, apparatus, and electronic device for determining line loss rate prediction, in order to at least solve the technical problem of inaccurate line loss rate prediction in related technologies.

[0005] According to one aspect of the present invention, a method for determining a predicted line loss rate is provided, comprising: acquiring target operating data of a distribution network substation to be predicted; determining, based on the target operating data, target clustering features corresponding to multiple target clustering items and target prediction features corresponding to multiple target prediction items, wherein the multiple target prediction items are selected from multiple candidate feature items by a recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items by the correlation coefficient between the corresponding feature items and the line loss rate; determining the target substation category to which the substation to be predicted belongs based on the target clustering features; retrieving a target prediction model corresponding to the target substation category, wherein the target prediction model is selected from multiple trained models based on the difference between the corresponding predicted line loss rate and the actual line loss rate, and the multiple trained models are respectively configured with different model architectures; and inputting the target prediction features into the target prediction model to obtain a predicted line loss rate value for the substation to be predicted.

[0006] Optionally, before inputting the target prediction features into the target prediction model corresponding to the target transformer substation category to obtain the predicted line loss rate of the substation to be predicted, the method further includes: acquiring historical operating data of the distribution network substations, wherein the distribution network substations include substation samples belonging to the target substation category; extracting the prediction input features and actual line loss rate values ​​corresponding to the target substation category from the historical operating data; training multiple initial models based on the prediction input features and actual line loss rate values ​​corresponding to the target substation category to obtain multiple trained models corresponding to the target substation category, wherein the multiple initial models are configured with different model architectures; inputting the prediction input features into the multiple trained models to obtain the predicted line loss rate values ​​corresponding to the multiple trained models respectively; comparing the predicted line loss rate values ​​corresponding to the multiple trained models with the corresponding actual line loss rate values ​​to determine the scores corresponding to the multiple trained models under preset evaluation indicators; and determining the target prediction model corresponding to the target substation category from the multiple trained models based on the multiple scores.

[0007] Optionally, before determining the target clustering features corresponding to multiple target clustering items and the target prediction features corresponding to multiple target prediction items based on the target operating data, the method further includes: determining the variance inflation coefficients corresponding to the multiple candidate feature items based on the historical operating data of the distribution network area; removing features with variance inflation coefficients greater than a preset threshold from the multiple candidate feature items to obtain a candidate feature set, wherein the variance inflation coefficient is used to measure the degree of multicollinearity among features, and the larger the variance inflation coefficient, the stronger the linear correlation between the corresponding feature and other features; and using a recursive feature elimination cross-validation method to select features from the candidate feature set to obtain the multiple target prediction items, wherein the recursive feature elimination stage of the recursive feature elimination cross-validation method removes feature items in order of increasing importance, and the cross-validation stage is used to evaluate the generalization performance of the feature subset obtained after each removal, and selects a predetermined number of feature items with the highest cross-validation scores as prediction input features.

[0008] Optionally, before determining the target clustering features corresponding to multiple target clustering items and the target prediction features corresponding to multiple target prediction items based on the target operating data, the method further includes: determining the correlation coefficients between the multiple candidate feature items and the line loss rate based on the historical operating data of the distribution network area, thereby obtaining multiple target correlation coefficients; and determining the feature items whose corresponding correlation coefficients satisfy preset conditions as the multiple target clustering items.

[0009] Optionally, before determining the target distribution area category to which the distribution area to be predicted belongs based on the target clustering features, the method further includes: determining the sample clustering features corresponding to each distribution area sample under the multiple target clustering items based on the historical operating data of the distribution network distribution area; performing clustering processing on the multiple distribution area samples according to multiple preset candidate clustering numbers based on the sample clustering features corresponding to each distribution area sample under the multiple target clustering items, obtaining the clustering results corresponding to each preset candidate clustering number; determining the silhouette coefficient corresponding to each preset candidate clustering number based on the clustering results corresponding to each preset candidate clustering number; determining the preset candidate clustering number corresponding to the maximum silhouette coefficient value as the final number of clustering groups; and performing clustering processing on the multiple distribution area samples using a clustering algorithm based on the number of clustering groups, dividing the multiple distribution area samples into multiple distribution area categories, wherein the multiple distribution area categories include the target distribution area category.

[0010] Optionally, determining the target prediction model corresponding to the target transformer area category from the multiple trained models based on multiple scores includes: determining the weight settings corresponding to the multiple preset evaluation indicators when the preset evaluation indicators include the coefficient of determination, mean square error, mean absolute error, maximum error, minimum error and average error; and determining the target prediction model corresponding to the target transformer area category from the multiple trained models based on the scores and weight settings corresponding to the multiple preset evaluation indicators respectively.

[0011] Optionally, inputting the target prediction features into the target prediction model to obtain the predicted line loss rate of the transformer area to be predicted includes: when the target prediction model is a long short-term memory network model, inputting the target prediction features into the long short-term memory network model; determining the time-dependent features based on the target prediction features through the gating structure of the long short-term memory network model, wherein the gating structure selectively retains and discards historical information in the target prediction features; performing a nonlinear transformation on the time-dependent features through the modified linear unit activation function of the long short-term memory network model to obtain a nonlinear mapping feature, wherein the modified linear unit activation function is used to perform a nonlinear transformation on the time-dependent features while alleviating the gradient vanishing problem; and inputting the nonlinear mapping feature into the output layer of the long short-term memory network model to obtain the predicted line loss rate of the transformer area to be predicted.

[0012] According to one aspect of the present invention, a line loss rate prediction determination device is provided, comprising: an acquisition module for acquiring target operating data of a distribution network transformer area to be predicted; a first determination module for determining, based on the target operating data, target clustering features corresponding to multiple target clustering items and target prediction features corresponding to multiple target prediction items, wherein the multiple target prediction items are selected from multiple candidate feature items by a recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items by the correlation coefficient between the corresponding feature items and the line loss rate; a second determination module for determining the target transformer area category to which the transformer area to be predicted belongs based on the target clustering features; a retrieval module for retrieving a target prediction model corresponding to the target transformer area category, wherein the target prediction model is selected from multiple trained models based on the difference between the corresponding predicted line loss rate and the actual line loss rate, and the multiple trained models are respectively configured with different model architectures; and a third determination module for inputting the target prediction features into the target prediction model to obtain the predicted line loss rate of the transformer area to be predicted.

[0013] According to one aspect of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the line loss rate prediction method described in any of the preceding claims.

[0014] According to one aspect of the present invention, a computer-readable storage medium is provided, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the line loss rate prediction method described in any of the preceding claims.

[0015] In this embodiment of the invention, target operating data of the distribution network area to be predicted is obtained; based on the target operating data, target clustering features corresponding to multiple target clustering items and target prediction features corresponding to multiple target prediction items are determined, wherein the multiple target prediction items are selected from multiple candidate feature items through a recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items through the correlation coefficient between the corresponding feature items and the line loss rate; based on the target clustering features, the target distribution network area category to which the area to be predicted belongs is determined; the target prediction model corresponding to the target distribution network area category is retrieved, wherein the target prediction model is selected from multiple trained models based on the difference between the corresponding predicted line loss rate and the actual line loss rate, and the multiple trained models are each set with different model architectures; the target prediction features are input into the target prediction model to obtain the predicted line loss rate value of the area to be predicted. By employing a clustering and multi-model adaptive selection approach, the target clustering features are determined based on the target operating data to identify the target transformer area category to which the area to be predicted belongs. The target prediction model corresponding to the target transformer area category is then retrieved, achieving the goal of matching the corresponding prediction model for different transformer area categories. This improves the accuracy of line loss rate prediction and solves the technical problem of inaccurate line loss rate prediction in related technologies. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of a method for determining the predicted line loss rate according to an embodiment of the present invention;

[0018] Figure 2 This is a schematic diagram of the flow chart of the influencing factors of power distribution network line loss provided by the embodiments of the present invention;

[0019] Figure 3 This is a flowchart illustrating the RFECV method provided by an optional embodiment of the present invention;

[0020] Figure 4 This is a schematic diagram of the goodness-of-fit R² obtained by cross-validation of RFECV according to an optional embodiment of the present invention;

[0021] Figure 5 This is a schematic diagram of the K-means++ clustering algorithm provided in an optional embodiment of the present invention;

[0022] Figure 6 This is a schematic diagram of the silhouette coefficients under different K values ​​in K-means++ provided by an optional embodiment of the present invention;

[0023] Figure 7 This is a schematic diagram of the LR-Bagging algorithm provided in an optional embodiment of the present invention;

[0024] Figure 8 This is a flowchart of the random forest algorithm provided by an optional embodiment of the present invention;

[0025] Figure 9 This is a schematic diagram of the basic structure of a long short-term memory network provided by an optional embodiment of the present invention;

[0026] Figure 10 These are detailed schematic diagrams provided by optional embodiments of the present invention;

[0027] Figure 11 This is a schematic diagram of the complete internal structure of a long short-term memory network provided by an optional embodiment of the present invention;

[0028] Figure 12 This is a schematic diagram of the operation process of an LSTM long short-term memory network provided by an optional embodiment of the present invention;

[0029] Figure 13 This is a schematic diagram of the research process for the influencing factors of distribution network line loss rate provided by an optional embodiment of the present invention;

[0030] Figure 14 This is a comparison chart of predicted and actual values ​​of the first type of LR-Bagging test set provided by an optional embodiment of the present invention;

[0031] Figure 15 This is a comparison chart of predicted and actual values ​​for the second type of LR-Bagging test set provided by an optional embodiment of the present invention;

[0032] Figure 16 This is a comparison chart of predicted and actual values ​​for the third type of LR-Bagging test set provided by an optional embodiment of the present invention;

[0033] Figure 17 This is a comparison chart of predicted and actual values ​​for the fourth type of LR-Bagging test set provided by an optional embodiment of the present invention;

[0034] Figure 18 This is a comparison chart of predicted and actual values ​​for the fifth type of LR-Bagging test set provided by an optional embodiment of the present invention;

[0035] Figure 19 This is a comparison chart of predicted and actual values ​​of the first type of random forest test set provided by an optional embodiment of the present invention;

[0036] Figure 20 This is a comparison chart of predicted and actual values ​​of the second type of random forest test set provided by an optional embodiment of the present invention;

[0037] Figure 21 This is a comparison chart of predicted and actual values ​​of the third type of random forest test set provided by an optional embodiment of the present invention;

[0038] Figure 22 This is a comparison chart of predicted and actual values ​​of the fourth type of random forest test set provided by an optional embodiment of the present invention;

[0039] Figure 23 This is a comparison chart of predicted and actual values ​​of the fifth type of random forest test set provided by an optional embodiment of the present invention;

[0040] Figure 24 This is a comparison chart of predicted and actual values ​​of the first type of LSTM test set provided by an optional embodiment of the present invention;

[0041] Figure 25 This is a comparison chart of predicted and actual values ​​of the second type of LSTM test set provided by an optional embodiment of the present invention;

[0042] Figure 26 This is a comparison chart of predicted and actual values ​​of the third type of LSTM test set provided by an optional embodiment of the present invention;

[0043] Figure 27 This is a comparison chart of predicted and actual values ​​of the fourth type of LSTM test set provided by an optional embodiment of the present invention;

[0044] Figure 28 This is a comparison chart of predicted and actual values ​​of the fifth type of LSTM test set provided by an optional embodiment of the present invention. Detailed Implementation

[0045] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0046] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0047] Example 1

[0048] According to an embodiment of the present invention, an embodiment of a method for determining the predicted value of line loss rate is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0049] Figure 1 This is a flowchart of a method for determining the predicted line loss rate according to an embodiment of the present invention, as follows: Figure 1 As shown, the method includes the following steps:

[0050] Step S102: Obtain the target operating data of the distribution network area to be predicted;

[0051] Among them, the distribution network area refers to the area in the distribution network that is powered by the same distribution transformer. It is used to define the basic unit for line loss prediction, such as area A and area B in a city's distribution network.

[0052] Among them, the distribution area to be predicted refers to the distribution network area where the line loss rate needs to be predicted, such as the target distribution area where the line loss rate needs to be predicted in this case.

[0053] Among them, target operating data refers to the operating parameter data related to line loss rate prediction collected from the transformer area to be predicted. It is used as the data basis for subsequently determining the target clustering characteristics and target prediction characteristics. For example, it includes data such as transformer operating status, rated capacity, input power, power sales, three-phase current and three-phase voltage.

[0054] In this step, target operational data for the area to be predicted is acquired. This step provides a data source for subsequent determination of target clustering characteristics and target prediction characteristics.

[0055] Step S104: Based on the target running data, determine the target clustering features corresponding to multiple target clustering items and the target prediction features corresponding to multiple target prediction items. The multiple target prediction items are selected from multiple candidate feature items by recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items by the correlation coefficient between the corresponding feature items and the line loss rate.

[0056] Among them, the target clustering item refers to the feature item used for clustering and grouping of transformer substations. It includes features that are highly correlated with the line loss rate and are selected from multiple candidate feature items. These features are used to characterize the operating status of the transformer substations, such as power loss, maximum load rate, input power and sales power.

[0057] Among them, the target clustering feature refers to the specific feature value in the target operating data corresponding to the target clustering item, which is used to input the clustering algorithm to determine the category to which the transformer area belongs. For example, the power loss of a transformer area is 316.2 kWh and the maximum load rate is 47.4%.

[0058] The target prediction term refers to the feature term used for line loss rate prediction. The optimal feature combination selected from multiple candidate feature terms through the recursive feature elimination cross-validation method is used to input the prediction model to obtain the predicted value of the line loss rate. Examples include transformer type, no-load loss, power factor, low-voltage power supply radius, and three-phase voltage.

[0059] Among them, the target prediction feature refers to the specific feature value in the target operating data that corresponds to the target prediction item, which is used to input the target prediction model. For example, the transformer type of a certain transformer area is a distribution transformer, the no-load loss is 0.1135 kW, and the power factor is 0.9615.

[0060] Among them, the recursive feature elimination and cross-validation method refers to a feature selection method that combines recursive feature elimination and cross-validation. It is used to select the feature combination with the best prediction performance from candidate feature terms, which can improve the accuracy and generalization ability of the prediction model.

[0061] Among them, candidate features refer to the types of features that can be selected and are related to line loss rate prediction, including operating parameters and equipment parameters, such as transformer type, rated capacity, input power, power sales, three-phase current and three-phase voltage.

[0062] Among them, the line loss rate refers to the proportion of electricity lost by a distribution network area during the transmission and distribution of electricity to the input electricity, and is used to measure the operating economy of the area.

[0063] The correlation coefficient is a statistic used to measure the degree of linear correlation between a feature and the line loss rate. It is used to select features that are strongly correlated with the line loss rate as clustering input features.

[0064] In this step, target clustering features for clustering and target prediction features for prediction are determined from the target running data. This step filters out feature combinations suitable for cluster analysis and prediction modeling, ensuring that both clustering and prediction use optimal feature inputs, reducing the impact of irrelevant features on clustering results and prediction accuracy.

[0065] Step S106: Determine the target area category to which the predicted area belongs based on the target clustering characteristics;

[0066] The target transformer area category refers to the specific transformer area category to which the transformer area to be predicted is classified after clustering. This category is used to determine which target prediction model should be retrieved for the transformer area, such as category A or category B.

[0067] In this step, the target clustering features are input into the clustering algorithm to determine the target substation category to which the substation to be predicted belongs. This step assigns the substation to an existing substation category, enabling the use of the prediction model corresponding to that category.

[0068] Step S108: Retrieve the target prediction model corresponding to the target area category. The target prediction model is selected from multiple trained models based on the difference between the predicted line loss rate and the actual line loss rate. The multiple trained models have different model architectures.

[0069] The target prediction model refers to the optimal prediction model corresponding to the target transformer area category. It is a model selected from multiple trained models based on prediction performance and is used to predict the line loss rate of the transformer area to be predicted. For example, when the transformer area to be predicted belongs to category A, the LSTM model corresponding to category A is called.

[0070] Among them, the trained model refers to the prediction model that has been trained in advance using historical data. It includes a variety of different model architectures, which are used to provide alternative prediction models for different types of transformer substations, such as LSTM model and random forest model.

[0071] The predicted line loss rate refers to the predicted line loss rate output by the trained model, which is used to compare with the actual line loss rate to evaluate the model performance. For example, the predicted value output by a certain LSTM model is 4.17%.

[0072] The actual line loss rate refers to the actual line loss rate in the transformer area, which is used as a benchmark for evaluating the accuracy of the prediction model. For example, the actual line loss rate in this transformer area is 4.50%.

[0073] Among them, model architecture refers to the network structure or algorithm type of the prediction model. Different model architectures are suitable for different data characteristics and can provide a variety of optional models for different types of transformer substations, such as linear regression Bagging model, random forest model and long short-term memory network model.

[0074] In this step, the target prediction model corresponding to the category to which the transformer area to be predicted belongs is retrieved. This step enables different transformer area categories to use their respective optimal prediction models, improving the relevance and accuracy of the predictions.

[0075] Step S110: Input the target prediction features into the target prediction model to obtain the predicted line loss rate of the transformer area to be predicted.

[0076] Among them, the predicted line loss rate refers to the estimated line loss rate of the transformer area to be predicted, which is calculated by the target prediction model and is used to reflect the future line loss level of the transformer area. For example, the predicted line loss rate of a transformer area is 4.5%.

[0077] In this step, the target prediction features are input into the retrieved target prediction model to calculate the predicted line loss rate for the area to be predicted. This step then outputs the predicted line loss rate for the area to be predicted.

[0078] Through steps S102-S110 above, target operating data of the distribution network area to be predicted is obtained; based on the target operating data, target clustering features corresponding to multiple target clustering items and target prediction features corresponding to multiple target prediction items are determined. The multiple target prediction items are selected from multiple candidate feature items using a recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items based on the correlation coefficient between the corresponding feature item and the line loss rate; based on the target clustering features, the target distribution network area category to which the area to be predicted belongs is determined; the target prediction model corresponding to the target distribution network area category is retrieved. The target prediction model is selected from multiple trained models based on the difference between the corresponding predicted line loss rate and the actual line loss rate, and each of the multiple trained models has a different model architecture; the target prediction features are input into the target prediction model to obtain the predicted line loss rate value of the area to be predicted. By employing a clustering and multi-model adaptive selection approach, the target clustering features are determined based on the target operating data to identify the target transformer area category to which the area to be predicted belongs. The target prediction model corresponding to the target transformer area category is then retrieved, achieving the goal of matching the corresponding prediction model for different transformer area categories. This improves the accuracy of line loss rate prediction and solves the technical problem of inaccurate line loss rate prediction in related technologies.

[0079] As an optional embodiment, before inputting the target prediction features into the target prediction model corresponding to the target transformer substation category to obtain the predicted line loss rate of the substation to be predicted, the method further includes: acquiring historical operating data of the distribution network substations, wherein the distribution network substations include substation samples belonging to the target substation category; extracting the prediction input features and the actual line loss rate values ​​corresponding to the target substation category from the historical operating data; training multiple initial models based on the prediction input features and the actual line loss rate values ​​corresponding to the target substation category to obtain multiple trained models corresponding to the target substation category, wherein the multiple initial models are configured with different model architectures; inputting the prediction input features into the multiple trained models to obtain the predicted line loss rate values ​​corresponding to the multiple trained models respectively; comparing the predicted line loss rate values ​​corresponding to the multiple trained models with the corresponding actual line loss rate values ​​to determine the scores corresponding to the multiple trained models under preset evaluation indicators; and determining the target prediction model corresponding to the target substation category from the multiple trained models based on the multiple scores.

[0080] Historical operating data refers to the operating parameter data collected by the distribution network area within a historical time period, which is used to train the prediction model. This data includes, for example, transformer type, rated capacity, input power, power sales, three-phase current, and comprehensive line loss rate.

[0081] Among them, the transformer area sample refers to each transformer area instance in the distribution network that belongs to the target transformer area category. It is used to provide training data to train the prediction model of the corresponding category, such as 100 transformer areas in category A.

[0082] Among them, the predicted input features refer to the specific feature values ​​corresponding to the feature terms used to input the prediction model for predicting line loss rate. For example, the transformer type of a certain transformer area is a distribution transformer, the no-load loss is 0.1135 kW, and the power factor is 0.9615.

[0083] The initial model refers to a prediction model that has not yet been trained. It has a specific model architecture and is used to obtain a trained model through training, such as an untrained LSTM network structure.

[0084] It should be noted that the model architecture can be one of the following: For example, the linear regression Bagging model uses linear regression as the basic learner, trains multiple linear regression sub-models through a Bagging ensemble strategy, and then averages and fuses the outputs of each sub-model. Bagging constructs multiple training subsets by bootstrapping the training samples, trains a basic regressor in each subset, and finally integrates and averages the predictions of all regressors. This approach reduces the sensitivity of a single linear model to outliers, enhancing the model's stability and generalization ability. This model is suitable for transformer substations where the data features and line loss rate exhibit an approximately linear relationship and the data distribution is relatively stable. For transformer substations with stable operating conditions, small load fluctuations, and no significant abrupt changes, the linear regression Bagging model can maintain high computational efficiency while ensuring prediction accuracy. For example, when the load rate of a certain type of transformer substation remains stable for a long time, and the time-series changes of three-phase current and three-phase voltage are relatively smooth, the line loss rate of this type of substation is less affected by nonlinear factors, and the linear regression Bagging model can achieve ideal prediction results. For example, the random forest model consists of multiple decision trees. During training, training samples are randomly sampled, and features are randomly subspaced to train multiple regression trees. Finally, the outputs of each tree are averaged to obtain the final prediction. By introducing sample and feature randomness, this model effectively reduces the risk of overfitting from a single decision tree, can handle nonlinear relationships between features and target variables, and exhibits good robustness and feature adaptability. Compared to the linear regression Bagging model, the random forest model can capture more complex nonlinear mapping relationships; compared to the Long Short-Term Memory network model, the random forest model does not need to consider the time series order of the data, resulting in faster training speed and stronger interpretability. This model is suitable for transformer substations where there is a complex nonlinear relationship between features and line loss rate, but the time series dependencies between data are not strong. For transformer substations where the operating status is affected by multiple factors, the coupling relationships between these factors are complex, but the time series patterns are not significant, the random forest model can effectively capture the nonlinear interactions between multidimensional features. For example, when the line loss rate of a certain type of distribution area is affected by multiple factors such as transformer configuration, power supply radius, and load rate, and these factors have complex coupling relationships, the random forest model can automatically learn the importance of each feature and the nonlinear mapping law through the ensemble of multiple decision trees. The preset evaluation index refers to the pre-defined evaluation standard used to measure the predictive performance of the model, and is used for quantitative comparison of multiple trained models, such as the coefficient of determination, mean squared error, and mean absolute error.For example, the Long Short-Term Memory (LSTM) network model is a recurrent neural network model suitable for processing time-series data. Through a gating structure (including forget gates, input gates, and output gates), it selectively retains and discards historical information, effectively learning long-term dependencies in time-series data. The model's three-layer structure includes an input layer, a hidden layer, and an output layer. The hidden layer incorporates a self-recurrent mechanism to maintain connections between neurons, thus capturing the patterns of data evolution over time. Compared to linear regression (Bagging) and random forest models, the biggest advantage of the LTM network model is its ability to explicitly model sequential dependencies in time series data. This model is suitable for transformer substations where line loss rates are significantly affected by time-series factors and load fluctuations exhibit clear temporal regularities. For substations where electricity consumption is heavily influenced by factors such as time-of-use pricing, seasonal variations, and differences between weekdays and holidays, changes in line loss rates depend not only on the current operating status but also on load trends at multiple past time points. The LTM network model, through its gating structure, can extract temporal dependency features from data across multiple consecutive time steps, thereby more accurately capturing the evolution of line loss rates over time. For example, for transformer areas where the line loss rate differs significantly between peak and off-peak load periods, and where electricity consumption behavior differs greatly between holidays and weekdays, the Long Short-Term Memory (LSTM) network model can use historical time-series information to make more accurate predictions of the line loss rate at the current moment.

[0085] Among them, the score refers to the quantitative value calculated based on the preset evaluation index to measure the predictive performance of the model, and is used to compare the merits of different trained models. For example, the coefficient of determination is 0.96.

[0086] In this embodiment, for a target transformer substation category, historical operational data for that category is acquired, and corresponding predictive input features and true line loss rates are extracted. Multiple initial models with different model architectures are trained using this data, resulting in multiple trained models for that category. Then, each trained model is scored using a preset evaluation metric. Finally, the target predictive model for that category is determined from among the multiple trained models based on the scores. This approach employs a multi-model training and optimization mechanism for each transformer substation category to select the optimal predictive model best suited to the data characteristics of that category. This avoids the problem of a single model being unable to adapt to the data characteristics of all transformer substation categories, leading to a decrease in prediction accuracy. Furthermore, since different model architectures have different fitting capabilities for different types of nonlinear relationships, training and comparing multiple models using data from the same category allows for the selection of the model with the strongest generalization ability and smallest prediction error under the data distribution characteristics of that category. This provides a more accurate dedicated predictive model for predicting the line loss rate of subsequent transformer substations.

[0087] As an optional embodiment, before determining the target clustering features corresponding to multiple target clustering items and the target prediction features corresponding to multiple target prediction items based on the target operating data, the method further includes: determining the variance inflation coefficients corresponding to multiple candidate feature items based on the historical operating data of the distribution network area; removing features with variance inflation coefficients greater than a preset threshold from the multiple candidate feature items to obtain a candidate feature set, wherein the variance inflation coefficient is used to measure the degree of multicollinearity among features, and the larger the variance inflation coefficient, the stronger the linear correlation between the corresponding feature and other features; and using a recursive feature elimination cross-validation method to select features from the candidate feature set to obtain multiple target prediction items, wherein the recursive feature elimination stage of the recursive feature elimination cross-validation method removes feature items in order of increasing importance, and the cross-validation stage is used to evaluate the generalization performance of the feature subset obtained after each removal, and selects a predetermined number of feature items with the highest cross-validation scores as prediction input features.

[0088] The variance inflation coefficient is a quantitative indicator used to measure the degree of multicollinearity among features. The larger the variance inflation coefficient, the stronger the linear correlation between the corresponding feature and other features. It is used to identify and eliminate redundant features. For example, the variance inflation coefficient of a certain feature is 15.

[0089] The preset threshold refers to the critical value of the variance inflation coefficient set in advance, which is used to determine whether there is strong multicollinearity in the features. For example, the threshold can be set to 10.

[0090] The candidate feature set refers to the set of features remaining after removing features with a variance inflation coefficient greater than a preset threshold from multiple candidate feature items. It is used as the input for subsequent recursive feature elimination cross-validation.

[0091] Multicollinearity refers to a strong linear correlation between feature terms, which leads to unstable model parameter estimation and reduced interpretability. It is used to identify redundant features that need to be removed.

[0092] The feature subset refers to a set of features selected from the candidate feature set, which is used to input the prediction model for training and prediction.

[0093] Generalization performance refers to the model's predictive performance on data that was not used for training, and is used to evaluate the stability and applicability of feature subsets under different data partitions.

[0094] Importance refers to the degree to which a feature contributes to the prediction result, and is used to determine the order in which features are removed. For example, the importance score of a feature is 0.12.

[0095] The cross-validation score refers to the quantitative value obtained by evaluating the predictive performance of a feature subset through cross-validation. It is used to compare the merits of different feature subsets. For example, the cross-validation score of a certain feature subset is 0.93.

[0096] Among them, the predicted input features refer to the feature items that are finally selected and used to input into the prediction model for line loss rate prediction, such as transformer type, no-load loss, and power factor.

[0097] In this embodiment, the variance inflation coefficient of each candidate feature item is first calculated to eliminate features with multicollinearity to reduce information redundancy, resulting in a candidate feature set. Then, a recursive feature elimination cross-validation method is used to sort the candidate feature set by importance and evaluate the generalization performance of each feature subset. A predetermined number of feature items with the highest cross-validation scores are selected as the prediction input features. This approach first uses the variance inflation coefficient to eliminate features with strong multicollinearity, effectively reducing information redundancy between features and avoiding model parameter instability and overfitting risks caused by high feature correlation. Furthermore, the recursive feature elimination cross-validation method is used to select the feature combination that contributes most to the prediction, further optimizing the feature input while ensuring feature independence. This reduces the model input dimensionality, lowers computational complexity, and simultaneously improves the model's prediction accuracy and generalization ability.

[0098] As an optional embodiment, before determining the target clustering features corresponding to multiple target clustering items and the target prediction features corresponding to multiple target prediction items based on the target operating data, the method further includes: determining the correlation coefficients between multiple candidate feature items and line loss rates based on the historical operating data of the distribution network area, thereby obtaining multiple target correlation coefficients; and determining the feature items whose corresponding correlation coefficients meet preset conditions as multiple target clustering items.

[0099] The target correlation coefficient refers to the specific value of the correlation coefficient between each candidate feature and the line loss rate, which is used to determine whether the feature meets the preset conditions. For example, the correlation coefficient between a certain feature and the line loss rate is 0.72.

[0100] Among them, the preset conditions refer to the pre-set screening criteria that the correlation coefficient must meet, which are used to select features that are sufficiently correlated with the line loss rate from multiple candidate features, such as a correlation coefficient absolute value greater than 0.5.

[0101] In this embodiment, the correlation coefficient between each candidate feature and the line loss rate is calculated, and the feature with the correlation coefficient meeting the preset condition is determined as the target clustering item. In this way, the features with the strongest correlation with the line loss rate can be selected from a large number of candidate features as clustering inputs, avoiding the problem of irrelevant features being introduced into the clustering algorithm due to too many input dimensions. This makes the clustering results more reflective of the essential differences in the line loss level of the transformer substations, thereby ensuring the effectiveness and rationality of the clustering.

[0102] As an optional embodiment, before determining the target distribution area category to which the distribution area to be predicted belongs based on the target clustering features, the method further includes: determining the sample clustering features corresponding to each distribution area sample under multiple target clustering items based on the historical operation data of the distribution network distribution area; performing clustering processing on multiple distribution area samples according to multiple preset candidate clustering numbers based on the sample clustering features corresponding to each distribution area sample under multiple target clustering items, obtaining the clustering results corresponding to each preset candidate clustering number; determining the silhouette coefficient corresponding to each preset candidate clustering number based on the clustering results corresponding to each preset candidate clustering number; determining the preset candidate clustering number corresponding to the maximum silhouette coefficient value as the final number of clustering groups; and performing clustering processing on multiple distribution area samples using a clustering algorithm based on the number of clustering groups, dividing the multiple distribution area samples into multiple distribution area categories, wherein the multiple distribution area categories include the target distribution area category.

[0103] Among them, sample clustering features refer to the specific feature values ​​in historical operating data that correspond to the target clustering item. These features are used to input the clustering algorithm to determine the category to which the sample in a certain transformer area belongs. For example, the power loss of a certain transformer area is 316.2 kWh and the maximum load rate is 47.4%.

[0104] The preset number of candidate clusters refers to the number of candidate clusters set in advance, which is used to determine the optimal number of clusters through evaluation, such as K=2, K=3, K=4.

[0105] The clustering result refers to the grouping result of the transformer area samples after clustering multiple transformer area samples according to a certain preset number of candidate clusters. It is used to calculate the silhouette coefficient to evaluate the clustering effect.

[0106] The silhouette coefficient is a comprehensive index used to evaluate the quality of clustering. Its value ranges from -1 to 1. The larger the value, the better the clustering effect. It is used to determine the optimal number of clusters from multiple preset candidate clusters. For example, when K=9, the silhouette coefficient is 0.462.

[0107] The number of clusters refers to the total number of categories for clustering the samples in the transformer area, which is used to divide multiple transformer area samples into multiple transformer area categories, such as dividing the transformer area into 9 categories.

[0108] Clustering algorithms refer to computational methods used to cluster samples from power distribution areas, which can group power distribution areas with similar operating characteristics into the same category, such as the K-means++ clustering algorithm.

[0109] Among them, the transformer area category refers to the grouping of transformer areas obtained by clustering multiple transformer area samples. Transformer areas in the same category have similar operational characteristics, such as category 1 and category 2.

[0110] In this embodiment, the clustering features of samples from each transformer substation under multiple target clustering items are first obtained. Then, clustering is performed according to multiple preset candidate cluster numbers, and the corresponding silhouette coefficients are calculated. The number of clusters corresponding to the maximum silhouette coefficient value is determined as the final number of clusters. Finally, a clustering algorithm is used to divide the samples from multiple transformer substations into multiple substation categories according to this number. In this way, the silhouette coefficient is used to quantitatively evaluate the clustering effect under different numbers of clusters, which can objectively and adaptively determine the optimal number of clusters. This avoids the subjectivity of manually setting the number of clusters and ensures the intra-cluster compactness and inter-cluster separability of the clustering results. This makes transformer substations of the same category highly similar in operating characteristics and transformer substations of different categories significantly different in operating characteristics, thus providing a reasonable category division basis for subsequent matching of each category with a dedicated prediction model.

[0111] As an optional embodiment, a target prediction model corresponding to the target transformer area category is determined from multiple trained models based on multiple scores, including: determining the weight settings corresponding to multiple preset evaluation indicators when the preset evaluation indicators include the coefficient of determination, mean square error, mean absolute error, maximum error, minimum error and average error; and determining the target prediction model corresponding to the target transformer area category from multiple trained models based on the scores and weight settings corresponding to the multiple preset evaluation indicators.

[0112] The coefficient of determination is an evaluation index that measures the goodness of fit of a model. It ranges from 0 to 1. The larger the value, the better the model fits the data. It is used to evaluate the explanatory power of the model. For example, the coefficient of determination is 0.96.

[0113] The mean squared error (MSE) is the average of the squares of the differences between the predicted and actual values. A smaller MSE indicates a smaller prediction error and is used to evaluate the prediction accuracy of the model. For example, an MSE of 0.00113 is used.

[0114] The mean absolute error (MAE) is the average of the absolute differences between the predicted and actual values. A smaller value indicates a smaller prediction error and is used to evaluate the prediction accuracy of the model. For example, the MAE is 0.02136.

[0115] The maximum error refers to the maximum difference between the predicted value and the actual value, and is used to evaluate the prediction bias of the model in the worst case. For example, the maximum error is 7.47%.

[0116] The minimum error refers to the minimum difference between the predicted value and the true value, and is used to evaluate the prediction bias of the model under the best conditions. For example, the minimum error is 0.04%.

[0117] The mean error refers to the average difference between the predicted value and the actual value, and is used to evaluate the overall central tendency of the model's prediction bias. For example, the mean error is 4.17%.

[0118] The weight setting refers to the different weight coefficients assigned to different preset evaluation indicators, which are used to reflect the importance of each indicator in the comprehensive evaluation of multiple indicators. For example, the coefficient of determination has a weight of 0.4 and the mean square error has a weight of 0.3.

[0119] In this embodiment, given that the preset evaluation indicators include the coefficient of determination, mean squared error, mean absolute error, maximum error, minimum error, and average error, the weight settings for each indicator are determined. Then, based on the scores of each model under each indicator and their corresponding weights, a comprehensive calculation is performed to determine the target prediction model from multiple trained models. This method uses a six-dimensional indicator system (coefficient of determination, mean squared error, mean absolute error, maximum error, minimum error, and average error) to comprehensively evaluate the model. Compared to using a single evaluation indicator, this approach more comprehensively and objectively reflects the model's predictive performance across different dimensions. Furthermore, by setting weights for different indicators, the importance of each indicator in model selection can be flexibly adjusted according to actual application needs, ensuring that the final selected target prediction model better matches the actual business requirements for prediction accuracy.

[0120] As an optional embodiment, the target prediction features are input into the target prediction model to obtain the predicted line loss rate of the transformer area to be predicted. This includes: if the target prediction model is a long short-term memory network model, inputting the target prediction features into the long short-term memory network model; determining the time-dependent features based on the target prediction features through the gating structure of the long short-term memory network model, wherein the gating structure selectively retains and discards historical information in the target prediction features; performing a nonlinear transformation on the time-dependent features through the modified linear unit activation function of the long short-term memory network model to obtain nonlinear mapping features, wherein the modified linear unit activation function is used to perform nonlinear transformation on the time-dependent features while alleviating the gradient vanishing problem; and inputting the nonlinear mapping features into the output layer of the long short-term memory network model to obtain the predicted line loss rate of the transformer area to be predicted.

[0121] Among them, the Long Short-Term Memory Network model refers to a recurrent neural network model suitable for processing time series data. Through the gating structure, it can learn long-term dependencies in the data and is used to predict the line loss rate of transformer operation data with time series characteristics.

[0122] Among them, the gating structure refers to the structural unit in the long short-term memory network model used to control the flow of information, including the forget gate, input gate and output gate, which are used to selectively retain and discard historical information in the target prediction features. For example, the forget gate decides which historical information to discard and the input gate decides which new information to store.

[0123] Among them, time-dependent features refer to the feature representations with time-series correlation extracted from the target prediction features by the Long Short-Term Memory Network Model, which are used to reflect the pattern of changes in the operating data of the transformer area over time, such as the trend of load changes over time.

[0124] Historical information refers to information in the target prediction features that is related to past time steps, which is used to selectively pass to the current time step through a gating structure, such as the load value and line loss rate at the previous moment.

[0125] Among them, the modified linear unit activation function refers to an activation function used for nonlinear transformation of neural networks. It maintains linear output when the input value is greater than 0 and outputs 0 when the input value is less than or equal to 0. It is used to perform nonlinear transformation on time-dependent features while alleviating the gradient vanishing problem, such as the ReLU activation function.

[0126] Among them, the nonlinear mapping feature refers to the feature representation obtained after the time-dependent feature is transformed by the nonlinear transformation of the modified linear unit activation function, which is used as input to the output layer to obtain the line loss rate prediction value.

[0127] The output layer, which refers to the last layer of the Long Short-Term Memory network model, is used to convert the nonlinear mapping features into the final line loss rate prediction value output, such as a fully connected layer.

[0128] In this embodiment, when the target prediction model is a Long Short-Term Memory (LSTM) network model, the time-dependent features in the target prediction features are extracted through the gating structure of the model. Then, the time-dependent features are nonlinearly transformed using a modified linear unit activation function (MRU), and finally, the predicted line loss rate is output by the output layer. This method effectively extracts the time-dependent features from the transformer area operation data using the gating structure of the LTM network model, capturing the long-term dependence patterns of load changes over time and improving the prediction accuracy for transformer area data with time-series characteristics. Simultaneously, the introduction of a modified MRU into the LTM network model for nonlinear transformation of the time-dependent features leverages the MRU's characteristic of maintaining linear output when the input value is greater than 0 and outputting 0 when it is less than or equal to 0. This enhances the model's ability to fit complex nonlinear features while effectively mitigating the gradient vanishing problem and accelerating model convergence. This allows the model to more accurately learn the deep mapping patterns between the transformer area line loss rate and multidimensional input features, maintaining stable prediction performance, especially under scenarios with drastic load fluctuations.

[0129] Based on the above embodiments and optional embodiments, an optional implementation method is provided, which is described in detail below.

[0130] In related technologies, the line loss rate of distribution network areas is an important indicator for measuring the economic efficiency and management level of power supply and distribution systems. It can reflect the loss of electricity caused by factors such as lines, equipment and operation management during the transmission and distribution process. With the continuous expansion of the scale of distribution networks and the rapid growth of the number of distribution areas, the operating environment of distribution areas is complex and changeable. The factors affecting line loss are characterized by multi-source heterogeneity, nonlinear coupling and strong time-varying characteristics, which makes the prediction of line loss rate face great challenges. The following problems are common: (1) The differences between distribution areas are not fully considered: Different distribution areas have significant differences in transformer configuration, load structure, operating status and power supply radius. It is difficult for a single prediction model to be applicable to all distribution areas at the same time. (2) Feature redundancy and multicollinearity affect the modeling effect: Variables such as input electricity, electricity sales, three-phase voltage and three-phase current in the operation data of distribution areas often have strong correlations. If they are not effectively screened, it is easy to lead to increased model complexity, unstable training and decreased interpretability. (3) Lack of differentiated prediction mechanism after clustering: Existing methods mostly model the full data directly without clustering based on the operating characteristics of the transformer substations, resulting in strong sample heterogeneity and insufficient model fitting ability for local patterns. (4) Lack of model optimization mechanism for different transformer substation categories: Different categories of transformer substations are suitable for different prediction methods. Some are suitable for tree models, some for linear ensemble models, and some for deep learning models. Without classification model selection, it is difficult to obtain the overall optimal prediction effect.

[0131] In view of this, an optional embodiment of the present invention provides a method for predicting line loss rate of distribution network transformer areas based on clustering and multi-model integration. By preprocessing, feature filtering, clustering and differentiated modeling of transformer area data, the method improves the accuracy of line loss rate prediction, reduces model error, and achieves adaptive prediction for different types of transformer areas.

[0132] To achieve the above objectives, the present invention adopts the following technical solution:

[0133] A method for predicting line loss rate in distribution network areas based on clustering and multi-model ensemble includes the following steps:

[0134] S1: Data acquisition and preprocessing;

[0135] Historical operation data of the distribution network area are collected, and the data is processed by missing value handling, categorical variable encoding and numerical standardization to obtain a standardized dataset that can be used for modeling.

[0136] S2: Cluster feature selection;

[0137] Based on the correlation analysis between the overall line loss rate and various operational characteristics, features with a high correlation to the line loss rate are selected as clustering input features.

[0138] S3: Predictive Feature Filtering;

[0139] Based on variance inflation coefficient (VIF) analysis, features with strong multicollinearity are eliminated, and then the final feature set used for predictive modeling is determined by recursive feature elimination cross-validation (RFECV).

[0140] S4: Cluster analysis of transformer areas;

[0141] Clustering algorithms were used to group the samples in the transformer area into multiple categories; the silhouette coefficient was used to evaluate the clustering effect under different clustering parameters and determine the optimal clustering result.

[0142] S5: Establish multiple prediction models;

[0143] For each cluster category, LR-Bagging, Random Forest, and LSTM models are constructed to predict the overall line loss rate.

[0144] S6: Model Evaluation and Selection;

[0145] For each cluster category, the coefficient of determination R², mean squared error MSE, mean absolute error MAE, maximum error, minimum error, and average error of the three models are calculated, and the optimal prediction model for that category is selected based on the evaluation index.

[0146] S7: Output the prediction results;

[0147] The prediction results of the optimal model are output as the final comprehensive line loss rate prediction value, which is used for line loss analysis, anomaly identification, and operation and maintenance decision support.

[0148] Compared with existing technologies, this invention achieves refined modeling of the comprehensive line loss rate of different types of distribution network areas by preprocessing, feature filtering, clustering, and multi-model adaptive prediction of distribution network area data. This effectively improves prediction accuracy and model generalization ability. At the same time, it reduces the impact of feature redundancy and multicollinearity on the modeling results, reduces computational complexity, and provides reliable data support for distribution network line loss analysis and operation and maintenance decisions, thus having good engineering application value.

[0149] Specifically, it will be introduced below:

[0150] S1: Collect and preprocess historical operational data of the transformer area;

[0151] 1.1 Data Acquisition;

[0152] Historical operational data of a distribution network area in a certain region is collected. The data sample includes, but is not limited to, the following fields: transformer type, rated capacity, no-load loss, no-load current, power factor, low-voltage supply radius, maximum load rate, load rate at maximum load moment, three-phase current, three-phase voltage, input power, output power, electricity sold, power loss, and comprehensive line loss rate. Among them, the comprehensive line loss rate is used as the target prediction variable, and the other features are used as input variables or candidate features.

[0153] 1.2 Handling missing values;

[0154] (1) For the collected raw data, if there are missing values, the following processing method shall be adopted:

[0155] (2) For numerical variables, the mean, median or nearest neighbor sample can be used for imputation;

[0156] (3) For categorical variables, the mode can be used to impute missing categories or a separate missing category can be set;

[0157] (4) Samples or features with an excessively high proportion of abnormal missing data can be directly removed.

[0158] Therefore, in the implementation case, the combination of "median imputation and missing rate threshold removal" is preferred to reduce the impact of extreme values ​​on the data distribution.

[0159] 1.3 Categorical Feature Coding;

[0160] For categorical variables such as transformer type, one-hot encoding is used to transform them into numerical vectors that can be used in machine learning models. For example, if transformer types include distribution transformers and special-purpose transformers, then each type corresponds to a number of 0 / 1 feature bits.

[0161] 1.4 Normalization of numerical features;

[0162] To eliminate the influence of different units on model training, continuous variables are subjected to minimum-maximum normalization, and the formula (1) is as follows:

[0163] (1)

[0164] in: These are the original eigenvalues; These are the normalized eigenvalues; This is the minimum value of the feature; This is the maximum value of this feature.

[0165] After the above processing, all numerical features are compressed to a uniform interval, preferably [0,1], to facilitate subsequent model training and cluster analysis.

[0166] S2: Filtering clustering input features based on correlation analysis;

[0167] Because clustering algorithms are sensitive to input dimensionality, too many input features can easily introduce irrelevant features and reduce the clustering effect. Therefore, this invention first analyzes the correlation between each feature and the overall line loss rate, and prioritizes retaining features that are significantly related to the line loss rate as clustering input.

[0168] 2.1 Correlation analysis method;

[0169] In one embodiment, the Pearson correlation coefficient is used to calculate the degree of linear correlation between the characteristics and the overall line loss rate, and its formula (2) is as follows:

[0170] (2)

[0171] in, Let be a certain feature value of the i-th sample; Let i be the combined line loss rate for i samples; and These are the corresponding means; n is the sample size.

[0172] 2.2 Clustering Feature Selection Rules;

[0173] After data preprocessing, exploratory data analysis was conducted on each candidate influencing factor, specifically including the following steps:

[0174] 2.2.1 Quantification and ranking of association strength;

[0175] The linear correlation between the overall line loss rate and various influencing factors was analyzed; the correlation coefficient was used to quantitatively evaluate the strength of the correlation between each feature and the overall line loss rate, and the features were sorted in descending order according to the absolute value of the correlation coefficient.

[0176] 2.2.2 Task-oriented feature selection;

[0177] Based on the requirements of the transformer area clustering task, suitable influencing factors as clustering input are selected from the candidate features; at the same time, based on the requirements of the line loss rate prediction task, suitable influencing factors as prediction model input are selected from the candidate features.

[0178] 2.2.3 Specific determination of clustering input features;

[0179] For the cluster analysis task, features that are strongly correlated with the comprehensive line loss rate and can characterize the operating status, load characteristics and loss level of the transformer area are selected as cluster input features. Specifically, by calculating the correlation coefficient between each candidate feature and the comprehensive line loss rate, and sorting them according to the absolute value of the correlation coefficient from large to small, several highly correlated features are selected.

[0180] Based on the data from the distribution area operation, the final clustering input features include: power loss, distribution transformer, maximum load rate, load rate at maximum load time, input power, and power sales.

[0181] The power loss is used to reflect the power loss level of the distribution area; the distribution transformer is used to characterize the configuration of the power supply equipment; the maximum load rate and the maximum load moment load rate are used to reflect the peak operating pressure and load utilization of the distribution area; the input power and the sales power respectively characterize the scale of power input and the actual sales scale, and the difference is used to indirectly reflect the line loss.

[0182] 2.2.4 Feature Iterative Optimization Based on Implementation Cases;

[0183] The determination of the input features is verified and corrected in conjunction with implementation cases; specifically, it includes: performing correlation analysis and preliminary screening of all candidate influencing factors based on historical sample data from multiple transformer substations; inputting the screened features into clustering models and prediction models for training and testing, and iteratively optimizing the feature set based on the model performance;

[0184] If a feature fluctuates significantly across different sample sets or contributes less than a preset threshold to the clustering results, it will be removed; if a feature demonstrates stable discriminative and explanatory power across different sample sets, it will be retained as the final input feature.

[0185] Figure 2 This is a schematic diagram of the flow chart of the influencing factors of power distribution network line loss provided by the embodiments of the present invention.

[0186] S3: Feature selection for prediction modeling based on variance inflation factor (VIF) and recursive feature elimination model (RFECV);

[0187] 3.1 Eliminating multicollinearity based on VIF analysis;

[0188] There are often strong correlations among the features used in line loss prediction. Direct modeling can easily lead to unstable model parameters, decreased interpretability, and increased risk of overfitting. Therefore, this invention identifies and eliminates collinear features using the variance inflation factor (VIF).

[0189] 3.1.1 VIF Calculation Formula;

[0190] For the j-th feature, it is defined by formula (3):

[0191] (3)

[0192] In the formula This represents the variance inflation coefficient of the i-th variable. R² represents the coefficient of determination when the i-th variable is used as an independent variable in a regression.

[0193] 3.1.2 Removal Rules;

[0194] After the initial screening of candidate features, the VIF (Variable Interest Scale) is further used to test for multicollinearity among features, in order to eliminate highly correlated and redundant features and improve the independence and stability of the model input. Specifically, when the VIF value of a feature is greater than a preset threshold, the feature is considered to have strong multicollinearity, preferably set to 10. For features with a VIF value greater than 10, they are eliminated in descending order of VIF value, and the VIF value of the remaining features is recalculated after each elimination, until the VIF value of all retained features is lower than the threshold.

[0195] Furthermore, the determination of the input features is preferably verified and optimized in conjunction with implementation cases. Specifically, based on historical transformer area sample data, candidate features with a strong correlation to the comprehensive line loss rate are first screened out through correlation coefficient analysis; then, VIF is used to perform collinearity testing on the candidate features to eliminate variables with significant redundancy; on this basis, the remaining features are input into the clustering model or prediction model for training, and the model performance is evaluated through implementation cases, including indicators such as cluster category discrimination, prediction error, stability, and generalization performance.

[0196] For example, in several historical transformer area samples, although "input electricity" and "sales electricity" are somewhat correlated with the comprehensive line loss rate, there is also a strong linear dependence between them, which can easily lead to the repeated expression of the same type of information by features. Similarly, the A-phase voltage and C-phase voltage show similar trends in multiple transformer area samples and have a strong coupling relationship with other voltage indicators, thus exhibiting a high inflation factor in the VIF test. Implementation case studies have shown that after removing the aforementioned highly collinear features, the model input dimension is more compact, the training process is more stable, the intra-class consistency and inter-class separability of the clustering results are improved, and the prediction model error is correspondingly reduced.

[0197] 3.2 Filtering final prediction features based on RFECV;

[0198] Even after VIF elimination, some features may still contribute weakly to the prediction. To further optimize the combination of input variables, this invention employs the RFECV method for recursive feature elimination and combines it with cross-validation to determine the final feature subset.

[0199] 3.2.1 RFECV principle;

[0200] Figure 3 This is a flowchart illustrating the RFECV method provided in an optional embodiment of the present invention.

[0201] (1) RFE stage;

[0202] 1) The initial feature set selects all available features;

[0203] 2) Use feature sets for model design and calculate feature importance;

[0204] 3) Delete one or more of the least important features and update the feature set;

[0205] 4) Repeat the modeling, importance calculation, feature deletion and final feature set update until all features have been rated for importance.

[0206] (2) CV stage;

[0207] 1) Based on the importance results of the RFE stage, select different numbers of features in sequence;

[0208] 2) Perform cross-validation on the selected feature set;

[0209] 3) Calculate the number of features with the highest average score to complete feature selection.

[0210] The REFCV method can be used to plot the R² values ​​obtained by cross-validation for different numbers of features.

[0211] 3.2.2 Evaluation Method;

[0212] The REFCV method can be used to plot the R² values ​​obtained by cross-validation for different numbers of features. Figure 4 This is a schematic diagram of the goodness-of-fit R² obtained by cross-validation of RFECV according to an optional embodiment of the present invention.

[0213] As shown in the figure above, when the number of features is 12, the coefficient of determination R² obtained by cross-validation is the highest, reaching 0.92%, meaning that 12 features are ultimately selected as the input features for the algorithm. After selecting the number of features, the existing dataset is transformed to remove the features with the lowest importance ratings in the RFE stage, retaining only the features with the highest importance. The seven influencing factors with the lowest importance ratings are selected for deletion: pole-mounted transformer, input electricity, electricity sold, A-phase voltage, C-phase voltage, C-phase current, and rated capacity. The remaining 12 features are used for line loss rate prediction.

[0214] Table 1 is a schematic table of RFECV values ​​under different quantitative characteristics provided by optional embodiments of the present invention, as shown in Table 1.

[0215] Table 1

[0216]

[0217] S4: Clustering algorithm is used to group the samples in the transformer area;

[0218] 4.1 Clustering methods;

[0219] Due to the vast number of distribution network areas in counties and urban areas, and to prevent the quantitative analysis models of line loss influencing factors from becoming overly complex, this invention uses a clustering algorithm to cluster the distribution areas. Clustering not only reduces the space and time complexity of the model but also allows for the analysis of quantitative relationships between different categories of distribution areas, increasing the model's applicability. Common clustering algorithms include K-means clustering and its variants, density clustering, hierarchical clustering, and fuzzy clustering. Table 2 illustrates the advantages and disadvantages of the clustering algorithms provided in the optional embodiments of this invention.

[0220] Table 2

[0221]

[0222] As shown in Table 2, K-means++ has a better initial center selection mechanism than traditional K-means, which can improve clustering stability and reduce the probability of getting trapped in local optima. Therefore, this paper selects the K-means++ clustering algorithm. Figure 5 This is a schematic diagram of the K-means++ clustering algorithm provided in an optional embodiment of the present invention.

[0223] 4.2 Determining the number of clusters;

[0224] To determine the optimal number of clusters K, this invention uses the silhouette coefficient as an evaluation index. The larger the average silhouette coefficient of all samples, the better the clustering effect. It can be expressed as formula (4);

[0225] (4)

[0226] in: This represents the average distance between sample i and other samples in the same cluster; This represents the average distance between sample i and its nearest neighbor cluster samples; Let be the contour coefficient of sample i.

[0227] Taking data from 100 transformer substations in a certain area as an example, features with high correlation to line loss rate, namely line loss rate, lost electricity, maximum load rate, load rate at maximum load time, input electricity, and electricity sold, are selected as features for clustering algorithm.

[0228] The K-means++ clustering algorithm was used to validate the samples based on the above six features. Before using the K-means++ clustering algorithm, the K value, i.e., the final number of clusters, needs to be confirmed. As described above, the silhouette coefficient is selected as the criterion for determining the clustering result, and the K value is selected one by one. The silhouette coefficient values ​​under different K values ​​in K-means++ are calculated. Table 3 is a schematic table of silhouette coefficients under different K values ​​in K-means++ provided by the optional embodiment of the present invention.

[0229] Table 3

[0230]

[0231] Figure 6 This is a schematic diagram of the silhouette coefficients under different K values ​​in K-means++ provided by an optional embodiment of the present invention.

[0232] As shown in the table and figure, the K-means++ clustering algorithm has the highest silhouette coefficient of 0.462% when the number of classes K is 9. Therefore, the parameter K=9 is selected, and the transformer area is divided into 9 classes.

[0233] S5: Construct multiple prediction models for different types of transformer areas;

[0234] For each type of transformer substation after clustering, this invention constructs the following three prediction models: LR-Bagging model, Random Forest model, and LSTM model. By applying different models to the same type of data and comparing their prediction performance, the optimal model is further selected for each type of transformer substation.

[0235] 5.1 LR-Bagging Model;

[0236] Figure 7 This is a schematic diagram of the LR-Bagging algorithm provided in an optional embodiment of the present invention.

[0237] 5.1.1 Model Structure;

[0238] The LR-Bagging model uses linear regression as the basic learner, trains multiple linear regression sub-models through the Bagging ensemble strategy, and averages and fuses their outputs to improve model stability and perturbation resistance.

[0239] 5.1.2 Mechanism of action;

[0240] Bagging constructs multiple training subsets by bootstrapping the training samples. Each subset trains a base regressor, and the predictions from all regressors are then integrated and averaged. This method reduces the sensitivity of a single linear model to outliers and enhances generalization ability.

[0241] 5.2 Random Forest Model;

[0242] The random forest model consists of multiple decision trees. During training: samples are randomly sampled; features are randomly selected from subspaces; multiple regression trees are trained; and the outputs of each tree are averaged to obtain the final prediction. This model can handle nonlinear relationships and has good robustness and feature adaptability.

[0243] Figure 8 This is a flowchart of the random forest algorithm provided by an optional embodiment of the present invention.

[0244] 5.3 Long Short-Term Memory Network Model;

[0245] Long Short-Term Memory (LSTM) networks are suitable for learning data with temporal dependencies. An LSTM model employs a three-layer structure, including an input layer, hidden layers, and an output layer. It also features a self-recurring mechanism, meaning there are connections between neurons.

[0246] Figure 9 This is a schematic diagram of the basic structure of a long short-term memory network provided by an optional embodiment of the present invention.

[0247] Figure 10 This is a detailed schematic diagram provided by an optional embodiment of the present invention.

[0248] The detailed diagram includes equations (5) and (6);

[0249] (5)

[0250] (6)

[0251] In equations (5) and (6) This represents the input of the neuron at time t. Represents the hidden state at time t. Represents the activation function (general form ReLU or Tanh). , , These three represent network parameters. This represents the activation function.

[0252] After refining the hidden layers, the complete internal structure is obtained. This structure contains an activation function (Tanh is used here) in the hidden layers. At each time step, this network... They all have the same network structure. Figure 11 This is a schematic diagram of the complete internal structure of a long short-term memory network provided by an optional embodiment of the present invention.

[0253] An LSTM gate structure consists of a Sigmoid activation function and a bitwise multiplication element. The Sigmoid activation function makes its output result between (0, 1). When the result is 0, the gate structure does not allow any information to pass through. When the result is 1, all information is allowed to pass through the gate structure. When the result is between (0, 1), some information is allowed to pass through the gate structure. Figure 12 This is a schematic diagram of the operation process of the LSTM Long Short-Term Memory network provided by an optional embodiment of the present invention.

[0254] The LSTM (Long Short-Term Memory) network first inputs the dataset D into the model and normalizes the training data; it then sets the number of network layers, neurons, activation function, learning rate, and hyperparameters; after setting the parameters, it starts calculating the loss function and adjusting the threshold; when the error reaches below the set value or the number of iterations reaches the set value, it stops the model operation and saves the results.

[0255] 5.3.1 Activation function;

[0256] Predicting line loss rates in transformer substations faces multiple challenges, including frequent load fluctuations, strong time-series dependence of electricity consumption behavior, and deep coupling between holidays and meteorological factors. To more accurately capture the complex nonlinear variation patterns in transformer substation operation data and thus improve the accuracy and stability of line loss rate prediction, this embodiment proposes to innovatively introduce the ReLU (Modified Linear Unit) activation function into the hidden layers or internal neural units of a Long Short-Term Memory (LSTM) network.

[0257] The line loss rate of a transformer substation is a complex indicator influenced by multiple factors. It is directly affected by changes in user-side load and the operating status of the transformer, and is also closely related to phase voltage fluctuations, the degree of three-phase imbalance, and historical electricity consumption trends. These data often exhibit highly nonlinear correlations and close temporal dependencies. Although traditional LSTM models, with their unique gating structure, excel in extracting long-term dependencies in time series data, their internal feature transformation capabilities remain limited when dealing with sudden local fluctuations, drastic changes, and complex nonlinear mapping relationships in transformer substation operation data. Therefore, introducing the ReLU activation function into the LSTM model significantly enhances the network's ability to fit deep nonlinear relationships to complex temporal features, enabling the model to more sensitively and accurately learn and characterize the deep mapping patterns between the line loss rate of the transformer substation and multidimensional input features.

[0258] The expression (7) for the ReLU activation function is as follows:

[0259] (7)

[0260] in, This represents the input value of the neuron. This represents the output value after processing by the activation function.

[0261] Compared to the traditional Sigmoid or Tanh functions, the ReLU function maintains linear output characteristics when the input value is greater than 0, and outputs 0 when the input value is less than or equal to 0. It has advantages such as simple calculation, fast convergence speed, and less gradient vanishing problem.

[0262] Therefore, in the implementation of this invention, the ReLU activation function can effectively improve the learning efficiency of the model in the task of predicting the line loss rate of transformer areas, and is especially suitable for scenarios with high input feature dimensionality and strong nonlinearity of sample distribution.

[0263] Furthermore, in preferred implementations, the ReLU activation function can be placed in the fully connected layer after the LSTM layer output, or in the feature mapping unit between adjacent layers in a multi-layer LSTM structure, to perform further nonlinear transformation on the temporal features extracted by the LSTM. Since the ReLU function maintains a linear output when the input is greater than zero and outputs zero when the input is less than or equal to zero, its calculation process is simple, its convergence speed is fast, and it can alleviate the gradient vanishing problem to some extent, helping the model to approach the optimal parameters more quickly. For transformer substation line loss rate prediction, this method can effectively improve the model's response to short-term drastic load changes, changes in electricity consumption behavior caused by time-of-use pricing, and line loss fluctuations under abnormal operating conditions.

[0264] Furthermore, transformer substation line loss rate data typically exhibits strong noise interference and periodic fluctuations. Relying solely on the standard LSTM structure may result in models that are overly sensitive to local outliers or short-term random fluctuations. By introducing the ReLU activation function, the model's ability to filter key features and reconstruct nonlinearities can be enhanced, thereby improving its ability to identify actual operating trends and reducing the volatility of prediction results. Especially during peak load periods, transformer substation switching periods, or when seasonal electricity consumption changes are significant, the improved LSTM model can more fully capture the patterns of line loss rate changes, improving the stability of prediction results and its engineering application value.

[0265] In the context of distribution transformer area line loss rate prediction, the introduction of the ReLU activation function can be used in conjunction with input feature selection, time window construction, and multi-model fusion strategies to form a complete prediction chain from feature extraction and time series modeling to result output. This approach enhances the ability to learn the complex evolutionary patterns of distribution transformer area line loss rates while ensuring model training efficiency, providing more reliable technical support for distribution transformer area line loss analysis, anomaly identification, and operational optimization.

[0266] S6: Use multiple indicators to evaluate the predictive performance of each model and select the optimal model;

[0267] 6.1 Evaluation Indicators;

[0268] Select reasonable influencing factors as features for line loss prediction. Figure 13 This is a schematic diagram of the research process for the influencing factors of distribution network line loss rate provided by an optional embodiment of the present invention.

[0269] (1) Data preprocessing: missing value imputation, non-numerical data processing and data standardization;

[0270] (2) Exploratory data analysis:

[0271] ① Analysis of the linear relationship between overall line loss rate and influencing factors;

[0272] ② Selection of influencing factors for clustering algorithms;

[0273] ③ Selection of influencing factors used in the prediction algorithm;

[0274] 6.2 Indicator Formula;

[0275] For each category of transformer substation, the following evaluation metrics were calculated for the three models: coefficient of determination (R²); mean squared error (MSE); mean absolute error (MAE); maximum error; minimum error; and average error. The coefficient of determination reflects the goodness of fit, while the error metrics reflect the magnitude of prediction deviation.

[0276] The mean square error (MSE) can be expressed as:

[0277] (8)

[0278] The mean absolute error (MAE) can be expressed as:

[0279] (9)

[0280] in, For the true value, is the predicted value, and m is the number of samples.

[0281] 6.3 Determining the optimal model;

[0282] Within the same category, by comprehensively comparing the above indicators, the model with the largest R², smallest MSE, smallest MAE, and most stable error distribution is preferred as the final prediction model for that category.

[0283] 6.4 Implementation Results;

[0284] Taking a certain distribution area as an example, the transformer type, rated capacity, no-load loss, no-load current, power factor, low-voltage power supply radius, maximum load rate, maximum load moment load rate, three-phase current, three-phase voltage, input power, output power, sales power, and power loss are selected as the input characteristics of the distribution network line loss. The comprehensive line loss rate in 2025 is selected as the target characteristic. After coding, the transformers are divided into pole-mounted transformers and distribution transformers.

[0285] Table 4 is a schematic table of data after processing provided by an optional embodiment of the present invention, and Table 5 is another schematic table of data after processing provided by an optional embodiment of the present invention, as shown in Tables 4-5.

[0286] Table 4

[0287]

[0288] Table 5

[0289]

[0290] 6.4.1 Analysis of Prediction Results;

[0291] To explore the optimal prediction model under different clustering data characteristics, this study compared and predicted five clustering classes defined by the DBSCAN clustering algorithm using three algorithms: LR-Bagging, Random Forest, and Long Short-Term Memory (LSTM) network. The core parameter settings for each model are as follows:

[0292] LR-Bagging: The number of basic evaluators is set to 100; during training, the maximum number of training samples and the maximum number of features drawn in a single session are both set to 90% of the total dataset.

[0293] Random Forest: The number of base evaluators (i.e. decision trees) is set to 100; the maximum number of samples and the maximum number of features in a single training run are both set to 90% of the total dataset; the maximum depth of the decision tree (max_depth) is not limited (None), and the Gini coefficient is used as the node splitting criterion.

[0294] LSTM: Uses a standard long short-term memory network architecture for time series modeling and prediction.

[0295] (1) LR-Bagging prediction results;

[0296] First, LR-Bagging was performed on the samples from the transformer area.

[0297] Figure 14 This is a comparison chart of predicted and actual values ​​of the first type of LR-Bagging test set provided by an optional embodiment of the present invention; Figure 15 This is a comparison chart of predicted and actual values ​​for the second type of LR-Bagging test set provided by an optional embodiment of the present invention; Figure 16 This is a comparison chart of predicted and actual values ​​for the third type of LR-Bagging test set provided by an optional embodiment of the present invention; Figure 17 This is a comparison chart of predicted and actual values ​​for the fourth type of LR-Bagging test set provided by an optional embodiment of the present invention; Figure 18 This is a comparison chart of predicted and actual values ​​for the fifth type of LR-Bagging test set provided by an optional embodiment of the present invention.

[0298] (2) Random forest prediction results;

[0299] Random forests were applied to the five types of sample data respectively.

[0300] Figure 19 This is a comparison chart of predicted and actual values ​​of the first type of random forest test set provided by an optional embodiment of the present invention;

[0301] Figure 20 This is a comparison chart of predicted and actual values ​​of the second type of random forest test set provided by an optional embodiment of the present invention;

[0302] Figure 21 This is a comparison chart of predicted and actual values ​​of the third type of random forest test set provided by an optional embodiment of the present invention;

[0303] Figure 22 This is a comparison chart of predicted and actual values ​​of the fourth type of random forest test set provided by an optional embodiment of the present invention;

[0304] Figure 23This is a comparison chart of predicted and actual values ​​of the fifth type of random forest test set provided by an optional embodiment of the present invention;

[0305] (3) LSTM prediction results;

[0306] LSTM was applied to the five types of sample data respectively.

[0307] Figure 24 This is a comparison chart of predicted and actual values ​​of the first type of LSTM test set provided by an optional embodiment of the present invention;

[0308] Figure 25 This is a comparison chart of predicted and actual values ​​of the second type of LSTM test set provided by an optional embodiment of the present invention;

[0309] Figure 26 This is a comparison chart of predicted and actual values ​​of the third type of LSTM test set provided by an optional embodiment of the present invention;

[0310] Figure 27 This is a comparison chart of predicted and actual values ​​of the fourth type of LSTM test set provided by an optional embodiment of the present invention;

[0311] Figure 28 This is a comparison chart of predicted and actual values ​​of the fifth type of LSTM test set provided by an optional embodiment of the present invention.

[0312] Table 6 is a schematic table showing the indices R2, MSE, MAE, maximum error, minimum error, and average error of the three models provided by the optional embodiments of the present invention, as shown in Table 6.

[0313] Table 6

[0314]

[0315] Based on the above charts, a comprehensive comparison of key indicators such as the coefficient of determination (R²), mean squared error (MSE), mean absolute error (MAE), and extreme value error of the three algorithms in various clustering results, combined with the analysis of the prediction fitting curves, leads to the following conclusions:

[0316] 1. The dominant advantage of LSTM networks: In the clustering results of categories 1, 2, and 4, LSTM networks performed best in all evaluation metrics, including the coefficient of determination, MSE, MAE, maximum / minimum error, and average error. Combined with the corresponding result curves, it can be seen that LSTM networks provide the most ideal fit for these three types of data, and therefore were selected as the preferred prediction method.

[0317] 2. Model selection for the fifth category: In the fifth category clustering results, although the LSTM network showed the best performance in all error metrics (MSE, MAE, mean error) and coefficient of determination, the core of model evaluation lies in the comprehensive performance of the overall goodness of fit and mean error. Considering the actual trend of the fifth category result curve, the LSTM network was ultimately chosen as the prediction method for this category.

[0318] 3. Applicable Scenarios for Random Forest: In the third type of clustering results, the Random Forest algorithm outperforms other models in terms of coefficient of determination, MSE, MAE, minimum error, and average error. Considering the fitting performance of the curves in this type of result, Random Forest is determined to be the best prediction method for this type of data.

[0319] S7: Output the prediction results and use them for line loss analysis;

[0320] After selecting the optimal model for each category, the input features of the transformer area samples to be predicted are input into the corresponding optimal prediction model according to their category, and the comprehensive line loss rate prediction result is output. This prediction result can be used for transformer area line loss level assessment, abnormal transformer area identification, line loss influencing factor analysis, operation and maintenance strategy optimization, governance effect verification, and operation trend prediction, thereby providing data support for the refined management of distribution network line loss.

[0321] Specifically, the predicted value can be compared with a preset threshold or historical benchmark value to determine whether there is a high risk of loss in the transformer area; or the prediction results of different types of transformer areas can be compared horizontally to identify transformer areas with abnormal line loss levels.

[0322] Furthermore, based on the prediction results, targeted inspections, metering verifications, line rectification, and load optimization measures can be implemented in high-line-loss transformer areas, and the changes in line loss before and after rectification can be evaluated to verify the effectiveness of the rectification.

[0323] The above optional implementation methods can achieve at least the following beneficial effects:

[0324] (1) Achieve adaptive selection of the optimal model for different types of transformer substations;

[0325] This invention constructs LR-Bagging, Random Forest, and LSTM models for different clustering categories, and compares and analyzes them based on evaluation metrics such as coefficient of determination, mean squared error, and mean absolute error, automatically selecting the optimal model for each category as the final prediction model. This approach avoids the performance degradation problem caused by uniformly adapting a single model to all transformer areas, improving the specificity and accuracy of the prediction results.

[0326] (2) Enhance the practical value of distribution network loss reduction analysis and operation and maintenance decision-making;

[0327] This invention can not only output the comprehensive line loss rate prediction results of distribution areas, but also analyze the line loss characteristics of different types of distribution areas by combining distribution area categories and prediction errors. It provides data support for distribution network operation management, line loss mitigation and abnormal distribution area identification, which helps to achieve refined and differentiated operation and maintenance decisions and improve the economic efficiency of power grid operation.

[0328] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0329] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0330] Example 2

[0331] According to an embodiment of the present invention, an apparatus for implementing the above-described method for determining the predicted line loss rate is also provided. The apparatus includes: an acquisition module, a first determination module, a second determination module, a retrieval module, and a third determination module. The apparatus will be described in detail below.

[0332] The system comprises the following modules: an acquisition module for acquiring target operating data of the distribution network area to be predicted; a first determination module connected to the acquisition module for determining target clustering features corresponding to multiple target clustering items and target prediction features corresponding to multiple target prediction items based on the target operating data, wherein the multiple target prediction items are selected from multiple candidate feature items using a recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items based on the correlation coefficient between the corresponding feature items and the line loss rate; a second determination module connected to the first determination module for determining the target distribution network area category to which the area to be predicted belongs based on the target clustering features; a retrieval module connected to the second determination module for retrieving the target prediction model corresponding to the target distribution network area category, wherein the target prediction model is selected from multiple trained models based on the difference between the corresponding predicted line loss rate and the actual line loss rate, and the multiple trained models are configured with different model architectures; and a third determination module connected to the retrieval module for inputting the target prediction features into the target prediction model to obtain the predicted line loss rate value of the area to be predicted.

[0333] It should be noted here that the above-mentioned acquisition module, first determination module, second determination module, retrieval module and third determination module correspond to steps S102 to S110 in the method for determining the predicted value of line loss rate. The multiple modules and the corresponding steps are the same in terms of implementation examples and application scenarios, but are not limited to the content disclosed in the above embodiment 1.

[0334] Example 3

[0335] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute instructions to implement the line loss rate prediction method of any of the above embodiments.

[0336] Example 4

[0337] According to another aspect of the present invention, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the line loss rate prediction method described above.

[0338] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0339] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0340] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0341] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0342] Furthermore, the functional units in the various embodiments of the present 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. The integrated unit can be implemented in hardware or as a software functional unit.

[0343] 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 computer-readable 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, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0344] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for determining the predicted value of line loss rate, characterized in that, include: Obtain the target operating data of the distribution network area to be predicted; Based on the target running data, target clustering features corresponding to multiple target clustering items and target prediction features corresponding to multiple target prediction items are determined. The multiple target prediction items are selected from multiple candidate feature items by recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items by the correlation coefficient between the corresponding feature item and the line loss rate. Based on the target clustering features, determine the target area category to which the predicted transformer area belongs; Retrieve the target prediction model corresponding to the target transformer area category. The target prediction model is selected from multiple trained models based on the difference between the corresponding predicted line loss rate and the actual line loss rate. Each of the multiple trained models has a different model architecture. The target prediction features are input into the target prediction model to obtain the predicted line loss rate of the transformer area to be predicted.

2. The method according to claim 1, characterized in that, Before inputting the target prediction features into the target prediction model corresponding to the target transformer area category to obtain the predicted line loss rate value of the transformer area to be predicted, the method further includes: Obtain historical operating data of the distribution network area, wherein the distribution network area includes area samples belonging to the target area category; Extract the predicted input features and the true value of the line loss rate corresponding to the target transformer area category from the historical operation data; Based on the predicted input features and the true value of the line loss rate corresponding to the target transformer area category, multiple initial models are trained to obtain multiple trained models corresponding to the target transformer area category. Each of the multiple initial models has a different model architecture. The predicted input features are input into multiple trained models respectively to obtain the predicted line loss rate values ​​corresponding to the multiple trained models respectively; The predicted line loss rate corresponding to each of the multiple trained models is compared with the actual line loss rate to determine the scores corresponding to each of the multiple trained models under the preset evaluation index. Based on multiple scores, a target prediction model corresponding to the target transformer area category is determined from the multiple trained models.

3. The method according to claim 1, characterized in that, Before determining the target clustering features corresponding to multiple target clustering items and the target prediction features corresponding to multiple target prediction items based on the target running data, the process further includes: Based on the historical operating data of the distribution network area, the variance inflation coefficients corresponding to the multiple candidate feature items are determined respectively; From the multiple candidate feature items, features with a variance inflation coefficient greater than a preset threshold are removed to obtain a candidate feature set. The variance inflation coefficient is used to measure the degree of multicollinearity among features. The larger the variance inflation coefficient, the stronger the linear correlation between the corresponding feature and other features. Based on the candidate feature set, a recursive feature elimination cross-validation method is used to select features from the candidate feature set to obtain the multiple target prediction terms. In the recursive feature elimination stage of the recursive feature elimination cross-validation method, feature terms are eliminated in order of increasing importance. The cross-validation stage is used to evaluate the generalization performance of the feature subsets obtained after each elimination and selects a predetermined number of feature terms with the highest cross-validation scores as prediction input features.

4. The method according to claim 1, characterized in that, Before determining the target clustering features corresponding to multiple target clustering items and the target prediction features corresponding to multiple target prediction items based on the target running data, the process further includes: Based on the historical operating data of the distribution network area, the correlation coefficients between the multiple candidate feature items and the line loss rate are determined, and multiple target correlation coefficients are obtained; The feature terms whose corresponding correlation coefficients meet the preset conditions are determined as the multiple target clustering terms.

5. The method according to claim 1, characterized in that, Before determining the target area category to which the predicted transformer area belongs based on the target clustering features, the process further includes: Based on the historical operation data of the distribution network area, determine the sample clustering features corresponding to each sample in the distribution network area under the multiple target clustering items; Based on the sample clustering features corresponding to each transformer area sample under the multiple target clustering items, the multiple transformer area samples are clustered according to multiple preset candidate clustering numbers to obtain the clustering results corresponding to each preset candidate clustering number; Based on the clustering results corresponding to each preset number of candidate clusters, determine the silhouette coefficient corresponding to each preset number of candidate clusters; The number of candidate clusters corresponding to the maximum value of the silhouette coefficient is determined as the final number of clusters. Based on the number of clusters, a clustering algorithm is used to cluster the multiple transformer area samples, dividing the multiple transformer area samples into multiple transformer area categories, wherein the multiple transformer area categories include the target transformer area category.

6. The method according to claim 2, characterized in that, Based on multiple scores, a target prediction model corresponding to the target transformer area category is determined from the multiple trained models, including: When the preset evaluation indicators include the coefficient of determination, mean square error, mean absolute error, maximum error, minimum error and average error, determine the weight settings corresponding to the multiple preset evaluation indicators; Based on the scores and weight settings corresponding to multiple preset evaluation indicators, a target prediction model corresponding to the target transformer area category is determined from the multiple trained models.

7. The method according to any one of claims 1 to 6, characterized in that, The target prediction features are input into the target prediction model to obtain the predicted line loss rate of the transformer area to be predicted, including: When the target prediction model is a long short-term memory network model, the target prediction features are input into the long short-term memory network model; Based on the target prediction features, the temporal dependency features are determined through the gating structure of the long short-term memory network model, wherein the gating structure selectively retains and discards historical information in the target prediction features; The temporal dependency features are nonlinearly transformed by the modified linear unit activation function of the long short-term memory network model to obtain nonlinear mapping features. The modified linear unit activation function is used to perform nonlinear transformation on the temporal dependency features while alleviating the gradient vanishing problem. The nonlinear mapping feature is input into the output layer of the long short-term memory network model to obtain the predicted line loss rate of the transformer area to be predicted.

8. A device for determining the predicted value of line loss rate, characterized in that, include: The acquisition module is used to acquire the target operating data of the distribution network area to be predicted; The first determining module is used to determine, based on the target running data, target clustering features corresponding to multiple target clustering items and target prediction features corresponding to multiple target prediction items, wherein the multiple target prediction items are selected from multiple candidate feature items by recursive feature elimination cross-validation method, and the multiple target clustering items are selected from multiple candidate feature items by the correlation coefficient between the corresponding feature item and the line loss rate; The second determining module is used to determine the target area category to which the predicted area belongs based on the target clustering features; The retrieval module is used to retrieve the target prediction model corresponding to the target area category. The target prediction model is selected from multiple trained models based on the difference between the corresponding predicted line loss rate and the actual line loss rate. Each of the multiple trained models has a different model architecture. The third determining module is used to input the target prediction features into the target prediction model to obtain the predicted line loss rate of the transformer area to be predicted.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method for determining the predicted line loss rate as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method for determining the predicted line loss rate as described in any one of claims 1 to 7.