Virtual machine scheduling heuristic function optimization method based on large language model
Through the optimization method of virtual machine scheduling heuristic function based on large language model, the complex problem of heuristic algorithms relying on manual and reinforcement learning model training in online virtual machine scheduling is solved, and the dynamic generation and optimization of scheduling strategies are realized, which improves scheduling efficiency and resource utilization.
Patent Information
- Application Number
- CN202510117346.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-24
AI Technical Summary
In online virtual machine scheduling, heuristic algorithm design relies on manual labor, and reinforcement learning model training is complex, making it difficult to maintain efficient in dynamic environments.
The virtual machine scheduling heuristic function optimization method is adopted based on the large language model. By constructing the initial heuristic function code and using the large language model for optimization, dynamically generate and optimize the scheduling strategy, reducing sample complexity, improving scheduling efficiency and resource utilization.
Dynamic generation and optimization of scheduling strategies are realized, which significantly reduces sample complexity, improves scheduling efficiency and resource utilization, and adapts to efficient and stable performance in complex environments.
Smart Images

Figure CN120045283A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of function optimization methods, and particularly to a heuristic function optimization method for virtual machine scheduling based on large language models. Background Art
[0002] In the context of the rapid development of modern technology, cloud computing has become the core force driving the digital transformation of enterprises. By allocating computing resources on demand, cloud computing provides important support for enterprises to get rid of the limitations of traditional local hardware and accelerate business innovation. Leading global cloud service providers offer flexible and efficient resource management capabilities through their widely deployed data center infrastructures. In this system, virtual machine scheduling, as a key resource allocation mechanism, plays a crucial role in optimizing the performance and controlling the cost of cloud platforms. Optimizing virtual machine scheduling strategies can not only improve resource utilization efficiency but also significantly reduce energy consumption and enhance the resource usage efficiency of the entire industry.
[0003] The IaaS (Infrastructure as a Service) model of cloud computing abstracts hardware resources and delivers them in a standardized manner, providing users with flexible computing, storage, and network services. In a multi-tenant environment, how to efficiently match resources between virtual machines and physical hosts has become a key issue affecting the performance and cost of cloud platforms. Modern data centers use virtualization technology to abstract physical resources, significantly enhancing the flexibility of resource management. However, virtual machine scheduling needs to address challenges such as multi-dimensional resource requirements, dynamic environmental changes, and complex constraint conditions. An effective virtual machine scheduling strategy can improve hardware resource utilization and reduce energy consumption while ensuring service quality.
[0004] The core task of virtual machine scheduling is to solve the mapping problem between virtual machines and physical hosts, which is generally classified as an NP-Hard combinatorial optimization problem. Due to the diversity and uncertainty of virtual machine resource requirements, the complexity of the scheduling problem increases exponentially with the increase in system scale. Offline scheduling methods assume that virtual machine resource requirements are known and usually use exact algorithms such as mixed integer programming for solution; while in an online scheduling environment, virtual machine resource requirements arrive dynamically, and the system cannot predict future tasks, so resource allocation needs to be performed in real time, which poses higher requirements for scheduling algorithms.
[0005] In traditional scheduling methods, heuristic algorithms such as "First-Fit" and "Best-Fit" are widely used for their simplicity and efficiency. However, these algorithms rely on expert design and are difficult to remain efficient in a dynamic and uncertain environment. On the other hand, machine learning technologies, especially reinforcement learning, have been introduced into the virtual machine scheduling problem. Reinforcement learning shows strong dynamic optimization capabilities by adaptively adjusting scheduling strategies, but its training process consumes a large amount of resources and the decision-making process is difficult to interpret, which limits its practical application.
[0006] In recent years, large language models (LLMs) have achieved performance breakthroughs in multiple fields with their powerful natural language processing capabilities, and have gradually expanded to optimization and generation tasks. Based on the Transformer architecture, large language models not only have excellent language understanding and generation capabilities under extensive corpus training, but also demonstrate the potential for cross-domain problem solving. Its "emergent properties" enable it to adapt to new tasks with a small number of examples and have complex reasoning capabilities. In the field of optimization and scheduling, LLMs have the potential to serve as intelligent assistants, improving algorithm performance by reflecting on and adjusting iterative optimization algorithm design. Summary of the invention
[0007] In view of the problems that the design of heuristic algorithms in online virtual machine scheduling relies on manual work and the training of reinforcement learning models is complex, and combined with the automatic optimization capability of large language models, the purpose of the present invention is to provide a virtual machine scheduling heuristic function optimization method based on a large language model. This method realizes the dynamic generation and optimization of scheduling strategies, significantly reduces sample complexity, and improves scheduling efficiency and resource utilization.
[0008] The purpose of the present invention is achieved by adopting the following technical solutions:
[0009] A virtual machine scheduling heuristic function optimization method based on a large language model comprises the following steps:
[0010] S1. Use a large language model to construct the initial heuristic function code and perform data cleaning on the virtual machine sequences obtained from the cloud computing environment to build a training set;
[0011] S2. Add a description, improvement suggestions, and the best function in the database π to the prompt best , construct the prompt word and submit it to the large language model, obtain the model response, and extract the optimized heuristic function code from its response. The formula is defined as π new =LLM(π best ,hint,des), where des is the task description, indicating the heuristic function code for large language model optimization, hint is the currently obtained improvement suggestion, π best is the best function in the database, π new The optimized function code generated for the large language model. LLM means that the large language model receives the prompt word and outputs the optimized heuristic function. If it cannot run normally, repeat this step until the correct running code is obtained.
[0012] The reply includes an optimized heuristic function code and a detailed description of the code;
[0013] S3. After obtaining the optimized heuristic function, input it together with the data set into the evaluator and generate the corresponding evaluation result;
[0014] The evaluation result is the number of virtual machines that can be successfully placed under the fixed resource capacity limit;
[0015] S4. Update the heuristic function list in the database, add the newly obtained heuristic function and reorder it, and select the function with the best evaluation result from it;
[0016] S5. Sort the heuristic function list in the database from low to high according to the evaluation result, and add the heuristic function list {π i |i = 1,…,k}, the task description des to the prompt, and send the prompt to the large language model, so as to obtain the improvement suggestion hint of the function by the large language model. The formula is defined as hint = LLM({π i |i = 1,…,k}, des), where {π i |i = 1,…,k} is the list of historically improved heuristic functions, des is the task description, indicating that the large language model extracts knowledge according to the list of historically improved heuristic functions, LLM represents interacting with the large language model, and hint is the obtained improvement suggestion;
[0017] The improvement suggestion is a code snippet obtained by the large language model from the analysis of the historical function list and is useful for improving the evaluation result;
[0018] S6. If the current iteration round does not exceed the preset iteration round, perform the next round of iteration, that is, repeat steps S2 - S5; if the current iteration round has exceeded the preset iteration round, terminate the optimization and output the virtual machine scheduling heuristic function with the best evaluation result in the current database.
[0019] Advantageous technical effects of the present invention:
[0020] A method for optimizing the virtual machine scheduling heuristic function based on a large language model provided by the present invention makes full use of the large language model's ability in code generation and automated optimization, and adopts a carefully designed prompting strategy to guide the model to generate innovative heuristic functions from multiple dimensions such as the problem background, constraint conditions, and optimization objectives.
[0021] The present invention integrates the concept of self - reflection. By introducing a dynamic feedback and continuous optimization mechanism, the system can quickly identify and adjust to the optimal parameters and strategies, so as to achieve efficient, stable and excellent performance in a complex environment. Description of the Drawings
[0022] Figure 1 It is a flowchart of an embodiment of the present invention;
[0023] Figure 2 Flow chart of constructing an initial heuristic function using a large language model according to an embodiment of the present invention;
[0024] Figure 3 Example diagram of prompt words for optimizing a heuristic function using a large language model according to an embodiment of the present invention;
[0025] Figure 4 Example diagram of prompt words for obtaining improvement suggestions using a large language model according to an embodiment of the present invention. Detailed implementation manners
[0026] To make the technical solutions of the present invention clearer and more definite to those skilled in the art, the present invention will be further described in detail below in conjunction with embodiments and accompanying drawings. However, the implementation manners of the present invention are not limited thereto.
[0027] Embodiment
[0028] Refer to Figure 1 , a virtual machine scheduling heuristic function optimization method based on a large language model of the present invention includes the following steps:
[0029] Step S1: Refer to Figure 2 , add task instructions and code examples to the prompt words, use a large language model to construct the initial heuristic function code, and perform data cleaning on the virtual machine sequence obtained from the cloud computing environment to construct a training set;
[0030] Step S2: Refer to the example of the prompt words in Figure 3 , add descriptions, improvement suggestions hint, and the best-performing function π in the database to the prompt words (prompt), best , construct the prompt words and submit them to the large language model, obtain the model response, and extract the optimized heuristic function code from its response. The formula is defined as π new =LLM(π best , hint, des), where des is the task description, indicating the large language model to optimize the heuristic function code, hint is the currently obtained improvement suggestion, π best is the best-performing function in the database, π new is the optimized function code generated by the large language model, and LLM represents that the large language model receives the prompt words and outputs the optimized heuristic function. If it cannot run properly, repeat this step until the correct running code is obtained;
[0031] Step S3: After obtaining the optimized heuristic function, input it together with the data set into the evaluator and generate the corresponding evaluation result. The evaluation result is the number of virtual machines that can be successfully placed under the fixed resource capacity limit;
[0032] Step S4: Update the heuristic function list in the database, add the newly obtained heuristic function and reorder it, and select the function with the best evaluation result from it;
[0033] Step S5: Refer to Figure 4 , first sort the heuristic function list of the database from low to high according to the evaluation results, and add the heuristic function list {π i | i = 1, …, k}, task description des to the prompt, and send the prompt to the large language model, so as to obtain the improvement suggestion hint of the function by the large language model. The formula is defined as hint = LLM({π i | i = 1, …, k}, des), where {π i | i = 1, …, k} is the list of heuristic functions for historical improvement, des is the task description, indicating that the large language model extracts knowledge according to the list of heuristic functions for historical improvement, LLM represents interacting with the large language model, hint is the obtained improvement suggestion, and the improvement suggestion refers to the code extracted by the large language model from the historical function list and useful for improving the evaluation result;
[0034] Step S6: If the current iteration round does not exceed the preset iteration round, then perform the next round of iteration, that is, repeat steps S2, S3, S4, S5; if the current iteration round has exceeded the preset iteration round, then terminate the optimization and output the virtual machine scheduling heuristic function with the best evaluation result in the current database.
[0035] As mentioned above, it is only a further embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the scope disclosed by the present invention, according to the technical solution and its concept of the present invention, makes equivalent substitutions or changes, all belong to the protection scope of the present invention.
Claims
1. A virtual machine scheduling heuristic function optimization method based on a large language model, characterized in that: The steps include: S1. Use a large language model to construct the initial heuristic function code and perform data cleaning on the virtual machine sequences obtained from the cloud computing environment to build a training set; S2. Add description, improvement suggestions, and the best function in the database π to the prompt word best , construct the prompt word and submit it to the large language model, obtain the model response, and extract the optimized heuristic function code from its response. The formula is defined as π new =LLM(π best ,hint,des), where des is the task description, indicating the heuristic function code for large language model optimization, hint is the currently obtained improvement suggestion, π best is the best function in the database, π new The optimized function code generated for the large language model. LLM means that the large language model receives the prompt word and outputs the optimized heuristic function. If it cannot run normally, repeat this step until the correct running code is obtained. The reply includes an optimized heuristic function code and a detailed description of the code; S3. After obtaining the optimized heuristic function, input it and the data set into the evaluator and generate the corresponding evaluation result; The evaluation result is the number of virtual machines that can be successfully placed under the fixed resource capacity constraint; S4, updating the heuristic function list in the database, adding the newly acquired heuristic function and re-sorting it, and selecting the function with the best evaluation result; S5. Sort the heuristic function list of the database from low to high according to the evaluation results, and add the heuristic function list {π i |i=1,…,k}, task description des, and send the hint to the large language model to obtain the improvement suggestion hint of the function from the large language model. The formula is defined as hint=LLM({π i |i=1,…,k},des), where {π i |i=1,…,k} is a list of historically improved heuristic functions, des is a task description, instructing the large language model to extract knowledge based on the list of historically improved heuristic functions, LLM indicates interaction with the large language model, and hint is the obtained improvement suggestion; The improvement suggestions are code snippets that are useful for improving evaluation results and are obtained by the large language model based on the analysis of the historical function list; S6. If the current number of iterations does not exceed the preset number of iterations, the next iteration is performed, i.e. steps S2-S5 are repeated; if the current number of iterations exceeds the preset number of iterations, the optimization is terminated and the virtual machine scheduling heuristic function with the best evaluation result in the current database is output.
Citation Information
Patent Citations
Universal power supply and performance management system of cloud computing center
CN105116987A
Function as a service (FAAS) system enhancements
CN112955869A
SAT solver heuristic function optimization method based on large language model
CN119271940A
Adaptive learning intelligent scheduling unified computing framework and system for industrial personalized customized production
WO2022099596A1