GBDT-based damage calculation cluster load balancing method
By using GBDT algorithm to build a prediction model in the damage computing cluster, the problem of uneven allocation of computing resources is solved, and efficient allocation of tasks and the improvement of simulation speed is achieved.
Patent Information
- Application Number
- CN202411593688.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-04-11
AI Technical Summary
In the damage computing cluster, unbalanced allocation of computing resources leads to too long task response time, the existing load balancing algorithm is complex and the response time needs to be improved.
The prediction model is constructed based on the gradient enhancement decision tree (GBDT) algorithm, and the computing node with the shortest time required to execute tasks is predicted based on the real-time load information of the service node, so as to achieve reasonable allocation of tasks.
It improves the overall execution time of the destruction cluster simulation task, makes full use of computer cluster resources, and improves the simulation speed and system robustness.
Smart Images

Figure CN119808519A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a balancing method, and in particular to a damage computing cluster load balancing method based on GBDT. Background Art
[0002] It is of great significance to conduct damage simulation research on armored equipment. It can not only provide basic data for combat simulation and protection simulation of armored equipment, but also provide important reference for damage research of armored equipment. Huang Junqing (Damage Simulation of a Certain Type of Armored Equipment Based on Finite Element Analysis, Journal of System Simulation, 2018) constructed a numerical simulation model of the ammunition force field based on finite elements and a high-resolution component-level vulnerability structure model of armored equipment based on three-dimensional modeling technology, as well as an armored equipment damage simulation system, and carried out damage simulation analysis of a certain type of armored equipment. Yao Jiangtao (Simulation of Damage of Semi-Armor-Piercing Warhead Penetrating Multi-layer Deck, Ship Science and Technology, 2022) used LS-DYNA nonlinear finite element software to evaluate the damage effect caused by warhead penetration. Wang Jun (Building Damage Assessment Based on Finite Element Simulation Results Identification, Command, Control and Simulation) used the structural dynamic finite element analysis software SAP-2000 to perform numerical simulation and analysis of target damage. ANSYS finite element simulation software is used in various target damage assessment systems. With the expansion of damage simulation business scale and the emergence of complex simulation scenarios, traditional single services can no longer meet business scenarios. In the microservice architecture, each microservice can be deployed on a single server or on different servers. We call these servers clusters. Deploying different damage simulation services on microservice clusters can form a damage computing cluster. This allows each damage simulation service to be independently deployed and expanded, providing a more flexible, scalable, and distributed solution.
[0003] However, as time goes by, due to the different loads of different servers in the computing cluster, when a client task needs to respond, if the microservice instance that executes the task is deployed on a server with a higher load, the response time of the task will be very long. In order to solve this problem, we need to rely on an effective load balancing method to reasonably allocate tasks to cluster servers. Under this strategy, the load of cluster servers is relatively uniform, and the overall processing efficiency of the cluster system will also be improved. Jing Cheng designed the DWLB algorithm, which takes into account the real-time health status of different server nodes and has a significant improvement in throughput. However, due to the high complexity of the algorithm, the response time needs to be improved. Yang Mingji proposed that the judgment criteria of the CM (CPU-Memory) algorithm are the efficiency of CPU and memory usage. It calculates the weight of the server and introduces a new parameter-the load redundancy parameter to evaluate the server's ability to handle new requests. Du Jinfang introduced a dynamic load balancing algorithm using Nginx, which adds a dynamic feedback function on the basis of the weighted polling algorithm, aiming to enhance the load balancing efficiency of the server and the flexibility of its strategy. Summary of the invention
[0004] Aiming at the problem of unbalanced allocation of computing resources in the damage computing system, the present invention proposes a damage computing cluster load balancing method and designs a dynamic load balancing strategy based on the GBDT algorithm. The GBDT algorithm has high prediction accuracy and can predict the computing node with the shortest time required to execute a task based on the real-time load information of the service node, which can shorten the overall time for the simulation cluster to execute batch simulation tasks, make fuller and more reasonable use of computer cluster resources, and improve the simulation speed of the damage cluster.
[0005] The present invention adopts the above technical solution, adopts the following technical solution:
[0006] A damage calculation cluster load balancing method based on GBDT includes the construction of a GBDT prediction model and a damage cluster load balancing method, specifically including the following steps:
[0007] Step 1: Collect and process data from the damage calculation cluster system platform;
[0008] Step 2: GBDT prediction model construction;
[0009] x=<c,Load>,x i is the characteristic variable of the i-th sample training data, y i is the characteristic value of the i-th training sample, and the training data set D of the model is obtained as {(x1,y1),(x2,y2),...,(x n ,y n )}, n is the total number of training samples; the GBDT prediction model obtained after M iterations is:
[0010]
[0011] in,
[0012]
[0013] is the predicted initial value, c is the constant that minimizes the loss function, and f i (x)(i=1,2,...,M) is the function increment of the i-th iteration, and f(x) is the sum of the predicted initial value and the iterative function increment;
[0014] Step 3: First, analyze the damage simulation task sent by the client, obtain the available simulation service instances and the load information of the computer nodes where the simulation service is deployed from the service registration center of the simulation cluster, and then integrate the GBDT damage simulation task time prediction model trained in advance into the load balancer. According to different simulation task types and the current load information of the simulation nodes, predict the execution time of the new simulation task, select the service node with the shortest prediction time, and assign the simulation task to the service node for execution.
[0015] Step 1 The specific process is as follows:
[0016] 1.1、Data information definition: Within the period T, the load detailed information Load and data collection of the damaged cluster computing node RT are used to obtain the total data set;
[0017] 1.2 Data collection and processing:
[0018] (1) Data collection: At the beginning of the algorithm, simulation tasks are evenly distributed to each computing node in the damage calculation cluster. Then each computing node starts to process the simulation tasks and records the task type c of each simulation task. i and execution time y i And the load information of the computing node at the current time Load i , after all computing node tasks are completed, they are merged into the total data set S.
[0019] (2) Data processing: After obtaining the data set, the data is preprocessed. First, samples with missing values caused by factors such as unexpected power outages in the damage simulation cluster are removed; in order to avoid the impact of dimensional differences on the prediction results, the data is normalized and linear normalization is selected.
[0020] In step 2, when establishing the GBDT model, the prediction accuracy is improved by continuously iterating the prediction results in the gradient direction where the residual decreases. The calculation formula for the optimal gradient direction of the fitting residual in the mth iteration of the GBDT model is:
[0021]
[0022] The optimal step length calculation formula for each iteration is (6), h m (x) is the weak learner created in the mth iteration. The prediction result after m iterations can be expressed as formula (7);
[0023]
[0024] f m (x) = f m-1 (x)+β m h m (x) (7).
[0025] The present invention adopts the above technical solution, through theoretical analysis of the factors affecting the length of time for server nodes in the cluster to execute tasks, establishes a regression model of node load information and task response time, and integrates the trained model into the load balancing scheduling method. When executing the damage simulation calculation task, the model is used to predict the response time of the task on different server nodes, and finally the damage simulation task is assigned to the server with the shortest predicted response time. The four learning models of DT, LR, RF and BP neural network are compared, and the accuracy of the simulation task time is predicted by the mean square error, mean absolute error and determination coefficient analysis model. Experiments show that the GBDT algorithm is more accurate in predicting the execution time of the damage task compared with the other three algorithms. Compared with the three load balancing algorithms of DWLB algorithm, CM algorithm and Nginx dynamic load balancing algorithm, the load balancing algorithm proposed by the present invention has a significant improvement in task execution time. The system is tested for performance in three aspects: single-machine and cluster task execution time, multi-user concurrent use error rate and task execution time of different load balancing algorithms. It is verified that the damage calculation cluster combined with the load balancing algorithm has better robustness and faster simulation task execution speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is the principle diagram of the GBDT algorithm;
[0027] Figure 2 To damage the cluster load balancing method flow chart;
[0028] Figure 3 This is a comparison chart of model evaluation indicators;
[0029] Figure 4 This is a comparison chart between the actual task time and the predicted time;
[0030] Figure 5 This is a comparison chart of stand-alone and cluster time;
[0031] Figure 6 This is a multi-user stress test chart;
[0032] Figure 7 The time comparison of load balancing algorithms. DETAILED DESCRIPTION
[0033] Load balancing is to balance the work tasks and distribute them to multiple operation units to make the cluster resource allocation more reasonable. Common load balancing methods include hardware load balancing and soft load balancing. The present invention discusses soft load balancing methods. For soft load balancing, common ones include LVS, Nginx, DNS Load Balance and Ribbon. It can expand the bandwidth and throughput of the server, improve the data processing capacity in the network, and make the tasks more reasonably distributed between server nodes, so as to better complete the work together. Load balancing technology mainly includes static load balancing and dynamic load balancing. Common static load balancing methods include: random, weighted polling and other algorithms. Common dynamic load balancing methods include: minimum number of connections, shortest response time, etc.
[0034] GBDT is a machine learning algorithm for classification and regression, which has the characteristics of high prediction accuracy and strong robustness. The principle of the GDBT algorithm is to train a weak learner from the original data set, and then gradually adjust the training samples according to the performance of the weak learner, and then use the adjusted sample distribution to train the next weak classifier; and so on, until the number of weak learners reaches a pre-specified value, and finally the weak learner is combined with the weighted. It optimizes the model through gradient descent, and affects the evaluation structure by continuously fitting the residuals, so that the loss function can maximize the iteration reduction in each round of iteration, accelerating the local and global convergence of the model. In each round of residual fitting, the fitting direction is the negative gradient direction of the loss function of the previous weak evaluator, so that the output of the weak evaluator gradually approaches the true value, making it more advantageous in performance and efficiency. The principle is as follows Figure 1 shown.
[0035] A damage calculation cluster load balancing method based on GBDT mainly involves the construction of a GBDT prediction model and a load balancing method of a damage cluster, and specifically includes the following steps:
[0036] Step 1: Collect and process the data of the damage calculation cluster system platform. The specific process is as follows:
[0037] 1.1、Data Information Definition
[0038] Definition 1: Load details of the damaged cluster computing node RT within the period T:
[0039] Load=<n,u,l,a,Tn>
[0040] Among them, n is the number of CPU cores; u is the CPU system utilization; l is the CPU load; a is the remaining physical memory; Tn is the total number of all threads of the current node process.
[0041] Definition 2 After data collection, the total data set is obtained:
[0042] S=<X,Y>
[0043] Where X is the damage simulation task type and node load information sample set, each piece of information x in the X sample set is <c, Load>, c is the simulation task type; Y is the corresponding simulation task execution time sample set.
[0044] 1.2 Data collection and processing
[0045] (1) Data Collection
[0046] The data used in the present invention is collected on the damage computing cluster system platform. At the beginning of the algorithm, the simulation tasks are evenly distributed to each computing node in the damage computing cluster. Then each computing node starts to process the simulation tasks and records the task type c of each simulation task. i and execution time y i And the load information of the computing node at the current time Load i , after all computing node tasks are completed, they are merged into the total data set S.
[0047] (2) Data processing
[0048] After obtaining the data set, the data is preprocessed. First, samples with missing values caused by factors such as unexpected power outages in the damage simulation cluster are removed; in order to avoid the impact of dimensional differences on the prediction results, the data is normalized, and linear normalization is selected:
[0049]
[0050] x mormal represents the normalized value, x min and x max represents the maximum and minimum eigenvalues, and x represents the original eigenvalue.
[0051] Step 2: GBDT prediction model construction;
[0052] The load balancing strategy of the algorithm of the present invention takes the simulation task execution time predicted by the prediction model of the cluster node as the main judgment criterion.
[0053] x=<c,Load> , x i is the characteristic variable of the i-th sample training data, y iis the characteristic value of the i-th training sample, and the training data set D of the model is obtained as {(x1,y1),(x2,y2),...,(x n ,y n )}, n is the total number of training samples. In the modeling process, the error between the predicted value and the true value is calculated by the loss function. The square loss function formula selected in the present invention is:
[0054]
[0055] Among them, f(x) is the predicted value; x is the input variable; y is the output variable; i is the number of iterations. The GBDT prediction model obtained after M iterations is:
[0056]
[0057] in,
[0058]
[0059] is the predicted initial value, c is the constant that minimizes the loss function, and f i (x)(i=1,2,...,M) is the function increment of the i-th iteration, and f(x) is the sum of the predicted initial value and the iterative function increment.
[0060] In the process of establishing the GBDT model, the prediction accuracy is improved by continuously iterating the prediction results in the gradient direction where the residual is reduced. The calculation formula for the optimal gradient direction of the fitting residual in the mth iteration of the GBDT model is:
[0061]
[0062] The optimal step length calculation formula for each iteration is (6), h m (x) is the weak learner created in the mth iteration. The prediction result after m iterations can be expressed as formula (7);
[0063]
[0064] f m (x) = f m-1 (x)+β m h m (x) (7)
[0065] The GBDT model construction and simulation task execution time prediction algorithm are shown in Algorithm 1:
[0066]
[0067] The GBDT model can select different hyperparameters to improve the generalization ability of the parameter model. In the present invention, the loss function selects the square loss function; the dropout regularization is selected to improve the generalization ability of the model to prevent the network from overfitting. Through a large number of hyperparameter tuning, the other hyperparameters selected are: the number of CART regression numbers is 100; the learning rate is 0.1; the subsampling is 0.9; the maximum depth of the decision tree is 10; the minimum number of leaf splits is 10; and the minimum number of leaf nodes is 5.
[0068] Assume that M=6 is the dimension of x. It can be seen from Algorithm 1 that in the absence of modeling cycle, only the f(Load) operation needs to be executed to obtain the damage task prediction time. According to formula (7), only the addition operation of the weak learner results is performed, and the time complexity of the algorithm is O(M). In the modeling cycle, the training sample data is mainly used to iterate the weak learner. At this time, the time complexity of Algorithm 1 becomes O(NM*M!+M!). Therefore, more resources will be consumed when performing modeling operations. When only the prediction time operation is performed, the time prediction value can be quickly obtained. Each load node obtains its own prediction time T for executing the damage task. i After that, T i Feedback is given to the load balancing scheduler for scheduling decisions.
[0069] Step 3: Load balancing method.
[0070] In order to improve the overall efficiency of the damage computing cluster and minimize the time it takes for the damage computing cluster to execute simulation tasks, the present invention proposes a load balancing method based on GBDT. Figure 2 As shown:
[0071] First, the damage simulation task sent by the client is analyzed, and the available simulation service instances and the load information of the computer nodes where the simulation service is deployed are obtained from the service registration center of the simulation cluster. Then, the GBDT damage simulation task time prediction model trained in advance is integrated into the load balancer. The execution time of the new simulation task is predicted according to the different simulation task types and the current load information of the simulation node. The service node with the shortest prediction time is selected and the simulation task is assigned to the service node for execution. The specific implementation algorithm is shown in Algorithm 2.
[0072]
[0073]
[0074] As can be seen from Algorithm 2, the process of selecting execution nodes by the load balancing algorithm mainly requires collecting the predicted time for each node to execute tasks from the scheduling center and sorting the time. If the network is unobstructed, the collection process consumes almost no time. Therefore, the time sorting method selects quick sort. The time complexity of this algorithm is O(nlogn), where n is the number of cluster nodes.
[0075] Experimental and comparative analysis:
[0076] In order to evaluate and test the prediction effect of the GBDT model constructed by the present invention on the execution time of the damage simulation task, the model is constructed based on four common machine learning algorithms, namely random forest (RF), decision tree (DT), linear regression (LR) and BP neural network. These represent prediction algorithms of different complexity and characteristics, which can help evaluate the performance indicators such as prediction accuracy and stability of different models on the same data set. First, the data set is randomly divided into a training set and a test set in an 8:2 ratio. The training set is used for model construction and the test set is used for model evaluation. The model construction process adopts ten-fold cross-validation (CV), that is, the training set data is divided into 10 equal parts, each of which is trained and tested in the above-mentioned machine learning model. Each time, one of them is selected as the validation set, and the remaining 9 are selected as the training set. The final model evaluation result takes the average of the 10 training results to more accurately evaluate the generalization performance of the model. The model parameters are adjusted by grid search to continuously optimize the model.
[0077] The performance of the model was evaluated using mean square error (MSE), mean absolute error (MAE), and coefficient of determination (R 2 ). Its calculation formula is as follows:
[0078]
[0079] Where n is the number of samples, y i is the actual value of the i-th sample, is the predicted value of the i-th sample, is the average value of all sample true values. MAE and MSE represent the error between the predicted value and the true value. The smaller the value, the more accurate the prediction model. 2 The range of is 0 to 1. The larger the value, the better the model fit. The evaluation results are shown in Table 1.
[0080] Table 1 Model comparison evaluation table
[0081] Model\Algorithm MSE MAE <![CDATA[R 2 ]]> GBDT 12038 85.45 0.9677 DT 18729 129.23 0.9430 LR 23871 137.05 0.9302 RF 15392 109.36 0.9522 BP 14382 103.05 0.9604
[0082] From Table 1 and Figure 3 It can be seen that the MAE and MSE of the GBDT model are 85.45 and 12308 respectively, which are lower than the MAE and MSE values of the other four models. 2 =0.9677, which is higher than the values of the other four models, indicating that the prediction efficiency of the GBDT model is better than that of the other four models as a whole.
[0083] (1) Feasibility verification of Algorithm 1
[0084] After the damage simulation task time prediction model is built by Algorithm 1, 15 data in the data set S are randomly selected for verification, and the predicted value of the damage task execution time is compared with the actual value. Figure 4 As shown, the reliability of the GBDT model is further proved.
[0085] (2) Performance Evaluation of Damage Computing Cluster
[0086] The load balancing algorithm proposed in the present invention is tested on the damage computing cluster. The tool uses the open source tool Jmeter to simulate the client for testing. The analysis is conducted from three aspects: single-machine and cluster execution time, multi-user stress test, and load balancing algorithm time comparison. The performance test is conducted in a local area network with a network bandwidth of 100MB / S. The composition of the damage computing cluster server nodes is shown in the table. Simulation services one to three are deployed on the damage cluster nodes one and two, and the Redis registration center and load balancing server are deployed on cluster node three. Jmeter simulated client operations are performed on cluster node three. The detailed configuration information of the service nodes in the service cluster is shown in Table 2 Cluster Node Configuration.
[0087]
[0088]
[0089] Table 2.
[0090] (3) Single machine and cluster time comparison test
[0091] The main test is to compare the execution time of the damage task under single-thread, multi-thread and cluster systems. The environment of the single-thread and multi-thread experiments in the experiment is service node 1, and the experimental environment of the distributed damage cluster system is the cluster environment in Table 2. The load balancing scheduling algorithm used is Algorithm 2 of the present invention. In the experiment, each task of the client is simulated to send a 64-byte real-time data. Since the thread pool size set by Netty used in the RPC framework used in the damage computing cluster system is 16, the thread pool size used by the computer used to execute the multi-threaded task is also set to 16. The experimental results are shown in Tables 3 and Figure 5 shown.
[0092] Table 3 Comparison of stand-alone and cluster time
[0093] Number of tasks Single thread execution time Multithreaded execution time Distributed system execution time 100 508.3 63.8 58 400 1948.5 351.4 225 600 3039.6 525.4 330 800 4132.7 699.2 455 1000 5041.0 877.1 551 1200 6269.1 1045.4 668 1600 8168.9 1411.0 886 2000 10065.9 1744.7 1110 2400 12515.3 2789.1 1441
[0094] From Table 3 and Figure 5It can be seen that the time spent by using a thread pool and a customized distributed system to execute simulation tasks is significantly improved compared to a single thread. When the number of tasks is less than 500, there is no significant advantage in using a distributed damage cluster solution because calling the simulation service method will have a certain system overhead. When the number of tasks reaches more than 2000, the advantage of using the algorithm 2 of the present invention is more obvious. When the number of tasks is 2000, the execution time of using a distributed system is shortened by 89% and 64% compared to single thread and multi-thread, respectively.
[0095] (4) Multi-user stress testing
[0096] The robustness of the system is tested when multiple users are online. The experimental setting simulates each user sending 16 simulation task requests within 1 second, and the number of concurrent users ranges from 9 to 30. The error rate of tasks during the execution of the test system is tested. Figure 6 It is the data result of the simulation experiment.
[0097] Table 2 Multi-user stress test results
[0098] Number of concurrent users Error rate of multithreaded stand-alone system Distributed system error rate 10 0 0 11 0 0 12 36.36 0 13 72.95 0 14 96.21 0 15 100 0 16 100 0 17 100 0 18 100 0 19 100 0 20 100 0 21 100 0 22 100 0 23 100 0 24 100 0 25 100 0 26 100 0 27 100 2.1 28 100 15.6 29 100 86 30 100 100
[0099] From Table 4 and Figure 6 It can be seen that when the number of concurrent users exceeds 12, the error rate of task execution under single-machine multi-threading begins to appear. When the concurrency reaches 15, the single-machine multi-threading system can no longer execute tasks normally.
[0100] The distributed system began to have system errors when the number of concurrent users reached 27, indicating that the system can support a certain scale of users using it online at the same time, and as the number of computing nodes in the cluster increases, the concurrency that can be supported will also increase accordingly, showing good robustness.
[0101] (5) Load balancing algorithm time comparison test
[0102] This section compares the execution speed of four load balancing algorithms: DWLB algorithm, CM algorithm, Nginx dynamic load balancing algorithm and GBDT algorithm. In a distributed cluster, the cluster's load balancing algorithm is replaced with these four algorithms to test the execution speed of the simulation task.
[0103] From Table 5 and Figure 7It can be seen that the CM algorithm, Nginx dynamic load balancing algorithm and GBDT load balancing algorithm have better execution time effects and can reasonably and fully utilize server node resources to improve task execution speed. Both the CM algorithm and the Nginx dynamic load balancing algorithm need to continuously calculate the weight value of the service node, and their time performance is relatively close. The DWLB algorithm focuses on the discreteness of disk space usage and system robustness, and requires more system resources. Therefore, the DWLB algorithm is not as good as the other three algorithms in terms of time performance. When the number of tasks exceeds 1500, since the GBDT algorithm consumes less system computing resources than the other two algorithms in the process of selecting service nodes, when there are more than 1500 tasks, the distributed system uses the GBDT algorithm to execute tasks faster than the CM algorithm and the Nginx dynamic load balancing algorithm.
[0104] Table 3 Load balancing algorithm time comparison
[0105] Number of tasks DWLB algorithm CM algorithm Dynamic load balancing algorithm GBDT Algorithm 100 65 59 57 58 400 281 235 232 225 600 430 362 347 330 800 561 477 483 455 1000 706 593 579 551 1200 814 706 692 668 1600 1126 981 905 886 2000 1620 1251 1260 1110 2400 1963 1575 1633 1441
[0106] The use of GBDT load balancing algorithm has significantly improved the efficiency of this system when executing large-scale simulation tasks. Compared with the DWLB algorithm, CM algorithm, and Nginx dynamic load balancing algorithm, the time is shortened by 26.6%, 9.6%, and 11.8% respectively when there are 2400 simulation tasks.
[0107] Based on the problem of unbalanced resource allocation in a damage computing cluster, the present invention proposes a load balancing method in a damage computing cluster system in combination with the GBDT algorithm. By theoretically analyzing the factors that affect the length of time it takes for server nodes in the cluster to execute tasks, a regression model of node load information and task response time is established, and the trained model is integrated into the load balancing scheduling method. When executing damage simulation computing tasks, the model is used to predict the response time of tasks on different server nodes, and finally the damage simulation task is assigned to the server with the shortest predicted response time. By comparing the four learning models of DT, LR, RF and BP neural network, the accuracy of the simulation task time prediction model is analyzed using mean square error, mean absolute error and determination coefficient. Experiments have shown that the GBDT algorithm is more accurate than the other three algorithms in predicting the execution time of damage tasks. By comparing the three load balancing algorithms of DWLB algorithm, CM algorithm and Nginx dynamic load balancing algorithm, the load balancing algorithm proposed by the present invention has a significant improvement in task execution time. The system was performance tested from three aspects: single-machine and cluster task execution time, multi-user concurrent use error rate, and task execution time of different load balancing algorithms. It was verified that the damage computing cluster combined with the load balancing algorithm has better robustness and faster simulation task execution speed.
Claims
1. A damage calculation cluster load balancing method based on GBDT, characterized by: Including the construction of GBDT prediction model and the load balancing method of the damage cluster, the specific steps include: Step 1: Collect and process data from the damage calculation cluster system platform; Step 2: GBDT prediction model construction; x=<c,Load> , x i is the characteristic variable of the i-th sample training data, y i is the characteristic value of the i-th training sample, and the training data set D of the model is obtained as {(x1,y1),(x2,y2),...,(x n ,y n )}, n is the total number of training samples; the GBDT prediction model obtained after M iterations is: in, is the predicted initial value, c is the constant that minimizes the loss function, and f i (x)(i=1,2,...,M) is the function increment of the i-th iteration, and f(x) is the sum of the predicted initial value and the iterative function increment; Step 3: First, analyze the damage simulation task sent by the client, obtain the available simulation service instances and the load information of the computer nodes where the simulation service is deployed from the service registration center of the simulation cluster, and then integrate the GBDT damage simulation task time prediction model trained in advance into the load balancer. According to different simulation task types and the current load information of the simulation nodes, predict the execution time of the new simulation task, select the service node with the shortest prediction time, and assign the simulation task to the service node for execution.
2. The damage calculation cluster load balancing method based on GBDT according to claim 1 is characterized in that: Step 1 The specific process is as follows: 1.1、Data information definition: Within the period T, the load detailed information Load and data collection of the damaged cluster computing node RT are used to obtain the total data set; 1.2 Data collection and processing: (1) Data collection: At the beginning of the algorithm, simulation tasks are evenly distributed to each computing node in the damage calculation cluster. Then each computing node starts to process the simulation tasks and records the task type c of each simulation task. i and execution time y i And the load information of the computing node at the current time Load i , after all computing node tasks are completed, they are merged into the total data set S. (2) Data processing: After obtaining the data set, the data is preprocessed. First, samples with missing values caused by factors such as unexpected power outages in the damage simulation cluster are removed; in order to avoid the impact of dimensional differences on the prediction results, the data is normalized and linear normalization is selected.
3. The damage calculation cluster load balancing method based on GBDT according to claim 1 is characterized in that: In step 2, when establishing the GBDT model, the prediction accuracy is improved by continuously iterating the prediction results in the gradient direction where the residual decreases. The calculation formula for the optimal gradient direction of the fitting residual in the mth iteration of the GBDT model is: The optimal step length calculation formula for each iteration is (6), h m (x) is the weak learner created in the mth iteration. The prediction result after m iterations can be expressed as formula (7); f m (x)=f m-1 (x)+β m h m (x) (7)。