Prediction method and device for distributed user polymer resource load regulation and control

Through the combination of dynamic time regular genetic K-medoids clustering and LightGBM/XGBoost model, the problem of limited accuracy in distributed user load prediction is solved, more accurate and reliable load prediction and dynamic regulation is achieved, and the rational allocation of energy is promoted.

CN119543114APending Publication Date: 2025-02-28NORTH CHINA BRANCH OF STATE GRID CORPORATION OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411596790.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to accurately capture the fluctuation characteristics of electricity consumption data and the influence of external factors in distributed user load prediction, resulting in limited prediction accuracy.

Method used

The dynamic time-regular genetic K-medoids clustering method is used for user clustering, and combined with LightGBM and XGBoost models, considering external features, model training is carried out through 50% cross-validation to predict the user's power consumption and dynamically adjust the load.

Benefits of technology

It improves the accuracy and stability of clustering results, enhances the accuracy and reliability of load prediction, reduces power waste, and promotes the rational allocation of energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119543114A_ABST
    Figure CN119543114A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed user polymer resource load regulation prediction method and device, and the method comprises the steps: 1, carrying out the processing of distributed user data, and carrying out the clustering, and forming a corresponding user polymer; 2, training a machine learning model by using the clustered data, and training by adopting a LightGBM and XGBoost fusion model to obtain an evaluation result; the device comprises a preprocessing module, a clustering module and a model training module. According to the method, the K-medoids clustering is combined with the genetic algorithm and the dynamic time warping, so that the accuracy of the clustering result is improved, more reliable data support is provided for power load prediction, the power load prediction is more accurate and reliable, the load is dynamically adjusted according to the prediction result, and the power load prediction efficiency is improved. Therefore, the problem of unreasonable power distribution to users in the development process of the smart power grid is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a prediction method and device for decentralized user aggregate resource load regulation, belonging to the technical field of smart grids. Background Art

[0002] Decentralized user load forecasting refers to the use of massive user electricity consumption data and related artificial intelligence algorithms to predict future electricity demand, thereby providing decision support for power grid operators, energy suppliers and end users. By using relevant artificial intelligence technologies for load forecasting and combining them with automatic load adjustment technology, power supply can be dynamically adjusted according to the forecast results to meet the actual needs of users and improve energy efficiency.

[0003] The behavior of power users shows certain cluster characteristics, that is, the power consumption models of different individual users autonomously form a series of groups in the attribute space or its subspace. The power consumption characteristics of users in each group are similar, and the power consumption characteristics in different groups are significantly different. The cluster characteristics of users provide clues for cluster analysis and group modeling of user models. In view of the above problems, clustering algorithms can be used to group users with similar power consumption behaviors, thereby improving the accuracy of load forecasting and providing support for the optimal scheduling of power resources. Considering that power consumption data are usually time series types, if Euclidean distance is used in the clustering process, it will not be able to well reflect the characteristics of power consumption data fluctuations over time, resulting in large errors in clustering results. Therefore, when performing decentralized user clustering, traditional clustering methods need to be improved and optimized to adapt to the complexity and diversity of data.

[0004] In addition, although traditional power load forecasting methods, such as time series analysis, trend extrapolation, and regression analysis, have been widely used in the field of power load forecasting, these methods have limited ability to handle nonlinear and non-stationary data, and it is often difficult to accurately capture the sudden changes and abnormal fluctuations in the load curve. Moreover, these methods usually rely on the statistical laws of historical data and it is difficult to fully consider the influence of external factors, resulting in limited prediction accuracy. Therefore, with the development of smart grid and big data technology, traditional power load forecasting methods need to be continuously improved and optimized to meet the new needs of power system development.

[0005] In order to solve the above problems, the present invention uses a genetic K-medoids clustering method based on dynamic time warping to cluster users and form user aggregates. In addition, by combining the LightGBM and XGBoost models and considering external features, a prediction algorithm for load control of distributed user resource aggregates is proposed. This method helps to realize the aggregation of distributed user electricity consumption data, thereby predicting the user's electricity consumption based on the aggregate's electricity consumption data and dynamically adjusting the load, which is of great significance for reducing electricity waste and promoting the rational allocation of energy. Summary of the invention

[0006] The purpose of the present invention is to provide a prediction method and device for resource load regulation of a decentralized user aggregate, which can better capture the fluctuation characteristics of electricity consumption data and avoid the influence of heterogeneous data by combining the genetic K-medoids clustering method with dynamic time warping, thereby improving the accuracy and stability of clustering results; taking into account external characteristics, a model combining the LightGBM and XGBoost models is adopted, and 5-fold cross-validation is used during training to obtain the average index, so as to predict the electricity demand of users in future time periods, and adjust the load capacity accordingly, reduce electricity waste, and promote the rational allocation of energy.

[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0008] On the one hand, the present invention provides a prediction method for decentralized user aggregate resource load regulation, which comprises the following steps:

[0009] Step 1: Process the distributed user data and then cluster them to form corresponding user aggregates;

[0010] Step 2: Use the clustered data to train the machine learning model, using the LightGBM and XGBoost fusion model to obtain evaluation results after training.

[0011] Furthermore, in step 1, the data is preprocessed including processing missing values ​​and fields to ensure that the model training proceeds normally. For records containing missing value fields, a moving average method is used to fill them.

[0012] Furthermore, in step 1, the source data is clustered in combination with the genetic K-medoids clustering method with dynamic time warping, and the differences between different types of users are found through clustering to form different user aggregates.

[0013] Furthermore, in step 1, the clustering process is:

[0014] (1) Encode the sample using a decimal encoding method based on cluster centers, randomly initialize K cluster centers, and generate an individual;

[0015] (2) Repeat sizepop times to obtain the initial population P0 and calculate the fitness F(S i );

[0016] (3) A new population P1 is generated by performing selection operations based on fitness. For each individual in the new population, the individual criterion function value J is the current solution f. For each individual in the new population, according to the probability P i Generate a new individual, the criterion function value J of the individual is the current solution f', calculate the function difference f = f'-f, and make a judgment based on the value of f. If f <= 0, accept the new solution f' as the current solution with probability P, otherwise accept the new solution f' as the current solution, iterate until the conditions are met, and generate a new population P2;

[0017] (4) For each individual in the new population, calculate the current cluster center, use DTW distance-based clustering, and perform clustering through K-medoids to form data of different clusters, generate population P3, and determine whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, the individual with the highest fitness in the population is the best clustering result, otherwise continue to repeat the iteration.

[0018] Furthermore, the criterion for judging the quality of clustering in the K-medoids algorithm is the criterion function value J, the value of J is equal to the sum of the distances from all points in the cluster to the corresponding cluster center, the smaller the value of J, the better the quality of the clustering, and vice versa; the criterion function is defined as follows:

[0019]

[0020] Among them, k is the number of categories, x i is the sample object, z j For class c j The cluster center of .

[0021] Furthermore, for each individual in the population, a fitness function is constructed according to the criterion function J. The fitness function is defined as follows:

[0022] F(S i )=1.5×J max -J(S i ), i=1,2,...,sizepop

[0023] Among them, J max is the maximum value of the criterion function of all individuals in the population; J(S i) is the criterion function value of the current individual, sizepop is the population size; the smaller the value of the criterion function J, the better the quality of the clustering represented by the individual, the larger the fitness function value, and the higher the survival probability.

[0024] Furthermore, the K-medoids algorithm determines the cluster to which a sample point belongs based on the distance between the sample point and the cluster center, and updates the cluster center according to the obtained clustering result; specifically, it includes:

[0025] (1) Calculate the distance from each sample in the training data set D to D C The distance η of each cluster center is calculated, and the cluster center with the closest distance is selected as the cluster to which it belongs;

[0026] (2) Calculate the average distance from each sample in each category to other sample points, and select the smallest one as the new cluster center.

[0027] Furthermore, in step 2, the preprocessed data is used to train the cross-LightGBM and XGBoost. First, the XGBoost1 model generates a new feature X1 based on the initial features T, H, W, and P. Similarly, the LightGBM1 model generates another new feature X2 based on the four features. Then, the X1 feature is incorporated into the original feature as a column, so that the original data has 5 features. These 5 features are used to train the LightGBM2 model, and the LightGBM2 model predicts the power load, which is recorded as b. Again, the X2 feature is incorporated into the original data to obtain another data with five features, which is used to train the XGBoost2 model. The model will also output a power load prediction, recorded as a, and finally these two outputs are combined to obtain the final power load prediction, that is,

[0028] Furthermore, the cross-validation method is used in the model training process. The preprocessed data set is divided into 5 parts of equal size. For each round of cross-validation, 4 subsets are used to train the model, and the remaining 1 subset is used as a validation set to evaluate the performance of the model. This process is repeated 5 times until each subset is used as a validation set once. After each round of cross-validation, the performance index of the model on the validation set is calculated, and the performance index of the 5 cross-validations is averaged to obtain the cross-validation performance evaluation result of the model.

[0029] On the other hand, the present invention provides a prediction device for decentralized user aggregate resource load control, comprising:

[0030] A preprocessing module for processing distributed user data;

[0031] The clustering module is used to cluster the source data, find out the differences between different types of users through clustering, and form different user aggregates;

[0032] Model training module: used to train the cross-LightGBM and XGBoost using preprocessed data, and save the model parameters after the model training is completed.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] The distributed user load forecasting method proposed in the present invention innovatively combines K-medoids clustering with genetic algorithms and dynamic time warping, which not only improves the accuracy of clustering results, but also provides more reliable data support for power load forecasting; uses clustered data to perform load forecasting, and considers factors such as weather and economy that may affect power consumption during forecasting. A fusion model of LightGBM and XGBoost is used to perform 5-fold cross validation, and predicts user power consumption based on the aggregate power consumption data. The cross-combination of the two algorithms can not only effectively alleviate the problem of excessive depth of the XGBoost algorithm, but also avoid the problem of overfitting of LightGBM, further enhancing the robustness of the model, reducing the error of the prediction results, making power load forecasting more accurate and reliable, and dynamically adjusting the load according to the prediction results, thereby solving the unreasonable power distribution to users during the development of smart grids. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is the overall framework diagram of the present invention;

[0036] Figure 2 A specific flowchart for improving Kmedoids clustering;

[0037] Figure 3 Schematic diagram of generating new features for cross-model;

[0038] Figure 4 This is a diagram of the cross-validation process. DETAILED DESCRIPTION

[0039] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] like Figure 1 and 2 , a prediction method for decentralized user aggregate resource load regulation, the process of which includes:

[0041] (1) Using the distributed user power load data in time series format, the data set is preprocessed. The preprocessing mainly performs special processing on missing values ​​and fields to ensure the normal training of the model. For records with missing value fields, the simple moving average method is used to fill them.

[0042] (2) The samples are encoded using a decimal encoding method based on cluster centers, K cluster centers are randomly initialized, and an individual is generated.

[0043] (3) Repeat sizepop times to obtain the initial population P0 and calculate the fitness F(S i ).

[0044] (4) A new population P1 is generated by performing selection operations based on fitness. For each individual in the new population, the individual criterion function value J is the current solution f. For each individual in the new population, according to the probability P i Generate a new individual, the criterion function value J of the individual is the current solution f', calculate the function difference f = f'-f, and make a judgment based on the value of f. If f <= 0, accept the new solution f' as the current solution with probability P, otherwise accept the new solution f' as the current solution, iterate until the conditions are met, and generate a new population P2.

[0045] (5) For each individual in the new population, calculate the current cluster center, use clustering based on DTW distance, and perform clustering through improved K-medoids to form data of different clusters, generate population 3, and determine whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, the individual with the highest fitness in the population is the best clustering result, otherwise continue to repeat the iteration.

[0046] (6) Figure 3 As shown, the XGBoost1 model generates a new feature X1 based on the initial features T, H, W, and P. Similarly, the LightGBM1 model generates another new feature X2 based on the four features. Then, the X1 and X2 features are merged into the original features as columns. Therefore, the original data has 5 features.

[0047] (7) Figure 4 As shown in the figure, the cross-validation method is used in the model training process. The aggregate data set is divided into 5 parts of equal size. For each round of cross-validation, 4 subsets are used to train the model, and the remaining 1 subset (validation set) is used to evaluate the performance of the model. This process is repeated 5 times until each subset is used as a validation set once. After each round of cross-validation, the performance indicators of the model on the validation set are calculated, including the root mean square error (RMSE) and the mean absolute error (MAE). The performance indicators of the 5 cross-validations are averaged to obtain the cross-validation performance estimate of the model.

[0048] (8) Use these five features to train the LightGBM2 model, and the LightGBM2 model predicts the future power load, denoted as b.

[0049] (9) The X2 feature is incorporated into the original data to obtain another data with five features. The data is used to train the XGBoost2 model, which finally predicts an electricity load data item, denoted as a.

[0050] (10) Combining these two outputs, we get the final power load forecast (a+b) / 2.

[0051] The technical background and principle of the present invention are further described below:

[0052] 1. Algorithm background

[0053] The present invention is mainly based on genetic algorithm, dynamic time warping, K-medoids algorithm, LightGBM model and XGBoost model.

[0054] K-medoids clustering is a clustering algorithm based on center points, and Euclidean distance is usually used to calculate the similarity between data points and center points. However, in the scenario of decentralized user clustering, time series data may have complex features such as dislocation, nonlinear changes, and periodic fluctuations, and Euclidean distance cannot effectively handle these problems. To this end, the present invention adopts Dynamic Time Warping (DTW) for distance measurement. DTW can solve the time dislocation problem between time series through nonlinear alignment, while adapting to the nonlinear deformation and periodic fluctuations of time series, thereby improving the accuracy and robustness of clustering.

[0055] When performing K-medoids clustering, K data points are randomly selected as the initial centers. Next, the algorithm forms the initial clusters by calculating the distance from all data points to each center point and assigning each data point to the nearest center point. In each iteration, the algorithm tries to replace the existing center points to find a new center point that can reduce the overall cost, that is, to find the state where the sum of the distances from all points to their center points is the smallest. If such a center point is found, the cluster center is updated; otherwise, the current center is kept unchanged. Through the clustering algorithm, decentralized users with similar behaviors can be aggregated for subsequent prediction tasks.

[0056] Genetic Algorithm (GA) is an optimization algorithm that simulates natural selection and genetics mechanisms and is widely used to solve search and optimization problems. During the search process, the algorithm can automatically acquire relevant knowledge of the search space and accumulate the obtained information; through adaptive control of the search process, the optimal solution to the problem can be obtained. In decentralized user clustering, K-medoids clustering is prone to fall into local optimal solutions, especially when the initially selected cluster center is inappropriate, the clustering result may be unsatisfactory. Secondly, the selection of center points depends on random initialization, which may lead to insufficient diversity of cluster centers, thus affecting the clustering effect. Introducing genetic algorithms to optimize K-medoids can effectively solve these problems. By simulating natural selection and evolutionary processes, genetic algorithms can perform global searches in multiple center point combinations, avoiding the trouble of local optimal solutions. In addition, genetic algorithms can generate diversified center point selections through crossover and mutation operations, improve the diversity of clustering, and thus improve the clustering effect. Genetic algorithms can also improve computational efficiency, especially when processing large-scale or high-dimensional data, accelerating convergence through population evolution and optimizing the clustering process.

[0057] In the actual power distribution process, the user's power load is usually estimated based on the user's power consumption over a period of time. However, the user's daily power consumption is affected by many factors. For example, when the weather is too cold or too hot, the user will use high-power equipment such as air conditioners. If the power consumption is not effectively controlled, there will be too much or too little power distribution. Therefore, the present invention takes weather, economy and other factors into consideration of the load, combines the LightGBM and XGBoost models, and cross-validates them to measure the power demand of users in the future period, and adjusts the load capacity accordingly. The LightGBM model and the XGBoost model differ in the decision tree growth strategy. LightGBM adopts the leaf-wise growth strategy, and selects the leaf node with the maximum gradient at present for splitting, instead of the traditional depth-first or breadth-first. The decision tree of XGBoost grows in a depth-first manner. The algorithm will classify the nodes with the deepest current depth, which often makes the depth of the decision tree larger. The present invention cross-combines the two algorithms, which can not only preferentially split the leaves of the same layer, but also split the leaves with larger gradients. It can effectively alleviate the problem of excessive leaf depth of the XGBoost algorithm and avoid the overfitting problem of LightGBM. Through cross-validation, the robustness of the model is further enhanced, and the error of the prediction results is reduced, thereby making the power load prediction more accurate and reliable.

[0058] 2. User clustering and prediction model training

[0059] The algorithm construction process mainly includes clustering users and training of the fusion model combined with cross-validation. The specific process is as follows:

[0060] 2.1 Dynamic Time Warping

[0061] Given two time series X = {x1, x2, …, x m} and Y={y1,y2,…,y n}, construct the cumulative distance:

[0062] D(i,j)=d(x i ,y j )+min{D(x i-1 ,y j ),D(x i ,y j-1 ),D(x i-1 ,y j-1 )} (1)

[0063] in The initial condition is D(1,1)=d(x1,y1). The process of finding the final cumulative distance is actually to find an optimal curved path W in the distance matrix B so that the cumulative distance is minimized. The distance matrix B is:

[0064]

[0065] Curved path W=(w1,w2,…,w k ) with constraints, max(m,n)≤k≤m+n-1, element w r =(i,j) means that the i-th point in sequence X matches the j-th point in sequence Y and satisfies: (1) W starts at the lower left corner of matrix B and ends at the upper right corner of matrix B, that is, w1 = (1,1), w k =(m,n); (2) Any two adjacent elements on W are also adjacent in the distance matrix B and develop forward, that is, if there is w k =(a k ,b k ), w k+1 =(a k+1 ,b k+1 ), then 0≤a k+1 -a k ≤1 and 0≤b k+1 -b k ≤1.

[0066] The range that the curved path W in the distance matrix can reach is called the curved window. The final metric distance is defined as:

[0067]

[0068] Where K is the length of the curved path W.

[0069] 2.2 Fitness Function

[0070] The fitness function affects the convergence speed of the entire clustering method and the determination of the optimal solution. The fitness function is generally used to measure the fitness of an individual and determine the degree of superiority of the individual in the population. The greater the value of an individual's fitness, the greater the probability of survival of the individual in the entire genetic process.

[0071] The criterion for judging the quality of clustering in the K-medoids algorithm is the criterion function J, and the value of J is equal to the sum of the distances from all points in the cluster to the corresponding cluster center. The smaller the value of J, the better the quality of the clustering, and vice versa. The criterion function is defined as follows:

[0072]

[0073] Among them, k is the number of categories, x i is the sample object, z j For class c j The cluster center of . To calculate the dynamic time warping distance.

[0074] For each individual in the population, a fitness function is constructed according to the criterion function J. The fitness function is defined as follows:

[0075] F(S i )=1.5×J max -J(S i ), i=1,2,...,sizepop (4)

[0076] Among them, J max is the maximum value of the criterion function of all individuals in the population; J(S i ) is the criterion function value of the current individual, and sizepop is the population size.

[0077] According to the function definition, the smaller the value of the criterion function J, the better the quality of the clustering division represented by the individual, and the larger the value of the fitness function, the higher the survival probability.

[0078] 2.3 Selection and mutation

[0079] The present invention uses a roulette wheel method to perform a selection operation. The roulette wheel method is to use the sum of the fitness functions of all individuals in the population as the entire circumference of the roulette wheel, and according to the proportion of the fitness value of each individual in the sum, in the roulette wheel method, the larger the area, the more likely it is to be selected, and vice versa, the lower the probability of being selected, and the larger the fitness function value, the larger the area of ​​the individual.

[0080] The fitness function value of the i-th individual in the population P is F(S i ), then the probability of individual i being selected is:

[0081]

[0082] Perform sizepop selections in the parent population to generate a new population P1.

[0083] The present invention uses uniform mutation operation, and the specific process is: for each sample point on the individual code, a mutation operation is performed once, that is, according to the mutation probability P i Select a code value from the existing category number of the sample to replace the original value, and finally get a new individual. i The definition is as follows:

[0084]

[0085] Among them, DTW(x i ,c k ) is the sample x i and the centroid c of the kth cluster k The dynamic time warping distance between . The deviation of 0.5 is introduced to avoid division by zero error. The probability P used here is i It is not a fixed value, so the mutation probability of each locus on the individual is different, which can greatly increase the mutation probability of the individual and further avoid the premature phenomenon of the genetic algorithm.

[0086] 2.4K-medoids clustering

[0087] The K-medoids algorithm determines the cluster to which a sample point belongs based on the distance between the sample point and the cluster center, and updates the cluster center based on the obtained clustering results. For the convenience of description, D, D C Respectively represent the training data set, cluster center set, and clustering results.

[0088] 1. Calculate every sample in D to D C The distance η of each cluster center is calculated, and the cluster center with the closest distance is selected as the cluster to which it belongs.

[0089] 2. Calculate the average distance from each sample in each category to other sample points, and select the smallest one as the new cluster center. The calculation formula for the average distance is: Among them, t i is the number of samples in the i-th class, DTW(x,x j ) is the dynamic time warping distance calculation formula.

[0090] 2.5 Cross-training LightGBM and XGBoost

[0091] Use the preprocessed data to train the cross-LightGBM and XGBoost. First, the XGBoost1 model will generate a new feature X1 based on the initial features T, H, W, and P. Similarly, the LightGBM1 model generates another new feature X2 based on the four features. Then, the X1 feature is incorporated into the original feature as a column. The original data therefore has 5 features. These 5 features are used to train the LightGBM2 model. The LightGBM2 model predicts the power load, which is denoted as b. Again, the X2 feature is incorporated into the original data to obtain another data with five features. This data is used to train the XGBoost2 model. The model will also output a power load prediction, denoted as a. Finally, these two outputs are combined to obtain the final power load prediction, i.e. Crossover model Figure 3 shown.

[0092] The cross-validation method is used in the model training process. The preprocessed data set is divided into 5 parts of equal size. For each round of cross-validation, 4 subsets are used to train the model, and the remaining 1 subset (validation set) is used to evaluate the performance of the model. This process is repeated 5 times until each subset is used as a validation set once. After each round of cross-validation, the performance indicators of the model on the validation set are calculated, including the root mean square error (RMSE) and the mean absolute error (MAE). The performance indicators of the 5 cross-validations are averaged to obtain the cross-validation performance estimate of the model. The process is as follows: Figure 4 shown.

[0093] After the model training is completed, save the model parameters and record the model at this time as M, then there is the following formula:

[0094] E=M(T,H,W,P) (8)

[0095] Among them, E is the model output value, T, H, W, and P are the predicted temperature, humidity, wind speed, and electricity price for the day. This formula can be used to predict future electricity consumption. Assuming that on day t, the temperature is T t , humidity is H t , wind speed is W t , the electricity price is P t , then by calculating M(T t ,H t ,W t ,P t ) to get E t , E t It is not the final predicted power consumption yet, and it needs to be denormalized to get the power consumption. The formula is as follows:

[0096] E'=E(E max -E min)+E min (9)

[0097] Among them, E' represents the final predicted electricity consumption, E max ,E min Indicates the maximum and minimum values ​​of electricity consumption in the original data set. According to E', the smart grid can notify the system to dynamically adjust the load.

[0098] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the protection scope of the present invention in any form, and all technical solutions obtained by equivalent replacement and the like fall within the protection scope of the present invention. The parts not involved in the present invention are the same as the prior art or can be implemented by the prior art.

Claims

1. A prediction method for decentralized user aggregate resource load control, characterized in that: The steps include: Step 1: Process the distributed user data and then cluster them to form corresponding user aggregates; Step 2: Use the clustered data to train the machine learning model, using the LightGBM and XGBoost fusion model to obtain evaluation results after training.

2. A prediction method for decentralized user aggregate resource load control according to claim 1, characterized in that: In step 1, data preprocessing includes processing missing values ​​and fields to ensure that model training proceeds normally. For records containing missing value fields, a moving average method is used to fill them.

3. A prediction method for decentralized user aggregate resource load control according to claim 1, characterized in that: In the step 1, the source data is clustered by combining the genetic K-medoids clustering method with dynamic time warping, and the differences between different types of users are found through clustering to form different user aggregates.

4. A method for predicting resource load control of a distributed user aggregate according to claim 1, characterized in that: In step 1, the clustering process is: (1) Encode the sample using a decimal encoding method based on cluster centers, randomly initialize K cluster centers, and generate an individual; (2) Repeat sizepop times to obtain the initial population P0 and calculate the fitness F(S i ); (3) A new population P1 is generated by performing selection operations based on fitness. For each individual in the new population, the individual criterion function value J is the current solution f. For each individual in the new population, according to the probability P i Generate a new individual, the criterion function value J of the individual is the current solution f', calculate the function difference f = f'-f, and make a judgment based on the value of f. If f <= 0, accept the new solution f' as the current solution with probability P, otherwise accept the new solution f' as the current solution, iterate until the conditions are met, and generate a new population P2; (4) For each individual in the new population, calculate the current cluster center, use DTW distance-based clustering, and perform clustering through K-medoids to form data of different clusters, generate population P3, and determine whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, the individual with the highest fitness in the population is the best clustering result, otherwise continue to repeat the iteration.

5. A method for predicting resource load control of a distributed user aggregate according to claim 4, characterized in that: The criterion for judging the quality of clustering in the K-medoids algorithm is the criterion function value J, the value of J is equal to the sum of the distances from all points in the cluster to the corresponding cluster center. The smaller the value of J, the better the quality of the clustering, and vice versa. The criterion function is defined as follows: Among them, k is the number of categories, x i is the sample object, z j For class c j The cluster center of .

6. A method for predicting resource load control of a distributed user aggregate according to claim 5, characterized in that: For each individual in the population, a fitness function is constructed according to the criterion function J. The fitness function is defined as follows: F(S i )=1.5×J max -J(S i ),i=1,2,...,sizepop Among them, J max is the maximum value of the criterion function of all individuals in the population; J(S i ) is the criterion function value of the current individual, sizepop is the population size; the smaller the value of the criterion function J, the better the quality of the clustering represented by the individual, the larger the fitness function value, and the higher the survival probability.

7. A method for predicting resource load control of a distributed user aggregate according to claim 4, characterized in that: The K-medoids algorithm determines the cluster to which a sample point belongs based on the distance between the sample point and the cluster center, and updates the cluster center according to the obtained clustering result; specifically, it includes: (1) Calculate the distance from each sample in the training data set D to D C The distance η of each cluster center is calculated, and the cluster center with the closest distance is selected as the cluster to which it belongs; (2) Calculate the average distance from each sample in each category to other sample points, and select the smallest one as the new cluster center.

8. The prediction method for decentralized user aggregate resource load control according to claim 1, characterized in that: In step 2, the preprocessed data is used to train the cross-LightGBM and XGBoost. First, the XGBoost1 model generates a new feature X1 based on the initial features T, H, W, and P. Similarly, the LightGBM1 model generates another new feature X2 based on the four features. Then, the X1 feature is incorporated into the original feature as a column. Therefore, the original data has 5 features. These 5 features are used to train the LightGBM2 model. The LightGBM2 model predicts the power load, which is recorded as b. Again, the X2 feature is incorporated into the original data to obtain another data with five features. The data is used to train the XGBoost2 model. The model will also output a power load prediction, recorded as a. Finally, these two outputs are combined to obtain the final power load prediction, that is, 9. A method for predicting resource load control of a distributed user aggregate according to claim 8, characterized in that: The cross-validation method is used in the model training process. The preprocessed data set is divided into 5 parts of equal size. For each round of cross-validation, 4 subsets are used to train the model, and the remaining 1 subset is used as the validation set to evaluate the performance of the model. This process is repeated 5 times until each subset is used as a validation set once. After each round of cross-validation, the performance index of the model on the validation set is calculated, and the performance index of the 5 cross-validations is averaged to obtain the cross-validation performance evaluation result of the model.

10. A prediction device for decentralized user aggregate resource load control, characterized in that: include: A preprocessing module for processing distributed user data; The clustering module is used to cluster the source data, find out the differences between different types of users through clustering, and form different user aggregates; Model training module: used to train the cross-LightGBM and XGBoost using preprocessed data, and save the model parameters after the model training is completed.