A data-driven power outage customer demand volume prediction method

By constructing a sample set and performing feature clustering and data augmentation, a fully connected neural network model is built, which solves the problem in existing technologies that cannot quantify and analyze the temporal changes in customer demand caused by power outage events, and achieves more efficient and reliable prediction results.

CN119599165BActive Publication Date: 2026-01-02GUANGXI POWER GRID CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411541757.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2026-01-02
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Existing technologies cannot effectively quantify and analyze the temporal changes in customer demand caused by power outage events, and single neural network models have poor prediction performance in scenarios with large differences in local features and small differences in sample labels.

Method used

A sample set is constructed, taking into account multiple features and dynamic factors of the power outage lines. Clustering is performed using the KMeans algorithm and the CH index, and the data is cleaned and enhanced using the SMOTE algorithm. A fully connected neural network model is then built for prediction.

Benefits of technology

It improves the reliability and efficiency of predicting the temporal changes in customer demand after power outages, reduces the complexity of model training, and enhances the model's generalization ability and the credibility of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599165B_ABST
    Figure CN119599165B_ABST
Patent Text Reader

Abstract

The application discloses a power-off customer appeal amount prediction method based on data driving and relates to the technical field of smart power grids. In the process of constructing a sample set, multiple inherent characteristics of a power-off line, dynamic factors objectively existing during power-off and human-determined factor components are comprehensively considered, independent lines are classified through optimal clustering results based on line characteristics, and the sample set is effectively divided accordingly; the divided sample set is extended and transformed, so that input characteristics of training samples contain time sequence information and output results implicitly contain time sequence change characteristics; and a neural network model is differentially built for each type of extended sample set. The application can predict customer power-off appeals changing with time after power-off, and has higher reliability compared with prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid technology, and in particular to a data-driven method for predicting customer demand during power outages. Background Technology

[0002] With the increasing complexity and expansion of power grid structures, power outages caused by 10kV line faults in distribution networks occur frequently in daily life, and these outages often trigger service risks such as a surge in customer calls. As modern power supply service systems improve, power companies are placing higher demands on customer service quality. Timely and reliable prediction of customer calls triggered by power outages not only improves the efficiency of transmitting important information during service but also helps in assessing potential risks (such as customer complaints and emergency calls), enabling timely and effective measures to prevent further escalation of risks. This is of great significance in improving customers' experience during power outages. Against this backdrop, current research only explores service risks from the perspectives of predicting total regional call volume, outage sensitivity, and outage probability, failing to quantitatively analyze the temporal changes in customer call volume caused by power outages.

[0003] Wu Guanghua, Zhang Shike, and others have published a power outage sensitivity analysis method based on neural networks and clustering (publication number CN 111681128A). For power outage planned lines, they proposed a sensitivity prediction method based on neural networks to make a qualitative judgment on whether the power outage plan is sensitive. However, the method does not consider the type of power outage due to faults, nor does it perform time-segmented quantitative prediction of the work orders. In other words, the model input and output do not have time-series variation characteristics.

[0004] Deng Xiaoyong, Chen Tie, and others have published a method for predicting power outages caused by 10kV feeder faults in distribution networks (publication number CN115598459 A), which quantifies the probability of power outages caused by line faults and predicts the risks after non-faults occur.

[0005] Furthermore, existing research models only employ a single neural network prediction framework, which results in poor performance in scenarios with large local feature differences, small sample label differences, and large overall data volume. It is evident that no predictive research has yet been proposed to address the temporal changes in customer demands caused by independent power outage events, and the efficiency of prediction methods still needs further improvement. Summary of the Invention

[0006] To address the shortcomings of the existing technologies, this invention provides a data-driven method for predicting customer demand during power outages. By constructing a sample set, this method comprehensively considers multiple inherent characteristics of the outage line, objective dynamic factors during the power outage, and human-determined factors, thereby predicting customer demand for power outages that changes over time after the outage. This method has higher reliability compared to existing technologies.

[0007] The specific technical solution is as follows:

[0008] A data-driven method for predicting customer demand during power outages, comprising:

[0009] S1. For 10kV lines, collect historical line fault outage data, line characteristic data, historical weather date data for the area where the line is located, and customer service work order data of the power supply company to which the line belongs;

[0010] S2. Using each historical 10kV line fault outage event as an independent sample unit, and combining it with the data collected in S1, the sample feature data is supplemented to construct a sample dataset.

[0011] S3. Cluster the line feature data based on the KMeans algorithm and CH index to obtain the optimal number of clusters and the cluster centers of the line feature data;

[0012] S4. Determine the class of each sample by calculating the Euclidean distance between the feature vector of the sample line and the cluster center vector in the sample dataset one by one, divide the sample dataset according to the class, and complete the construction of the sample set for each class; then, expand and transform each sample with hour as the granularity and the power outage and restoration time difference as the total length to obtain the expanded sample set for each class.

[0013] S5. Perform data cleaning and data augmentation on the expanded sample set for each class to obtain the model training sample set. Then, build different fully connected neural network models for each sample set and complete the training of each neural network model using the sample data.

[0014] S6. When a power outage occurs on a certain line, a full feature vector is formed based on the real-time data after the power outage. The line feature vector in the full feature vector is used to find the corresponding cluster, and then the corresponding neural network model is found. After removing the line feature vector from the full feature vector, the remaining feature vectors are expanded and transformed to obtain an expanded feature vector set. Each feature vector is then input into the corresponding neural network model for prediction calculation to obtain the prediction result.

[0015] Furthermore, in S1 of the above scheme:

[0016] The historical line fault outage data is a list of historical fault outage events within a selected time and region. Each outage event includes the name of the outage line, the number of affected areas, the number of affected users, the outage time, the power restoration time, and the status of the outage SMS messages sent.

[0017] The line characteristic data refers to the basic characteristic data of all 10kV lines within the selected area, including the number of line substations, the number of power supply users, the number of important users, whether it belongs to a high-risk line, the number of high-risk users, and whether it belongs to a rural line, etc.

[0018] The historical weather data for the region includes daily maximum temperature, daily minimum temperature, daily weather type, and whether it is a holiday.

[0019] The customer service work order data consists of records of customer calls to the service hotline, including information on the power outage line involved in the call and the power outage event number.

[0020] Furthermore, in the above scheme, S2 includes:

[0021] S21. By associating the power outage time with historical weather date data for the region, obtain the daily maximum temperature, daily minimum temperature, daily weather type, whether it is a holiday, month number, day of the month, and day of the week for the day of the power outage, as well as the hourly time period corresponding to the time of the power outage. The mathematical expression is as follows:

[0022]

[0023] Where D1 represents the sample set, N represents the total number of samples, and O i This represents the number of the i-th historical power outage event. T represents the m-th weather date feature of the i-th power outage event sample; i This indicates that the time of the power outage in the i-th power outage event sample corresponds to the T-th time of the same day. i If the time interval is 1, then 1 ≤ T. i ≤24;

[0024] S22. Obtain the characteristic values ​​of the outage line, including the number of users, transformer substations, number of important users, whether it is a high-risk line, the number of high-risk users, and whether it belongs to a rural area, by associating the line characteristic data with the outage line name; supplement the sample characteristics based on the sample set D1 in S21 to obtain sample set D2, the mathematical expression of which is as follows:

[0025]

[0026] in, This indicates that the i-th power outage event sample involves the p-th line feature of the outage line, i.e., p = 6;

[0027] S23. Obtain whether the current power outage event sample sent a power outage notification SMS to customers through historical line fault outage data, and count the number of power outages that occurred on the lines involved in the current sample in the previous 1, 2, and 3 months; supplement the sample features based on the sample set D2 in S22 to obtain sample set D3, the mathematical expression of which is as follows:

[0028]

[0029] in, The characteristic information representing the number of times the line of the i-th power outage event sample has experienced power outages in the previous 1, 2, and 3 months, and whether the current event sends a power outage notification SMS to the customer, is q = 4;

[0030] S24. By linking customer service work order data, statistically analyze the number of customer power outage requests for the target event during each hour from the occurrence of the power outage to the restoration of power; based on the sample set D3 in S23, further supplement the sample features to obtain sample set D4, the mathematical expression of which is as follows:

[0031]

[0032] in, This represents the number of customer requests for the i-th power outage event sample within the t-th hour after the power outage, where 1 ≤ t ≤ t. max If the total power outage duration is less than or equal to t max , then t max Take the total power outage duration. If the total power outage duration is greater than t... max ,but Indicates the t-th time after the power outage max Total customer requests after one hour, preset t max =16.

[0033] Furthermore, the S3 operation process in the above scheme includes:

[0034] S31. Randomly select two initial points as the centroids;

[0035] S32. Using the K-Means clustering algorithm, each sample in the line feature data is assigned to the cluster represented by its nearest centroid, and a new centroid is calculated for each cluster. This process continues until the centroid value no longer changes.

[0036] S33. Calculate the Calinski-Harabasz coefficient to evaluate the clustering effect. The formula for calculating CH is as follows:

[0037]

[0038] Among them, B k W represents the degree of dispersion between clusters. k The k values ​​represent the degree of dispersion within a cluster, where k represents the number of clusters and n represents the total number of samples.

[0039] S34. Increase the initial number of random centroids by 1. If the initial number of random centroids is less than or equal to the maximum number of clusters, repeat S32 and S33; otherwise, proceed to S35.

[0040] S35. Select the number of centroids corresponding to the maximum value of the CH coefficient as the optimal number of clusters, and the centroid value as the optimal cluster center.

[0041] Furthermore, in the above scheme, S4 includes:

[0042] By calculating the feature vectors of sample lines in sample dataset D4 one by one The Euclidean distance to the cluster center vector is used to determine the cluster to which each sample belongs;

[0043] The method for calculating the Euclidean distance d is as follows:

[0044]

[0045] in, The cluster center vector;

[0046] Then, the samples are classified according to their respective categories to complete the construction of the sample set for each category; next, the total length is calculated using hours as the time scale and the time difference between power outage and restoration as the total length, with a maximum length of t. max +1, perform an expansion transformation on each sample to form the training and testing sample set for the subsequent neural network model. The expansion transformation of each cluster sample is as follows:

[0047]

[0048] Where D[d] represents the extended sample set of the d-th cluster, N d Let d be the number of samples before the expansion of the d-th cluster, t be the hourly time period corresponding to the power outage of sample i, and D[d] be the number of samples in N. d The sample is expanded to form the whole; Define the demand quantity as the hourly time period within a day corresponding to the time t after a power outage. The output label for each sample after expansion.

[0049] Furthermore, in the above scheme, since each cluster sample after expansion contains a large number of 0-value labels, the SMOTE algorithm is used to solve this problem in S5.

[0050] Furthermore, the SMOTE algorithm operation steps in the above scheme include:

[0051] S51. The minority class sample set for the SMOTE algorithm is defined as follows:

[0052]

[0053] S52. For each sample in the minority class, calculate its distance to all samples in the minority class sample set X using Euclidean distance as the standard, and obtain its k nearest neighbor samples;

[0054] S53. Set a sampling ratio based on the proportion of sample imbalance to determine the sampling fold N. For each minority class sample x...i From its k nearest neighbors, several samples are randomly selected. Let's assume that x is selected. i ';

[0055] S54. For each randomly selected nearest neighbor x i ', respectively with x i According to formula x new =x i +rand(0,1)×(x i '-x i Construct new samples.

[0056] Furthermore, in S5, different model parameters can be set for the neural network model corresponding to each expanded sample set, including the number of hidden layers, the number of neurons in the hidden layers, the type of activation function, and the type of loss function. After shuffling the order of the samples, the training set and the test set are divided. The sample data is normalized and then input into the neural network model for gradient descent and iterative convergence training to obtain the weights and bias parameters of the constructed neural network model.

[0057] Furthermore, step S6 of the above scheme includes:

[0058] S61. The processed input features include the inherent basic features of the power outage line, the basic features of the power outage, the external objective features, and the dynamic change features. The inherent basic features of the line include the number of transformer substations, the number of users, whether it is a high-risk line, the number of high-risk users, the number of important users, and whether it belongs to a rural area. The basic features of the power outage include the month of the power outage, the day of the month in which the power outage occurs, the week of the day of the power outage, the number of users affected, the number of power outages in the previous month, the number of power outages in the previous two months, and the number of power outages in the previous three months. The external objective features include the highest temperature of the day, the lowest temperature of the day, the weather type of the day, and whether it is a holiday. The dynamic change features include the current time period after the power outage, the current time period of the day, and whether a notification has been sent.

[0059] S62. Calculate the Euclidean distance between the inherent basic characteristics of the line and the cluster centers obtained in S3, and find the class with the smallest distance as the class to which the current input sample belongs;

[0060] S63. Supplement the input features with the feature values ​​of "the current time is in which hour of the day" and "the hour after the power outage" in chronological order, organize them into an extended input dataset, and input them into the neural network model of the corresponding class in chronological order to obtain continuous prediction results, which constitute the demand prediction quantity for the time-series changes after the power outage.

[0061] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0062] This invention predicts the temporal changes in demand caused by independent 10kV line outages. The sample set construction process comprehensively considers multiple inherent characteristics of the outage line (region, number of transformers, etc.), externally existing variable factors during the outage (weather, holidays, etc.), and human-determined factors (whether outage SMS messages were sent), improving the effectiveness of the prediction process and the reliability of the prediction results. Secondly, independent lines are classified using optimal clustering results of line features, effectively dividing the sample set accordingly, thereby reducing the structural scale of subsequent neural network models and improving the overall training efficiency. The training samples are transformed so that the input features contain temporal information and the output results implicitly contain temporal change characteristics. Further sample cleaning and enhancement techniques are used to improve the samples and enhance the model's generalization ability. Each sample set uses a fully connected neural network structure, which offers superior performance and is easy to adjust. Furthermore, within the framework of this invention, the prediction results obtained based on big data have higher reliability than traditional manual experience predictions, and in practical applications, neural network models can be quickly replaced or improved as needed.

[0063] It is worth noting that this invention predicts customer power outage requests that change over time after a power outage, proposing a method for sample partitioning based on line characteristics and constructing a neural network prediction model for classification. Since the number of customer calls related to the out-of-power line in each time period after a 10kV power outage is an independent variable, and the values ​​between time periods are not correlated, time-series change information is incorporated as a feature into the prediction model for time-series simulation and prediction.

[0064] Existing methods do not consider line feature clustering, individual neural network models have weak generalization ability, and the methods and models do not have the ability to predict time series changes. Attached Figure Description

[0065] Figure 1 Flowchart of this invention;

[0066] Figure 2 Logical diagram of the implementation framework of the method of this invention;

[0067] Figure 3 The trend of CH coefficient change during the implementation of this invention;

[0068] Figure 4 Schematic diagram of the fully connected neural network structure of this invention;

[0069] Figure 5 A comparison chart of the prediction results and true values ​​of a certain type of sample set corresponding to the neural network training set and test set during the implementation of this invention;

[0070] Figure 6 The target neural network model, after training, calls the prediction results. Detailed Implementation

[0071] The embodiments of the invention will be described in further detail below with reference to the accompanying drawings, so that the objectives, technical solutions and technical effects of the invention will be more clearly presented.

[0072] like Figures 1-2 As shown, a data-driven method for predicting customer demand during power outages includes the following steps:

[0073] A data-driven method for predicting customer demand during power outages, comprising:

[0074] S1. For 10kV lines, collect historical line fault outage data, line characteristic data, historical weather date data for the area where the line is located, and customer service work order data of the power supply company to which the line belongs;

[0075] S2. Using each historical 10kV line fault outage event as an independent sample unit, and combining it with the data collected in S1, the sample feature data is supplemented to construct a sample dataset.

[0076] S3. Cluster the line feature data based on the KMeans algorithm and CH index to obtain the optimal number of clusters and the cluster centers of the line feature data;

[0077] S4. Determine the class of each sample by calculating the Euclidean distance between the feature vector of the sample line and the cluster center vector in the sample dataset one by one, divide the sample dataset according to the class, and complete the construction of the sample set for each class; then, expand and transform each sample with hour as the granularity and the power outage and restoration time difference as the total length to obtain the expanded sample set for each class.

[0078] S5. Perform data cleaning and data augmentation on the expanded sample set for each class to obtain the model training sample set. Then, build different fully connected neural network models for each sample set and complete the training of each neural network model using the sample data.

[0079] S6. When a power outage occurs on a certain line, a full feature vector is formed based on the real-time data after the power outage. The line feature vector in the full feature vector is used to find the corresponding cluster, and then the corresponding neural network model is found. After removing the line feature vector from the full feature vector, the remaining feature vectors are expanded and transformed to obtain an expanded feature vector set. Each feature vector is then input into the corresponding neural network model for prediction calculation to obtain the prediction result.

[0080] This invention aims to predict customer power outage demands that change over time after a power outage. It proposes a method for sample partitioning based on line characteristics and constructing a neural network prediction model. Specifically, the method involves: comprehensively considering multiple inherent characteristics of the outage lines and human-determined factors during sample set construction; classifying independent lines based on the optimal clustering results of line characteristics, and effectively partitioning the sample set accordingly; transforming the training samples so that the input features contain temporal information and the output results implicitly reflect temporal variation characteristics; and employing a fully connected neural network structure for each sample set. Based on the above principles and processes, this method offers higher reliability compared to traditional manual experience-based predictions, and allows for rapid replacement or improvement of the neural network model as needed in practical applications.

[0081] Since the number of customer calls related to the outage line is an independent variable in each time period after a 10kV power outage, and the values ​​between time periods are not correlated, time series change information is included as a feature in the prediction model to perform time series simulation and prediction, thus enabling the prediction of time series changes.

[0082] The following steps illustrate the specific implementation:

[0083] S1. For 10kV lines, collect historical line fault outage data, line characteristic data, historical weather date data for the area where the line is located, and customer service work order data of the power supply company to which the line belongs.

[0084] The historical line fault outage data is a list of historical fault outage events within a selected time and region. Each outage event includes the name of the outage line, the number of affected areas, the number of affected users, the outage time, the power restoration time, and the status of the outage SMS messages sent.

[0085] The line characteristic data refers to the basic characteristic data of all 10kV lines within the selected area, including the number of line substations, the number of power supply users, the number of important users, whether it belongs to a high-risk line, the number of high-risk users, and whether it belongs to a rural line, etc.

[0086] The historical weather data for the region includes the daily maximum temperature, daily minimum temperature, daily weather type, and whether it is a holiday.

[0087] The customer service work order data consists of records of customer calls to the service hotline, including information on the power outage line involved in the call and the power outage event number.

[0088] S2. Using each historical 10kV line fault outage event as an independent sample unit, and combining it with the data collected in S1, the sample feature data is completed to construct a sample dataset, which includes the following process:

[0089] S21. By associating the power outage time with historical weather date data for the region, obtain the daily maximum temperature, daily minimum temperature, daily weather type, whether it is a holiday, month number, day of the month, and day of the week for the day of the power outage, as well as the hourly time period corresponding to the time of the power outage. The mathematical expression is as follows:

[0090]

[0091] Where D1 represents the sample set, N represents the total number of samples, and O i This represents the number of the i-th historical power outage event. T represents the m-th weather date feature of the i-th power outage event sample; i This indicates that the time of the power outage in the i-th power outage event sample corresponds to the T-th time of the same day. i If the time interval is 1, then 1 ≤ T. i ≤24.

[0092] S22. Obtain the characteristic values ​​of the outage line, including the number of users, transformer substations, number of important users, whether it is a high-risk line, the number of high-risk users, and whether it belongs to a rural area, by associating the line characteristic data with the outage line name; supplement the sample characteristics based on the sample set D1 in S21 to obtain sample set D2, the mathematical expression of which is as follows:

[0093]

[0094] in, Let p represent the p-th line feature of the power outage line involved in the i-th power outage event sample, i.e., p = 6.

[0095] S23. Obtain whether the current power outage event sample sent a power outage notification SMS to customers through historical line fault outage data, and count the number of power outages that occurred on the lines involved in the current sample in the previous 1, 2, and 3 months; supplement the sample features based on the sample set D2 in S22 to obtain sample set D3, the mathematical expression of which is as follows:

[0096]

[0097] in, The characteristic information q = 4 represents the number of times the line of the i-th power outage event sample has experienced power outages in the previous 1, 2, and 3 months, as well as whether the current event sends a power outage notification SMS to the customer.

[0098] S24. By linking customer service work order data, statistically analyze the number of customer power outage requests for the target event during each hour from the occurrence of the power outage to the restoration of power; based on the sample set D3 in S23, further supplement the sample features to obtain sample set D4, the mathematical expression of which is as follows:

[0099]

[0100] Among them, K i t This represents the number of customer requests for the i-th power outage event sample within the t-th hour after the power outage, where 1 ≤ t ≤ t. max If the total power outage duration is less than or equal to t max , then t max Take the total power outage duration. If the total power outage duration is greater than t... max ,but Indicates the t-th time after the power outage max Total customer requests after one hour, preset t max =16.

[0101] S3. Cluster the line feature data based on the KMeans algorithm and CH index to obtain the optimal number of clusters and the cluster centers of the line feature data. The operation process is as follows:

[0102] S31: Randomly select two initial points as the centroids.

[0103] S32: Using the K-Means clustering algorithm, each sample in the line feature data is assigned to the cluster represented by its nearest centroid. The new centroid of each cluster is calculated. Each line sample point is assigned to the cluster represented by its nearest centroid and the new centroid of the cluster is calculated until the value of the centroid no longer changes.

[0104] S33: Calculate the Calinski-Harabasz coefficient (CH coefficient) to evaluate the clustering effect. The formula for calculating CH is as follows:

[0105]

[0106] Among them, B k W represents the degree of dispersion between clusters. k The clusters represent the degree of dispersion within each cluster, where k represents the number of clusters and n represents the total number of samples.

[0107] S34: Increase the initial random centroid number by 1. If the initial random centroid number is less than or equal to the maximum cluster number, repeat steps B and C; otherwise, proceed to step E.

[0108] S35: Select the number of centroids corresponding to the maximum value of the CH coefficient as the optimal number of clusters, and the centroid value as the optimal cluster center.

[0109] pass Figure 3 We can see the trend of CH coefficient changes during the implementation process. The CH coefficient is the largest when the number of clusters is 7, so the optimal number of clusters is 7.

[0110] In this example, the clustering was divided into 7 categories, and the results are as follows:

[0111]

[0112]

[0113] In S4, the feature vectors of sample lines in the sample dataset are calculated one by one. The Euclidean distance to the cluster center vector is used to determine the cluster to which each sample belongs.

[0114] The method for calculating the Euclidean distance d is as follows:

[0115]

[0116] in, This is the cluster center vector.

[0117] Then, the samples are classified according to their respective categories, completing the construction of the sample set for each category. Next, the total length is calculated using hours as the time scale and the time difference between power outage and restoration as the maximum length (t). max +1), perform an expansion transformation on each sample to form the training and testing sample set for the subsequent neural network model. The expansion transformation of each cluster sample is as follows:

[0118]

[0119] Where D[d] represents the extended sample set of the d-th cluster, N d Let d be the number of samples before the expansion of the d-th cluster, t be the hourly time period corresponding to the power outage of sample i, and D[d] be the number of samples in N. d The sample is expanded to form the sample. Let t be the hourly time period within the day corresponding to the time t hours after the power outage. For example, if the power outage occurs at 22:05, then... If t = t max =16, and the total duration of the power outage in this power outage event sample is greater than t. max Then t+ has a value of 17. This represents the total demand after a 16-hour power outage. (Definition of demand volume) The output label for each sample after expansion.

[0120] In an example, sample i is expanded as follows:

[0121]

[0122]

[0123] S5. Perform data cleaning and sample data augmentation on the expanded sample set for each class to obtain the model training sample set. Then, build different fully connected neural network models for each class of sample set and complete the training of each neural network model using sample data.

[0124] Data cleaning and augmentation are performed on each sample set: samples with missing feature data are removed. Since each cluster sample after augmentation contains a large number of 0-value labels, the SMOTE algorithm is used to solve the label imbalance problem in the dataset of each cluster sample, so as to improve the quality of the generated samples and the performance of subsequent models. The operation steps include:

[0125] The minority class sample set of the S51.SMOTE algorithm is defined as follows:

[0126]

[0127] S52. For each sample in the minority class, calculate its distance to all samples in the minority class sample set X using Euclidean distance as the standard, and obtain its k nearest neighbor samples.

[0128] S53. Set a sampling ratio based on the proportion of sample imbalance to determine the sampling fold N. For each minority class sample x... i From its k nearest neighbors, several samples are randomly selected. Let's assume that x is selected. i '.

[0129] S54. For each randomly selected nearest neighbor x i ', respectively with x i According to formula x new =x i +rand(0,1)×(x i '-x i Construct new samples.

[0130] S6. When a power outage occurs on a certain line, a full feature vector is formed based on the real-time data after the power outage. The line feature vector in the full feature vector is used to find the corresponding cluster, and then the corresponding neural network model is found. After removing the line feature vector from the full feature vector, the remaining feature vectors are expanded and transformed to obtain an expanded feature vector set. Each feature vector is then input into the corresponding neural network model for prediction calculation to obtain the prediction result.

[0131] For each data-cleaned and data-augmented expanded sample set, a differentiated fully connected neural network model (Multilayer Perceptron MLP) is built, and model training is completed.

[0132] Different model parameters can be set for the neural network model corresponding to each expanded sample set, including the number of hidden layers, the number of neurons in the hidden layers, the type of activation function, and the type of loss function, such as... Figure 4 As shown, the sample order is shuffled and divided into training and test sets. The sample data is normalized and then input into the neural network model for gradient descent and iterative convergence training to obtain the weights and bias parameters of the constructed neural network model.

[0133] The input features selected for the prediction model are:

[0134]

[0135] In this example, the normalization method is selected as follows:

[0136]

[0137] Where, x max and x min These are the maximum and minimum values ​​that can occur in the original data x, respectively. norm It is the normalized value.

[0138] In this example, the activation function is chosen as the ReLU function:

[0139] f(x) = max(0,x)

[0140] Output x if x is greater than 0, otherwise output 0.

[0141] In this embodiment, the loss function for training the model is chosen to be the mean squared error function:

[0142]

[0143] y true,i Let y be the true label value of the i-th sample. pred,i The model prediction value for the i-th sample.

[0144] In this example, based on the S3 clustering number, after setting the model parameters, a total of 7 neural network models were trained: The network models are as follows:

[0145] Classification Sample size Hidden layers Number of neurons per layer 1 347 1 128 2 708 2 128,64 3 3402 4 1280,640,128,64 4 11011 2 2560,128 5 787 1 256 6 3108 3 640,128,64 7 1408 2 640,128

[0146] Example Implementation Process Description:

[0147] S61. The resulting full feature vector includes the characteristics of the power outage line, the basic characteristics of the power outage, the external objective characteristics, and the dynamic change characteristics.

[0148] The characteristics of power outage lines include the number of transformer substations, the number of users, whether it is a high-risk line, the number of high-risk users, the number of important users, and whether it belongs to a rural area.

[0149] The basic characteristics of a power outage include the month of the outage, the day of the month in which the outage occurs, the week of the week, the number of users affected, the number of outages in the previous month, the number of outages in the previous two months, and the number of outages in the previous three months.

[0150] External objective characteristics include the day's highest temperature, lowest temperature, weather type, and whether it is a holiday.

[0151] Dynamic change characteristics include which hour period the current time is after the power outage, which hour period of the day the current time is, and whether a notification has been sent.

[0152] S62. Calculate the Euclidean distance between the inherent basic characteristics of the line and the cluster centers obtained in S3, and find the class with the smallest distance as the class to which the current input sample belongs;

[0153] S63. Next, after removing the line feature vector from the full feature vector, the remaining feature vector is expanded and transformed. That is, the feature values ​​of "the current time is in which hour of the day" and "the hour after the power outage" in the dynamic change feature are added in time order. The expanded feature vector set is then processed and input into the neural network model of the corresponding class in time order to obtain continuous prediction results, which constitute the demand prediction quantity of the time sequence change after the power outage.

[0154] It should be noted that the fully connected neural network model mentioned above was trained using an existing Python deep learning framework. Specifically, the data samples were processed according to the steps described above, and an existing pre-packaged Python deep learning model was selected to train the neural network model. These steps will not be elaborated on here.

[0155] Combination Figure 5 As shown, this is a comparison chart of the prediction results and actual values ​​of a certain type of sample set corresponding to the training and test sets of the neural network during the implementation process; the curves of the predicted values ​​and the actual values ​​in the chart are similar, and the prediction effect has reached the expectation.

[0156] Combination Figure 6 As shown, the target neural network model calls the prediction results after training. The figure shows the changes in the demand volume in each hour within 16 hours after the power outage, as well as the prediction results of the total demand volume after 16 hours.

[0157] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of the patent application of the present invention. All equivalent changes, substitutions or modifications made within the technical spirit and principles indicated by the present invention should be included within the scope of patent protection covered by the present invention.

Claims

1. A data-driven method for predicting customer demand during power outages, characterized in that, include: S1. For 10kV lines, collect historical line fault outage data, line characteristic data, historical weather date data for the area where the line is located, and customer service work order data of the power supply company to which the line belongs; S2. Using each historical 10kV line fault outage event as an independent sample unit, and combining it with the data collected in S1, the sample feature data is supplemented to construct a sample dataset. S3. Cluster the line feature data based on the KMeans algorithm and CH index to obtain the optimal number of clusters and the cluster centers of the line feature data; S4. Determine the class of each sample by calculating the Euclidean distance between the feature vector of the sample line and the cluster center vector in the sample dataset one by one, divide the sample dataset according to the class, and complete the construction of the sample set for each class; then, expand and transform each sample with hour as the granularity and the power outage and restoration time difference as the total length to obtain the expanded sample set for each class. S5. Perform data cleaning and data augmentation on the expanded sample set for each class to obtain the model training sample set. Then, build different fully connected neural network models for each sample set and complete the training of each neural network model using the sample data. S6. When a power outage occurs on a certain line, a full feature vector is formed based on the real-time data after the power outage. The line feature vector in the full feature vector is used to find the corresponding cluster, and then the corresponding neural network model is found. After removing the line feature vector from the full feature vector, the remaining feature vector is expanded and transformed to obtain an expanded feature vector set. Each feature vector is then input into its respective neural network model for prediction calculation to obtain the prediction result. S2 includes: S21. By associating the power outage time with historical weather date data for the region, obtain the daily maximum temperature, daily minimum temperature, daily weather type, whether it is a holiday, month number, day of the month, and day of the week for the day of the power outage, as well as the hourly time period corresponding to the time of the power outage. The mathematical expression is as follows: in, Represents the sample set, Represents the total number of samples. This represents the number of the i-th historical power outage event. This represents the m-th weather date feature of the i-th power outage event sample; This indicates that the time of the power outage in the i-th power outage event sample corresponds to the i-th power outage of the day. Hours, then ; S22. Obtain the number of users, number of transformer substations, number of important users, whether it is a high-risk line, number of high-risk users, and whether it belongs to a rural area by associating the line feature data with the line name; in the sample set of S21 Based on this, complete the sample features to obtain the sample set. The mathematical expression is as follows: in, This indicates that the i-th power outage event sample involves the p-th line feature of the outage line, i.e. ; S23. Obtain whether to send power outage notification SMS messages to customers for the current power outage event sample through historical line fault outage data, and count the number of power outages that occurred on the lines involved in the current sample in the previous 1, 2, and 3 months; in the sample set of S22 Based on this, complete the sample features to obtain the sample set. The mathematical expression is as follows: in, This represents the number of times the line for the i-th power outage event sample experienced outages in the previous 1, 2, and 3 months, as well as the characteristic information of whether a power outage notification SMS was sent to customers for the current event. ; S24. By linking customer service work order data, statistically analyze the number of customer power outage requests for the target event during each hour from the occurrence of the power outage to the restoration of power; in the sample set of S23. Based on this, further supplement the sample features to obtain the sample set. The mathematical expression is as follows: in, This represents the number of customer requests for the i-th power outage event sample within the t-th hour after the power outage. If the total power outage duration is less than or equal to ,but Take the total power outage duration. If the total power outage duration is greater than... ,but Indicates the number of days after the power outage Total customer requests after one hour, preset .

2. The data-driven method for predicting customer demand during power outages according to claim 1, characterized in that, In S1: The historical line fault outage data is a list of historical fault outage events within a selected time and region. Each outage event includes the name of the outage line, the number of affected areas, the number of affected users, the outage time, the power restoration time, and the status of the outage SMS messages sent. The line characteristic data refers to the basic characteristic data of all 10kV lines within the selected area, including the number of line substations, the number of power supply users, the number of important users, whether it belongs to a high-risk line, the number of high-risk users, and whether it belongs to a rural line, etc. The historical weather data for the region includes daily maximum temperature, daily minimum temperature, daily weather type, and whether it is a holiday. The customer service work order data consists of records of customer calls to the service hotline, including information on the power outage line involved in the call and the power outage event number.

3. The data-driven method for predicting customer demand during power outages according to claim 1, characterized in that, The S3 operation process includes: S31. Randomly select two initial points as the centroids; S32. Using the K-Means clustering algorithm, each sample in the line feature data is assigned to the cluster represented by its nearest centroid, and a new centroid is calculated for each cluster. This process continues until the centroid value no longer changes. S33. Calculate the Calinski-Harabasz coefficient to evaluate the clustering effect. The formula for calculating CH is as follows: in, Indicates the degree of dispersion between clusters. The k values ​​represent the degree of dispersion within a cluster, where k represents the number of clusters and n represents the total number of samples. S34. Increase the initial number of random centroids by 1. If the initial number of random centroids is less than or equal to the maximum number of clusters, repeat S32 and S33; otherwise, proceed to S35. S35. Select the number of centroids corresponding to the maximum value of the CH coefficient as the optimal number of clusters, and the centroid value as the optimal cluster center.

4. The data-driven method for predicting customer demand during power outages according to claim 1, characterized in that, S4 includes: By calculating the sample dataset one by one Medium sample line feature vector The Euclidean distance to the cluster center vector is used to determine the cluster to which each sample belongs; The method for calculating the Euclidean distance d is as follows: in, The cluster center vector; Then, the samples are classified according to their respective categories, completing the construction of the sample set for each category; next, the total length is calculated using hours as the time scale and the time difference between power outage and restoration as the total length, with a maximum length of [missing information]. Each sample is then expanded and transformed to form the training and testing sample set for the subsequent neural network model. The expanded and transformed samples of each cluster are as follows: in, This represents the extended sample set of the d-th cluster. Let be the number of samples before the expansion of the d-th cluster, and t be the hourly time period corresponding to sample i after the power outage. for The sample is expanded to form the whole; Define the demand quantity as the hourly time period within a day corresponding to the time t after a power outage. The output label for each sample after expansion.

5. The data-driven method for predicting customer demand during power outages according to claim 1, characterized in that, In S5, since each cluster sample after expansion contains a large number of 0-value labels, the SMOTE algorithm is used to solve this problem.

6. The data-driven method for predicting customer demand during power outages according to claim 5, characterized in that, The SMOTE algorithm operation steps include: S51. The minority class sample set for the SMOTE algorithm is defined as follows: S52. For each sample in the minority class, calculate its distance to all samples in the minority class sample set X using Euclidean distance as the standard, and obtain its k nearest neighbor samples; S53. Set a sampling ratio based on the proportion of sample imbalance to determine the sampling fold N. For each minority class sample... Randomly select several samples from its k nearest neighbors, assuming that the selected samples are... ; S54. For each randomly selected nearest neighbor , respectively with According to the formula Construct new samples.

7. The data-driven method for predicting customer demand during power outages according to claim 1, characterized in that, In S5, different model parameters can be set for the neural network model corresponding to each expanded sample set, including the number of hidden layers, the number of neurons in the hidden layers, the type of activation function, and the type of loss function. After the sample order is shuffled, the training set and the test set are divided. After the sample data is normalized, it is input into the neural network model for gradient descent and iterative convergence training to obtain the weights and bias parameters of the constructed neural network model.

8. The data-driven method for predicting customer demand during power outages according to claim 1, characterized in that, Step S6 includes: S61. The processed input features include the inherent basic features of the power outage line, the basic features of the power outage, the external objective features, and the dynamic change features. The inherent basic features of the line include the number of transformer substations, the number of users, whether it is a high-risk line, the number of high-risk users, the number of important users, and whether it belongs to a rural area. The basic features of the power outage include the month of the power outage, the day of the month in which the power outage occurs, the week of the day of the power outage, the number of users affected, the number of power outages in the previous month, the number of power outages in the previous two months, and the number of power outages in the previous three months. The external objective features include the highest temperature of the day, the lowest temperature of the day, the weather type of the day, and whether it is a holiday. The dynamic change features include the current time period after the power outage, the current time period of the day, and whether a notification has been sent. S62. Calculate the Euclidean distance between the inherent basic characteristics of the line and the cluster centers obtained in S3, and find the class with the smallest distance as the class to which the current input sample belongs; S63. Supplement the input features with the feature values ​​of "the current time is in which hour of the day" and "the hour of the power outage" in chronological order, organize them into an extended input dataset, and input them into the neural network model of the corresponding class in chronological order to obtain continuous prediction results, which constitute the demand prediction quantity for the time-series changes after the power outage.

Citation Information

Patent Citations

  • Power failure sensitivity analysis method based on neural network and clustering

    CN111681128A

  • Power failure prediction method for 10kV feeder fault of power distribution network

    CN115598459A

  • Clustering and trend index-based power distribution network line load prediction method and device

    CN112508275A

  • Root cause positioning method and system for complaint of mobile phone internet surfing user

    CN116633805A