Power failure customer appeal quantity prediction method based on data driving
By constructing a sample set that comprehensively considers multiple characteristics and factors, and using clustering and neural network models, the problem of the inability to predict the timing changes of customer demand volume after power outages in the prior art is solved, and a more efficient and reliable prediction effect is achieved.
Patent Information
- Application Number
- CN202411541757.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The prior art cannot effectively predict the timing changes in the number of customers' demands after a 10kV line failure and power outage, resulting in inefficient service risk judgment and risk prevention and control.
By constructing a sample set, taking into account multiple characteristics, dynamic factors and human factors of the power outage line, KMeans clustering and fully connected neural network model are used to predict the timing changes of customer demand volume after power outage.
The basis validity and credibility of the prediction process are improved, the scale of the model structure is reduced, the training efficiency is improved, and the generalization and prediction efficiency of the model are enhanced.
Smart Images

Figure CN119599165A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid technology, and in particular to a data-driven method for predicting the amount of power outage customer demands. Background Art
[0002] As the power grid structure becomes increasingly complex and expanded, power outages caused by faults in 10kV distribution networks often occur in daily life, and there is a certain possibility that they will cause service risks such as a sudden increase in customer calls. With the improvement of the modern power supply service system, power supply companies have put forward higher requirements for the quality of customer service. Timely and reliable prediction of the number of customer demands caused by faults and power outages can not only improve the efficiency of important information transmission during the service process, but also assist in judging potential risks (such as customer complaints, emergency demands, etc.), and take effective measures in time to prevent the risk from further expanding, which is of great significance to improving customers' experience of power outages. In this context, the current related topics only explore service risks from the perspective of predicting regional total call volume, power outage sensitivity, and power outage probability, and cannot quantify and analyze the risk of time series changes in customer demands caused by faults and power outages.
[0003] Wu Guanghua, Zhang Shike and others disclosed a power outage sensitivity analysis method based on neural network and clustering, publication number CN 111681128A. For the power outage plan line, they proposed a sensitivity prediction method based on neural network to make a qualitative judgment on whether the power outage plan is sensitive. The type of fault power outage was not considered, and the request work order was not quantitatively predicted by time period, that is, the model input and output did not have the characteristics of time series changes.
[0004] Deng Xiaoyong, Chen Tie and others disclosed a method for predicting power outages caused by faults in 10kV feeder lines in distribution networks, publication number CN115598459 A, which quantified the probability of power outages caused by line faults and predicted risks after non-faults occurred.
[0005] In addition, the existing research model only uses a single neural network prediction framework, and the application effect is poor for scenarios with large local feature differences, small sample label differences and large overall data volume. Currently, no prediction research on the temporal changes in customer demands caused by independent fault power outages has been proposed, and the efficiency of the prediction method still needs to be further improved. Summary of the invention
[0006] In view of the shortcomings of the above-mentioned prior art, the present invention provides a data-driven method for predicting the amount of customer demands for power outages. In the process of constructing a sample set, multiple inherent characteristics of the power outage lines, objective dynamic factors during the power outage, and human-determined factors are comprehensively considered, thereby predicting customer power outage demands that change over time after the power outage, which has higher reliability than the prior art.
[0007] The specific technical solutions are as follows:
[0008] A data-driven method for predicting the amount of customer complaints due to power outages, comprising:
[0009] S1. For 10kV lines, collect historical line fault power outage data, line feature data, historical weather date data in 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. Take each 10kV line fault power outage event that occurred in history as an independent sample unit, and complete the sample feature data in combination with the data collected in S1 to construct a sample data set;
[0011] S3. Cluster the line characteristic data based on the KMeans algorithm and the CH index to obtain the optimal number of clusters and the cluster center of the line characteristic data;
[0012] S4. Determine the class to which each sample belongs by calculating the Euclidean distance between the sample line feature vector and the cluster center vector in the sample data set one by one, divide the sample data set according to the class to which it belongs, and complete the construction of the sample set of each class; then, with the hour as the granularity and the power outage and restoration time difference as the total length, perform an expansion transformation on each sample to obtain an expanded sample set of each class;
[0013] S5. Perform data cleaning and sample data enhancement on each type of extended sample set to obtain a model training sample set, then build a different fully connected neural network model for each type of sample set, and complete the training of each neural network model through the sample data;
[0014] S6. When a power line is out of power, a full feature vector is formed based on the real-time data after the power outage, and 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, which are input into the corresponding neural network model one by one for prediction operation to obtain the prediction result.
[0015] The above scheme is further improved in S1:
[0016] The historical line fault power outage data is a list of historical fault power outage events within a selected time and area. Each power outage event includes the name of the power outage line, the number of power outage areas, the number of power outage users, the power outage time, the power supply restoration time, and the power outage SMS sending status;
[0017] The line characteristic data is 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 is a high-risk line, the number of high-risk users, and whether it is a township line, etc.;
[0018] The historical weather date data of the region includes the daily maximum temperature, daily minimum temperature, daily weather type, and whether it is a holiday;
[0019] The customer service work order data is the record data of the customer calling the service hotline, including the power outage line information and power outage event number involved in the call.
[0020] In the above scheme, S2 further comprises:
[0021] S21. The maximum temperature, minimum temperature, weather type, holiday, month, day, and day of the week of the day when the power outage occurs are obtained by associating the power outage time with the historical weather date data of the region, and marking the hour period of the day corresponding to the time when the power outage occurs. The mathematical expression is as follows:
[0022]
[0023] Among them, D1 represents the sample set, N represents the total number of samples, and O i represents the number of the i-th historical power outage event, represents the mth weather date feature of the i-th power outage event sample; T i The power outage time of the i-th power outage event sample corresponds to the T-th time of the day. i hours, then 1≤T i ≤24;
[0024] S22. Obtain the number of users, number of stations, number of important users, whether it is a high-risk line, number of high-risk users, and whether it belongs to a township line characteristic value of the power outage line by associating the line characteristic data with the power outage line name; complete the sample characteristics based on the sample set D1 of S21 to obtain the sample set D2, and the mathematical expression is as follows:
[0025]
[0026] in, It indicates that the p-th line feature of the power outage line involved in the i-th power outage event sample, that is, p = 6;
[0027] S23. Obtain whether the current power outage event sample sends a customer power outage notification SMS through historical line fault power outage data, and count the number of power outages on the lines involved in the current sample in the previous 1, 2, and 3 months; complete the sample features based on the sample set D2 in S22 to obtain the sample set D3, the mathematical expression is as follows:
[0028]
[0029] in, Indicates the number of power outages that occurred on the line of the i-th power outage event sample in the previous 1, 2, and 3 months, and the characteristic information of whether a power outage notification SMS is sent to the customer for the current event, that is, q = 4;
[0030] S24. By associating customer service work order data, the number of customer power outage complaints in each hour from the time the target event occurs to the time the power is restored is counted; based on the sample set D3 in S23, the sample features are further supplemented to obtain the sample set D4, and the mathematical expression is as follows:
[0031]
[0032] in, represents the number of customer complaints for the i-th power outage event sample in the t-th hour after the power outage, 1≤t≤t max , if the total power outage duration is less than or equal to t max , then t max Take the total duration of the power outage. If the total duration of the power outage is greater than t max ,but Indicates the time after power outage max The total number of customer requests after the hour period, assuming t max =16.
[0033] In the above scheme, the S3 operation process includes:
[0034] S31. Randomly select two initial points as centroids;
[0035] S32. Use the K-Means clustering algorithm to assign each sample in the route feature data to the cluster represented by the nearest centroid, calculate the new centroid of each cluster, assign each route sample point to the cluster represented by the nearest centroid and calculate the new centroid of the cluster, until the centroid value no longer changes;
[0036] S33. Calculate the Calinski Harabasz coefficient to evaluate the clustering effect. The CH calculation formula is as follows:
[0037]
[0038] Among them, B k Indicates the degree of dispersion between clusters, W k Indicates the degree of dispersion within the cluster, k indicates the number of clusters, and n indicates the total number of samples;
[0039] S34. The initial random centroid number is increased by 1. If the initial random centroid number is less than or equal to the maximum number of clusters, S32 and S33 are repeated, otherwise, the process goes 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] In the above scheme, S4 further comprises:
[0042] By calculating the sample line feature vectors in the sample data set D4 one by one The Euclidean distance from the cluster center vector is used to determine the cluster to which each sample belongs with the minimum distance;
[0043] The calculation method of Euclidean distance d is as follows:
[0044]
[0045] in, is the cluster center vector;
[0046] Then, each sample is classified according to its category, and the sample set of each category is constructed; then, the time difference between power outage and restoration is taken as the total length, with the longest being t max +1, expand and transform each sample to form a set of training and test samples for the subsequent neural network model, and expand and transform each type of cluster sample into the following form:
[0047]
[0048] Where D[d] represents the extended sample set of the d-th cluster, N d is the number of samples before the expansion of the d-th cluster, t is the corresponding hour period after the power outage of sample i, and D[d] is N d After the samples are expanded, The demand volume is defined as the hourly period of the day corresponding to the time of the tth hour after the power outage. is the output label of each sample after expansion.
[0049] In the above scheme, since each type of cluster samples after expansion contains a large number of zero-value labels in S5, the SMOTE algorithm is used to solve the problem.
[0050] In the above scheme, the SMOTE algorithm operation steps include:
[0051] S51. The minority class sample set of the SMOTE algorithm is defined as:
[0052]
[0053] S52. For each sample in the minority class, calculate its distance to all samples in the minority class sample set X using the Euclidean distance as the standard, and obtain its k nearest neighbor samples;
[0054] S53. Set a sampling ratio according to the sample imbalance ratio to determine the sampling ratio N. For each sample x of the minority class sampledi , randomly select several samples from its k nearest neighbors, assuming that the selected one is x i ';
[0055] S54. For each randomly selected neighbor x i ', respectively with x i According to the formula x new =x i +rand(0,1)×(x i '-x i ) to construct a new sample.
[0056] Furthermore, in the above scheme, in S5, different model parameters can be set for the neural network model corresponding to each extended sample set, including the number of hidden layers, the number of neurons in the hidden layer, the type of activation function, and the type of loss function; the sample order is shuffled and divided into training sets and test sets, the sample data is normalized and then input into the neural network model, and gradient descent and iterative convergence training is performed to obtain the weights and bias parameters of the constructed neural network model.
[0057] In the above scheme, step S6 further comprises:
[0058] S61. The sorted input features include inherent basic features of power outage lines, basic features of power outages, external objective features, and dynamic change features; the inherent basic features of the lines include the number of line areas, the number of line 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 township line; the basic features of power outages include the month of power outages, the day of the month when the power outages belong, the week of the power outages, the number of power outage users, 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 number of hours after the power outage at the current time, the number of hours of the day at the current time, and whether a notification has been sent;
[0059] S62. Calculate the Euclidean distance between the inherent basic features of the line and the centers of the various clusters 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 feature values of "the current time is in which hour of the day" and "the number of hours after the power outage" in the input features in chronological order, organize them into an extended input data set, and input them into the neural network model of the corresponding category one by one in chronological order to obtain continuous prediction results, which constitute the demand prediction quantity of the time series changes after the power outage.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] The present invention predicts the time series change value of the demand volume caused by the power outage caused by the independent 10kV line fault. In the process of constructing the sample set, multiple inherent characteristics of the power outage line (the area where the line is located, the number of line transformers, etc.), external objective variable factors during the power outage (weather factors, holiday factors, etc.), and human-determined factors (whether a power outage text message is sent) are comprehensively considered, thereby improving the validity of the basis of the prediction process and the credibility of the prediction result; secondly, the independent lines are classified according to the optimal clustering results of the line characteristics, and the sample set is effectively divided accordingly, thereby reducing the structural scale of each subsequent neural network model and improving the overall training efficiency of the model; the training samples are converted so that the input features contain time series information and the output results imply time series change characteristics, and the samples are further improved by using sample cleaning and sample enhancement techniques to improve the generalization of the model; each type of sample set adopts a fully connected neural network structure, which has better performance and is easy to adjust; in addition, under the framework of the method of the present invention, the prediction results obtained based on big data drive have higher reliability than traditional manual experience predictions, and the neural network model can also be quickly replaced or improved as needed in practical applications.
[0063] It is worth noting that the present invention predicts the customer's power outage demands that change over time after a power outage, and proposes a method for sample division based on line feature clustering and classification construction of a neural network prediction model. Since after a 10kV power outage occurs, the customer call demands related to the power outage line in each time period are independent variables, and the values between time periods are not correlated, in order to perform time series simulation prediction, the time series change information is included as a feature into the input of the prediction model.
[0064] The existing methods do not consider the clustering of line features, the generalization of a single neural network model is weak, and the methods and models do not have the ability to predict time series changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 Schematic diagram of the process of the present invention;
[0066] Figure 2 Logic diagram of the implementation framework of the method of the present invention;
[0067] Figure 3 The trend of CH coefficient changes during the implementation of the present invention;
[0068] Figure 4 Schematic diagram of the fully connected neural network structure of the present 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 process of the present invention;
[0070] Figure 6 The trained target neural network model of the present invention calls the prediction result. DETAILED DESCRIPTION
[0071] The following is a further detailed description of the embodiments of the invention in conjunction with the accompanying drawings to make the objectives, technical solutions and technical effects of the invention more clearly presented.
[0072] like Figure 1-Figure 2 As shown, a data-driven method for predicting customer demand for power outage events includes the following steps:
[0073] A data-driven method for predicting the amount of customer complaints due to power outages, comprising:
[0074] S1. For 10kV lines, collect historical line fault power outage data, line feature data, historical weather date data in 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. Take each 10kV line fault power outage event that occurred in history as an independent sample unit, and complete the sample feature data in combination with the data collected in S1 to construct a sample data set;
[0076] S3. Cluster the line characteristic data based on the KMeans algorithm and the CH index to obtain the optimal number of clusters and the cluster center of the line characteristic data;
[0077] S4. Determine the class to which each sample belongs by calculating the Euclidean distance between the sample line feature vector and the cluster center vector in the sample data set one by one, divide the sample data set according to the class to which it belongs, and complete the construction of the sample set of each class; then, with the hour as the granularity and the power outage and restoration time difference as the total length, perform an expansion transformation on each sample to obtain an expanded sample set of each class;
[0078] S5. Perform data cleaning and sample data enhancement on each type of extended sample set to obtain a model training sample set, then build a different fully connected neural network model for each type of sample set, and complete the training of each neural network model through the sample data;
[0079] S6. When a power line is out of power, a full feature vector is formed based on the real-time data after the power outage, and 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, which are input into the corresponding neural network model one by one for prediction operation to obtain the prediction result.
[0080] The present invention predicts customer power outage demands that change over time after a power outage, and proposes a method for sample division based on line feature clustering and classification construction of a neural network prediction model. Specifically, in the process of constructing a sample set, multiple inherent features of the power outage line and human-determined factors are comprehensively considered, and independent lines are classified by the optimal clustering results of line features, and the sample set is effectively divided accordingly; the training samples are converted so that the input features contain time series information and the output results imply time series change characteristics; each type of sample set adopts a fully connected neural network structure; based on the above principle process, it has higher reliability than traditional manual experience prediction, and in practical applications, the neural network model can be quickly replaced or improved as needed.
[0081] After the 10kV power outage occurs, the number of customer calls related to the power outage line in each time period is an independent variable, and there is no correlation between the values between time periods. In order to perform time series simulation prediction, the time series change information is included as a feature in the input of the prediction model, which has the ability to predict time series changes.
[0082] The following steps are used to illustrate the specific implementation:
[0083] S1. For 10kV lines, collect historical line fault power outage data, line characteristic data, historical weather date data in 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 power outage data is a list of historical fault power outage events within a selected time and area. Each power outage event includes the name of the power outage line, the number of power outage areas, the number of power outage users, the time when the power outage occurred, the time when power was restored, and the sending of power outage text messages.
[0085] The line characteristic data are 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 is a high-risk line, the number of high-risk users, and whether it is a township line, etc.
[0086] The historical weather date data of the region includes the daily maximum temperature, the daily minimum temperature, the daily weather type, and whether it is a holiday.
[0087] The customer service work order data is the record data of the customer calling the service hotline, including the power outage line information and power outage event number involved in the call.
[0088] S2. Take each 10kV line fault power outage event that occurred in history as an independent sample unit, combine the data collected in S1 to complete the sample feature data, and construct a sample data set, which includes the following process:
[0089] S21. The maximum temperature, minimum temperature, weather type, holiday, month, day, and day of the week of the day when the power outage occurs are obtained by associating the power outage time with the historical weather date data of the region, and marking the hour period of the day corresponding to the time when the power outage occurs. The mathematical expression is as follows:
[0090]
[0091] Among them, D1 represents the sample set, N represents the total number of samples, and O i represents the number of the i-th historical power outage event, represents the mth weather date feature of the i-th power outage event sample; T i The power outage time of the i-th power outage event sample corresponds to the T-th time of the day. i hours, then 1≤T i ≤24.
[0092] S22. Obtain the number of users, number of stations, number of important users, whether it is a high-risk line, number of high-risk users, and whether it belongs to a township line characteristic value of the power outage line by associating the line characteristic data with the power outage line name; complete the sample characteristics based on the sample set D1 of S21 to obtain the sample set D2, and the mathematical expression is as follows:
[0093]
[0094] in, It means that the i-th power outage event sample involves the p-th line feature of the power outage line, that is, p=6.
[0095] S23. Obtain whether the current power outage event sample sends a customer power outage notification SMS through historical line fault power outage data, and count the number of power outages on the lines involved in the current sample in the previous 1, 2, and 3 months; complete the sample features based on the sample set D2 in S22 to obtain the sample set D3, the mathematical expression is as follows:
[0096]
[0097] in, It represents the number of power outages that occurred on the line of the i-th power outage event sample in the previous 1, 2, and 3 months, and the characteristic information of whether a power outage notification SMS is sent to the customer for the current event, that is, q=4.
[0098] S24. By associating customer service work order data, the number of customer power outage complaints in each hour from the time the target event occurs to the time the power is restored is counted; based on the sample set D3 in S23, the sample features are further supplemented to obtain the sample set D4, and the mathematical expression is as follows:
[0099]
[0100] Among them, K i t represents the number of customer complaints for the i-th power outage event sample in the t-th hour after the power outage, 1≤t≤t max , if the total power outage duration is less than or equal to t max , then t max Take the total duration of the power outage. If the total duration of the power outage is greater than t max ,but Indicates the time after power outage max The total number of customer requests after the hour period, assuming t max =16.
[0101] S3. Cluster the line characteristic data based on the KMeans algorithm and the CH index to obtain the optimal number of clusters and the cluster center of the line characteristic data. The operation process is as follows:
[0102] S31: Randomly select two initial points as centroids.
[0103] S32: Use the K-Means clustering algorithm to assign each sample in the line feature data to the cluster represented by the nearest centroid, calculate the new centroid of each cluster, assign each line sample point to the cluster represented by the nearest centroid and calculate the new centroid of the cluster until the centroid value no longer changes.
[0104] S33: Calculate the Calinski Harabasz coefficient (CH coefficient) to evaluate the clustering effect. The CH calculation formula is as follows:
[0105]
[0106] Among them, B k Indicates the degree of dispersion between clusters, W k represents the degree of dispersion within the cluster, k represents the number of clusters, and n represents the total number of samples.
[0107] S34: The initial number of random centroids increases by 1. If the initial number of random centroids is less than or equal to the maximum number of clusters, repeat B and C, otherwise go to 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 know the changing trend of the CH coefficient during the implementation process. When the number of clusters is 7, the CH coefficient is the largest, so the optimal number of clusters is 7.
[0110] In the embodiment, clustering is divided into 7 categories, and the results are as follows:
[0111]
[0112]
[0113] In S4, the sample line feature vectors in the sample data set are calculated one by one The Euclidean distance from the cluster center vector is used to determine the cluster to which each sample belongs with the minimum distance.
[0114] The calculation method of Euclidean distance d is as follows:
[0115]
[0116] in, is the cluster center vector.
[0117] Then, we classify each sample according to its category and build a sample set for each category. Then, we use the hour as the scale and the power outage and restoration time difference as the total length (the longest is t max +1), expand and transform each sample to form a set of training and testing samples for the subsequent neural network model, and expand and transform each type of cluster sample into the following form:
[0118]
[0119] Where D[d] represents the extended sample set of the d-th cluster, N d is the number of samples before the expansion of the d-th cluster, t is the corresponding hour period after the power outage of sample i, and D[d] is N d The samples are expanded. The time of the tth hour after the power outage corresponds to the hour period of the day. For example, if a power outage occurs at 22:05, then If t = t max =16, and the total power outage duration of the power outage event sample is greater than t max , then t+ takes the value of 17, It is the total demand volume after 16 hours of power outage. Definition of demand volume is the output label of each sample after expansion.
[0120] In the embodiment, a sample i is expanded as follows:
[0121]
[0122]
[0123] S5. Perform data cleaning and sample data enhancement on each category of extended sample sets to obtain model training sample sets, then build different fully connected neural network models for each category of sample sets, and complete the training of each neural network model through sample data.
[0124] Data cleaning and sample data enhancement are performed on each sample collection: samples with missing feature data are removed. Since each cluster sample after expansion contains a large number of zero-value labels, the SMOTE algorithm is used to solve the label classification imbalance problem in each cluster sample data set to enhance the quality of generated samples and the performance of subsequent models. The operation steps include:
[0125] S51.The minority class sample set of the SMOTE algorithm is defined as:
[0126]
[0127] S52. For each sample in the minority class, calculate its distance to all samples in the minority class sample set X using the Euclidean distance as the standard to obtain its k nearest neighbor samples.
[0128] S53. Set a sampling ratio according to the sample imbalance ratio to determine the sampling ratio N. For each sample x of the minority class sampled i , randomly select several samples from its k nearest neighbors, assuming that the selected one is x i '.
[0129] S54. For each randomly selected neighbor x i ', respectively with x i According to the formula x new =x i +rand(0,1)×(x i '-x i ) to construct a new sample.
[0130] S6. When a power line is out of power, a full feature vector is formed based on the real-time data after the power outage, and 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, which are input into the corresponding neural network model one by one for prediction operation to obtain the prediction result.
[0131] For each extended sample collection after data cleaning and data enhancement, a differentiated fully connected neural network model (multi-layer perceptron MLP) is built to complete the model training, namely:
[0132] Different model parameters can be set for the neural network model corresponding to each extended sample set, including the number of hidden layers, the number of neurons in the hidden layer, the type of activation function, and the type of loss function, such as Figure 4 As shown in the figure, the sample order is disrupted and divided into training set and test set. The sample data is normalized and input into the neural network model. Gradient descent and iterative convergence training are performed to obtain the weight and bias parameters of the constructed neural network model.
[0133] The input features of the prediction model are selected as:
[0134]
[0135] In the embodiment, the normalization method is selected as follows:
[0136]
[0137] Among them, x max and x min are the maximum and minimum values that can appear in the original data x, respectively. norm is the normalized value.
[0138] In this embodiment, the activation function is selected as the relu function:
[0139] f(x)=max(0,x)
[0140] Output x if x is greater than 0, otherwise output 0.
[0141] In the embodiment, the loss function of the training model is selected as the mean square error function:
[0142]
[0143] y true,i is the true label value of the i-th sample, y pred,i The model's predicted value for the ith sample.
[0144] In the embodiment, according to the number of S3 clusters, the model parameters are set and a total of 7 neural network models are trained: the network models are as follows:
[0145] Classification Number of samples Number of 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 process description:
[0147] S61. The total feature vector formed by sorting includes power outage line characteristics, basic power outage characteristics, external objective characteristics and dynamic change characteristics.
[0148] The characteristics of power outage lines include the number of line substations, the number of line users, whether it is a high-risk line, the number of high-risk users, the number of important users, and whether it is a township line.
[0149] The basic characteristics of power outages include the month of the outage, the day of the month the outage occurs, the day of the week the outage occurs, the number of users who have experienced power outages, 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.
[0150] External objective characteristics 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.
[0151] The dynamic change characteristics include the number of hours after the power outage, the number of hours of the day, and whether a notification has been sent.
[0152] S62. Calculate the Euclidean distance between the inherent basic features of the line and the centers of the various clusters obtained in S3, and find the class with the smallest distance as the class to which the current input sample belongs;
[0153] S63. Then, after removing the line feature vector from the full feature vector, the remaining feature vectors are expanded and transformed, that is, the feature values of "the current time is in which hour of the day" and "the number of hours after the power outage" in the dynamic change features are supplemented in chronological order, and organized into an extended feature vector set. The extended feature vectors are input into the neural network model of the corresponding class one by one in chronological order to obtain continuous prediction results, which constitute the demand prediction quantity of the time series changes after the power outage.
[0154] It should be noted that the fully connected neural network model mentioned above is trained using the existing python deep learning framework. Specifically, the data samples are processed according to the above steps, and the existing packaged python deep learning model is selected to train the neural network model, which will not be described one by one here.
[0155] Combination Figure 5 As shown in the figure, it is a comparison chart of the prediction results and true values of the neural network training set and test set corresponding to a certain type of sample set in the implementation process; the curve changes of the predicted value and the true value in the figure are similar, and the prediction effect meets the expectations.
[0156] Combination Figure 6 As shown in the figure, the target neural network model after training calls the prediction results. 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 only a preferred feasible embodiment of the present invention and is not intended to limit the scope of the patent application of the present invention. All equivalent changes, equivalent substitutions or modified changes performed within the technical spirit and principles suggested by the present invention should be included in the scope of patent protection covered by the present invention.
Claims
1. A data-driven method for predicting customer demands for power outages, characterized in that: include: S1. For 10kV lines, collect historical line fault power outage data, line feature data, historical weather date data in the area where the line is located, and customer service work order data of the power supply company to which the line belongs; S2. Take each 10kV line fault power outage event that occurred in history as an independent sample unit, and complete the sample feature data in combination with the data collected in S1 to construct a sample data set; S3. Cluster the line characteristic data based on the KMeans algorithm and the CH index to obtain the optimal number of clusters and the cluster center of the line characteristic data; S4. Determine the class to which each sample belongs by calculating the Euclidean distance between the sample line feature vector and the cluster center vector in the sample data set one by one, divide the sample data set according to the class to which it belongs, and complete the construction of the sample set of each class; then, with the hour as the granularity and the power outage and restoration time difference as the total length, perform an expansion transformation on each sample to obtain an expanded sample set of each class; S5. Perform data cleaning and sample data enhancement on each type of extended sample set to obtain a model training sample set, then build a different fully connected neural network model for each type of sample set, and complete the training of each neural network model through the sample data; S6. When a line is out of power, a full feature vector is formed based on the real-time data after the power outage, and 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, which are input into the corresponding neural network model one by one for prediction operation to obtain the prediction result.
2. A data-driven method for predicting customer demands for power outages according to claim 1, characterized in that: In S1: The historical line fault power outage data is a list of historical fault power outage events within a selected time and area. Each power outage event includes the name of the power outage line, the number of power outage areas, the number of power outage users, the power outage time, the power supply restoration time, and the power outage SMS sending status; The line characteristic data is 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 is a high-risk line, the number of high-risk users, and whether it is a township line, etc.; The historical weather date data of the region includes the daily maximum temperature, daily minimum temperature, daily weather type, and whether it is a holiday; The customer service work order data is the record data of the customer calling the service hotline, including the power outage line information and power outage event number involved in the call.
3. The data-driven method for predicting customer demands for power outages according to claim 1, characterized in that: The S2 includes: S21. The maximum temperature, minimum temperature, weather type, holiday, month, day, and day of the week of the day when the power outage occurs are obtained by associating the power outage time with the historical weather date data of the region, and marking the hour period of the day corresponding to the time when the power outage occurs. The mathematical expression is as follows: Among them, D1 represents the sample set, N represents the total number of samples, and O i represents the number of the i-th historical power outage event, represents the mth weather date feature of the i-th power outage event sample; T i The power outage time of the i-th power outage event sample corresponds to the T-th time of the day. i hours, then 1≤T i ≤24; S22. Obtain the number of users, number of stations, number of important users, whether it is a high-risk line, number of high-risk users, and whether it belongs to a township line characteristic value of the power outage line by associating the line characteristic data with the power outage line name; complete the sample characteristics based on the sample set D1 of S21 to obtain the sample set D2, and the mathematical expression is as follows: in, It indicates that the p-th line feature of the power outage line involved in the i-th power outage event sample, that is, p = 6; S23. Obtain whether the current power outage event sample sends a customer power outage notification SMS through historical line fault power outage data, and count the number of power outages on the lines involved in the current sample in the previous 1, 2, and 3 months; complete the sample features based on the sample set D2 in S22 to obtain the sample set D3, the mathematical expression is as follows: in, Indicates the number of power outages that occurred on the line of the i-th power outage event sample in the previous 1, 2, and 3 months, and the characteristic information of whether a power outage notification SMS is sent to the customer for the current event, that is, q = 4; S24. By associating customer service work order data, the number of customer power outage complaints in each hour from the time the target event occurs to the time the power is restored is counted; based on the sample set D3 in S23, the sample features are further supplemented to obtain the sample set D4, and the mathematical expression is as follows: in, represents the number of customer complaints for the i-th power outage event sample in the t-th hour after the power outage, 1≤t≤t max , if the total power outage duration is less than or equal to t max , then t max Take the total duration of the power outage. If the total duration of the power outage is greater than t max ,but Indicates the time after power outage max The total number of customer requests after the hour period, assuming t max =16.
4. The data-driven method for predicting the amount of power outage customer complaints according to claim 1, characterized in that: The S3 operation process includes: S31. Randomly select two initial points as centroids; S32. Use the K-Means clustering algorithm to assign each sample in the route feature data to the cluster represented by the nearest centroid, calculate the new centroid of each cluster, assign each route sample point to the cluster represented by the nearest centroid and calculate the new centroid of the cluster, until the centroid value no longer changes; S33. Calculate the Calinski Harabasz coefficient to evaluate the clustering effect. The CH calculation formula is as follows: Among them, B k Indicates the degree of dispersion between clusters, W k Indicates the degree of dispersion within the cluster, k indicates the number of clusters, and n indicates the total number of samples; S34. The initial random centroid number is increased by 1. If the initial random centroid number is less than or equal to the maximum number of clusters, S32 and S33 are repeated, otherwise, the process goes 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.
5. The data-driven method for predicting customer demands for power outages according to claim 1, characterized in that: The S4 includes: By calculating the sample line feature vectors in the sample data set D4 one by one The Euclidean distance from the cluster center vector is used to determine the cluster to which each sample belongs with the minimum distance; The calculation method of Euclidean distance d is as follows: in, is the cluster center vector; Then, each sample is classified according to its category, and the sample set of each category is constructed; then, the time difference between power outage and restoration is taken as the total length, with the longest being t max +1, expand and transform each sample to form a set of training and test samples for the subsequent neural network model, and expand and transform each type of cluster sample into the following form: Where D[d] represents the extended sample set of the d-th cluster, N d is the number of samples before the expansion of the d-th cluster, t is the corresponding hour period after the power outage of sample i, and D[d] is N d After the samples are expanded, T i t The demand volume is defined as the hourly period of the day corresponding to the time of the tth hour after the power outage. is the output label of each sample after expansion.
6. A data-driven method for predicting customer demands for power outages according to claim 1, characterized in that: In S5, since each type of cluster sample after expansion contains a large number of zero-value labels, the SMOTE algorithm is used to solve the problem.
7. A data-driven method for predicting customer demands for power outages according to claim 6, characterized in that: The SMOTE algorithm operation steps include: S51. The minority class sample set of the SMOTE algorithm is defined as: S52. For each sample in the minority class, calculate its distance to all samples in the minority class sample set X using the Euclidean distance as the standard, and obtain its k nearest neighbor samples; S53. Set a sampling ratio according to the sample imbalance ratio to determine the sampling ratio N. For each sample x of the minority class sampled i , randomly select several samples from its k nearest neighbors, assuming that the selected one is x i '; S54. For each randomly selected neighbor x i ', respectively with x i According to the formula x new =x i +rand(0,1)×(x i '-x i ) to construct a new sample.
8. The data-driven method for predicting customer demands for 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 extended sample set, including the number of hidden layers, the number of neurons in the hidden layer, the type of activation function, and the type of loss function; the sample order is shuffled and divided into training sets and test sets, and the sample data is normalized and input into the neural network model, and gradient descent and iterative convergence training is performed to obtain the weights and bias parameters of the constructed neural network model.
9. The data-driven method for predicting customer demands for power outages according to claim 1, characterized in that: Step S6 includes: S61. The sorted input features include inherent basic features of power outage lines, basic features of power outages, external objective features, and dynamic change features; the inherent basic features of the lines include the number of line areas, the number of line 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 township line; the basic features of power outages include the month of power outages, the day of the month when the power outages belong, the week of the power outages, the number of power outage users, 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 number of hours after the power outage at the current time, the number of hours of the day at the current time, and whether a notification has been sent; S62. Calculate the Euclidean distance between the inherent basic features of the line and the centers of the various clusters 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 number of hours after the power outage" in chronological order, organize them into an extended input data set, and input them into the neural network model of the corresponding class one by one in chronological order to obtain continuous prediction results, thus forming the demand prediction quantity of 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
Potential risk behavior processing method and device, computer equipment and storage medium
CN117333266A