General algorithm reflection evolution method based on large language model

Through the general algorithm reflection evolution method based on large language models, algorithm individuals are automatically generated and optimized, and the problems of parameter dependence and scenario specificity of existing algorithms in complex system optimization are solved, and efficient and adaptive algorithm optimization is achieved.

CN119721110APending Publication Date: 2025-03-28TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411802883.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Existing heuristic algorithms have parameter dependence and scenario specificity in complex system optimization, which limits their universality and application effects.

Method used

Using a general algorithmic reflection evolution method based on large language models, through individual coding, population construction and population iterative optimization steps, cross-evolution, cooperative evolution and framework upgrade modules are used, combined with the generation-standardization-evaluation-select cycle module (GSES), to automatically generate and optimize algorithm individuals.

Benefits of technology

Automatic optimization and evolution of algorithms are realized, and the individual algorithm with the best performance is generated, which significantly improves the adaptability and performance of the algorithm and reduces the dependence of manual tuning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721110A_ABST
    Figure CN119721110A_ABST
Patent Text Reader

Abstract

The invention discloses a general algorithm reflection evolution (MHRE) method based on a large language model. The MHRE method comprises the steps of individual coding, population construction and population iterative optimization. In the individual coding stage, the large language model generates code snippets containing performance functions and architecture functions, and the snippets define basic structures and behaviors of population individuals. In the population construction stage, a prompt word of a specific task is used for further refining code snippets, and initial population individuals are formed. In the population iterative optimization stage, through a cross evolution module, a cooperative evolution module, a framework upgrading module and other modules, iterative optimization of population individuals is achieved in combination with a generation-standardization-evaluation-selection loop module (GSES), and algorithm individuals with the optimal performance are generated. The MHRE method can automatically generate, optimize and evaluate a plurality of algorithms, improves the adaptability, universality and optimization effect of the algorithms, and is especially suitable for complex optimization tasks such as industrial production, resource allocation and logistics path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the optimization of complex systems, and in particular to a general algorithm reflective evolution method based on a large language model. Background Art

[0002] In the optimization process of complex systems, it is often necessary to optimize and coordinate multiple sub-objective functions in order to achieve the best comprehensive effect in a specific scenario. For example, in application scenarios such as industrial production, resource allocation, and logistics path planning, multiple objective functions must be considered simultaneously, such as time, cost, and resource utilization. In the design of metaheuristic algorithms, it is required to comprehensively consider multiple factors such as local search, global search, and population interaction. These objectives often have mutual constraints in the optimization process, so the performance of the same algorithm in different scenarios varies significantly due to different parameters. In addition, algorithm design and parameter setting usually rely on manual tuning, which limits its versatility and practical application effects in various scenarios.

[0003] Specifically, traditional heuristic algorithms such as particle swarm optimization (PSO), genetic algorithm (GA), and simulated annealing (SA) all rely on manual tuning and parameter adjustment. This reliance on manual work greatly limits the versatility of the algorithm in different scenarios, thus affecting its application scope and effect. In addition, the optimization effect depends to a large extent on the precise selection of parameters and strategies in specific application scenarios, and these choices often rely on deep expertise and rich experience.

[0004] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention

[0005] The main purpose of the present invention is to overcome the defects existing in the above-mentioned background technology and provide a general algorithm reflective evolution method based on a large language model.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A general algorithmic reflective evolution method based on a large language model comprises the following steps:

[0008] S1. Individual coding: A series of code snippets are generated using a large language model. Each code snippet contains several functional functions and architecture functions. The functional functions and architecture functions are used to define the basic structure and behavior of the population individuals. During the generation process, only the definition and call of the function are constrained, while the function implementation method remains open and unrestricted.

[0009] S2. Population construction: Based on the code snippets generated by the individual encoding steps, the large language model is guided to further refine and customize the code snippets through prompt words required by specific tasks, so as to generate initial population individuals with specific task orientation;

[0010] S3. Iterative optimization of population: Iterative optimization of population individuals is achieved through modules such as cross-evolution, cooperative evolution and framework upgrade. The generation-standardization-evaluation-selection cycle module (GSES) is applied to continuously evaluate, optimize and screen the population to produce the algorithm individuals with the best performance. The GSES module includes standardized generated code snippets to ensure that they comply with the specifications, and screens out the best performing individuals through the evaluation and selection mechanism to achieve continuous improvement of algorithm performance and enhanced adaptability.

[0011] Furthermore, in step S2, the task requirements include problem description, function definition constraints and heuristic guidance prompts, so that the initial population individuals match the specific task requirements.

[0012] Furthermore, step S3 specifically includes:

[0013] Perform crossover evolution, which simulates the crossover mechanism in genetic algorithms, combines different algorithm strategies of the same sub-function, uses hyper-heuristic guidance to form a new generation of algorithm individuals, and normalizes, evaluates and selects the newly generated individuals through the generation-standardization-evaluation-selection loop module (GSES) to update the population;

[0014] Conduct cooperative evolution, in which the functional relationships of multiple sub-functions are coordinated to assist the evolution of individual sub-functions to improve the overall algorithm performance. The GSES module is then applied again to update the population to ensure that individuals in the population can cooperate with each other and improve their adaptability.

[0015] Upgrade the framework, which dynamically adjusts the architecture of the algorithm framework, including integrating sub-function calls and optimizing weight parameters. The framework is updated through the GSES module to ensure the algorithm's efficient adaptability and flexibility in various scenarios.

[0016] Iterative process control, in which cross-evolution, cooperative evolution, and framework upgrade operations are repeatedly performed until the preset termination conditions are met, such as reaching a certain optimization accuracy or number of iterations, to ensure continuous improvement of algorithm performance and enhanced adaptability.

[0017] Furthermore, the processing of the generate-standardize-evaluate-select cycle module specifically includes:

[0018] a) In the generation phase, a large language model is used to generate new function individuals, providing new potential solutions for the population;

[0019] b) Standardization stage: standardize the format and definition of the newly generated algorithm individuals to ensure that they have consistent input and output specifications to facilitate subsequent evaluation and comparison;

[0020] c) Evaluation phase: Performance testing is performed on the standardized individual algorithms to measure their performance in different scenarios and to assess their ability to solve specific problems;

[0021] d) In the selection phase, based on the performance scores obtained in the evaluation phase, the individuals in the population are ranked by fitness and the individuals with the best performance are selected to ensure the population quality in the next round of optimization cycle;

[0022] e) Cycle iteration, the best individuals are selected for the next round of cross evolution, cooperative evolution and framework upgrade operations. Through continuous iteration, the adaptability and effectiveness of the algorithm are gradually improved.

[0023] Furthermore, the generate-standardize-evaluate-select cycle module has the following working mechanism:

[0024] Population individual generation: The initial individuals are generated by a large language model, which may contain irregular code formats, inconsistent definition constraints, or logical errors. These individuals are not yet directly applicable to algorithm calls after generation;

[0025] Normalization of population individuals: Use the normalization model to review and correct the generated code snippets to ensure that format errors and definition inconsistencies are eliminated so that the functions can be called normally by the algorithm;

[0026] Scoring of population individuals: Combine the normalized individual function snippets with the elite individual code snippets, execute them on the benchmark task to evaluate the performance, obtain scores, and distinguish the performance of different code snippets through visual identification (such as color depth);

[0027] Generate the next generation population: Sort the fitness based on the individual scores and select the best performing individuals to form the next generation population and enter the next round of optimization cycle.

[0028] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the general algorithm reflective evolution method based on a large language model.

[0029] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the general algorithm reflective evolution method based on a large language model is implemented.

[0030] The general algorithm reflective evolution method based on a large language model realizes the automatic optimization and evolution of algorithms in various industrial scenarios including industrial production, resource allocation, logistics and supply chain management, energy management, financial management, etc., and automatically generates algorithm individuals with the best performance in different specific scenarios, so that they are suitable for the specific scenarios.

[0031] The present invention has the following beneficial effects:

[0032] The general algorithm reflective evolution method (MHRE) based on a large language model of the present invention has shown significant technical advantages in many aspects with its innovation and practicality. The method provides an adaptive and efficient solution for the optimization of complex systems through the advanced algorithm generation capability of the large language model, can realize automatic optimization and evolution of the algorithm in a variety of scenarios, generate the algorithm individual with the best performance, and significantly improve the adaptability and performance of the algorithm. The MHRE method realizes the automation and intelligence of the algorithm through its cross evolution, cooperative evolution and framework upgrade modules, as well as the generation-standardization-evaluation-selection cycle module (GSES), thereby promoting technological progress and industrial upgrading in related fields. This method can not only provide customized algorithm solutions for specific problems, but also realize the automation and intelligence of algorithms in a wide range of practical applications, with significant social and economic benefits. The MHRE framework guides the generation of algorithms in the optimization space through a hyper-heuristic approach of multi-function objectives, and iteratively optimizes them through a reflective evolution mechanism, and finally generates an optimization algorithm suitable for specific tasks. The accuracy of this method is higher than that of existing similar methods, and the optimization space is larger and the adaptability is stronger. It is a very potential hyper-heuristic method algorithm optimization method based on a large model. In addition, the MHRE method significantly reduces the complexity of algorithm design and implementation by automatically generating algorithm strategies and using a large language model to automatically learn and adjust the parameters and structures that best suit the current problem. This is especially true when faced with optimization problems of different scales or types, such as industrial production, resource allocation, and logistics path planning. The MHRE method designs a framework upgrade module and an adaptive evaluation selection mechanism to ensure that the algorithm remains efficient and scalable even when the scale and complexity change, providing a method that can be widely used in various complex system optimization tasks.

[0033] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is an overall flow chart of the general algorithm reflective evolution method based on a large language model proposed in the present invention.

[0035] Figure 2 It is a structural diagram of the general algorithm reflective evolution framework based on the large language model proposed in the present invention.

[0036] Figure 3 It is a module structure and flow chart of the generation-standardization-evaluation-selection loop module (GSES) in the general algorithm reflective evolution framework based on the large language model proposed in the present invention. DETAILED DESCRIPTION

[0037] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.

[0038] The present invention proposes a general algorithm reflective evolution method (MHRE) based on a large language model. This method designs a framework, called MHRE, which can not only enhance the performance of a single algorithm, but also integrate multiple algorithms into a unified optimization space, and realize efficient and universal optimization strategies to generate algorithm individuals with optimal performance. The MHRE framework adopts a hyper-heuristic method of multi-function objectives to guide the generation of algorithms in the optimization space, and generates optimization algorithms suitable for different specific tasks through an iterative reflective evolution mechanism. The MHRE framework not only optimizes a single algorithm, but also processes multiple similar algorithms in the same optimization space, improving the versatility and efficiency of the algorithm.

[0039] See also Figure 1 The embodiment of the present invention provides a general algorithm reflective evolution method based on a large language model, comprising the following steps:

[0040] Step S1, individual coding: Generate a series of code snippets using a large language model, each of which contains several functional functions and architecture functions, which are used to define the basic structure and behavior of the population individuals. In the generation process, only the definition and call of the function are constrained, while the function implementation method remains open and unrestricted, so as to ensure the diversity and functionality of the population individuals.

[0041] Step S2, population construction: Based on the code snippets generated in the individual coding step, the large language model is guided to further refine and customize the code snippets through prompt words of specific task requirements, wherein the task requirements include problem description, function definition constraints, and heuristic guidance prompts, so as to match the initial population individuals with the specific task requirements and generate initial population individuals with specific task orientation;

[0042] Step S3, iterative optimization of population: through modules such as cross evolution, cooperative evolution and framework upgrade, iterative optimization of population individuals is achieved, wherein the generation-standardization-evaluation-selection cycle module (GSES) is applied to continuously evaluate, optimize and screen the population to produce the algorithm individuals with the best performance. The GSES module includes the code snippets generated by normalization to ensure that they comply with the specifications, and the individuals with the best performance are screened out through the evaluation and selection mechanism to achieve continuous improvement of algorithm performance and enhancement of adaptability.

[0043] See also Figure 1 In a preferred embodiment, step S3 specifically includes:

[0044] Perform crossover evolution, which simulates the crossover mechanism in genetic algorithms, combines different algorithm strategies of the same sub-function, uses hyper-heuristic guidance to form a new generation of algorithm individuals, and normalizes, evaluates and selects the newly generated individuals through the generation-standardization-evaluation-selection loop module (GSES) to update the population;

[0045] Conduct cooperative evolution, in which the functional relationships of multiple sub-functions are coordinated to assist the evolution of individual sub-functions to improve the overall algorithm performance. The GSES module is then applied again to update the population to ensure that individuals in the population can cooperate with each other and improve their adaptability.

[0046] Upgrade the framework, which dynamically adjusts the architecture of the algorithm framework, including integrating sub-function calls and optimizing weight parameters. The framework is updated through the GSES module to ensure the algorithm's efficient adaptability and flexibility in various scenarios.

[0047] Iterative process control, in which cross-evolution, cooperative evolution, and framework upgrade operations are repeatedly performed until the preset termination conditions are met, such as reaching a certain optimization accuracy or number of iterations, to ensure continuous improvement of algorithm performance and enhanced adaptability.

[0048] In a preferred embodiment, the processing of the generate-standardize-evaluate-select cycle module specifically includes:

[0049] a) In the generation phase, a large language model is used to generate new function individuals, providing new potential solutions for the population;

[0050] b) Standardization stage: standardize the format and definition of the newly generated algorithm individuals to ensure that they have consistent input and output specifications to facilitate subsequent evaluation and comparison;

[0051] c) Evaluation phase: Performance testing is performed on the standardized individual algorithms to measure their performance in different scenarios and to assess their ability to solve specific problems;

[0052] d) In the selection phase, based on the performance scores obtained in the evaluation phase, the individuals in the population are ranked by fitness and the individuals with the best performance are selected to ensure the population quality in the next round of optimization cycle;

[0053] e) Cycle iteration, the best individuals are selected for the next round of cross evolution, cooperative evolution and framework upgrade operations. Through continuous iteration, the adaptability and effectiveness of the algorithm are gradually improved.

[0054] In some embodiments, the general algorithm reflective evolution method based on the large language model can be applied to various industrial scenarios including industrial production, resource allocation, logistics and supply chain management, energy management, financial management, etc., and provide general optimization solutions in multiple fields such as industrial production, resource allocation, and logistics path planning, so as to realize automatic optimization and evolution of the algorithm, significantly improve the adaptability and performance of the algorithm, and provide an adaptive and efficient solution for solving complex optimization problems. Software service providers can use the method of the present invention to become "algorithm manufacturers" or intelligent solution providers to produce customized optimization algorithms. For example, the present invention can be used to provide software services for industrial production optimization, help manufacturing customers optimize production processes, and automatically generate and optimize production scheduling algorithms to improve production efficiency and reduce resource waste. The present invention can be used to develop software for energy management, traffic planning, and other fields, optimize resource allocation strategies, and achieve efficient use and fair allocation of resources. The present invention can be used to develop and optimize logistics path planning software, automatically design the optimal logistics path, reduce transportation costs and time, and improve the efficiency and reliability of the logistics network.

[0055] Through the MHRE mechanism, the present invention can optimize the performance of a single algorithm and unify multiple algorithms in the same optimization framework to achieve efficient and wide adaptability. The present invention overcomes the limitations of traditional algorithms and can automatically generate algorithms that adapt to different application scenarios. In the population iterative optimization process, through the collaborative work of the cross evolution module, the cooperative evolution module, the framework upgrade module, and the generation-standardization-evaluation-selection cycle module (GSES), a general optimization algorithm suitable for complex scenarios is automatically generated. Compared with the traditional manual tuning method, the present invention significantly reduces labor costs and enhances the optimization performance of the algorithm. The MHRE framework is particularly suitable for complex systems that require high adaptability and high efficiency, such as industrial production, resource allocation, and logistics path planning.

[0056] The specific embodiments and experimental verification of the present invention are further described below.

[0057] A general algorithm reflective evolution (MHRE) method based on a large language model, the MHRE method includes individual coding, population construction and population iterative optimization steps. In the individual coding stage, the large language model generates code snippets containing functional functions and architectural functions, which define the basic structure and behavior of population individuals. In the population construction stage, the code snippets are further refined using prompt words for specific tasks to form initial population individuals. In the population iterative optimization stage, through modules such as cross evolution, cooperative evolution and framework upgrade, combined with the generation-standardization-evaluation-selection loop module (GSES), iterative optimization of population individuals is achieved to produce algorithm individuals with the best performance. The MHRE method can automatically generate, optimize and evaluate multiple algorithms, improve the adaptability, versatility and optimization effect of the algorithms, and is particularly suitable for complex optimization tasks such as industrial production, resource allocation and logistics path planning.

[0058] A general algorithmic reflective evolution (MHRE) method based on a large language model specifically comprises the following steps:

[0059] a) Individual coding step, using the large language model to generate code snippets as population individuals, including several functional functions and architecture functions, and only constraining the function call part, without any restrictions on other parts. In the individual coding step, the generated code snippets include different functional functions and architecture functions, and there is no restriction on the function content.

[0060] b) A population initialization step guides the large language model to generate initial individuals through prompt words required by specific tasks, and the task requirements include problem description, function definition constraints and heuristic guidance prompts; the population initialization step generates initial individuals through prompt words of specific tasks, including problem description, function definition constraints and heuristic guidance prompts, further optimizing the performance of the generation algorithm.

[0061] c) Population iteration optimization step, using Figure 2 The cross-evolution module, cooperative evolution module, framework upgrade module, etc. shown in the figure are iteratively generated and updated until the generated optimization algorithm reaches the convergence standard on the set performance index; the population iterative optimization step realizes the integration and optimization of multiple algorithms through the synergy of the cross-evolution module, cooperative evolution module and framework upgrade module, thereby improving the global adaptability of the algorithm. In the process of population iterative optimization, the generation-standardization-evaluation-selection loop module (GSES) is used to continuously evaluate, optimize and screen the population to produce the algorithm individuals with the best performance. The generation-standardization-evaluation-selection loop module (GSES) ensures that the generated code snippets meet the specifications by standardizing them, and screens out the individuals with the best performance through the evaluation and selection mechanism.

[0062] The general algorithm reflective evolution method based on the large language model of the present invention can generate, optimize and evaluate multiple algorithms through the large language model, thereby improving the adaptability, versatility and optimization effect of the algorithm. The method framework can automatically generate optimization algorithms suitable for specific application scenarios, and achieve efficient optimization performance in multiple complex tasks through the general algorithm reflective evolution mechanism. The method of the present invention can be widely used in complex optimization tasks, especially in scenarios that require high adaptability and high efficiency, such as complex systems such as industrial production, resource allocation and logistics path planning.

[0063] like Figure 2 As shown in Figure 2, the population iterative optimization process of this method includes the following main modules:

[0064] Crossover Evolution Module: The core function of this module is to form a new generation of algorithm individuals by combining different algorithm strategies of the same sub-function and using hyper-heuristic guidance. Through the gene crossover method, the excellent characteristics of multiple existing algorithms are recombined to produce new algorithms with better performance. During the optimization process, this module effectively integrates multiple strategies and iteratively improves sub-function individuals to adapt to specific tasks.

[0065] Cooperative evolution module: Figure 2 As shown in the figure, this module assists the evolution of a single sub-function by coordinating the functional relationships of multiple sub-functions to improve the overall algorithm performance. In this process, multiple different sub-function individuals jointly participate in the generation and guidance of a new generation of function individuals, and improve the overall adaptability of the group through information sharing and interaction. The cooperative evolution module simulates the concept of swarm intelligence. Through collaborative work, different sub-functions can make up for each other's shortcomings and jointly find a more efficient solution.

[0066] Framework upgrade module: such as Figure 2 As shown in the figure, this module is responsible for dynamically adjusting the architecture of the algorithm framework, including integrating sub-function calls and optimizing weight parameters. This module can improve the optimization potential of the algorithm through upgrading, and ensure its efficient adaptability and flexibility in various scenarios, while enhancing the robustness and versatility of the generated algorithm.

[0067] Generate-Standardize-Evaluate-Select Loop (GSES): This module specifies the standard process for sub-function optimization and is called as a separate module during each optimization. First, after generating new function individuals by generating a large model, the standardization module ensures that the newly generated algorithm has consistent input and output specifications; then the performance of the function is tested through the evaluation module to measure its performance in different scenarios, and finally the fitness of the population is ranked based on the performance score, and the best performing individuals are selected to enter the next round of optimization loop. The loop process of this module ensures that the generated algorithm has high adaptability and effectiveness after multiple iterations.

[0068] The collaborative work of these modules enables the MHRE framework of the present invention to automatically generate general optimization algorithms suitable for complex scenarios. Compared with traditional manual tuning methods, the present invention significantly reduces labor costs and enhances the optimization performance of the algorithm. The general algorithm reflective evolution framework (MHRE) based on a large language model provided by the present invention not only enhances the performance of a single algorithm, but also integrates multiple similar algorithms into a unified optimization space to achieve a general and efficient optimization solution. The MHRE framework of the present invention is widely applicable to various complex optimization tasks, especially in scenarios requiring high adaptability and high efficiency, such as complex systems such as industrial production, resource allocation, and logistics path planning.

[0069] like Figure 1 As shown, a general algorithm reflective evolution (MHRE) method based on a large language model, the implementation steps of the method include:

[0070] Step S1, individual coding: MHRE optimizes a heuristic algorithm for a series of functions through an evolutionary process. Unlike traditional evolutionary algorithms, the population individuals of the present invention are composed of code fragments generated by a large model. These code fragments contain a variety of functional functions and architecture functions. To ensure the correctness of function calls, the definition of the function is constrained, while the function content remains open without additional restrictions.

[0071] Step S2, population initialization: Based on the individual encoding format, use prompts of specific task requirements to guide the large model to generate initial individuals. These task requirements cover problem description, function definition constraints and heuristic guidance, aiming to encourage the large model to optimize algorithm performance in the most promising direction.

[0072] Step S3, population iterative optimization: follow the iteration requirements, through Figure 2 The modules shown perform continuous iterative generation and population update until the optimization algorithm meets the preset performance indicators and reaches the convergence standard. The algorithm obtained in this way can be widely adapted to a variety of complex application scenarios.

[0073] Next, refer to Figure 3 , explaining the working mechanism of the Generate-Standardize-Evaluate-Select (GSES) loop module.

[0074] Population individual generation: The initial individuals are generated by the large generation model. Since the code snippets in these individuals may have irregular code formats, inconsistent definition constraints, or logical errors, they cannot be called directly.

[0075] Normalization of population individuals: Use the normalization model to review the generated code snippets one by one and correct any format and definition errors to ensure that these functions can be called normally by the algorithm;

[0076] Scoring of population individuals: Combine the function snippet of the current individual with the code snippet of the elite individual and execute them on the benchmark task to obtain a score. Figure 3 As shown, the scores of different code snippets are marked by different shades of colors;

[0077] Generate the next generation of population: Sort the population by fitness according to the scores and select the best performing individuals to enter the next round of optimization cycle.

[0078] In order to verify the effectiveness of the generalized algorithm reflective evolution (MHRE) method based on the large language model proposed in the present invention, a variety of metaheuristic algorithms are used, including artificial fish swarm algorithm (AFSA), cuckoo search algorithm (CSA), frog leaping algorithm (FLA), whale algorithm (WOA) and particle swarm algorithm (PSO). These algorithms are unified into a metaheuristic unified algorithm (Generalized Evolutionary Metaheuristic Algorithm, GEMA) to evaluate the ability to incorporate multiple algorithms into the same optimization space. Ten complex continuous functions of different difficulty levels are selected, such as Sphere and Rastrigin, and their optimal values ​​are all 0. The closer the value is to 0, the stronger the algorithm optimization ability is. The results are shown in Table 1 below.

[0079] Table 1

[0080]

[0081]

[0082] The above table shows the results of optimizing ten complex continuous functions by different algorithms. It can be clearly seen from the table that the proposed unified metaheuristic algorithm (GEMA) generally performs better than the traditional single metaheuristic algorithm on each test function, especially on the Schwefel function, where GEMA shows a significantly lower optimization value, indicating that its optimization ability is stronger and close to the theoretical optimal value 0.

[0083] At the same time, Ant Colony Optimization (ACO) is taken as an example for separate enhancement. ACO is a heuristic search algorithm that simulates the foraging behavior of ants and is often used to solve combinatorial optimization problems. The improved ACO algorithm is applied to the NP-hard classic combinatorial optimization problem - the Traveling Salesman Problem (TSP). TSP requires finding the shortest possible route, visiting each city once and returning to the starting point. It is compared with other enhancement methods such as DeepACO (a method of combining deep learning with ACO) and ReEvo+ACO (a method of combining reflective evolution strategy with ACO). The experimental data is selected from a subset of the TSPLib dataset, which is a widely used standard test set that contains multiple TSP problems of different sizes. In these tests, the smaller the value, the better the optimization effect. The results are shown in Table 2 below.

[0084] Table 2

[0085]

[0086]

[0087]

[0088] As can be seen from the above table, the method proposed in the present invention has achieved excellent performance in multiple TSP tasks. Specifically, compared with traditional ACO, DeepACO and ReEvo+ACO, the improved algorithm of the present invention not only significantly improves the optimization degree of the solution, but the optimal solution is closer to the theoretical minimum. In addition, the method of the present invention demonstrates a high degree of scalability and can effectively handle TSP problems from medium to large scales. When expanded to larger data sets such as d657 and fl1400, the method can still maintain optimization performance without a significant decrease in efficiency or excessive computational cost. This scalability advantage illustrates the advanced design of the present invention, including optimized search strategies and efficient algorithm structures, which enable it to adapt to optimization problems of different scales and complexities.

[0089] The general algorithm reflective evolution method based on a large language model of the present invention can automatically generate, optimize and evaluate multiple algorithms, and improve the adaptability, versatility and optimization effect of the algorithms. The method framework can automatically generate optimization algorithms suitable for specific application scenarios, and through the MHRE mechanism, achieve efficient optimization performance in multiple complex tasks. This method has broad application prospects in complex optimization tasks that require high adaptability and high efficiency, such as industrial production, resource allocation and logistics path planning.

[0090] application

[0091] 1. Industrial production optimization

[0092] In the industrial production process, optimizing resource allocation, production line scheduling and inventory management is the key to improving efficiency and reducing costs. The MHRE method can automatically generate and adjust algorithms to adapt to different production needs and changing market conditions, thereby optimizing the efficiency of the entire production process.

[0093] 2. Logistics and supply chain management

[0094] Logistics and supply chain involve complex decision-making issues, including route planning, inventory management, distribution center selection, etc. The MHRE method can provide dynamic optimization solutions to help companies reduce transportation costs, shorten delivery time, and improve overall service quality.

[0095] 3. Financial Engineering

[0096] In the field of financial engineering, MHRE can be used for portfolio optimization, risk management, and algorithmic trading. Through an adaptive algorithm generation mechanism, MHRE can generate optimal trading strategies and risk assessment models based on real-time market data.

[0097] 4. Energy management

[0098] In the energy industry, especially in the management of renewable energy, it is necessary to optimize the distribution and consumption of energy. The MHRE method can be used for load balancing of the power grid, forecasting energy demand and optimizing energy prices, improving energy efficiency and reducing waste.

[0099] The invention has great commercial prospects and has obvious market value for multiple industries:

[0100] 1. Logistics industry

[0101] The application of this invention in the logistics industry can significantly improve distribution efficiency, reduce transportation costs, and optimize route planning:

[0102] Improved efficiency: By using algorithms optimized using the MHRE method, logistics companies can achieve faster flow of goods in complex distribution networks, reduce delays, and improve overall service quality. For example, algorithms can adjust delivery routes in real time to respond to traffic congestion or emergencies to ensure that goods arrive on time.

[0103] Cost savings: By optimizing route planning and vehicle scheduling, the present invention can help companies significantly reduce fuel consumption and vehicle maintenance costs. In addition, higher transportation efficiency also means that more tasks can be completed with fewer vehicles, further reducing operating costs.

[0104] Market size: With the continuous growth of global e-commerce, the demand for efficient logistics services is increasing. It is estimated that by 2027, the global logistics market will reach 1.27 trillion US dollars, and the application of this invention is expected to occupy an important position in this vast market.

[0105] 2. Energy Industry

[0106] In the energy industry, the present invention is mainly used to optimize energy distribution and improve energy efficiency, especially in renewable energy management, showing great potential:

[0107] Optimizing energy distribution: MHRE methods can help energy suppliers optimize power generation and energy distribution plans, especially in situations of large demand fluctuations, to ensure the stability and efficiency of power supply. For example, by predicting energy demand and adjusting power supply accordingly, energy waste can be reduced.

[0108] Improve efficiency: In the use of renewable energy such as wind and solar energy, the present invention can reduce dependence on traditional energy and improve the green sustainability of the overall energy system by accurately predicting energy output and optimizing the use of energy storage systems.

[0109] Market size: The global smart energy market is expected to continue to expand, reaching $24 billion by 2023, and this invention has significant market potential in helping to achieve more efficient and sustainable energy management.

[0110] 3. Financial Industry

[0111] The present invention provides efficient optimization solutions in the financial services industry, especially in the fields of asset management, risk assessment and algorithmic trading:

[0112] Asset Management Optimization: Through the MHRE approach, financial institutions can construct and manage investment portfolios more efficiently, automatically adjusting asset allocations in response to market changes to optimize returns and reduce risk.

[0113] Risk management: The present invention can use big data analysis and model prediction to provide more accurate decision support for risk management. For example, by analyzing historical data and market trends, financial crises can be predicted and risk preparations can be made in advance.

[0114] Market size and profit estimates: The rapid growth of the financial technology market provides broad application prospects for this invention. The global financial technology market is expected to reach $305 billion by 2025. By improving transaction efficiency and accuracy, this invention can help financial institutions improve their return on assets.

[0115] An embodiment of the present invention further provides a storage medium for storing a computer program, which at least performs the above method when executed.

[0116] An embodiment of the present invention further provides a control device, comprising a processor and a storage medium for storing a computer program; wherein the processor is configured to execute at least the method described above when executing the computer program.

[0117] An embodiment of the present invention further provides a processor, wherein the processor executes a computer program and at least executes the method described above.

[0118] The storage medium can be implemented by any type of non-volatile storage device, or a combination thereof. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The storage medium described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0119] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0120] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0121] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0122] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.

[0123] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0124] The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.

[0125] The features disclosed in several product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.

[0126] The features disclosed in several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0127] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope of the present invention.

Claims

1. A general algorithm reflective evolution method based on a large language model, characterized in that: The following steps are involved: S1. Individual coding: A series of code snippets are generated using a large language model. Each code snippet contains several functional functions and architecture functions. The functional functions and architecture functions are used to define the basic structure and behavior of the population individuals. During the generation process, only the definition and call of the function are constrained, while the function implementation method remains open and unrestricted. S2. Population construction: Based on the code snippets generated by the individual encoding steps, the large language model is guided to further refine and customize the code snippets through prompt words required by specific tasks, so as to generate initial population individuals with specific task orientation; S3. Iterative optimization of population: Iterative optimization of population individuals is achieved through cross-evolution, cooperative evolution and framework upgrade modules. The generation-standardization-evaluation-selection cycle module (GSES) is applied to continuously evaluate, optimize and screen the population to produce the algorithm individuals with the best performance. The GSES module includes standardized generated code snippets to ensure that they comply with the specifications, and screens out the best performing individuals through the evaluation and selection mechanism to achieve continuous improvement of algorithm performance and enhanced adaptability.

2. The general algorithm reflective evolution method based on a large language model as claimed in claim 1, characterized in that: In step S2, the task requirements include problem description, function definition constraints and heuristic guidance prompts to match the initial population individuals with specific task requirements.

3. The general algorithm reflective evolution method based on a large language model as claimed in claim 1 or 2, characterized in that: Step S3 specifically includes: Perform crossover evolution, which simulates the crossover mechanism in genetic algorithms, combines different algorithm strategies of the same sub-function, uses hyper-heuristic guidance to form a new generation of algorithm individuals, and normalizes, evaluates and selects the newly generated individuals through the generation-standardization-evaluation-selection loop module (GSES) to update the population; Conduct cooperative evolution, in which the functional relationships of multiple sub-functions are coordinated to assist the evolution of individual sub-functions to improve the overall algorithm performance. The GSES module is then applied again to update the population to ensure that individuals in the population can cooperate with each other and improve their adaptability. Upgrade the framework, which dynamically adjusts the architecture of the algorithm framework, including integrating sub-function calls and optimizing weight parameters. The framework is updated through the GSES module to ensure the algorithm's efficient adaptability and flexibility in various scenarios. Iterative process control, in which cross-evolution, cooperative evolution, and framework upgrade operations are repeatedly performed until the preset termination conditions are met, such as reaching a certain optimization accuracy or number of iterations, to ensure continuous improvement of algorithm performance and enhanced adaptability.

4. The general algorithm reflective evolution method based on a large language model as claimed in any one of claims 1 to 3, characterized in that: The processing of the generate-standardize-evaluate-select cycle module specifically includes: a) In the generation phase, a large language model is used to generate new function individuals, providing new potential solutions for the population; b) Standardization stage: standardize the format and definition of the newly generated algorithm individuals to ensure that they have consistent input and output specifications to facilitate subsequent evaluation and comparison; c) Evaluation phase: Performance testing is performed on the standardized individual algorithms to measure their performance in different scenarios and to assess their ability to solve specific problems; d) In the selection phase, based on the performance scores obtained in the evaluation phase, the individuals in the population are ranked by fitness and the individuals with the best performance are selected to ensure the population quality in the next round of optimization cycle; e) Cycle iteration, the best individuals are selected for the next round of cross evolution, cooperative evolution and framework upgrade operations. Through continuous iteration, the adaptability and effectiveness of the algorithm are gradually improved.

5. The general algorithm reflective evolution method based on a large language model as claimed in any one of claims 1 to 4, characterized in that: The Generate-Standardize-Evaluate-Select cycle module has the following working mechanism: Population individual generation: The initial individuals are generated by a large language model, which may contain irregular code formats, inconsistent definition constraints, or logical errors. These individuals are not yet directly applicable to algorithm calls after generation; Normalization of population individuals: Use the normalization model to review and correct the generated code snippets to ensure that format errors and definition inconsistencies are eliminated so that the functions can be called normally by the algorithm; Scoring of population individuals: Combine the normalized individual function snippets with the elite individual code snippets, execute them on the benchmark task to evaluate the performance, obtain scores, and distinguish the performance of different code snippets through visual identification (such as color depth); Generate the next generation population: Sort the fitness based on the individual scores and select the best performing individuals to form the next generation population and enter the next round of optimization cycle.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the general algorithm reflective evolution method based on a large language model as described in any one of claims 1 to 5 is implemented.

7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the general algorithm reflective evolution method based on a large language model as described in any one of claims 1 to 5 is implemented.

8. The general algorithm reflective evolution method based on a large language model as described in any one of claims 1 to 5 realizes the application of automatic optimization and evolution of algorithms in various industrial scenarios including industrial production, resource allocation, logistics and supply chain management, energy management, financial management, etc., and automatically generates algorithm individuals with the best performance in different specific scenarios, so as to be suitable for the specific scenarios.

Citation Information

Cited By

  • Line balance optimization algorithm automatic design method driven by large language model

    CN121435700A

  • Automatic design optimization method of buffer configuration scheme based on LLM

    CN121615198A