A Dynamic Resource Allocation and Load Balancing Method in a Cloud Computing Environment
Through the spider bee algorithm, the gray prediction model and multi-objective trout sea squirt algorithm are optimized, and the resource allocation in the cloud computing environment is dynamically adjusted, which solves the problems of node overload and heterogeneous resource management, and achieves efficient resource utilization and system performance improvement.
Patent Information
- Application Number
- CN202510387313.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-03-31
AI Technical Summary
In the prior art, resource allocation in cloud computing environments has problems such as overloading of specific nodes, resulting in unavailability of system services and imbalance in resource use, resulting in idle or waste of resources, and it is difficult to manage heterogeneous resources in a unified manner.
The gray prediction model and multi-objective trout sea squirt algorithm are used to optimize the spider bee algorithm, combined with real-time monitoring and historical data, and dynamically adjust the resource allocation strategy, optimize the gray prediction model for future load change data through the spider bee algorithm, and optimize heterogeneous resource allocation using the multi-objective trout sea squirt algorithm.
It realizes the accuracy and dynamic adaptability of resource allocation, improves resource utilization, reduces operating costs, solves the problems of resource waste and inefficient heterogeneous resource management, and improves system performance.
Smart Images

Figure CN119883663B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing, and particularly to a method for dynamic resource allocation and load balancing in a cloud computing environment. Background Art
[0002] Cloud Computing is a technology and model that provides computing resources (such as servers, storage, databases, networks, software, etc.) through the Internet. These resources are centrally managed by cloud service providers and provided to users in a way of on-demand use and elastic expansion. Users can obtain and configure computing resources through the network according to their own needs without manual interaction with the service provider. For example, a user can create or destroy a virtual machine within a few minutes. Cloud computing resources can be accessed through the Internet or a dedicated network, supporting the access of multiple devices (such as computers, mobile phones, tablets, etc.). Cloud computing can quickly expand or contract resources to adapt to changes in user load. Users can increase or decrease resources at any time according to business needs to achieve elastic scaling.
[0003] In a cloud computing environment, dynamic resource allocation and load balancing is a key technology for optimizing resource utilization, improving system performance and user experience. This method of dynamic resource allocation and load balancing can effectively cope with high concurrency and dynamic load changes in a cloud computing environment, improve resource utilization, reduce operating costs, and at the same time enhance the stability of the system and user experience.
[0004] However, in the prior art, traditional resource allocation often leads to resource idleness or over-allocation, resulting in waste, and it is difficult to uniformly manage and optimize multiple heterogeneous resources in traditional resource management methods, leading to low allocation efficiency. There is also a defect that the overload of a specific node may cause the entire system service to be unavailable. Summary of the Invention
[0005] The present invention provides a method for dynamic resource allocation and load balancing in a cloud computing environment to solve the defects in the prior art that the overload of a specific node may cause the entire system service to be unavailable and the use of different types of resources is unbalanced, resulting in some resources being ignored or not fully utilized.
[0006] The present invention provides a method for dynamic resource allocation and load balancing in a cloud computing environment, including:
[0007] S1: Monitor the resource usage situation and servers in the cloud computing environment in real time to obtain real-time data and load data, and collect historical data and heterogeneous resources;
[0008] S2: Construct a grey prediction model optimized based on the spider wasp algorithm, input historical data for training to obtain the optimized grey prediction model, and input real-time data into the optimized grey prediction model to obtain future load change data;
[0009] S3: Extract heterogeneous performance data from heterogeneous resources, use the multi-objective trout salp algorithm to calculate the heterogeneous performance data to obtain heterogeneous allocation data, formulate a resource allocation strategy based on the heterogeneous allocation data and load data, and adjust the resource allocation strategy in real time according to the future load change data.
[0010] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S2, the steps of obtaining the optimized grey prediction model include:
[0011] S201: Set the size of the spider wasp population to N, and initialize the spider wasp population. The position of each spider wasp represents a set of grey prediction model parameters.
[0012] S202: Define the fitness function according to the prediction accuracy and using the mean square error method.
[0013] S203: Update the position of the spider wasp individual through the position update formula to obtain the updated position of the spider wasp individual, and update the global position of the spider wasp according to the local information to obtain the updated global position of the spider wasp. The formula is expressed as: In the formula, is the th parameter of the th individual at the th iteration, is the th parameter of the global optimal position, is the th parameter of the individual's historical optimal position, r1, r2, and r3 are random numbers between [0, 1], is the
[0014] th parameter of a certain individual within the individual's neighborhood.
[0014] S204: Calculate the fitness of the updated position of the spider wasp individual and the updated global position of the spider wasp according to the fitness function, repeat steps S201 to S203, and after reaching the preset number of iterations, select the updated position of the spider wasp individual with the highest fitness as the optimal parameter.
[0015] S205: Substitute the optimal parameters into the grey prediction model to obtain the optimized grey prediction model.
[0016] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S205, the formula of the optimized grey prediction model is expressed as: In the formula, and are the optimal values of parameters a and b optimized by the spider wasp algorithm, is the original data sequence, is the value of the new sequence generated by the first-order accumulation at time, is the predicted time point, the value of the original time series data sequence at the first time, is the exponential term.
[0017] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S2, the steps of obtaining future load change data include:
[0018] S211: After normalizing the real-time data, collect it into the database, attach a timestamp to each real-time data point, arrange the real-time data points in chronological order according to the timestamp to obtain a real-time data sequence, and perform an accumulation generation operation on the real-time data sequence to obtain an accumulation sequence;
[0019] S212: When the preset time interval is reached, re-use the spider wasp algorithm to update the optimized grey prediction model to obtain the optimal parameters;
[0020] S213: Substitute the optimal parameters into the time response function to predict the real-time data sequence backward to obtain prediction data, and perform a subtraction reduction on the prediction data to obtain future load change data.
[0021] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S3, the steps of obtaining heterogeneous performance data include:
[0022] Heterogeneous resources include computing resources, storage resources, and network resources. Install a monitoring tool on the server, connect to the target resources, and define monitoring metrics and data collection frequencies;
[0023] Start the monitoring tool, collect the performance data of computing resources, storage resources, and network resources to obtain multi-objective performance data, and store the multi-objective performance data in the time series database after data cleaning;
[0024] Extract heterogeneous performance data from the time series database. The heterogeneous performance data includes computing resource performance data, storage resource performance data, and network resource performance data.
[0025] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S3, the steps of obtaining heterogeneous allocation data include:
[0026] S31: Define the objective function according to the computing resource performance data, storage resource performance data, and network resource performance data, and determine the constraints;
[0027] S32: Use the multi-objective trout salp swarm algorithm to randomly generate a trout population, where each trout individual represents a resource allocation scheme;
[0028] S33: For each trout individual, calculate the fitness value according to the objective function, and sort all the trout individuals in the trout population according to the non-dominated relationship, dividing the trout population into multiple levels;
[0029] S34: Within the same level, calculate the distance between adjacent trout individuals in each objective function dimension for the objective function value, and then accumulate multiple distances to obtain the crowding degree of each trout individual;
[0030] S35: Select the trout individual with the lowest level and the largest crowding degree from the trout population as the current global optimal solution to enter the next generation;
[0031] S36: The trout individual moves according to its own position and the position of the current global optimal solution, and the formula is expressed as: In the formula, is the th trout individual at the th generation, the position of the current global optimal solution, is a random number between [0, 1];
[0032] S37: The salp moves following the position of the trout individual;
[0033] S38: Repeat steps S32 to S37 until the preset number of iterations is reached to obtain the non-dominated solution set, and select the solution with the highest fitness from the non-dominated solution set as the heterogeneous allocation data.
[0034] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S31, the steps of obtaining the objective function include:
[0035] Define the resource utilization objective function according to the number of nodes of the computing resources and the computing resource performance utilization rate, storage resource performance utilization rate, and network resource performance utilization rate of each node;
[0036] Obtain the task completion time objective function according to the number of tasks and the expected completion time of each task on different nodes;
[0037] Define the cost objective function according to the computing resource cost, storage resource cost, and network resource cost of each node.
[0038] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S37, the movement formula of the ascidian is expressed as: In the formula, is the position of the th ascidian in the th generation, is the position of its previous ascidian, is a random number between [0, 1].
[0039] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S3, the steps of obtaining a resource allocation strategy include:
[0040] Extract features from the load data to obtain load feature data. Let the load feature data be D (D1, D2, D3,..., D Y ), where Y represents the number, D1 is hardware-intensive, D2 is task priority, D3 is the estimated execution duration, and D Y is the peak resource demand;
[0041] Set a resource allocation target according to the application scenario and user requirements of the cloud computing environment and in combination with the usage environment, and allocate the resource allocation target according to the load feature data to obtain a preliminary allocation strategy;
[0042] Simulate the operation of the preliminary allocation strategy according to historical data, calculate multiple evaluation indicators, and select the optimal preliminary allocation strategy as the resource allocation strategy by comparing the evaluation indicators of different preliminary allocation strategies under the same conditions.
[0043] According to a dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention, in step S3, the steps of adjusting the resource allocation strategy include:
[0044] Conduct trend analysis, change amplitude evaluation, and periodic feature recognition on the load change data to obtain load change trend features, and combine the load change trend features to predict the resource requirements at different future time points to obtain resource requirement prediction data;
[0045] Determine the adjustment direction of the resource allocation strategy according to the resource requirement prediction data, the current resource allocation situation, and in combination with the load data;
[0046] Adjust the computing resources, storage resources, and network resources according to the adjustment direction, and monitor multiple key indicators in real time to determine whether the multiple key indicators reach the expected indicators. If so, stop the adjustment; otherwise, continue to adjust the resource allocation strategy.
[0047] A dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention can accurately obtain future load change data through a grey prediction model optimized by the spider wasp algorithm, solving the defects of traditional load prediction methods in terms of accuracy, self - adaptability, and dynamics. By obtaining future load change data in advance, the forward - looking and real - time nature of dynamic resource allocation is realized, significantly improving the accuracy of resource allocation, the dynamic adaptability of the system, resource utilization rate, and reducing operating costs.
[0048] A dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention also obtains heterogeneous allocation data by using the multi - objective trout salp algorithm, solving the defect that it is difficult to uniformly manage, optimize, and balance multiple heterogeneous resources in traditional resource management and allocation methods, resulting in low allocation efficiency, and achieving the beneficial effects of improving resource utilization rate and system performance.
[0049] A dynamic resource allocation and load balancing method in a cloud computing environment provided by the present invention solves the defects of static resource allocation and lagged response to load changes by adjusting the resource allocation strategy in real - time, thereby achieving the beneficial effects of reducing resource waste and improving system efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0051] Figure 1 is one of the flow diagrams of a dynamic resource allocation and load balancing method in a cloud computing environment provided by an embodiment of the present invention;
[0052] Figure 2 is the second flow diagram of a dynamic resource allocation and load balancing method in a cloud computing environment provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0054] The following will be combined with Figure 1 - Figure 2Describe a dynamic resource allocation and load balancing method in a cloud computing environment of the present invention.
[0055] Figure 1 It is one of the flow schematic diagrams of a dynamic resource allocation and load balancing method in a cloud computing environment.
[0056] As Figure 1 shown, a dynamic resource allocation and load balancing method provided by an embodiment of the present invention includes:
[0057] S1: Monitor the resource usage and servers in the cloud computing environment in real time to obtain real-time data and load data, and collect historical data and heterogeneous resources;
[0058] S2: Construct a grey prediction model optimized by the spider wasp algorithm, input historical data for training to obtain an optimized grey prediction model, and input real-time data into the optimized grey prediction model to obtain future load change data.
[0059] In step S2, the steps of constructing the optimized grey prediction model include:
[0060] S201: Set the spider wasp population size as N, and initialize the spider wasp population. The position of each spider wasp represents a set of grey prediction model parameters. Let the grey prediction model parameters be (a, b).
[0061] S202: Define the fitness function according to the prediction accuracy and using the mean square error method. The formula is expressed as: where, is the predicted value of the model, is the actual value, is the number of the spider wasp population.
[0062] S203: Update the position of the spider wasp individual through the position update formula to obtain the updated position of the spider wasp individual, and update the global position of the spider wasp according to the local information to obtain the updated global position of the spider wasp. The formula is expressed as: In the formula, is the j-th parameter of the i-th individual at the t-th iteration, is the j-th parameter of the global optimal position, is the j-th parameter of the individual historical optimal position, r1, r2 and r3 are random numbers between [0, 1], is the j-th parameter of a certain individual within the individual neighborhood.
[0063] S204: Calculate the fitness of the updated position of the spider wasp individual and the globally updated position of the spider wasp according to the fitness function. Repeat steps S201 to S203. After reaching the preset number of iterations, select the updated position of the spider wasp individual with the highest fitness as the optimal parameter.
[0064] S205: Substitute the optimal parameter into the grey prediction model to obtain the optimized grey prediction model.
[0065] In step S205, the formula of the optimized grey prediction model is expressed as: In the formula, and are the optimal values of parameters a and b optimized by the spider wasp algorithm, is the original data sequence, is the value of the new sequence generated by the first-order accumulation at time, is the predicted time point, is the value of the original time series data sequence at the first time, is the exponential term.
[0066] The steps to obtain the future load change data include:
[0067] S211: After normalizing the real-time data, collect it into the database, attach a timestamp to each real-time data point, arrange the real-time data points in chronological order according to the timestamp to obtain the real-time data sequence, and perform an accumulation generation operation on the real-time data sequence to obtain the accumulation sequence;
[0068] S212: When the preset time interval is reached, re-use the spider wasp algorithm to update the optimized grey prediction model to obtain the optimal parameter;
[0069] S213: Substitute the optimal parameter into the time response function to predict the real-time data sequence backward to obtain the predicted data, and perform a subtraction reduction on the predicted data to obtain the future load change data.
[0070] S3: Extract the heterogeneous resources to obtain the heterogeneous performance data, use the multi-objective trout salp swarm algorithm to calculate the heterogeneous performance data to obtain the heterogeneous allocation data, formulate a resource allocation strategy according to the heterogeneous allocation data and the load data, and adjust the resource allocation strategy in real time according to the future load change data.
[0071] In step S3, the steps to obtain the heterogeneous performance data include:
[0072] The heterogeneous resources include computing resources, storage resources, and network resources. Install monitoring tools on the server and connect to the target resources, and define the monitoring metrics and data collection frequency;
[0073] Start the monitoring tool, collect the performance data of computing resources, storage resources, and network resources to obtain multi-objective performance data, and store the multi-objective performance data in the time series database after data cleaning;
[0074] Extract heterogeneous performance data from the time series database. The heterogeneous performance data includes computing resource performance data, storage resource performance data, and network resource performance data.
[0075] Figure 2 It is the second flow diagram of a dynamic resource allocation and load balancing method in a cloud computing environment provided by an embodiment of the present invention.
[0076] As Figure 2 shown, the steps of obtaining heterogeneous allocation data include:
[0077] S31: Define the objective function according to the computing resource performance data, storage resource performance data, and network resource performance data, and determine the constraint conditions.
[0078] In step S31, the steps of obtaining the objective function include:
[0079] Define the resource utilization objective function according to the number of nodes of the computing resources and the computing resource performance utilization rate, storage resource performance utilization rate, and network resource performance utilization rate of each node. The formula is expressed as: In the formula, is the number of nodes, is the weight of the computing resource performance utilization rate, is the weight of the storage resource performance utilization rate, is the weight of the network resource performance utilization rate, is the computing resource performance utilization rate, is the storage resource performance utilization rate, is the network resource performance utilization rate.
[0080] Define the task completion time objective function according to the number of tasks and the estimated completion time of each task on different nodes. The formula is expressed as: In the formula, is the number of tasks, is the task, is the decision variable, indicating whether the task is assigned to the node , is the estimated completion time.
[0081] Define the cost objective function according to the computing resource cost, storage resource cost, and network resource cost of each node. The formula is expressed as: In the formula, is the computing resource cost, is the storage resource cost is the network resource cost.
[0082] S32: Use the multi-objective rainbow trout salpa algorithm to randomly generate a rainbow trout population, where each rainbow trout individual represents a resource allocation plan.
[0083] S33: For each rainbow trout individual, calculate the fitness value according to the objective function, and sort all the rainbow trout individuals in the rainbow trout population according to the non-dominated relationship, dividing the rainbow trout population into multiple ranks.
[0084] S34: Within the same rank, calculate the distance between adjacent rainbow trout individuals in each objective function dimension for the objective function value, and then accumulate multiple distances to obtain the crowding degree of each rainbow trout individual.
[0085] S35: Select the rainbow trout individual with the lowest rank and the largest crowding degree from the rainbow trout population as the current global optimal solution to enter the next generation.
[0086] S36: The rainbow trout individual moves according to its own position and the position of the current global optimal solution. The formula is expressed as: In the formula, is the position of the th rainbow trout individual in the th generation, is the position of the current global optimal solution, is a random number between [0, 1].
[0087] S37: The salpa moves following the position of the rainbow trout individual. The movement formula of the salpa is expressed as: In the formula, is the position of the th salpa in the th generation, is the position of its previous salpa, is a random number between [0, 1].
[0088] S38: Repeat steps S32 to S37 until the preset number of iterations is reached to obtain the non-dominated solution set. Select the solution with the highest fitness from the non-dominated solution set as the heterogeneous allocation data, and allocate computing resources, storage resources, and network resources to different tasks or services to achieve goals such as maximizing resource utilization, minimizing cost, and optimizing performance.
[0089] The steps to obtain the resource allocation strategy include:
[0090] Extract the feature data from the load data to obtain the load feature data. Let the load feature data be D (D1, D2, D3,..., D Y), where Y represents the quantity, D1 is hardware-intensive, D2 is task priority, D3 is the estimated execution duration, and D Y is the peak resource requirement;
[0091] Set the resource allocation goal according to the application scenario and user requirements of the cloud computing environment and in combination with the usage environment, and allocate the resource allocation goal based on the load characteristic data to obtain a preliminary allocation strategy;
[0092] Simulate and run the preliminary allocation strategy based on historical data, calculate multiple evaluation indicators, and select the optimal preliminary allocation strategy as the resource allocation strategy by comparing the evaluation indicators of different preliminary allocation strategies under the same conditions.
[0093] The steps to adjust the resource allocation strategy include:
[0094] Conduct trend analysis, change amplitude evaluation, and periodic feature recognition on the load change data to obtain the load change trend feature, and combine the load change trend feature to predict the resource requirements at different future time points to obtain the resource requirement prediction data;
[0095] Determine the adjustment direction of the resource allocation strategy according to the resource requirement prediction data, the current resource allocation situation, and in combination with the load data;
[0096] Adjust the computing resources, storage resources, and network resources according to the adjustment direction, and monitor multiple key indicators in real time to determine whether the multiple key indicators reach the expected indicators. If so, stop the adjustment; otherwise, continue to adjust the resource allocation strategy.
[0097] In summary, this embodiment provides a dynamic resource allocation and load balancing method in a cloud computing environment. The grey prediction model optimized by the spider wasp algorithm can accurately obtain future load change data, solving the defects of traditional load prediction methods in terms of accuracy, self-adaptability, and dynamicity. By obtaining future load change data in advance, the forward-looking and real-time nature of dynamic resource allocation is realized, significantly improving the accuracy of resource allocation, the dynamic adaptability of the system, resource utilization, and reducing the operation cost. Also, by using the multi-objective trout salp algorithm to obtain heterogeneous allocation data, it solves the defect that it is difficult to uniformly manage, optimize, and balance multiple heterogeneous resources in traditional resource management and allocation methods, resulting in low allocation efficiency, and achieves the beneficial effect of improving resource utilization and enhancing system performance. By adjusting the resource allocation strategy in real time, it solves the defects of the static nature of resource allocation and the lag response of load changes, thus achieving the beneficial effect of reducing resource waste and improving system efficiency.
[0098] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A dynamic resource allocation and load balancing method in a cloud computing environment, characterized in that Including: S1: Real - time monitor the resource usage and servers in the cloud computing environment to obtain real - time data and load data, and collect historical data and heterogeneous resources; S2: Construct a grey prediction model optimized based on the spider - bee algorithm, input the historical data for training to obtain an optimized grey prediction model, and input the real - time data into the optimized grey prediction model to obtain future load change data; S3: Extract heterogeneous performance data from the heterogeneous resources, use the multi - objective trout - sea squirt algorithm to calculate the heterogeneous allocation data for the heterogeneous performance data, formulate a resource allocation strategy according to the heterogeneous allocation data and the load data, and adjust the resource allocation strategy in real - time according to the future load change data; The steps for obtaining the heterogeneous allocation data include: S31: Define an objective function based on computing resource performance data, storage resource performance data, and network resource performance data, and determine the constraint conditions; S32: Use the multi - objective trout - sea squirt algorithm to randomly generate a trout population, and each trout individual represents a resource allocation scheme; S33: For each trout individual, calculate the fitness value according to the objective function, and sort all the trout individuals in the trout population according to the non - domination relationship, dividing the trout population into multiple levels; S34: Within the same level, calculate the distance between adjacent trout individuals in the value of each objective function dimension, and then accumulate the multiple distances to obtain the crowding degree of each trout individual; S35: Select the trout individual with the lowest level and the largest crowding degree from the trout population as the current global optimal solution to enter the next generation; S36: The trout individual moves according to its own position and the position of the current global optimal solution, and the formula is expressed as: In the formula, is the position of the i-th trout individual in the t-th generation, the position of the current global optimal solution, and R1 is a random number between [0, 1]; S37: The sea squirt moves following the position of the trout individual; S38: Repeat steps S32 to S37 until a preset number of iterations is reached to obtain a non - dominated solution set, and select the solution with the highest fitness from the non - dominated solution set as the heterogeneous allocation data.
2. The dynamic resource allocation and load balancing method in a cloud computing environment according to claim 1, wherein In step S2, the steps for obtaining the optimized grey prediction model include: S201: Set the size of the spider - bee population as N, and initialize the spider - bee population. The position of each spider - bee represents a set of grey prediction model parameters; S202: Define a fitness function according to the prediction accuracy and using the mean square error method; S203: Update the position of the spider - bee individual through the position update formula to obtain the updated position of the spider - bee individual, and update the global position of the spider - bee according to the local information to obtain the updated global position of the spider - bee. The formula is expressed as: ; ; wherein, is the -th parameter of the -th individual at the -th iteration, is the -th parameter of the globally optimal position, is the -th parameter of the historically optimal position of the individual, , and are random numbers between [0, 1], is the -th parameter of a certain individual within the neighborhood of the individual; S204: Calculate the fitness of the updated position of the spider - bee individual and the updated global position of the spider - bee according to the fitness function, repeat steps S201 to S203. After reaching the preset number of iterations, select the updated position of the spider - bee individual with the highest fitness as the optimal parameter; S205: Substitute the optimal parameter into the grey prediction model to obtain the optimized grey prediction model.
3. The dynamic resource allocation and load balancing method in a cloud computing environment according to claim 2, characterized in that, In step S205, the formula of the optimized grey prediction model is expressed as: ; In the formula, and are the optimal values of parameters a and b optimized by the spider wasp algorithm, is the original data sequence, is the value of the new sequence generated by the first-order accumulation at time point, is the predicted time point, is the value of the original time series data sequence at the first time point, is the exponential term.
4. A dynamic resource allocation and load balancing method in a cloud computing environment according to claim 2, characterized in that In step S2, the steps for obtaining the future load change data include: S211: After normalizing the real-time data, collect it into the database, attach a timestamp to each real-time data point, arrange the real-time data points in chronological order according to the timestamp to obtain a real-time data sequence, and perform an accumulation generation operation on the real-time data sequence to obtain an accumulation sequence; S212: When the preset time interval is reached, re-use the spider wasp algorithm to update the optimized grey prediction model to obtain the optimal parameters; S213: Substitute the optimal parameters into the time response function to predict the future of the real-time data sequence to obtain prediction data, and perform a subtraction reduction on the prediction data to obtain future load change data.
5. A dynamic resource allocation and load balancing method in a cloud computing environment according to claim 1, characterized in that, In step S3, the steps of obtaining the heterogeneous performance data include: The heterogeneous resources include computing resources, storage resources, and network resources. Install a monitoring tool on the server, connect to the target resources, and define monitoring metrics and data collection frequencies; Start the monitoring tool, collect the performance data of the computing resources, the storage resources, and the network resources to obtain multi-objective performance data, and store the multi-objective performance data in the time series database after data cleaning; Extract the heterogeneous performance data from the time series database, where the heterogeneous performance data includes computing resource performance data, storage resource performance data, and network resource performance data.
6. A dynamic resource allocation and load balancing method in a cloud computing environment according to claim 1, characterized in that, In step S31, the steps of obtaining the objective function include: Define a resource utilization objective function according to the number of nodes of the computing resources and the computing resource performance utilization rate, storage resource performance utilization rate, and network resource performance utilization rate of each node; Define a task completion time objective function according to the number of tasks and the time expected to be completed by each task on different nodes; Define a cost objective function according to the computing resource cost, storage resource cost, and network resource cost of each node.
7. A dynamic resource allocation and load balancing method in a cloud computing environment according to claim 1, characterized in that, In step S37, the movement formula of the ascidian is expressed as: In the formula, is the position of the J-th ascidian in the T-th generation, is the position of its previous ascidian, and R2 is a random number between [0, 1].
8. A dynamic resource allocation and load balancing method in a cloud computing environment according to claim 1, characterized in that In step S3, the steps of obtaining the resource allocation strategy include: Extract features from the load data to obtain load feature data. Let the load feature data be D(D1, D2, D3, ..., D Y ), where Y represents the number, D1 is hardware-intensive, D2 is task priority, D3 is the estimated execution duration, and D Y is the peak resource requirement; Set a resource allocation objective according to the application scenario and user requirements of the cloud computing environment and in combination with the usage environment, and allocate the resource allocation objective according to the load characteristic data to obtain a preliminary allocation strategy; Perform a simulation run on the preliminary allocation strategy according to the historical data, calculate multiple evaluation metrics, and select the optimal preliminary allocation strategy as the resource allocation strategy by comparing the evaluation metrics of different preliminary allocation strategies under the same conditions.
9. A dynamic resource allocation and load balancing method in a cloud computing environment according to claim 5, characterized in that, In step S3, the steps of adjusting the resource allocation strategy include: Perform a trend analysis, change amplitude evaluation, and periodic feature identification on the load change data to obtain load change trend features, and combine the load change trend features to predict the resource requirements at different future time points to obtain resource requirement prediction data; Determine the adjustment direction of the resource allocation strategy according to the resource requirement prediction data, the current resource allocation situation, and in combination with the load data. Adjust the computing resources, the storage resources, and the network resources according to the adjustment direction, and monitor multiple key metrics in real time to determine whether the multiple key metrics reach the expected metrics. If so, stop the adjustment; otherwise, continue to adjust the resource allocation strategy.
Citation Information
Patent Citations
CNN-Transform-based cloud server dynamic load optimization method and device
CN116302509A
Multi-cloud resource load balancing method and device based on GPT technology, equipment and medium
CN117880291A