Prediction method of power grid emergency repair resource consumption based on regional characteristics
Through the power grid emergency repair resource consumption prediction method based on regional characteristics, combined with improved particle swarm optimization algorithm and long-term short-term memory artificial neural network model, the problem of inefficient resource consumption prediction in the existing technology is solved, and higher prediction accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202411983595.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
The existing method of predicting resource consumption of power grid emergency repair resources is based on simple historical data regression analysis, and lacks in-depth analysis of specific regional environments and types of emergency repairs, resulting in low resource allocation efficiency and slow response to emergency repairs, which affects the power supply reliability and user experience of the power grid.
A method of predicting the consumption of power grid emergency repair resources based on regional characteristics is adopted. By obtaining the emergency repair types and corresponding emergency repair data of emergency repair projects, it is integrated and pre-processed. Then, cluster analysis is performed using an improved particle swarm optimization algorithm to identify emergency repair scenarios with similar resource consumption patterns. Finally, the analysis results are input to the long-term and short-term memory artificial neural network model to predict the consumption of emergency repair resources.
The accuracy and reliability of the prediction of grid emergency repair resource consumption is improved. Through detailed classification and optimization of resource consumption mode, emergency repair resource consumption can be predicted more accurately and the grid operation and maintenance efficiency can be improved.
Smart Images

Figure CN119783907A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power grid emergency repair resource prediction methods, and in particular to a power grid emergency repair resource consumption prediction method based on regional characteristics. Background Art
[0002] As the scale and complexity of power grids increase, emergency repair work has become particularly important in power grid maintenance. How to efficiently organize emergency repair work in various emergencies and ensure the safe and stable operation of the power grid is a major challenge facing power companies.
[0003] Existing resource consumption prediction methods are often based on simple historical data regression analysis and lack in-depth analysis of specific regional environments and emergency repair types, resulting in inefficient resource allocation and slow response to emergency repair work, which seriously affects the power supply reliability and user experience of the power grid.
[0004] With the development of data science and artificial intelligence technology, complex algorithms and models can be used to predict the consumption of power grid repair resources, which has become an important direction for improving the efficiency of power grid operation and maintenance. For example, the amount of power grid repair resources can be predicted by using a neural network model. However, the multi-dimensional influence of different environmental conditions, different geographical characteristics and different types of repairs will lead to a low accuracy rate of the prediction results of the neural network model. There are deficiencies in the method of using a neural network model to predict the resource consumption of repair projects. Summary of the invention
[0005] The present application provides a method for predicting power grid emergency repair resource consumption based on regional characteristics, so as to improve the accuracy and reliability of power grid emergency repair resource consumption prediction.
[0006] The present application provides a method for predicting power grid emergency repair resource consumption based on regional characteristics, including:
[0007] Obtain the emergency repair type of the emergency repair project; the emergency repair types include equipment failure emergency repair, natural disaster emergency repair, preventive damage emergency repair, human factor emergency repair, and special event emergency repair;
[0008] Based on the emergency repair type, acquiring emergency repair data corresponding to the emergency repair type; the emergency repair data includes environmental conditions, geographical location, resource consumption type, and meteorological conditions;
[0009] Integrate the emergency repair type with the emergency repair data to obtain first engineering data;
[0010] Preprocessing the first engineering data to obtain second engineering data;
[0011] Based on an improved particle swarm optimization algorithm, cluster analysis is performed on the second engineering data to obtain an analysis result; the improved particle swarm optimization algorithm is a particle swarm algorithm that integrates chaos mapping, reverse learning and Cauchy mutation;
[0012] The analysis result is input into a neural network model to obtain a prediction result of emergency repair resource consumption output by the neural network model; the neural network model is a long short-term memory artificial neural network model trained according to training data, the training data includes historical emergency repair data and the emergency repair resource consumption corresponding to the historical data, the historical emergency repair data is the input value, and the emergency repair resource consumption corresponding to the historical data is the output reference value.
[0013] Optionally, preprocessing the first engineering data to obtain second engineering data includes:
[0014] Performing data cleaning on the first engineering data to correct abnormal values in the first engineering data;
[0015] Perform missing value filling on the first engineering data to obtain the second engineering data.
[0016] Optionally, performing data cleaning on the first engineering data includes:
[0017] Performing scale analysis on the first engineering data to decompose the first engineering data to obtain a plurality of data sets;
[0018] Performing cluster analysis on the data set using an adaptive hybrid model to obtain cluster centers; the cluster analysis dynamically adjusts the number of clusters and model parameters using a maximum expectation algorithm;
[0019] According to the cluster center, calculating the Mahalanobis distance of each data point in the data set relative to the cluster center;
[0020] If the Mahalanobis distance of the data point is greater than a preset threshold, marking the data point as the outlier;
[0021] Obtaining similar data points of the outlier, and performing weighted averaging on the similar data points to obtain a corrected outlier;
[0022] The abnormal value is replaced by the corrected abnormal value to correct the abnormal value in the first engineering data.
[0023] Optionally, performing missing value filling on the first engineering data to obtain the second engineering data includes:
[0024] Scan the data set to obtain missing values in the data set and features corresponding to the missing values;
[0025] Based on the features corresponding to the missing values, neighborhood samples similar to the missing values in the data set are obtained; the neighborhood samples similar to the missing values are calculated according to the Euclidean distance, Manhattan distance or cosine similarity method.
[0026] Performing weighted averaging on the neighborhood samples to obtain an average value;
[0027] The missing value is replaced by the mean value to obtain second engineering data.
[0028] Optionally, the improved particle swarm optimization algorithm is a particle swarm optimization algorithm that integrates chaos mapping, reverse learning and Cauchy mutation.
[0029] Optionally, the method further includes:
[0030] Obtain the training data of a number of data;
[0031] Constructing an initial long short-term memory artificial neural network model; the initial long short-term memory artificial neural network model includes a forget gate, an input gate, an output gate and a cell state;
[0032] The training data is input into the initial long short-term memory artificial neural network model to back propagate according to the output result of the initial long short-term memory artificial neural network model; and the long short-term memory neural network model that has completed training is obtained.
[0033] Optionally, constructing an initial LSTM artificial neural network model includes:
[0034] Setting the initial parameter configuration of the initial long short-term memory artificial neural network model; the initial parameter configuration includes a learning rate, a number of hidden units, and a forget gate weight;
[0035] The initial parameter configuration is optimized using an adaptive sorting optimization algorithm.
[0036] Optionally, optimizing the initial parameter configuration using an adaptive sorting optimization algorithm includes:
[0037] Set the initial temperature of the adaptive sorting optimization algorithm;
[0038] Based on the initial temperature, calculating the loss function of the initial long short-term memory artificial neural model on the validation set;
[0039] According to the loss function, obtaining a first fitness of the initial parameter configuration;
[0040] Adding random perturbations to generate a first parameter configuration;
[0041] Based on the first parameter configuration, calculating a second fitness of the initial long short-term memory artificial neural model;
[0042] Substituting the first fitness and the second fitness into the acceptance probability function of the adaptive sorting optimization algorithm to determine whether the first parameter configuration is better than the initial parameter configuration;
[0043] If the first parameter configuration is better than the initial parameter configuration, replacing the initial parameter configuration with the first parameter configuration;
[0044] The initial temperature is lowered until a termination condition is met.
[0045] Optionally, the termination condition is that the initial temperature is lower than a set minimum temperature, or the number of iterations reaches a maximum number of iterations.
[0046] It can be seen from the above technical solutions that the present application provides a method for predicting power grid emergency repair resource consumption based on regional characteristics, including: obtaining the emergency repair type of the emergency repair project; the emergency repair type includes equipment failure emergency repair, natural disaster emergency repair, preventive damage, human factor emergency repair, and special event emergency repair; based on the emergency repair type, obtaining emergency repair data corresponding to the emergency repair type; the emergency repair data includes environmental conditions, geographical location, resource consumption type, and meteorological conditions; integrating the emergency repair type with the emergency repair data to obtain first engineering data; performing preprocessing on the first engineering data to obtain second engineering data; based on improved particle swarm Optimization algorithm, performing cluster analysis on the second engineering data to obtain analysis results; the improved particle swarm optimization algorithm is a particle swarm algorithm that integrates chaotic mapping, reverse learning and Cauchy mutation; the analysis results are input into a neural network model to obtain the prediction results of the emergency repair resource consumption output by the neural network model; the neural network model is a long short-term memory artificial neural network model obtained by training according to training data, and the training data includes historical emergency repair data and the emergency repair resource consumption corresponding to the historical data, the historical emergency repair data is the input value, and the emergency repair resource consumption corresponding to the historical data is the output reference value. In this application, the power grid emergency repair project is classified in detail, and the classification of emergency repair projects and the identification of resource consumption patterns are optimized by the improved particle swarm optimization algorithm, so as to improve the accuracy and reliability of the prediction of power grid emergency repair resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0048] Figure 1A flow chart of a method for predicting power grid emergency repair resource consumption based on regional characteristics provided in an embodiment of the present application;
[0049] Figure 2 A flow chart of a first engineering data preprocessing method provided in an embodiment of the present application;
[0050] Figure 3 A flow chart of a long short-term memory artificial neural network model training provided in an embodiment of the present application;
[0051] Figure 4 A flow chart of cluster analysis of second engineering data provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of the structure of a long short-term memory artificial neural network model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0054] As the scale and complexity of power grids increase, emergency repair work has become particularly important in power grid maintenance. How to efficiently organize emergency repair work in various emergencies and ensure the safe and stable operation of the power grid is a major challenge facing power companies.
[0055] Existing resource consumption prediction methods are often based on simple historical data regression analysis and lack in-depth analysis of specific regional environments and emergency repair types, resulting in inefficient resource allocation and slow response to emergency repair work, which seriously affects the power supply reliability and user experience of the power grid.
[0056] With the development of data science and artificial intelligence technology, complex algorithms and models can be used to predict the consumption of power grid repair resources, which has become an important direction for improving the efficiency of power grid operation and maintenance. For example, the amount of power grid repair resources can be predicted by using a neural network model. However, the multi-dimensional influence of different environmental conditions, different geographical characteristics and different types of repairs will lead to a low accuracy rate of the prediction results of the neural network model. There are deficiencies in the method of using a neural network model to predict the resource consumption of repair projects.
[0057] To improve the accuracy and reliability of power grid repair resource consumption forecast, see Figure 1 The present application embodiment provides a method for predicting power grid resource consumption based on regional characteristics, including:
[0058] S100: Obtain the emergency repair type of the emergency repair project.
[0059] Among them, since there are many types of power grid repair projects, which may involve emergency repairs caused by equipment failures, natural disasters, and conventional preventive hazards, the classification standards for repair types should take into account the actual needs of the power grid and the characteristics of various repair work. Therefore, in the embodiment of the present application, the repair types are divided into equipment failure repair, natural disaster repair, preventive hazard repair, human factor repair, and special event repair.
[0060] Specifically, emergency repair includes equipment failures due to equipment aging, technical problems or other reasons, such as transformer failures and line breaks.
[0061] Natural disaster emergency repair: Emergency repair work caused by external natural disasters, such as typhoons, floods, and earthquakes.
[0062] Preventive maintenance involves regular inspection and maintenance of grid equipment to prevent possible failures.
[0063] Human factor emergency repairs include emergency repairs caused by human factors, such as damage to power equipment caused by construction errors.
[0064] Special event emergency repair includes emergency repair work caused by large-scale power outages or other unconventional emergencies.
[0065] By classifying the types of emergency repairs, we can better construct specific prediction scenarios.
[0066] S200: Based on the emergency repair type, obtain emergency repair data corresponding to the emergency repair type.
[0067] Among them, since different regions have different influencing factors on the consumption of power grid emergency repair resources, in the embodiment of the present application, based on the emergency repair type, the emergency repair data corresponding to the emergency repair type is obtained, wherein the emergency repair data is historical data related to the power grid emergency repair project, including environmental conditions, geographical location, resource consumption type, and meteorological conditions.
[0068] The repair type is matched with the repair data to improve the prediction accuracy of the subsequent neural network model.
[0069] S300: Integrate the emergency repair type and the emergency repair data to obtain first engineering data.
[0070] The repair type and the repair data are integrated to match the repair type and the repair data. For example, when the repair type is fault repair, the repair data corresponding to the fault repair can be obtained, so as to predict the resource consumption of the fault repair through the repair data.
[0071] S400: Preprocessing the first engineering data to obtain second engineering data.
[0072] After obtaining the first engineering data, it is necessary to preprocess the first engineering data to ensure data quality and the reliability of subsequent analysis. Figure 2 As shown, the step of performing preprocessing on the first engineering data to obtain the second engineering data includes:
[0073] S410: Perform data cleaning on the first engineering data to correct abnormal values in the first engineering data.
[0074] To correct the outliers in the first engineering data, we must first find the outliers in the first engineering data. In the embodiment of the present application, by introducing the ideas of multi-scale analysis, adaptive clustering and hybrid models, combined with a dynamic adaptive adjustment mechanism, accurate detection and correction of outliers in the first engineering data are achieved. Among them, the specific steps of performing data cleaning on the first engineering data to correct the outliers in the first engineering data are as follows:
[0075] Performing scale analysis on the first engineering data to decompose the first engineering data to obtain several data sets
[0076] Cluster analysis is performed on the data set using an adaptive mixture model to obtain cluster centers; cluster analysis dynamically adjusts the number of clusters and model parameters through the maximum expectation algorithm.
[0077] According to the cluster center, calculate the Mahalanobis distance of each data point in the data set relative to the cluster center;
[0078] If the Mahalanobis distance of a data point is greater than a preset threshold, the data point is marked as an outlier;
[0079] Obtain similar data points of the outlier and perform weighted averaging on the similar data points to obtain the corrected outlier;
[0080] The outliers are replaced with corrected outliers to correct the outliers in the first engineering data.
[0081] Specifically, a multi-scale wavelet transform or other multi-scale analysis techniques are performed on the first engineering data. Through the scale wavelet transform, the first engineering data is decomposed into data sets of multiple scales. Each scale corresponds to a different resolution, which can reveal patterns and anomalies of the first engineering data at different levels.
[0082] Then, an adaptive mixture model, such as a Gaussian mixture model, is used to cluster the data set obtained after the multi-scale transformation. During the clustering process, the maximum expectation algorithm can be used to dynamically adjust the number of clusters and model parameters, so that the Gaussian mixture model can accurately capture the distribution pattern in the data set and obtain the cluster center of the data set. The clustering results are used to identify the mainstream patterns and potential anomalies in the data set.
[0083] On the basis of clustering, the Mahalanobis distance relative to the cluster center is calculated for each data point in the data set. The Mahalanobis distance takes into account the distance between the data point and the cluster center and the distribution characteristics of the data. By setting a preset threshold, when the Mahalanobis distance of a data point is greater than the preset threshold, the data point can be marked as an outlier.
[0084] When outliers are found in a data set, they can be corrected using an adaptive local interpolation strategy. For example, by selecting similar data points near the outliers, performing weighted averaging based on the similarity of similar data points, and generating a correction value to replace the outliers, the outliers can be corrected. In addition, in order to improve the accuracy of data cleaning, after completing outlier detection and correction, the entire data set can be re-evaluated. If significant anomalies or inconsistencies are still found in the corrected data, the parameters of the Gaussian mixture model are readjusted and the above steps are repeated until there are no outliers.
[0085] S420: Perform missing value filling on the first engineering data to obtain second engineering data.
[0086] After correcting the outliers in the first engineering data, it is necessary to fill the missing values in the first engineering data. The specific steps of performing missing value filling on the first engineering data to obtain the second engineering data are as follows:
[0087] Scan the data set to obtain the missing values in the data set and the features corresponding to the missing values;
[0088] Based on the features corresponding to the missing values, obtain the neighborhood samples in the data set that are similar to the missing values; the neighborhood samples with similar missing values are calculated based on the Euclidean distance, Manhattan distance or cosine similarity method;
[0089] Perform weighted averaging on the neighborhood samples to get the average value;
[0090] The missing values are replaced by the mean value to obtain the second engineering data.
[0091] Specifically, to fill the missing values in the first engineering data, it is first necessary to scan the data set, record all data points containing missing values and the features corresponding to the data points, and determine the position of each missing value in the data set.
[0092] Since all missing values need to be filled, in the embodiment of the present application, any missing value in the data set is taken as an example to illustrate the missing value filling process. First, the K samples most similar to the missing value are selected from the data set as neighborhood samples using a distance metric, such as Euclidean distance, Manhattan distance, or cosine similarity. The neighborhood samples should have complete values on the same features and similar features to the missing value.
[0093] According to the similarity between the neighborhood samples and the missing value points, the weight of each neighborhood sample is calculated to determine its influence on the final interpolation result.
[0094] Finally, according to the calculated weights, the known values of the neighborhood samples are weighted averaged to generate a replacement value for the missing value. The weights of the neighborhood samples and the corresponding eigenvalues are used for weighted calculation to obtain the estimated value of the missing value. Finally, the estimated value of the missing value replaces the missing value to obtain the second engineering data.
[0095] S500: performing cluster analysis on the second engineering data based on the improved particle swarm optimization algorithm to obtain analysis results;
[0096] Among them, the particle swarm algorithm is an optimization algorithm that simulates the foraging behavior of bird flocks. In the particle swarm algorithm, each particle has two attributes: speed and position. The position represents the solution to the problem. Each iteration is based on the optimization fitness function. The formulas for particle speed and position are:
[0097]
[0098] in, represents the d-dimensional velocity of particle i at the t+1th iteration, the unit is consistent with the data, c 1 、c 2 represents the learning factor, which indicates the degree of cognition of the particle to itself and the group. 1 、r 2 Represents a random number between (0, 1), represents the d-th dimension position of particle i at iteration t+1, P id , g id They represent the optimal solutions of the current particle and the group respectively, ω represents the inertia weight, and the larger the weight value, the stronger the global optimization ability, and vice versa.
[0099] Dynamic ω can achieve better optimization results than fixed values, for example, using a linear decreasing strategy, where the formula is as follows:
[0100] ω=ω max -(ω max -ω min )×i / T; (3)
[0101] Wherein, i represents the current number of iterations, and T represents the maximum number of iterations. As the particle swarm algorithm progresses with iterations, the population diversity will decrease, and premature phenomenon is prone to occur, and it will fall into the local optimum. Therefore, in the embodiment of the present application, by improving the particle swarm optimization algorithm, chaotic mapping, reverse learning and Cauchy mutation are integrated with the particle swarm algorithm to solve the shortcomings of the particle swarm algorithm.
[0102] Among them, since the chaotic mapping has randomness, ergodicity and regularity, compared with the random value of the particle swarm algorithm, the data distribution of the chaotic mapping value is more uniform and extensive. This application adopts the chaotic mapping, and the chaotic mapping function expression is:
[0103]
[0104] The reverse learning strategy is based on the current solution, generates new individuals by constructing a reverse solution, and compares and retains better solutions. The construction method of the reverse solution is as follows:
[0105]
[0106] Among them, x represents the original data, represents the reverse solution of x, x max and x min are the upper and lower limits of x respectively.
[0107] Combining chaos mapping with reverse learning can expand the search space of the particle swarm algorithm, improve the ability of the particle swarm algorithm to find the optimal solution, accelerate the convergence speed of the particle swarm algorithm, and improve the accuracy of the particle swarm algorithm.
[0108] When the optimal value of the population does not change after three consecutive iterations during the clustering process of the particle swarm algorithm, it is considered that the search is stagnant. This application introduces Cauchy mutation to enhance the ability of particles to jump out of the local optimum. The formula of Cauchy mutation is as follows:
[0109]
[0110] in, represents the position after mutation, and u represents a random number in (0, 1).
[0111] By integrating chaos mapping, reverse learning and Cauchy mutation with particle swarm algorithm, the clustering effect of particle swarm algorithm can be improved.
[0112] In addition, the clustering effect can be calculated by the sum of squares of clustering evaluation index errors. The formula for the sum of squares of clustering evaluation index errors is:
[0113]
[0114] Among them, K represents the number of clusters, μ i Represents cluster C i The cluster center of x represents cluster C i The smaller the SEE (clustering evaluation index sum of squared errors) value is, the tighter the cluster is and the better the clustering effect is. The iteration is performed based on minimizing the SEE. The velocity and position of the particle are encoded as K×d dimensional vectors. The boundary absorption strategy is adopted at the boundary of the position and velocity. The maximum velocity of the particle can be reduced in the later stage of the search.
[0115] Specifically, Figure 4 As shown, based on the improved particle swarm optimization algorithm, the steps of performing cluster analysis on the second engineering data to obtain the analysis results include:
[0116] Step 1: Set the initial parameters, including the particle swarm size N, sample feature dimension d, number of clusters K, maximum number of iterations T, position boundary x max 、x min , and the maximum speed v max .
[0117] Step 2, initialize the population. The initialized population can generate chaotic numbers through chaotic mapping, map the chaotic numbers to position intervals, and construct the reverse position of the particle through reverse learning. The fitness of the particle and its reverse position are compared, and the position corresponding to the better fitness is taken as the initial position of the particle.
[0118] Step 3: During normal iteration, update the particles according to formulas (1), (2), and (3); otherwise, mutate the particle positions according to formula (6) and perform boundary control;
[0119] Step 4: Divide the data set according to the nearest neighbor rule and recalculate the fitness of the particles.
[0120] Step 5: Compare and update the optimal positions and optimal fitness values of individual particles and the group.
[0121] Step 6: If the iteration stop condition is met, go to step 7; otherwise, return to step 3 to continue iterating.
[0122] Step 7: Divide the data according to the nearest neighbor rule with the optimal position and optimal fitness value of the group as the cluster center to obtain K clusters, complete the clustering, and output the analysis results.
[0123] The present application can better perform cluster analysis on the second engineering data based on the improved particle swarm optimization algorithm. After clustering the second engineering data through the improved particle swarm optimization algorithm, the analysis results can be obtained, wherein the analysis results are used to identify emergency repair scenarios with similar resource consumption patterns, thereby improving the data foundation for the subsequent construction of a neural network model.
[0124] S600: Input the analysis result into the neural network model to obtain the emergency repair resource consumption prediction result output by the neural network model.
[0125] After obtaining the analysis results, the analysis results are input into the neural network model to obtain the prediction results of the emergency repair resource consumption. In the embodiment of the present application, the neural network model is a long short-term memory artificial neural network model obtained by training according to the training data, and the training data includes historical emergency repair data and the emergency repair resource consumption corresponding to the historical data. The historical emergency repair data is the input value, and the emergency repair resource consumption corresponding to the historical data is the output reference value.
[0126] Among them, Figure 3 As shown, the steps of training the long short-term memory artificial neural network model include:
[0127] S610: Acquire some training data;
[0128] S620: Construct an initial long short-term memory artificial neural network model;
[0129] S630: Input the training data into the initial LSTM artificial neural network model to perform back propagation according to the output result of the initial LSTM artificial neural network model; and obtain a trained LSTM neural network model.
[0130] Among them, Figure 5 As shown, the initial long short-term memory artificial neural network model includes a forget gate, an input gate, an output gate and a cell state.
[0131] The input gate determines what new information will be added to the cell state. The input gate uses a sigmoid function to determine the updated part and generates candidate values through a tanh function.
[0132] The forget gate can control the amount of information discarded from the cell state. The forget gate uses a sigmoid function to output a value between 0 and 1, indicating the proportion of retained information.
[0133] The output gate determines how much information in the current cell state is output to the hidden state. The output gate also uses the sigmoid function to determine the output ratio and transforms the cell state through the tanh function to generate the final hidden state value.
[0134] The cell state is used to store long-term information. The cell state can effectively remember or forget information through the regulation of the forget gate, input gate, and output gate, thereby capturing the long-term dependencies in the sequence.
[0135] The long short-term memory artificial neural network model has the problem of gradient vanishing caused by not taking into account the input at any previous time, which makes the long short-term memory artificial neural network model difficult to converge and has low accuracy.
[0136] Therefore, in the embodiment of the present application, when constructing the initial long short-term memory artificial neural network model, an adaptive sorting optimization algorithm is used to optimize the parameter configuration of the initial long short-term memory artificial neural network model.
[0137] When constructing the initial long short-term memory artificial neural network model, after the forget gate, input gate, output gate and cell state are set, the initial parameter configuration of the initial long short-term memory artificial neural network model needs to be set; wherein, the initial parameter configuration includes the learning rate, the number of hidden units and the forget gate weight. The settings of the learning rate, the number of hidden units and the forget gate weight can determine an initial solution based on experience or rough search.
[0138] Then, the parameter configuration of the initial long short-term memory artificial neural network model is optimized using an adaptive sorting optimization algorithm. In the embodiment of the present application, the specific steps of optimizing the parameter configuration of the initial long short-term memory artificial neural network model using an adaptive sorting optimization algorithm are as follows:
[0139] Step 1: Set the initial temperature of the adaptive sorting optimization algorithm, where the search space is larger when the temperature is higher.
[0140] Step 2: Input the training set into the LSTM artificial neural network model, and adjust the weights and bias of the LSTM artificial neural network model according to the loss function on the training set through the back propagation algorithm.
[0141] Step 3: Calculate the loss function value of the long short-term memory artificial neural network model on the validation set, and use the loss function value as the fitness function to evaluate the first fitness of the initial parameters.
[0142] Step 4: Based on the initial parameter configuration, a new parameter configuration is generated by adding random disturbances, and the new parameter configuration is recorded as the first parameter configuration.
[0143] For example, a first parameter configuration can be generated by making a small adjustment to the learning rate or changing the number of hidden units.
[0144] Step 5: Based on the first parameter configuration, calculating the second fitness of the initial long short-term memory artificial neural model;
[0145] Step 6: Substitute the first fitness and the second fitness into the acceptance probability function of the adaptive sorting optimization algorithm to determine whether the first parameter configuration is better than the initial parameter configuration.
[0146] Step 7: If the first parameter configuration is better than the initial parameter configuration, the initial parameter configuration is replaced with the first parameter configuration.
[0147] Step 8: After the initial parameter configuration is replaced with the first parameter configuration, lower the initial temperature;
[0148] Step 9, repeating steps 2 to 8 until the termination condition is met. In this application, the termination condition is that the initial temperature is less than the set minimum temperature, or the number of iterations reaches the maximum number of iterations.
[0149] Finally, in the iterative process, the optimal parameter configuration can be found, and the optimal parameter configuration is used to configure the long short-term memory neural network model for training and prediction.
[0150] Once the parameter configuration of the initial long short-term memory artificial neural network model is determined, a trained long short-term memory neural network model can be obtained. By identifying similar emergency repair scenarios based on the emergency repair type of the emergency repair project through cluster analysis, the neural network model is used to predict the consumption, thereby achieving efficient management of power grid emergency repair resources.
[0151] In addition, the present invention combines multidimensional clustering analysis with a neural network prediction model by performing cluster analysis on the emergency repair data corresponding to the emergency repair type, taking into account the regional environmental conditions, geographical location conditions, emergency repair type and resource consumption type, thereby achieving a scientific prediction of the power grid emergency repair resource consumption.
[0152] It can be seen from the above technical scheme that the present application provides a method for predicting power grid emergency repair resource consumption based on regional characteristics, including: obtaining the emergency repair type of the emergency repair project; based on the emergency repair type, obtaining emergency repair data corresponding to the emergency repair type; integrating the emergency repair type with the emergency repair data to obtain first project data; performing preprocessing on the first project data to obtain second project data; based on the improved particle swarm optimization algorithm, performing cluster analysis on the second project data to obtain analysis results; inputting the analysis results into a neural network model to obtain the emergency repair resource consumption prediction results output by the neural network model; in the present application, the environmental conditions, geographical location conditions, emergency repair types and resource consumption types of the region are taken into consideration, and a combination of multidimensional clustering analysis and neural network models is performed to realize the prediction of power grid emergency repair resource consumption, and improve the accuracy and reliability of the prediction of power grid emergency repair resource consumption.
[0153] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.
Claims
1. A method for predicting power grid repair resource consumption based on regional characteristics, characterized in that: include: Obtain the emergency repair type of the emergency repair project; the emergency repair types include equipment failure emergency repair, natural disaster emergency repair, preventive damage emergency repair, human factor emergency repair, and special event emergency repair; Based on the emergency repair type, acquiring emergency repair data corresponding to the emergency repair type; the emergency repair data includes environmental conditions, geographical location, resource consumption type, and meteorological conditions; Integrate the emergency repair type with the emergency repair data to obtain first engineering data; Preprocessing the first engineering data to obtain second engineering data; Based on an improved particle swarm optimization algorithm, cluster analysis is performed on the second engineering data to obtain an analysis result; the improved particle swarm optimization algorithm is a particle swarm algorithm that integrates chaos mapping, reverse learning and Cauchy mutation; The analysis result is input into a neural network model to obtain a prediction result of emergency repair resource consumption output by the neural network model; the neural network model is a long short-term memory artificial neural network model trained according to training data, the training data includes historical emergency repair data and the emergency repair resource consumption corresponding to the historical data, the historical emergency repair data is the input value, and the emergency repair resource consumption corresponding to the historical data is the output reference value.
2. The method for predicting power grid repair resource consumption based on regional characteristics according to claim 1, characterized in that: Preprocessing the first engineering data to obtain second engineering data includes: Performing data cleaning on the first engineering data to correct abnormal values in the first engineering data; Perform missing value filling on the first engineering data to obtain the second engineering data.
3. The method for predicting power grid repair resource consumption based on regional characteristics according to claim 2 is characterized in that: Performing data cleaning on the first engineering data includes: Performing scale analysis on the first engineering data to decompose the first engineering data to obtain a plurality of data sets; Performing cluster analysis on the data set using an adaptive hybrid model to obtain cluster centers; the cluster analysis dynamically adjusts the number of clusters and model parameters using a maximum expectation algorithm; According to the cluster center, calculating the Mahalanobis distance of each data point in the data set relative to the cluster center; If the Mahalanobis distance of the data point is greater than a preset threshold, marking the data point as the outlier; Obtaining similar data points of the outlier, and performing weighted averaging on the similar data points to obtain a corrected outlier; The abnormal value is replaced by the corrected abnormal value to correct the abnormal value in the first engineering data.
4. The method for predicting power grid repair resource consumption based on regional characteristics according to claim 3 is characterized in that: Performing missing value filling on the first engineering data to obtain the second engineering data includes: Scan the data set to obtain missing values in the data set and features corresponding to the missing values; Based on the features corresponding to the missing values, obtaining neighborhood samples in the data set that are similar to the missing values; the neighborhood samples that are similar to the missing values are calculated according to the Euclidean distance, Manhattan distance or cosine similarity method; Performing weighted averaging on the neighborhood samples to obtain an average value; The missing value is replaced by the mean value to obtain second engineering data.
5. The method for predicting power grid repair resource consumption based on regional characteristics according to claim 1, characterized in that: The method further comprises: Obtaining a number of the training data; Constructing an initial long short-term memory artificial neural network model; the initial long short-term memory artificial neural network model includes a forget gate, an input gate, an output gate and a cell state; The training data is input into the initial long short-term memory artificial neural network model to back propagate according to the output result of the initial long short-term memory artificial neural network model; and the long short-term memory neural network model that has completed training is obtained.
6. The method for predicting power grid repair resource consumption based on regional characteristics according to claim 5, characterized in that: Building the initial LSTM ANN model includes: Setting the initial parameter configuration of the initial long short-term memory artificial neural network model; the initial parameter configuration includes a learning rate, a number of hidden units, and a forget gate weight; The initial parameter configuration is optimized using an adaptive sorting optimization algorithm.
7. The method for predicting power grid repair resource consumption based on regional characteristics according to claim 6, characterized in that: Optimizing the initial parameter configuration using an adaptive sorting optimization algorithm includes: Set the initial temperature of the adaptive sorting optimization algorithm; Based on the initial temperature, calculating the loss function of the initial long short-term memory artificial neural model on the validation set; According to the loss function, obtaining a first fitness of the initial parameter configuration; Adding random perturbations to generate a first parameter configuration; Based on the first parameter configuration, calculating a second fitness of the initial long short-term memory artificial neural model; Substituting the first fitness and the second fitness into the acceptance probability function of the adaptive sorting optimization algorithm to determine whether the first parameter configuration is better than the initial parameter configuration; If the first parameter configuration is better than the initial parameter configuration, replacing the initial parameter configuration with the first parameter configuration; The initial temperature is lowered until a termination condition is met.
8. The method for predicting power grid repair resource consumption based on regional characteristics according to claim 7, characterized in that: The termination condition is that the initial temperature is lower than the set minimum temperature, or the number of iterations reaches the maximum number of iterations.