A method, device, equipment and medium for predicting the number of low-voltage emergency repair work orders

By acquiring and preprocessing weather data and inputting it into the preset emergency repair work order quantity prediction model, the problem that traditional methods are difficult to predict for multiple days is solved, and more flexible and accurate prediction is achieved, which is conducive to the work arrangements of emergency repair workers.

CN113947247BActive Publication Date: 2025-03-14GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111228676.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-03-14
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

The traditional method of predicting the number of low-voltage emergency repair work orders is limited by the selection of characteristic variables, and it is difficult to flexibly and accurately realize the multi-day prediction of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangements for emergency repair personnel.

Method used

By obtaining weather forecast data, data preprocessing is performed to generate weather characteristic data, and input it into the preset emergency repair work order quantity prediction model to generate the quantity prediction results of low-pressure emergency repair work orders. Optionally, the initial decision tree model is constructed using historical weather data and trained through multiple sets of historical feature data to optimize the prediction model.

Benefits of technology

It realizes more flexible and accurate multi-day prediction of the number of low-voltage emergency repair work orders, which is conducive to the work arrangements of emergency repair personnel and improves the flexibility and accuracy of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947247B_ABST
    Figure CN113947247B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for predicting the number of low-voltage emergency repair work orders. The method obtains weather forecast data, performs data preprocessing operations on the weather forecast data, and then converts the weather forecast data into character data to obtain weather characteristic data. Finally, the weather characteristic data is input into a preset emergency repair work order quantity prediction model to generate a prediction result for the number of low-voltage emergency repair work orders, thereby solving the technical problem that traditional prediction methods are limited by the selection of characteristic variables, mainly focus on the determination and analysis of the number of short-term low-voltage emergency repair work orders, and are difficult to flexibly and accurately realize multi-day predictions of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangement of emergency repair personnel. Multi-day predictions of the number of low-voltage emergency repair work orders can be realized more flexibly and accurately, which is conducive to the work arrangement of emergency repair personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of work order quantity prediction, and in particular to a method, device, equipment and medium for predicting the quantity of low-voltage emergency repair work orders. Background Art

[0002] As society's requirements for power supply reliability and power supply services increase, people are increasingly reporting on daily power outages, low voltage, and other issues that affect the quality of daily electricity use. How to improve customer satisfaction and reduce complaints has become one of the important research topics for power supply companies. In order to reduce the number of low-voltage repair work orders for users, we can start by predicting user complaint behavior, use data mining models to predict the trend of the number of low-voltage repair work orders, analyze the causes of potential complaints, and take precautions in advance. By understanding the development trend of the number of low-voltage repair work orders in the future, we can take effective measures such as deploying repair construction teams and customer service seats to reduce the risk of complaints, avoid problems such as escalation of complaints, discover weak links in the service process, and respond to the demands of electricity users in a timely manner.

[0003] At present, the mainstream technical means for predicting the number of low-voltage emergency repair work orders are mostly based on machine learning algorithms, such as random forest algorithm (Random Forest), decision tree of support vector machine (SVM), regression prediction model or time series prediction model based on artificial neural network (ANN). The current research includes data preprocessing, feature variable processing, and establishing a machine learning model between power consumption characteristics and the number of low-voltage emergency repair work orders.

[0004] Since the number of low-voltage emergency repair work orders is closely related to many factors such as weather conditions, low-voltage tripping faults, and power load trends, the above method has a strong randomness. The traditional prediction method is limited by the selection of characteristic variables and mainly focuses on the short-term determination and analysis of the number of low-voltage emergency repair work orders. It is difficult to flexibly and accurately realize multi-day prediction of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangement of emergency repair personnel. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for predicting the number of low-voltage emergency repair work orders, which solves the technical problem that traditional prediction methods are limited by the selection of characteristic variables, mainly focus on the short-term determination and analysis of the number of low-voltage emergency repair work orders, and are difficult to flexibly and accurately realize multi-day prediction of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangement of emergency repair personnel.

[0006] A first aspect of the present invention provides a method for predicting the number of low-voltage emergency repair work orders, comprising:

[0007] Get weather forecast data;

[0008] Performing data preprocessing operations on the weather forecast data to obtain weather characteristic data;

[0009] The weather characteristic data is input into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders.

[0010] Optionally, the method further comprises:

[0011] Get historical weather data;

[0012] Performing the data screening operation on the historical weather data to obtain multiple groups of historical feature data and constructing an initial decision tree model;

[0013] The initial decision tree model is trained using multiple groups of the historical feature data to obtain a repair work order quantity prediction model.

[0014] Optionally, the step of performing a data preprocessing operation on the weather forecast data to obtain weather characteristic data includes:

[0015] The weather forecast data is encoded and converted according to a preset encoding conversion rule to generate intermediate weather data;

[0016] Using a preset delay time window to perform data division on the intermediate weather data to obtain corresponding delay characteristics;

[0017] Using a preset rolling time window to divide the intermediate weather data into data to obtain corresponding rolling features;

[0018] The delay feature and the rolling feature are arranged in chronological order to obtain weather feature data.

[0019] Optionally, the step of using multiple groups of the historical feature data to train the initial decision tree model to obtain a repair work order quantity prediction model includes:

[0020] Dividing the multiple groups of historical feature data according to a time series sliding window to obtain training data and test data;

[0021] Using the training data to train the initial decision tree model to obtain an intermediate decision tree model;

[0022] Inputting the test data into the intermediate decision tree model in sequence to obtain multiple prediction quantity results;

[0023] Determining a root mean square error of the intermediate decision tree model according to the predicted quantity result and the actual quantity result;

[0024] The root mean square error is compared with a preset error threshold, and a repair work order quantity prediction model is determined according to the comparison result.

[0025] Optionally, after the step of using the training data to train the initial decision tree model to obtain an intermediate decision tree model, the step further includes:

[0026] Analyze the intermediate decision tree model to determine the number of attribute divisions for each of the training data;

[0027] Deleting a preset amount of training data according to the attribute division times from low to high;

[0028] The remaining training data is determined as new training data.

[0029] Optionally, the step of comparing the root mean square error with a preset error threshold and determining a repair work order quantity prediction model according to the comparison result includes:

[0030] comparing the root mean square error with a preset error threshold;

[0031] If the root mean square error is less than or equal to the error threshold, the intermediate decision tree model at the current moment is determined as the repair work order quantity prediction model;

[0032] If the root mean square error is greater than the error threshold, the model parameters of the intermediate decision tree model are adjusted according to a preset adjustment gradient, and the step of inputting the test data into the intermediate decision tree model in sequence to obtain multiple predicted quantity results is jumped to execution.

[0033] Optionally, the step of inputting the weather characteristic data into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders includes:

[0034] Inputting the weather characteristic data into a preset emergency repair work order quantity prediction model; the emergency repair work order quantity prediction model includes multiple decision layers;

[0035] Sequentially classifying the weather characteristic data by attributes through each of the decision layers until reaching the last decision layer;

[0036] The quantity prediction result corresponding to the last decision layer is determined as the quantity prediction result of the low-voltage emergency repair work order.

[0037] A second aspect of the present invention provides a low voltage emergency repair work order quantity prediction device, comprising:

[0038] A weather forecast data acquisition module is used to acquire weather forecast data;

[0039] A weather feature extraction module, used for performing a data preprocessing operation on the weather forecast data to obtain weather feature data;

[0040] The emergency repair work order quantity prediction module is used to input the weather characteristic data into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders.

[0041] A third aspect of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for predicting the number of low-voltage emergency repair work orders as described in any one of the first aspects of the present invention.

[0042] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the method for predicting the number of low-voltage emergency repair work orders as described in any one of the first aspects of the present invention is implemented.

[0043] It can be seen from the above technical solutions that the present invention has the following advantages:

[0044] The present invention obtains weather forecast data, performs data preprocessing operations on the weather forecast data, converts the weather forecast data into character data, obtains weather characteristic data, and finally inputs the weather characteristic data into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders, thereby solving the technical problem that traditional prediction methods are limited by the selection of characteristic variables, mainly focusing on the short-term determination and analysis of the number of low-voltage emergency repair work orders, and it is difficult to flexibly and accurately realize multi-day prediction of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangement of emergency repair personnel. Multi-day prediction of the number of low-voltage emergency repair work orders can be realized more flexibly and accurately, which is conducive to the work arrangement of emergency repair personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0046] Figure 1 A flowchart of a method for predicting the number of low-voltage emergency repair work orders provided in Example 1 of the present invention;

[0047] Figure 2 A flowchart of a method for predicting the number of low-voltage emergency repair work orders provided in Embodiment 2 of the present invention;

[0048] Figure 3A schematic diagram of calculating a delay feature lag and a rolling feature rolling according to an embodiment of the present invention;

[0049] Figure 4 A schematic diagram of determining a data limit value according to an embodiment of the present invention;

[0050] Figure 5 Schematic diagram of a time series sliding window method in an embodiment of the present invention;

[0051] Figure 6 This is a structural block diagram of a low-voltage emergency repair work order quantity prediction device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0052] The embodiments of the present invention provide a method, device, equipment and medium for predicting the number of low-voltage emergency repair work orders, which are used to solve the technical problem that traditional prediction methods are limited by the selection of characteristic variables, mainly focus on the short-term determination and analysis of the number of low-voltage emergency repair work orders, and it is difficult to flexibly and accurately realize multi-day prediction of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangement of emergency repair personnel.

[0053] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] See also Figure 1 , Figure 1 A flowchart of the steps of a method for predicting the number of low-voltage emergency repair work orders provided in Example 1 of the present invention.

[0055] The present invention provides a method for predicting the number of low-voltage emergency repair work orders, comprising the following steps:

[0056] Step 101, obtaining weather forecast data;

[0057] Weather forecast data refers to weather data for the next n days obtained through web crawler tools, including but not limited to weather type, daily maximum temperature, daily minimum temperature and other data, where n is a positive integer.

[0058] In the embodiment of the present application, since there may be multiple areas in the same area, the importance, power quality and power load corresponding to each area may be different. The weather conditions faced by each area may affect the use status of various pressure-generating equipment. At the same time, different repair personnel are responsible for a limited number of work orders. In order to achieve a reasonable allocation of low-voltage repair work orders and further reduce the workload of repair personnel, weather forecast data can be obtained as the data basis for subsequent low-voltage repair work order predictions.

[0059] It should be noted that the low-voltage emergency repair work order refers to the work form for the maintenance, repair and operation work that needs to be completed for low-voltage equipment such as low-voltage transformers.

[0060] Step 102, performing data preprocessing operations on the weather forecast data to obtain weather characteristic data;

[0061] After obtaining the weather forecast data, since the weather forecast data may include character data such as weather type, data preprocessing operations can be performed on the weather forecast data to comprehensively consider the weather forecast data and encode and convert each character data in the weather forecast data, convert each weather type and other character data into model-recognizable data to obtain weather characteristic data.

[0062] Step 103, input the weather characteristic data into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders.

[0063] The repair work order quantity prediction model in the embodiment of the present application refers to a decision tree model constructed using a decision tree of a Leaf-wise growth strategy as a base classifier.

[0064] In an embodiment of the present application, after the weather characteristic data is extracted, the weather characteristic data can be input into a preset emergency repair work order quantity prediction model, and each decision layer therein can perform attribute division based on the weather characteristic data to determine the number of low-voltage emergency repair work orders that will appear under the current weather forecast data, thereby facilitating operation and maintenance personnel to efficiently and reasonably distribute work orders to each group of emergency repair personnel based on the prediction results of the number of low-voltage emergency repair work orders.

[0065] In an embodiment of the present application, weather forecast data is obtained, and after performing data preprocessing operations on the weather forecast data, character data conversion of the weather forecast data is realized to obtain weather characteristic data, and finally the weather characteristic data is input into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders, thereby solving the technical problem that traditional prediction methods are limited by the selection of characteristic variables, mainly focusing on the short-term determination and analysis of the number of low-voltage emergency repair work orders, and it is difficult to flexibly and accurately realize multi-day prediction of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangement of emergency repair personnel. Multi-day prediction of the number of low-voltage emergency repair work orders can be realized more flexibly and accurately, which is conducive to the work arrangement of emergency repair personnel.

[0066] See also Figure 2 , Figure 2 A flowchart of the steps of a method for predicting the number of low-voltage emergency repair work orders provided in Example 2 of the present invention.

[0067] The present invention provides a method for predicting the number of low-voltage emergency repair work orders, comprising the following steps:

[0068] Step 201, obtaining weather forecast data;

[0069] Weather forecast data refers to weather data for the next n days obtained through web crawler tools, including but not limited to weather type, daily maximum temperature, daily minimum temperature and other data, where n is a positive integer.

[0070] In the embodiment of the present application, since there may be multiple areas in the same area, the importance, power quality and power load corresponding to each area may be different. The weather conditions faced by each area may affect the use status of various pressure-generating equipment. At the same time, different repair personnel are responsible for a limited number of work orders. In order to achieve a reasonable allocation of low-voltage repair work orders and further reduce the workload of repair personnel, weather forecast data can be obtained as the data basis for subsequent low-voltage repair work order predictions.

[0071] It should be noted that the low-voltage emergency repair work order refers to the work form for the maintenance, repair and operation work that needs to be completed for low-voltage equipment such as low-voltage transformers.

[0072] Step 202, performing data preprocessing operations on the weather forecast data to obtain weather characteristic data;

[0073] Optionally, step 202 may include the following sub-steps:

[0074] The weather forecast data is encoded and converted according to a preset encoding conversion rule to generate intermediate weather data;

[0075] The preset delay time window is used to divide the intermediate weather data and obtain the corresponding delay characteristics;

[0076] The preset rolling time window is used to divide the intermediate weather data and obtain the corresponding rolling features;

[0077] The delayed characteristics and rolling characteristics are arranged in chronological order to obtain weather characteristic data.

[0078] In the embodiment of the present application, since the data model cannot recognize character-type data, the character-type variables therein may be encoded and converted to obtain intermediate weather data.

[0079] Taking weather type as an example, the specific encoding conversion rules can be found in Table 1 below:

[0080] Serial number Weather Type coding 1 Showers, thunderstorms 0 2 Cloudy, overcast 1 3 Light rain, light to moderate rain, moderate rain, moderate to heavy rain 2 4 Heavy rain, rainstorm 3 5 clear 4

[0081] Table 1

[0082] In an embodiment of the present invention, after obtaining the intermediate weather data, in order to improve the accuracy of the subsequent low-voltage emergency repair work order quantity prediction, a preset delay time window and a preset rolling time window can be used to divide the multiple intermediate power consumption data. Specifically, the delay time window is used to select multiple intermediate weather data before the forecast target date as delay features; at the same time, the rolling time window is used to calculate the average value between three adjacent intermediate weather data, which is used as the rolling feature.

[0083] See also Figure 3 , Figure 3 A schematic diagram of calculating a delay feature lag and a rolling feature rolling according to an embodiment of the present invention is shown.

[0084] In an example of the present invention, when the number of low-voltage emergency repair work orders on July 10 is set as the prediction target, the number of low-voltage emergency repair work orders in the past 7 days is selected as the input feature, that is, the number of low-voltage emergency repair work orders from July 3 to July 9 is selected as the number of low-voltage emergency repair work orders, named Lag-1 to Lag-7 input variables. At the same time, the number of low-voltage emergency repair work orders on July 9, 8, and 7 is averaged to obtain the roll-1 variable, and so on.

[0085] In an embodiment of the present invention, after obtaining multiple delay features and multiple rolling features, all or several features such as weather type, daily maximum temperature and daily minimum temperature corresponding to the delay features and rolling features can be selected in chronological order and sorted to obtain weather feature data.

[0086] The historical characteristic data can be specifically expressed in the form of the following Table 2:

[0087]

[0088]

[0089] Table 2

[0090] Step 203, inputting the weather characteristic data into a preset emergency repair work order quantity prediction model; the emergency repair work order quantity prediction model includes multiple decision layers;

[0091] The repair work order quantity prediction model in the embodiment of the present application refers to a decision tree model constructed using a decision tree of a Leaf-wise growth strategy as a base classifier.

[0092] In an embodiment of the present application, after the weather characteristic data is extracted, the weather characteristic data can be input into a preset emergency repair work order quantity prediction model, and each decision layer therein can perform attribute division based on the weather characteristic data to determine the number of low-voltage emergency repair work orders that will appear under the current weather forecast data, thereby facilitating operation and maintenance personnel to efficiently and reasonably distribute work orders to each group of emergency repair personnel based on the prediction results of the number of low-voltage emergency repair work orders.

[0093] Optionally, the repair work order quantity prediction model can be generated by following the steps S11-S13:

[0094] S11, obtaining historical weather data;

[0095] S12, performing a data screening operation on the historical weather data to obtain multiple groups of historical feature data and construct an initial decision tree model;

[0096] Optionally, the historical weather data includes multiple different types of electricity consumption data to be processed, and step S12 may include the following sub-step S21:

[0097] S21, traversing various power consumption data to be processed, and determining data limits corresponding to various power consumption data to be processed based on quartiles corresponding to various power consumption data to be processed;

[0098] Further, the data limit includes a maximum upper limit value and a minimum lower limit value, and the quartile includes a first quartile and a second quartile. Step S21 may include the following sub-steps:

[0099] Traverse various power consumption data to be processed;

[0100] Calculate the interval difference between the first quartile and the second quartile corresponding to various power consumption data to be processed;

[0101] Calculate the absolute value of each spacing difference and the spacing multiplier of the preset spacing multiple;

[0102] Calculate the sum of the first quartile and the interval multiplied value, and use the sum as the maximum upper limit;

[0103] Calculate the difference between the second quartile and the interval multiplier, and use the difference as the minimum lower limit.

[0104] In an embodiment of the present invention, the power consumption data to be processed may include multiple types, such as weather type, daily maximum temperature, daily minimum temperature, number of daily low-voltage emergency repair work orders, number of low-voltage faults, number of over-limits, etc. After obtaining different types of power consumption data to be processed, various types of power consumption data to be processed may be traversed first, and the spacing difference between the first quartile and the second quartile corresponding to various types of power consumption data to be processed may be calculated; the spacing multiplier of the absolute value of each spacing difference and the preset spacing multiple is calculated; the sum of the first quartile and the spacing multiplier is calculated, and the sum is used as the maximum upper limit; the difference between the second quartile and the spacing multiplier is calculated, and the difference is used as the maximum upper limit.

[0105] See also Figure 4 , Figure 4 A schematic diagram of determining a data limit value according to an embodiment of the present invention is shown.

[0106] In the specific implementation, the data limit can be represented by a box plot. The median of the power consumption data to be processed is located at the center of the box plot. The length of the box represents the interquartile range (IQR). The two ends of the box are the first quartile (Q3) and the second quartile (Q1), respectively. The two ends of the box must be the maximum upper limit and the minimum lower limit.

[0107] It should be noted that the spacing multiple can be set to 1.5. At this time, the maximum upper limit is Q3+1.5IQR and the minimum lower limit is Q1-1.5IQR, that is, the abnormal value is greater than Q3+1.5IQR and less than Q1-1.5IQR.

[0108] S13. Use multiple groups of historical feature data to train the initial decision tree model to obtain a repair work order quantity prediction model.

[0109] Further, step S13 may include the following sub-steps S131-S135:

[0110] S131, dividing multiple groups of historical feature data according to the time series sliding window to obtain training data and test data;

[0111] See also Figure 5 , Figure 5 A schematic diagram of the time series sliding window method in an embodiment of the present invention is shown.

[0112] In an embodiment of the present invention, in order to enhance the generalization ability of the model and avoid data information leakage, multiple groups of historical feature data can be divided through a time series sliding window, and cross-validation can be performed by dividing the data sets to further avoid the problem of overfitting of the model, thereby obtaining training data and test data.

[0113] like Figure 5 As shown, it includes multiple groups of historical feature data, Dataset1, Dataset2 and Dataset3, and each group of historical feature data is divided according to different time t1, t2 and t3 to obtain training data and test data. <t2<t3。

[0114] In another example of the present application, before step S132, in order to further screen the training data and reduce the model training time, the following steps may be performed to update the training data:

[0115] Analyze the intermediate decision tree model to determine the number of attribute divisions for each training data;

[0116] Delete a preset amount of training data from low to high according to the attribute division times;

[0117] The remaining training data is determined as new training data.

[0118] In an embodiment of the present invention, the intermediate decision tree model can be analyzed to determine the number of attribute divisions of each group of training data, and then a preset number of training data can be deleted from low to high according to the number of attribute divisions, and the remaining training data can be determined as new training data, thereby achieving the purpose of streamlining features and further improving the running speed.

[0119] Optionally, the partition gain of each group of training data in the initial decision tree model may be calculated, and each group of training data may be screened based on each partition gain, so as to screen out training data with high feature importance.

[0120] S132, using training data to train an initial decision tree model to obtain an intermediate decision tree model;

[0121] In the embodiment of the present application, in order to improve the robustness and accuracy of the model, a recursive multi-step prediction strategy can be adopted, and the prediction value of the previous step is used as a feature. The essence is still a single-step prediction, but only one model is needed for prediction of any number of steps. This strategy has the risk of error superposition and is suitable for short step lengths, as shown in the following equations 1 and 2:

[0122] prediction(t+1)=model1(x(t),x(t-1),...,x(tn)) (1)

[0123] prediction(t+2)=model1(prediction(t+1),x(t),...,x(t-n+1)) (2)

[0124] The direct+recursive hybrid multi-step prediction strategy has the best stability, and has a lower error superposition risk than the recursive multi-step prediction strategy, and has a higher prediction accuracy and the best robustness than the direct method. Therefore, the present invention adopts the direct+recursive multi-step prediction strategy.

[0125] In an embodiment of the present invention, the training process can be trained by selecting the LightGBM model algorithm. LightGBM is a model algorithm based on GBDT (Gradient Boosting Decision Tree) proposed by Microsoft in recent years. It is mainly used to solve the problems encountered by GDBT in massive data so that it can be used better and faster in industrial practice. It is currently widely used in the industry. The algorithm uses the decision tree of the Leaf-wise growth strategy as the base classifier to build an efficient integrated learning framework, and introduces the histogram algorithm to discretize the original data to enhance the robustness to noise.

[0126] In the embodiment of the present invention, a weak learner h(x) is obtained through iteration each time, so that the iterative loss function L(y, F t (x))minimum.

[0127] L(y,F t (x))=L(y,F t-1 (x)+h t (x)

[0128] In the formula, x is the training sample, y is the actual value of the predicted target corresponding to the training sample, and F t-1 (x) and L(y,F t (x)) are the strong learner and loss function obtained in the previous iteration respectively.

[0129] Taking the i-th sample as an example, the negative gradient of the following formula is used to fit the residual value r of this iteration: ti .

[0130]

[0131] In the formula, x i is the i-th training sample, y i is the actual value of the predicted target corresponding to the i-th training sample, F t-1 (x) is the strong learner obtained in the previous iteration.

[0132] Use squared error approximation to fit the weak learner h t (x), so that the loss function is minimized:

[0133] h t (x) = argmin∑(rti-h(x)) 2

[0134] Update the strong learner F obtained in this iteration t (x) As

[0135] F t (x) = h t (x)+F t-1 (x)

[0136] In the above formula, the LightGBM boosting tree model ensures that the loss function is continuously optimized in the downward direction after each addition of a new weak learner, that is, L(y,F t (x))<L(y,F t-1 (x)). L(y,F t (x))、L(y,F t-1 (x)) are the loss function values ​​of the t-th and t-1-th iterations respectively. t (x) and F t-1 (x) is the predicted value corresponding to the t-th and t-1-th samples, and y is the actual value corresponding to the sample.

[0137] S133, inputting the test data into the intermediate decision tree model in sequence to obtain multiple prediction quantity results;

[0138] In an embodiment of the present invention, the test data is sequentially input into each intermediate decision tree model to obtain a plurality of prediction quantity results, so as to obtain a data basis for verifying the model performance of each intermediate decision tree model.

[0139] S134. Determine the root mean square error of the intermediate decision tree model according to the predicted quantity result and the actual quantity result;

[0140] In an embodiment of the present invention, after obtaining the predicted quantity results and the actual quantity results corresponding to each test data, the above results are combined with the quantity of test data to determine the root mean square error corresponding to each intermediate decision tree model.

[0141] In the specific implementation, the root mean square error (RMSE) can be calculated by the following formula:

[0142]

[0143] In the formula, y i Indicates the actual number of results corresponding to the i-th test data, It represents the predicted number of results corresponding to the i-th test data, and n represents the number of test data.

[0144] S135. Compare the root mean square error with a preset error threshold, and determine a repair work order quantity prediction model according to the comparison result.

[0145] Further, step S135 may include the following sub-steps:

[0146] Compare the root mean square error with a preset error threshold;

[0147] If the root mean square error is less than or equal to the error threshold, the intermediate decision tree model at the current moment is determined as the repair work order quantity prediction model;

[0148] If the root mean square error is greater than the error threshold, the model parameters of the intermediate decision tree model are adjusted according to the preset adjustment gradient, and the execution is jumped to the step of inputting the test data into the intermediate decision tree model in sequence to obtain multiple predicted quantity results.

[0149] In an embodiment of the present invention, after obtaining the root mean square error corresponding to each intermediate decision tree model, the root mean square error can be compared with a preset error threshold. If the root mean square error is less than or equal to the error threshold, the intermediate decision tree model at the current moment is determined as the emergency repair work order quantity prediction model; if the root mean square error is greater than the error threshold, the model parameters of the intermediate decision tree model are adjusted according to the preset adjustment gradient, and the process jumps to step S133, and the training data is used again to perform model training.

[0150] Among them, the model parameters can be selected as shown in Table 3:

[0151]

[0152] Table 3

[0153] Step 204, attribute classification of the weather characteristic data is performed in turn through each decision layer until the last decision layer is reached;

[0154] Step 205, determining the quantity prediction result corresponding to the last decision layer as the quantity prediction result of the low-voltage emergency repair work order.

[0155] In an embodiment of the present application, after the training of the emergency repair work order quantity prediction model is completed, in order to know the number of low-voltage emergency repair work orders in each power consumption area in the next n days, the predicted weather characteristic data can be input into the emergency repair work order quantity prediction model, and the emergency repair work order quantity prediction model is constructed in the form of a decision tree, which includes multiple decision layers, and the corresponding number of low-voltage emergency repair work orders is set in the last decision layer.

[0156] Through the multi-layer decision layers in the emergency repair work order quantity prediction model, the attributes of each feature in the predicted weather characteristic data are divided in sequence, and the decision tree is continuously extended until the last decision layer is reached. According to the number of low-voltage emergency repair work orders corresponding to the last decision layer, the number of low-voltage emergency repair work orders corresponding to each power consumption area is determined.

[0157] In an embodiment of the present application, weather forecast data is obtained, and after performing data preprocessing operations on the weather forecast data, character data conversion of the weather forecast data is realized to obtain weather characteristic data, and finally the weather characteristic data is input into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders, thereby solving the technical problem that traditional prediction methods are limited by the selection of characteristic variables, mainly focusing on the short-term determination and analysis of the number of low-voltage emergency repair work orders, and it is difficult to flexibly and accurately realize multi-day prediction of the number of low-voltage emergency repair work orders, which is not conducive to the work arrangement of emergency repair personnel. Multi-day prediction of the number of low-voltage emergency repair work orders can be realized more flexibly and accurately, which is conducive to the work arrangement of emergency repair personnel.

[0158] See also Figure 6 , Figure 6 This is a structural block diagram of a low-voltage emergency repair work order quantity prediction device provided in Example 3 of the present invention.

[0159] An embodiment of the present invention provides a low-voltage emergency repair work order quantity prediction device, comprising:

[0160] The weather forecast data acquisition module 601 is used to acquire weather forecast data;

[0161] The weather feature extraction module 602 is used to perform data preprocessing operations on the weather forecast data to obtain weather feature data;

[0162] The emergency repair work order quantity prediction module 603 is used to input weather characteristic data into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders.

[0163] Optionally, the device further comprises:

[0164] A historical weather data acquisition module is used to acquire historical weather data;

[0165] A decision tree construction module is used to perform data screening operations on historical weather data, obtain multiple groups of historical feature data and construct an initial decision tree model;

[0166] The model training module is used to train the initial decision tree model using multiple groups of historical feature data to obtain a repair work order quantity prediction model.

[0167] Optionally, the weather feature extraction module 602 includes:

[0168] The data encoding conversion submodule is used to perform encoding conversion on the weather forecast data according to the preset encoding conversion rules to generate intermediate weather data;

[0169] The delay feature generation submodule is used to divide the intermediate weather data using a preset delay time window to obtain corresponding delay features;

[0170] The rolling feature generation submodule is used to divide the intermediate weather data using a preset rolling time window to obtain corresponding rolling features;

[0171] The feature sorting submodule is used to arrange the delay features and rolling features in chronological order to obtain weather feature data.

[0172] Optionally, the model training module includes:

[0173] The data partitioning submodule is used to partition multiple groups of historical feature data according to the time series sliding window to obtain training data and test data;

[0174] An initial decision tree training submodule is used to train an initial decision tree model using training data to obtain an intermediate decision tree model;

[0175] The prediction quantity result calculation submodule is used to input the test data into the intermediate decision tree model in sequence to obtain multiple prediction quantity results;

[0176] A root mean square error calculation submodule is used to determine the root mean square error of the intermediate decision tree model based on the predicted quantity results and the actual quantity results;

[0177] The error comparison submodule is used to compare the root mean square error with the preset error threshold and determine the repair work order quantity prediction model based on the comparison result.

[0178] Optionally, the model training module also includes:

[0179] The attribute division times determination submodule is used to analyze the intermediate decision tree model and determine the attribute division times of each training data;

[0180] The training data deletion submodule is used to delete a preset amount of training data according to the attribute division times from low to high;

[0181] The training data updating submodule is used to determine the remaining training data as new training data.

[0182] Optionally, the error comparison submodule is specifically used for:

[0183] Compare the RMS error with a preset error threshold;

[0184] If the root mean square error is less than or equal to the error threshold, the intermediate decision tree model at the current moment is determined as the repair work order quantity prediction model;

[0185] If the root mean square error is greater than the error threshold, the model parameters of the intermediate decision tree model are adjusted according to the preset adjustment gradient, and the execution is jumped to the step of inputting the test data into the intermediate decision tree model in sequence to obtain multiple predicted quantity results.

[0186] Optionally, the repair work order quantity prediction module 603 includes:

[0187] The data input submodule is used to input weather characteristic data into a preset emergency repair work order quantity prediction model; the emergency repair work order quantity prediction model includes multiple decision layers;

[0188] The model decision submodule is used to classify the weather characteristic data by attributes through each decision layer in turn until the last decision layer is reached;

[0189] The data prediction result generation submodule is used to determine the quantity prediction result corresponding to the last decision layer as the quantity prediction result of the low-voltage emergency repair work order.

[0190] An embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for predicting the number of low-voltage emergency repair work orders as described in any embodiment of the present invention.

[0191] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed, the method for predicting the number of low-voltage emergency repair work orders as described in any embodiment of the present invention is implemented.

[0192] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and sub-modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0193] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0194] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0195] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0196] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0197] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the number of low voltage emergency repair work orders, characterized in that: include: Get weather forecast data; Performing data preprocessing operations on the weather forecast data to obtain weather characteristic data; Inputting the weather characteristic data into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low-voltage emergency repair work orders; The step of performing a data preprocessing operation on the weather forecast data to obtain weather characteristic data comprises: The weather forecast data is encoded and converted according to a preset encoding conversion rule to generate intermediate weather data; Using a preset delay time window to perform data division on the intermediate weather data to obtain corresponding delay characteristics; Using a preset rolling time window to divide the intermediate weather data into data to obtain corresponding rolling features; Arrange the delay feature and the rolling feature in chronological order to obtain weather feature data; The method further comprises: Get historical weather data; Performing the data screening operation on the historical weather data to obtain multiple groups of historical feature data and constructing an initial decision tree model; Using multiple groups of the historical feature data to train the initial decision tree model to obtain a repair work order quantity prediction model; The step of using multiple groups of the historical feature data to train the initial decision tree model to obtain a repair work order quantity prediction model includes: Dividing the multiple groups of historical feature data according to a time series sliding window to obtain training data and test data; Using the training data to train the initial decision tree model to obtain an intermediate decision tree model; Inputting the test data into the intermediate decision tree model in sequence to obtain multiple prediction quantity results; Determining a root mean square error of the intermediate decision tree model based on the predicted quantity result and the actual quantity result; The root mean square error is compared with a preset error threshold, and a repair work order quantity prediction model is determined according to the comparison result.

2. The method according to claim 1, characterized in that After the step of using the training data to train the initial decision tree model to obtain an intermediate decision tree model, the method further includes: Analyze the intermediate decision tree model to determine the number of attribute divisions for each of the training data; Deleting a preset amount of training data according to the attribute division times from low to high; The remaining training data is determined as new training data.

3. The method according to claim 1, characterized in that The step of comparing the root mean square error with a preset error threshold and determining a repair work order quantity prediction model according to the comparison result includes: comparing the root mean square error with a preset error threshold; If the root mean square error is less than or equal to the error threshold, the intermediate decision tree model at the current moment is determined as the repair work order quantity prediction model; If the root mean square error is greater than the error threshold, the model parameters of the intermediate decision tree model are adjusted according to a preset adjustment gradient, and the step of inputting the test data into the intermediate decision tree model in sequence to obtain multiple predicted quantity results is jumped to execution.

4. The method according to claim 1, characterized in that The step of inputting the weather characteristic data into a preset emergency repair work order quantity prediction model to generate a quantity prediction result of low voltage emergency repair work orders includes: Inputting the weather characteristic data into a preset emergency repair work order quantity prediction model; the emergency repair work order quantity prediction model includes multiple decision layers; Sequentially classifying the weather characteristic data by attributes through each of the decision layers until reaching the last decision layer; The quantity prediction result corresponding to the last decision layer is determined as the quantity prediction result of the low-voltage emergency repair work order.

5. A low voltage repair work order quantity prediction device, characterized in that: include: A weather forecast data acquisition module is used to acquire weather forecast data; A weather feature extraction module, used for performing a data preprocessing operation on the weather forecast data to obtain weather feature data; A repair work order quantity prediction module is used to input the weather characteristic data into a preset repair work order quantity prediction model to generate a quantity prediction result of low-voltage repair work orders; The weather feature extraction module comprises: A data encoding conversion submodule, used to perform encoding conversion on the weather forecast data according to a preset encoding conversion rule to generate intermediate weather data; A delay feature generation submodule, used to divide the intermediate weather data using a preset delay time window to obtain corresponding delay features; A rolling feature generation submodule, used to perform data segmentation on the intermediate weather data using a preset rolling time window to obtain corresponding rolling features; A feature sorting submodule, used for arranging the delay feature and the rolling feature in chronological order to obtain weather feature data; The device also includes: A historical weather data acquisition module is used to acquire historical weather data; A decision tree construction module, used to perform the data screening operation on the historical weather data, obtain multiple groups of historical feature data and construct an initial decision tree model; A model training module, used to train the initial decision tree model using multiple groups of historical feature data to obtain a repair work order quantity prediction model; The model training module includes: A data partitioning submodule is used to partition the multiple groups of historical feature data according to a time series sliding window to obtain training data and test data; An initial decision tree training submodule, used to train the initial decision tree model using the training data to obtain an intermediate decision tree model; A prediction quantity result calculation submodule is used to input the test data into the intermediate decision tree model in sequence to obtain multiple prediction quantity results; A root mean square error calculation submodule, used to determine the root mean square error of the intermediate decision tree model according to the predicted quantity result and the actual quantity result; The error comparison submodule is used to compare the root mean square error with a preset error threshold, and determine a repair work order quantity prediction model according to the comparison result.

6. An electronic device, characterized in that: It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method for predicting the number of low-voltage emergency repair work orders as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the method for predicting the number of low-voltage emergency repair work orders as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Quantity forecast method of rush repair work order of distribution network based on meteorological data

    CN109063924A

  • Power grid fault first-aid repair duration prediction method based on multi-model fusion

    CN110738349A