Dynamic scheduling strategy generation method and device based on large language model

Through the dynamic scheduling strategy generation method based on large language model, the problem of insufficient adaptability and efficiency of genetic programming in a dynamic environment is solved, and more flexible and efficient dynamic scheduling is achieved.

CN120012956APending Publication Date: 2025-05-16EAST CHINA NORMAL UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510150371.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

Hyperheuristic algorithms based on genetic programming face the time-consuming training process, insufficient generalization ability and limited search methods in dynamic scheduling problems, resulting in insufficient adaptability and efficiency in dynamic environments.

Method used

A dynamic scheduling strategy generation method based on a large language model is adopted, and a heuristic individual and group is defined, and a large language model is used for initialization, evolution, evaluation and screening to generate a scheduling strategy that is adapted to the dynamic environment.

Benefits of technology

It improves the flexibility of dynamic scheduling, reduces the computational burden of genetic programming methods, and enhances adaptability and efficiency in dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012956A_ABST
    Figure CN120012956A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic scheduling strategy generation method and device based on a large language model, which utilizes the natural language processing capability of the large language model to generate and perfect a scheduling heuristic algorithm. Through an initialization method based on a big language model, a knowledge extraction method based on the big language model and a sorting selection method based on the big language model, complex scheduling requirements described by natural languages can be met, so that rapid adjustment can be performed without a large amount of manual intervention to adapt to constantly changing parameters; therefore, the flexibility of the scheduling algorithm is enhanced, the calculation burden of the genetic programming method is reduced to the greatest extent, and the dynamic scheduling effect is finally improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for generating a dynamic scheduling strategy based on a large language model. Background Art

[0002] The dynamic scheduling problem refers to the optimization problem of dynamically adjusting the execution order of tasks and resource allocation according to real-time information when there are unpredictable disturbances in the scheduling environment and tasks. Compared with static scheduling, dynamic scheduling can respond to actual changes in the production site more flexibly and generate more operational decision-making plans. The core difficulty of the dynamic scheduling problem is: solving the problem of complexity and uncertainty. In the actual production or operation environment, the parameters such as the arrival time, resource requirements, and processing time of the task are determined to change at any time, and dynamic interference times such as machine failures and task priority adjustments occur at the same time; to meet the needs of multi-objective optimization, dynamic scheduling usually needs to optimize multiple goals at the same time, such as minimizing delay time, maximizing resource utilization, and reducing energy consumption; real-time requirements. Many application scenarios (such as smart manufacturing, the Internet, logistics and transportation, cloud computing, etc.) have high real-time requirements and require dynamic scheduling algorithms to respond quickly to environmental changes.

[0003] Genetic programming-based hyper-heuristic algorithms are an innovative approach to solving dynamic scheduling problems by automatically evolving scheduling heuristic algorithms. By leveraging the principles of genetic programming, genetic programming-based hyper-heuristic algorithms generate and improve advanced heuristic algorithms to adapt to complex scheduling challenges in the real world, such as shop floor task scheduling and exam time scheduling. This adaptive ability makes genetic programming-based hyper-heuristic algorithms an important tool in combinatorial optimization, which can find flexible and robust solutions for different problem characteristics. The genetic programming-based hyper-heuristic algorithm framework usually involves the selection, crossover and mutation of heuristic representations, thereby exploring various heuristic combinations to improve scheduling results.

[0004] Although genetic programming-based hyper-heuristic algorithms have many advantages, there are still some challenges in applying them to dynamic scheduling problems:

[0005] 1. The training process is time-consuming. Improving the scheduling heuristic algorithm usually requires a lot of computing resources and time, especially when the complexity of the scheduling environment changes. This long training phase becomes a bottleneck, especially in a dynamic environment, where the characteristics of the job shop change frequently, so it is necessary to retrain the heuristic.

[0006] 2. Insufficient generalization ability. Although the goal of the hyper-heuristic algorithm based on genetic programming is to provide a general solution by searching in a high-level heuristic space, it often fails in practical applications. The design of the hyper-heuristic is too specific to a specific problem, resulting in a lack of robustness when facing new or unseen problem instances. This specificity limits the generality of the hyper-heuristic algorithm based on genetic programming and its applicability in various scheduling scenarios.

[0007] 3. Limited search methods. The hyper-heuristic design methods currently used by genetic programming-based hyper-heuristic algorithms are often limited to heuristic selection rather than heuristic generation. This limits the ability of genetic programming-based hyper-heuristic algorithms to generate new heuristics, which can better cope with scheduling challenges. Summary of the invention

[0008] In order to solve the problems of the prior art, the purpose of the present invention is to provide a method and device for generating a dynamic scheduling strategy based on a large language model. The present invention first defines heuristic individuals and groups, and uses a large language model to initialize the group. Then, the large language model is used to perform evolutionary operations on the individuals in the group. Then, evaluation is performed based on discrete simulation units. Then, the individuals in the group are screened using the large language model. Evolution, evaluation, and screening are repeated until the conditions for stopping iteration are met. Finally, based on the group evaluation of its overall performance for dynamic scheduling under unknown data sets, the optimal heuristic individual is selected. The present invention can use the automation and decision-making capabilities of the large language model to solve the adaptability and efficiency problems faced by the hyper-heuristic algorithm based on genetic programming in a dynamic environment, which not only enhances the flexibility of dynamic scheduling, but also minimizes the computational burden of the hyper-heuristic algorithm based on genetic programming.

[0009] The specific technical solution for achieving the purpose of the present invention is:

[0010] A method for generating a dynamic scheduling strategy based on a large language model comprises the following steps:

[0011] Group initialization: using a large language model to initialize the group;

[0012] Group evolution: evaluate the individuals in the group one by one based on the test data set, and use the large language model to perform evolutionary operations on the group and iteratively update the group;

[0013] Strategy selection, overall evaluation of each individual in the group, select the overall best individual as the final scheduling strategy; where:

[0014] The use of a large language model to perform an evolutionary operation on a group includes:

[0015] Based on discrete event simulation, dynamic scheduling is simulated to evaluate each individual in the group and generate a fitness vector;

[0016] Execute genetic operator operations, including random crossover operator, random mutation operator, and knowledge sharing crossover operator based on large language model;

[0017] Selection population, including non-dominated solution sorting genetic algorithm and sorting selection algorithm based on large language model;

[0018] Determine whether the given number of iterations has been reached. If not, repeat the above evolutionary operation.

[0019] Furthermore, the group is a sequence consisting of a plurality of individuals with a given target number, and the individuals are scheduling strategy individual triples, including: a genetic programming expression, a strategy natural language description, and a fitness vector; wherein:

[0020] The genetic programming expression is an expression composed of a given set of operation symbols and elements in the given set of operation symbols, and is a function used to calculate the scheduling priority, and its display form includes a mathematical expression and a tree structure diagram;

[0021] The strategy natural language description is used to describe the logic of the genetic programming expression, and the description is described in Chinese, English or other languages; the specific description includes: the factors, directions, goals and implementation methods considered by the genetic expression;

[0022] The fitness vector is used to evaluate the performance of the genetic programming expression on the current test data set. The fitness vector is the performance under the goal of dynamic scheduling optimization, and is specifically expressed in the form of a floating-point value corresponding to the number of target parameters.

[0023] Further, the initialization setting of the group using the large language model includes:

[0024] An initialization prompt word template is defined, wherein the template includes a task objective described in natural language, a task background, a composition description of a genetic programming expression, a format requirement of a returned content, and a description of a guided thinking chain;

[0025] Splice the complete prompt word text and obtain the genetic programming expression and its strategy natural language description by calling the large language model application programming interface;

[0026] Extract genetic programming expressions and strategy natural language descriptions from the returned natural language descriptions using regular expressions and abstract syntax trees to construct individual triples;

[0027] The large language model is a deep learning network model trained with massive text data, which can handle a variety of natural language tasks. Ways to use the large language model include: locally deploying open source models, fine-tuning pre-trained model applications, and calling the large language model application programming interface. Among them, calling the large language model application programming interface refers to exposing software functions to the outside through standardized protocols, allowing developers to call the application services of the large language model without understanding the underlying implementation. The calling of the large language model application programming interface includes the large language model application programming interface provided by OpenAI, Google, Anthropic and DeepSeek.

[0028] Furthermore, the knowledge sharing crossover operator based on the large language model includes:

[0029] Randomly select a number of individuals from the population and describe each individual in natural language;

[0030] A knowledge extraction prompt word template is defined, wherein the template includes a task objective described in natural language, an individual description, and a guided thinking chain description;

[0031] Splice the complete prompt word text and extract the knowledge list by calling the large language model application programming interface;

[0032] The extracted knowledge is injected into the nodes of the genetic programming expressions of individuals in the population to generate individuals; where:

[0033] The knowledge list is a sequence of knowledge consisting of a given target number; the knowledge is information extracted from the genetic programming expression in the individual; specifically, the knowledge is a part of the tree structure of the genetic programming expression, and its form includes: the tree structure of the genetic programming expression itself, the subtree of the tree structure of the genetic programming expression, and the leaves of the tree structure of the genetic programming expression.

[0034] Furthermore, the sorting and selection algorithm based on the large language model includes:

[0035] Randomly select a number of individuals from the population and describe each individual in natural language;

[0036] A sorting selection prompt word template is defined, wherein the template includes a task objective, a group description, and a guided thinking chain description described in natural language;

[0037] Splice the complete prompt word text, and select the individuals with the highest fitness to form the next generation group by calling the large language model application programming interface; among them:

[0038] The fitness is a vector composed of floating-point values ​​corresponding to the number of target parameters. The highest fitness is the smallest fitness value or the largest fitness value.

[0039] A dynamic scheduling strategy generation device based on a large language model, comprising:

[0040] A group initialization unit is used for group initialization, defining heuristic individual triples and initializing the group using a large language model;

[0041] The group evolution unit is used to evaluate the individuals in the group one by one based on the test data set, and use the large language model to perform evolutionary operations on the group to iteratively generate the next generation of groups;

[0042] The strategy selection unit is used to evaluate each individual in the group as a whole and select the best individual as the final scheduling strategy.

[0043] Further, the group initialization unit includes:

[0044] A prompt word template definition module, used to define an initialization prompt word template, wherein the template includes a task objective described in natural language, a task background, a composition description of a genetic programming expression, a format requirement for returned content, and a description of a guided thinking chain;

[0045] A prompt word splicing module is used to splice the complete prompt word text;

[0046] A large language model interface calling module is used to obtain a genetic programming expression and a natural language description of its strategy by calling a large language model application programming interface;

[0047] The individual construction module is used to extract genetic programming expressions and strategy natural language descriptions from the returned natural language descriptions using regular expressions and abstract syntax trees to construct individual triples.

[0048] Furthermore, the population evolution unit comprises:

[0049] A discrete event simulation unit is used to evaluate each individual in the population and generate a fitness vector;

[0050] A genetic operator execution unit, used to execute a random crossover operator, a random mutation operator, and a knowledge sharing crossover operator based on a large language model;

[0051] A population selection unit, used for selecting a population, including a non-dominated solution sorting genetic algorithm and a sorting selection algorithm based on a large language model;

[0052] The iteration control unit is used to determine whether the conditions for stopping iteration are met. If not, the evolution operation is repeated.

[0053] A computer device comprises a memory and a processor, wherein the memory stores a computer program of the above method, and the processor implements the steps of the above method when executing the computer program.

[0054] Compared with the prior art, the present invention has the following beneficial effects: the proposed method can utilize the natural language processing capability of a large language model to generate and improve a scheduling heuristic algorithm, and can describe complex scheduling requirements in natural language, so that it can be quickly adjusted to adapt to changing parameters without a lot of manual intervention. This not only enhances the flexibility of the scheduling algorithm, but also minimizes the computational burden of the genetic programming method, ultimately achieving an improvement in the dynamic scheduling effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is a flow chart of the dynamic scheduling strategy generation method proposed by the present invention;

[0056] Figure 2 It is a flow chart of group initialization based on a large language model proposed by the present invention;

[0057] Figure 3 It is a schematic diagram of the initialization prompt word template based on the large language model proposed by the present invention;

[0058] Figure 4 It is a flow chart of the population evolution based on the large language model proposed by the present invention;

[0059] Figure 5 is a flow chart of the knowledge sharing operator based on the large language model proposed by the present invention;

[0060] Figure 6 This is a schematic diagram of a knowledge extraction prompt word template based on a large language model proposed by the present invention;

[0061] Figure 7 It is a flow chart of the sorting selection operator based on the large language model proposed by the present invention;

[0062] Figure 8 It is a schematic diagram of a sorting and selecting prompt word template based on a large language model proposed by the present invention;

[0063] Fig. 9 is a tree structure diagram of a genetic programming expression provided by an embodiment of the present invention;

[0064] Fig.10 is a schematic diagram of group initialization based on a large language model provided by an embodiment of the present invention;

[0065] Fig.11 is a schematic diagram of knowledge extraction based on a large language model provided by an embodiment of the present invention;

[0066] Fig.12 is a schematic diagram of sorting selection based on a large language model provided by an embodiment of the present invention;

[0067] Fig.13 It is a schematic diagram of the structure of a device for generating a dynamic scheduling strategy provided by an embodiment of the present invention;

[0068] Fig.14 It is a schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the objectives, technical solutions and advantages of the present invention more clear and to further facilitate those skilled in the art to better understand the essence of the present invention, the embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

[0070] See also Figure 1 , Figure 1 Flow chart of a method for generating a dynamic scheduling strategy based on a large language model provided by the present invention. The method comprises steps S11-S13:

[0071] S11: Group initialization: use the large language model to initialize the group.

[0072] The group consists of a plurality of heuristic individual triplets.

[0073] The individual triplet that defines the heuristic consists of three parts: genetic programming expression, natural language description of the strategy, and fitness vector.

[0074] like Figure 2 As shown, a flowchart of group initialization based on a large language model described in S11 is shown, which specifically includes steps S21 to S24:

[0075] S21: define an initialization prompt word template 3 to request a large language model application programming interface. The template is a natural language description, such as Figure 3 The figure shows a schematic diagram of an initialization prompt word template based on a large language model, which includes: prompt word task target description 31, prompt word task description 32, genetic programming expression description 33, prompt word format requirements for returned content 34, and prompt word guided thinking chain description 35.

[0076] S22: Splice the text required by the template to generate complete prompt words, including:

[0077] Based on the goal of the dynamic scheduling problem, the task goal description of the prompt word is obtained by describing it in natural language 31;

[0078] Based on the background of the dynamic scheduling problem, a description is made in natural language to obtain a prompt word task description 32, including but not limited to: the attributes of the scheduling task, the attributes of the scheduling resource, the attributes of the scheduling environment, the mechanism of dynamic change, etc.;

[0079] Based on the composition of the genetic programming expression, the genetic programming expression is described in natural language to obtain a genetic programming expression description 33, including but not limited to: a range of a terminal symbol set, a range of an operation symbol set, a meaning of a terminal symbol, a meaning of an operation symbol, and a restricted description of the genetic programming expression;

[0080] Based on the method of genetic programming expression extraction, the format requirements of the returned content are obtained by describing it in natural language34;

[0081] Define prompt words to guide the thinking chain description 35, describe it in natural language, including but not limited to: first, describe the problem to be solved; then, describe the genetic programming expression to be generated; finally, output it in the corresponding format and hide unnecessary logical explanations;

[0082] Based on the prompt word template and the above content required by the template, the overall prompt word text is spliced ​​out.

[0083] S23: Request the large language model application programming interface and return the natural language description result.

[0084] S24: Based on the returned natural language description results, the newly generated genetic programming expressions and the corresponding natural language descriptions of the strategies are extracted through regular expressions and abstract syntax trees, and used as elements for constructing individuals.

[0085] S12: Group evolution, using a large language model to perform evolutionary operations on the group and iteratively generate the group.

[0086] Among them, Figure 4 As shown, the process of population evolution based on a large language model includes steps S41 to S45:

[0087] S41: Based on the dynamic scheduling of discrete event simulation, each individual in the group is evaluated to obtain the fitness vector.

[0088] S42: Based on the current population, a plurality of genetic operator operations are randomly and probabilistically executed, including but not limited to: a random crossover operator, a random mutation operator, and a knowledge sharing crossover operator based on a large language model. By executing these genetic operator operations, a progeny population can be obtained.

[0089] S43: Based on the current population and the newly generated offspring population, a selector is randomly selected for selection, and the selector includes but is not limited to: a non-dominated solution sorting genetic algorithm and a sorting selection algorithm based on a large language model. By executing the selector, a selected population can be obtained.

[0090] S44: Replace the current group with the selected group.

[0091] The replacing of the current group with the selected group in S44 refers to covering the current group with the selected group and determining whether it is necessary to continue iterating and performing evolution.

[0092] S45: Determine whether a given number of iterations has been reached. If not, repeat S41 to S45.

[0093] Specifically, the discrete event simulation in S41 is to evaluate the genetic programming expression corresponding to a given individual through the test set data to generate a fitness vector, which specifically includes steps S411 to S419:

[0094] S411: Read the test set data, including the task list and resource list that need to be executed for dynamic scheduling.

[0095] S412: All resources are initially in an idle state, and all tasks are in an unexecuted state.

[0096] S413: According to the dynamic mechanism of dynamic scheduling, the task is pushed to the simulator at an uncertain rhythm.

[0097] S414: The simulator periodically pulls tasks to be executed, and pulls a list of executable resources corresponding to the tasks.

[0098] S415: Calculate the information of each resource and the environment status corresponding to each task, and calculate the priority score through genetic programming expression.

[0099] S416: Based on the overall task list and resource list and their corresponding priority scores, a globally optimal combination is selected and execution tasks are assigned.

[0100] S417: Determine whether the stop condition is met, that is, all tasks are assigned and executed, otherwise repeat S413 to S417.

[0101] S418: Based on the status of task execution completion, calculate overall indicators, including but not limited to: average task completion time, average task waiting time, average task timeout time, etc.

[0102] S419: Based on the overall indicators and the goal of dynamic scheduling, a fitness vector is calculated.

[0103] like Figure 5 As shown, what is shown is the flow chart of the knowledge sharing operator based on the large language model described in S42, which analyzes and describes the group through natural language description, embeds the description into the prompt word template, and then calls the large language model application programming interface to extract excellent knowledge, and performs cross-mutation based on the knowledge to achieve knowledge sharing and improve individual level, specifically including the following steps S51 to S58:

[0104] S51: Obtain the current population, which is stored in the form of a list containing several scheduling strategy individuals.

[0105] S52: Randomly select several individuals from the population.

[0106] S53: Describe individuals in natural language. In particular, the description of each individual should include: genetic programming expression, natural language description of strategy, and fitness vector based on simulation evaluation.

[0107] S54: define a knowledge extraction prompt word template 6 to request a large language model application programming interface. The template is a natural language description, such as Figure 6 The diagram shown is a schematic diagram of a knowledge extraction prompt word template based on a large language model, which includes: prompt word task goal description 61, a group of individual natural language descriptions 62, and prompt word guided thinking chain description 63.

[0108] Among them, the definition prompt word guided thinking chain description 63 is described in natural language, and the content includes but is not limited to: first, identifying the common sub-blocks of the genetic programming expressions of individuals in the group; second, analyzing the relationship between the common sub-blocks of the genetic programming expressions and the fitness vector; finally, selecting the most valuable components from the above common sub-blocks as knowledge output.

[0109] S55: Based on the prompt word template and the above content required by the template, splice out the overall prompt word text.

[0110] S56: Request the large language model application programming interface with the complete prompt word text, and return the natural language description result.

[0111] S57: Based on the returned natural language description results, a knowledge list is extracted through regular expressions and abstract syntax trees.

[0112] S58: Randomly select nodes of the genetic programming expression of individuals in the group, and randomly select the extracted knowledge for injection to generate individuals to form a group.

[0113] like Figure 7As shown, what is shown is a flowchart of the sorting selection operator based on the large language model described in S43, which analyzes and describes the group through natural language description, embeds the description into the prompt word template, and then calls the large language model application programming interface to select individuals from the current group and the newly generated offspring group to form the next generation group, specifically including the following steps S71 to S75:

[0114] S71: Randomly select several individuals from the population and describe them in natural language. In particular, the description of each individual should include: genetic programming expression, natural language description of the strategy, and fitness vector based on simulation evaluation.

[0115] S72: define a sorting selection prompt word template 8 to request a large language model application programming interface. The template is a natural language description, such as Figure 8 The figure shows a schematic diagram of a sorting and selecting prompt word template based on a large language model, which includes: prompt word task goal description 81, natural language description of the group 82 and prompt word guided thinking chain description 83.

[0116] Among them, the prompt word guided thinking chain description 83 is described in natural language, and the content includes but is not limited to: first, identifying the main components of the genetic programming expression of individuals in the group; then, analyzing the relationship between the main components of the genetic programming expression and the fitness vector; finally, selecting the individual with the highest fitness from the above individual list to form a group.

[0117] S73: Based on the prompt word template and the above content required by the template, splice out the overall prompt word text.

[0118] S74: Request the large language model application programming interface with the complete prompt word text, and return the natural language description result.

[0119] S75: Based on the returned natural language description result, extract the group through regular expressions and abstract syntax trees.

[0120] S13: Strategy selection, comprehensively evaluate each individual in the group and select the best individual as the final scheduling strategy.

[0121] Among them, the overall evaluation method described in S13 is the same as S41, including but not limited to dynamic scheduling evaluation based on discrete event simulation.

[0122] Among them, the overall optimal individual mentioned in S13 refers to selecting the best performing individual strategy from multiple individuals in the group based on the overall evaluation effect and indicators of the test data set, and outputting it as the final scheduling strategy.

[0123] The method proposed in the present invention can utilize the natural language processing capabilities of a large language model to generate and improve a scheduling heuristic algorithm. It can describe complex scheduling requirements in natural language, so that it can be quickly adjusted to adapt to changing parameters without a lot of manual intervention. This not only enhances the flexibility of the scheduling algorithm, but also minimizes the computational burden of the genetic programming method, ultimately achieving an improvement in the dynamic scheduling effect.

[0124] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present invention, which will not be listed in detail here.

[0125] Example

[0126] In order to make the objectives, technical solutions and advantages of the present invention clearer and to further facilitate those skilled in the art to better understand the essence of the present invention, the embodiments of the present invention will be further described below in conjunction with examples and drawings.

[0127] Considering that dynamic scheduling involves a wide range of application scenarios, the following example is selected to expand on the dynamic flexible workshop task scheduling problem. Specifically, the set of operation symbols and terminal symbols of the genetic programming expression in this dynamic scheduling problem are limited to the range of the following table, and the corresponding meanings of the corresponding symbols are shown in the following table:

[0128]

[0129] like Fig. 9 As shown, tree structure 9 shows a tree structure diagram of a genetic programming expression provided by an embodiment of the present invention. The genetic programming expression is a function used to calculate the scheduling priority. The expression consists of a function symbol and a terminal symbol. During the dynamic scheduling execution process, by calculating the state of the environment at the current moment, the value represented by the corresponding terminal symbol is obtained, and then the genetic programming expression is passed in. A priority value can be calculated, and then a decision is made as a whole based on the priority values ​​corresponding to multiple decision points. Specifically, the genetic programming expression in the figure can be expressed by the following formula: , if the priority time is calculated, , then the corresponding priority value is .

[0130] The dynamic flexible shop scheduling problem is an important optimization problem in modern manufacturing, which combines the flexibility of flexible manufacturing systems with the uncertainty in dynamic environments. The dynamic flexible shop scheduling problem is developed on the basis of the job shop scheduling problem. It not only considers the processing order of the process, but also allows the process to be processed on multiple machines, which increases the flexibility of machine selection. Unlike static scheduling, the dynamic flexible shop scheduling problem needs to consider dynamic events in the production process, such as the insertion of new workpieces, machine failures, emergency orders, etc. There are three main characteristics of this problem: 1. Flexibility: Each process can be processed on multiple machines, and there are multiple matching methods between machines and processes; 2. Dynamicity: There are uncertainties in the production process, such as machine failures, emergency insertion orders, and randomness of workpiece arrival time; 3. Multi-objective optimization: It is usually necessary to optimize multiple objectives at the same time, such as minimizing the maximum completion time, total energy consumption, machine load balance, etc. Common optimization objectives include: minimizing the maximum completion time, that is, the latest time when all workpieces are processed; minimizing the total energy consumption, including the fixed energy consumption and processing energy consumption of the machine; minimizing the average residence time of the workpiece in the workshop; balancing the machine load to avoid excessive use of some machines. The constraints are: each process can only be processed on one machine; each machine can only process one process at the same time; the processing sequence of the workpiece must meet the process requirements; when dynamic events occur, rescheduling is required to adapt to the changing production status.

[0131] like Fig.10 , which is a schematic diagram of group initialization based on a large language model provided by an embodiment of the present invention.

[0132] First, based on the individual initialization prompt word template 3 of the large language model, the complete prompt word text 101 is concatenated:

[0133] For the prompt word task goal description 31, based on the description of the dynamic flexible shop floor task scheduling problem, it is described in natural language as 31': "Create a new scheduling heuristic, define the priority function, and its ultimate goal is to find a scheduling heuristic that minimizes the average execution time and the average timeout time, and assign the operation of the job to the machine. In order to avoid falling into the local optimum, its ultimate goal is to find a scheduling heuristic that minimizes the average execution time and the average timeout time";

[0134] For the prompt word task description 32, based on the context of the dynamic flexible job shop scheduling problem, it is described in natural language as 32': "Each task has an arrival time, a deadline and a weight, as well as a predetermined sequence of operations that must be processed in order. Information about the job is unknown before it arrives at the job shop. Each operation can be performed on a finite number of machines";

[0135] The description of genetic programming expressions 33 is based on the composition of genetic programming expressions and is described in natural language as follows 33': "These genetic programming expressions consist of terminal symbols and operation symbols. The terminal symbols are derived from the characteristics of tasks, machines, and task-shop systems. For tasks, terminal symbols can be (median of the remaining work on the task), (the number of remaining operations of the task), (the weight of the task), (Time the task is in the task shop). For an operation, the terminal symbol can be (processing time on the machine), (median processing time for the next operation), (wait time for an operation). For a machine, a terminal can be (number of operations in the machine queue), (total processing time required to release the machine); (The time required to complete the machine's current operation). The operator symbols include the basic arithmetic operators, including [ The heuristic policy expression is restricted to the previously cited symbols, excluding utilization and other numbers. All terminal symbols are restricted to among”;

[0136] The format requirements 34 of the returned content for the prompt words are described in natural language based on the method of extracting genetic programming expressions as 34': "When outputting genetic programming expressions, the results are written to one line and separated by special delimiters";

[0137] For the prompt word guided thinking chain description 35, use natural language description as 35': "First, describe your new heuristic strategy and main process; second, implement the new heuristic genetic programming expression in a binary tree structure; finally, do not give unnecessary explanations."

[0138] Then, by calling the large language model application programming interface 102, the natural language description result 103 can be obtained as follows: for the "description of the heuristic strategy", the result returned is: "A new heuristic strategy dynamically determines the priority of jobs by balancing the urgency of job completion, machine workload and job waiting time, with the goal of minimizing the maximum flow time and average flow time while avoiding local optimality."; for the "genetic programming expression", the result returned is: " ”.

[0139] Finally, the individual objects are obtained by parsing through regular expressions and abstract syntax trees.

[0140] like Fig.11, which is a schematic diagram of knowledge extraction based on a large language model provided by an embodiment of the present invention.

[0141] First, concatenate the knowledge extraction prompt words 111 based on the large language model:

[0142] For the prompt word task goal description 61, the natural language description is 61': "Extract valuable common sub-blocks from the following scheduling heuristics and share them as knowledge to other scheduling heuristics";

[0143] For a natural language description 62 of a group of individuals, the natural language description is 62': "The existing scheduling heuristics, including the corresponding strategy description and genetic programming expressions, are as follows: A scheduling heuristic: Its policy description is that the new heuristic calculates the weighted difference between the normalized queue work and the normalized processing time, which is determined by the ratio of the maximum waiting time to the current work, ensuring a unique form different from existing heuristic methods; its genetic programming expression is: ; Its fitness vector is: ; ...; No. Scheduling heuristic: The new heuristic calculates the weighted equilibrium time of the product of the remaining workload and the processing workload, adjusts it according to the minimum of waiting time and queued work, and then divides it by the maximum of the total idle time and the next idle number; its genetic programming expression is: , its fitness vector is: ”;

[0144] For the prompt word guided thinking chain description 63, the natural language description is 63': "First, please help me extract the knowledge heuristics (i.e., common building blocks) from it to compose new heuristics. Second, the knowledge heuristics are components of the given heuristics in the genetic programming expression, not in the origin given heuristics. Finally, keep the top 10 unique and valuable knowledge without giving redundant explanations";

[0145] Then, by calling the large language model application programming interface 112, the natural language description result 113 can be obtained as follows: a knowledge list, the returned content of which is: ”.

[0146] Finally, the knowledge list object is obtained by parsing through regular expressions and abstract syntax trees.

[0147] like Fig.12 , which is a schematic diagram of sorting selection based on a large language model provided by an embodiment of the present invention.

[0148] First, concatenate the sorting selection prompt words 131 based on the large language model:

[0149] For the prompt word task goal description 81, the natural language description is 81': "Select the most promising scheduling heuristic individual from the following scheduling heuristics";

[0150] For the natural language description 82 of the group, the natural language description is 82': "The existing scheduling heuristics, including the corresponding strategy description and genetic programming expressions, are as follows: A scheduling heuristic: Its policy description is that the new heuristic calculates the weighted difference between the normalized queue work and the normalized processing time, which is determined by the ratio of the maximum waiting time to the current work, ensuring a unique form different from existing heuristic methods; its genetic programming expression is: ; Its fitness vector is: ; ...; No. Scheduling heuristic: The new heuristic calculates the weighted equilibrium time of the product of the remaining workload and the processing workload, adjusts it according to the minimum of waiting time and queued work, and then divides it by the maximum of the total idle time and the next idle number; its genetic programming expression is: , its fitness vector is: ”;

[0151] For the prompt word guided thinking chain description 83, the natural language description is 83': "First, identify the main components in the above heuristics. Second, analyze the relationship between the heuristic components and their fitness. Then, select the top heuristics from the given heuristics to solve the multi-objective optimization problem to achieve a balance between diversity and generalization ability. Finally, output the index of the selected heuristics into a list without giving additional explanations";

[0152] Then, by calling the large language model application programming interface 122, the natural language description result 123 can be obtained as follows: For the "selected individual index", the returned content is: ”.

[0153] Finally, the regular expression is used for parsing to obtain the individual index, and the corresponding individuals are taken out from the group to form a group.

[0154] In this embodiment, the group is initialized by using a large language model, and then the group is evolved by using a large language model to iteratively generate the next generation of the group. Finally, the strategy is selected to evaluate each individual in the group as a whole and select the best individual as the final scheduling strategy.

[0155] See also Fig.13 , is a schematic diagram of the structure of a device for generating a dynamic scheduling strategy provided by an embodiment of the present invention. The device 13 of this embodiment includes:

[0156] The group initialization unit 131 is used for group initialization and uses a large language model to initialize the group.

[0157] The group evolution unit 132 is used for group evolution, and uses a large language model to perform evolution operations on the group and iteratively generate a new group.

[0158] The strategy selection unit 133 is used for strategy selection, which comprehensively evaluates each individual in the group and selects the best individual as the final scheduling strategy.

[0159] See also Fig.14 , is a schematic diagram of a computer device provided by an embodiment of the present invention. Fig.14 As shown, the computer device 14 of this embodiment includes: a processor 141, a memory 142, and a computer program 143 stored in the memory 142 and executable on the processor 141. When the processor 141 executes the computer program 143, the steps in the above-mentioned various method embodiments are implemented. Alternatively, when the processor 141 executes the computer program 143, the functions of each module / module in the above-mentioned various embodiments are implemented.

[0160] Exemplarily, the computer program 143 may be divided into one or more modules / modules, which are stored in the memory 142 and executed by the processor 141 to implement the present invention. The one or more modules / modules may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 143 in a computer device.

[0161] The computer device may be a desktop computer, a notebook computer, a PDA, a cloud server, etc. The computer device may include but is not limited to a processor 141 and a memory 142. Those skilled in the art will understand that Fig.14 These are merely examples of computer devices and do not constitute limitations on the computer device. The computer device may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0162] The processor 141 may be a central processing module, or other general-purpose processors, digital model processors, application-specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0163] The memory 142 may be an internal storage module of the computer device, such as a hard disk or memory of the computer device. The memory 142 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the computer device. Further, the memory 142 may also include both an internal storage module of the computer device and an external storage device. The memory 142 is used to store computer programs and other programs and videos required by the computer device. The memory 142 may also be used to temporarily store videos that have been output or are about to be output.

[0164] Those skilled in the art can clearly understand that, for the convenience and indirectness of description, only the division of the above-mentioned functional modules and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed to different functional modules and modules as needed, that is, the internal structure of the system can be divided into different functional modules or modules to complete all or part of the functions described above. The functional modules and modules in the embodiments can be inherited in one module, and the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific working process of each functional module, module, and module can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0165] In the above embodiments, the description of each embodiment has its own emphasis, and a part that is not described or recorded in detail in a certain embodiment may be referred to as a related description of other embodiments.

[0166] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A method for generating a dynamic scheduling strategy based on a large language model, characterized in that: The following steps are involved: Group initialization: using a large language model to initialize the group; Group evolution: evaluate the individuals in the group one by one based on the test data set, and use the large language model to perform evolutionary operations on the group and iteratively update the group; Strategy selection, comprehensively evaluate each individual in the group, select the best individual as the final scheduling strategy; where: The use of a large language model to perform an evolutionary operation on a group includes: Based on discrete event simulation, dynamic scheduling is simulated to evaluate each individual in the group and generate a fitness vector; Execute genetic operator operations, including random crossover operator, random mutation operator, and knowledge sharing crossover operator based on large language model; Selection of populations, including non-dominated solution sorting genetic algorithms and sorting selection algorithms based on large language models; Determine whether the given number of iterations has been reached. If not, repeat the above evolutionary operation.

2. The method for generating a dynamic scheduling strategy according to claim 1, characterized in that: The group is a sequence consisting of a plurality of individuals with a given target number, and the individuals are scheduling strategy individual triples, including: a genetic programming expression, a strategy natural language description, and a fitness vector; wherein: The genetic programming expression is an expression composed of a given set of operation symbols and elements in the given set of operation symbols, and is a function used to calculate the scheduling priority, and its display form includes a mathematical expression and a tree structure diagram; The strategy natural language description is used to describe the logic of the genetic programming expression, and the description is described in Chinese, English or other languages; the specific description includes: the factors, directions, goals and implementation methods considered by the genetic expression; The fitness vector is used to evaluate the performance of the genetic programming expression on the current test data set. The fitness vector is the performance under the goal of dynamic scheduling optimization, and is specifically expressed in the form of a floating-point value corresponding to the number of target parameters.

3. The method for generating a dynamic scheduling strategy according to claim 1, characterized in that: The initialization setting of the group using the large language model includes: An initialization prompt word template is defined, wherein the template includes a task objective described in natural language, a task background, a composition description of a genetic programming expression, a format requirement of a returned content, and a description of a guided thinking chain; Splice the complete prompt word text and obtain the genetic programming expression and its strategy natural language description by calling the large language model application programming interface; Regular expressions and abstract syntax trees are used to extract genetic programming expressions and strategy natural language descriptions from the returned natural language descriptions to construct individual triples.

4. The method for generating a dynamic scheduling strategy according to claim 1, characterized in that: The knowledge sharing crossover operator based on the large language model includes: Randomly select a number of individuals from the population and describe each individual in natural language; A knowledge extraction prompt word template is defined, wherein the template includes a task objective, an individual description, and a guided thinking chain description described in natural language; Splice the complete prompt word text and extract the knowledge list by calling the large language model application programming interface; The extracted knowledge is injected into the nodes of the genetic programming expressions of individuals in the population to generate individuals; where: The knowledge list is a sequence of knowledge consisting of a given target number; the knowledge is information extracted from the genetic programming expression in the individual; specifically, the knowledge is a part of the tree structure of the genetic programming expression, and its form includes: the tree structure of the genetic programming expression itself, the subtree of the tree structure of the genetic programming expression, and the leaves of the tree structure of the genetic programming expression.

5. The method for generating a dynamic scheduling strategy according to claim 1, characterized in that: The sorting and selection algorithm based on the large language model includes: Randomly select a number of individuals from the population and describe each individual in natural language; A sorting selection prompt word template is defined, wherein the template includes a task objective, a group description, and a guided thinking chain description described in natural language; Splice the complete prompt word text, and select the individuals with the highest fitness to form the next generation group by calling the large language model application programming interface; among them: The fitness is a vector composed of floating-point values ​​corresponding to the number of target parameters. The highest fitness is the smallest fitness value or the largest fitness value.

6. A dynamic scheduling strategy generation device based on a large language model, characterized in that: include: A group initialization unit is used for group initialization, defining heuristic individual triples and initializing the group using a large language model; The group evolution unit is used to evaluate the individuals in the group one by one based on the test data set, and use the large language model to perform evolutionary operations on the group to iteratively generate the next generation of groups; The strategy selection unit is used to evaluate each individual in the group as a whole and select the best individual as the final scheduling strategy.

7. The dynamic scheduling strategy generation device according to claim 6, characterized in that: The group initialization unit comprises: A prompt word template definition module, used to define an initialization prompt word template, wherein the template includes a task objective described in natural language, a task background, a composition description of a genetic programming expression, a format requirement for returned content, and a description of a guided thinking chain; A prompt word splicing module is used to splice the complete prompt word text; A large language model interface calling module is used to obtain a genetic programming expression and a natural language description of its strategy by calling a large language model application programming interface; The individual construction module is used to extract genetic programming expressions and strategy natural language descriptions from the returned natural language descriptions using regular expressions and abstract syntax trees to construct individual triples.

8. The dynamic scheduling strategy generation device according to claim 6, characterized in that: The group evolution unit comprises: A discrete event simulation unit is used to evaluate each individual in the population and generate a fitness vector; A genetic operator execution unit, used to execute a random crossover operator, a random mutation operator, and a knowledge sharing crossover operator based on a large language model; A population selection unit, used for selecting a population, including a non-dominated solution sorting genetic algorithm and a sorting selection algorithm based on a large language model; The iteration control unit is used to determine whether the conditions for stopping iteration are met. If not, the evolution operation is repeated.

9. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program of the method according to any one of claims 1 to 5, and the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.

Citation Information

Cited By

  • Genetic production scheduling optimization method and system for repairing infeasible solution based on large language model

    CN122334801A