Task scheduling method and system based on improved genetic algorithm
By introducing a large language model to optimize the task scheduling process of the genetic algorithm, the problem of unstable scheduling results in complex environments is solved, and efficient and interpretable scheduling schemes are generated.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XICHANG SATELLITE LAUNCH CENT
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-03
AI Technical Summary
Existing task scheduling algorithms are prone to getting stuck in local optima in complex environments and are unable to adapt to dynamic changes in task complexity, resulting in unstable scheduling results.
An adaptive operator generation and parameter dynamic adjustment mechanism for large language models is introduced. By analyzing population characteristics in real time, optimized crossover and mutation operators are automatically generated, and the mutation rate and crossover rate of the genetic algorithm are dynamically adjusted to improve the global search capability of the genetic algorithm.
It improves the efficiency and quality of task scheduling, enhances the system's adaptability to changes in complexity, and generates detailed scheduling reports for easy understanding and application.
Smart Images

Figure CN122334839A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a task scheduling method and system based on an improved genetic algorithm. Background Technology
[0002] Task scheduling, especially in complex environments, is a significant and challenging area of optimization. In scenarios such as production management and logistics, the quality of task scheduling directly impacts the overall efficiency, cost, and reliability of the system. As task complexity increases, manual scheduling faces significant challenges, easily introducing subjective biases and leading to inefficiency and resource waste. Therefore, intelligent task scheduling methods have become a research hotspot.
[0003] Currently, widely used task scheduling algorithms include Genetic Algorithms (GA), Simulated Annealing (SA), and Particle Swarm Optimization (PSO). These optimization methods based on global search show good performance in solving complex combinatorial problems, but they also have significant limitations. First, Genetic Algorithms are prone to getting trapped in local optima when faced with a large search space, especially when population diversity is insufficient, making it difficult to find the global optimum. Furthermore, Simulated Annealing and PSO involve trade-offs between search efficiency and convergence speed, making it difficult to balance exploration and development. Existing methods often rely on fixed parameter settings, making it difficult to adapt to dynamic changes in task complexity, resulting in unstable scheduling results. Summary of the Invention
[0004] The purpose of this invention is to provide a task scheduling system and method based on an improved genetic algorithm, to address the problems of insufficient efficiency and susceptibility to local optima in existing methods for scheduling complex tasks. By introducing adaptive operator generation and dynamic parameter adjustment mechanisms, the performance of the genetic algorithm in scheduling complex tasks is improved, and the quality of scheduling results is enhanced.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A task scheduling method based on an improved genetic algorithm includes the following steps:
[0007] S10, based on the large language model, transforms the task description information input by the user into structured data, and extracts the key information of each task and the dependencies between tasks;
[0008] S20, construct a genetic algorithm model based on the structured data, initialize the population, and perform genetic operations;
[0009] S30 analyzes the population characteristics of the current population in real time based on a large language model, and adaptively optimizes the crossover and mutation operators according to the population characteristics of the current population, as well as dynamically adjusts the mutation rate and crossover rate of the genetic algorithm model.
[0010] S40 performs genetic operations based on the optimized crossover and mutation operators, as well as the dynamically adjusted mutation and crossover rates;
[0011] S50, repeat steps S30-S40 until the termination condition is met, and output the final task scheduling result.
[0012] In step S30, the characteristics of the population include the optimal fitness f. best Average fitness of the population f avg Population fitness variance proportion of feasible solutions , , , Let N represent the fitness of the i-th individual in the population, and N be the number of individuals in the population. , , The number of feasible solutions.
[0013] A task scheduling system based on an improved genetic algorithm includes:
[0014] The data input module is used to transform the task description information input by the user into structured data based on the large language model, and to extract the key information of each task and the dependencies between tasks.
[0015] The genetic algorithm establishment module is used to construct a genetic algorithm model based on the structured data, initialize the population, and perform genetic operations based on the optimized crossover and mutation operators and the dynamically adjusted mutation and crossover rates.
[0016] The parameter adaptive control module is used to analyze the population characteristics of the current population in real time based on the large language model, and adaptively optimize the crossover and mutation operators according to the population characteristics of the current population, as well as dynamically adjust the mutation rate and crossover rate of the genetic algorithm model.
[0017] The results output and interpretation module is used to output the final task scheduling result after multiple generations of genetic operations have generated the final task scheduling result.
[0018] A computer program product includes computer-readable instructions that, when executed by a processor, implement the steps in the task scheduling method based on an improved genetic algorithm described in this invention.
[0019] A computer-readable storage medium comprising computer-readable instructions that, when executed by a processor, implement the steps of the task scheduling method based on an improved genetic algorithm described in this invention.
[0020] An electronic device is characterized by comprising: a memory for storing program instructions; and a processor connected to the memory for executing the program instructions in the memory to implement the steps in the task scheduling method based on the improved genetic algorithm described in this invention.
[0021] Compared with the prior art, the present invention has the following advantages:
[0022] 1) Utilize large language models to automatically parse and generate complex task descriptions, transforming unstructured text into structured data, significantly reducing human intervention and improving the accuracy and processing speed of task input.
[0023] 2) The large language model automatically generates crossover and mutation operators with optimal selection probabilities by analyzing the fitness of the current population, dynamically adapting to the needs of population diversity and evolutionary stage, enhancing global search capabilities, and reducing the exploration of infeasible solutions.
[0024] 3) The progress of the genetic algorithm is monitored in real time using a large language model (such as the population fitness change curve), and the algorithm parameters (such as crossover rate and mutation rate) are dynamically adjusted according to the actual situation. This adaptive adjustment mechanism based on real-time data enables the genetic algorithm to maintain good performance in tasks of different complexities, thereby improving the quality of solutions and convergence speed.
[0025] 4) In the task scheduling result output stage, a natural language description execution report is generated using a large language model to provide detailed information on the task's start time, completion time, resource usage, etc., making the scheduling results more interpretable and easier for non-technical personnel to understand and apply.
[0026] In short, this invention optimizes the task scheduling process of genetic algorithms by introducing a large language model, comprehensively improving the efficiency of genetic algorithms and the quality of scheduling schemes from task input, operator generation, parameter tuning to result interpretation. This method not only achieves more efficient task scheduling but also enhances the system's adaptability to changes in task complexity and resource constraints, providing strong technical support for the intelligent scheduling of complex tasks. Attached Figure Description
[0027] Figure 1 This is a block diagram of a task scheduling system based on an improved genetic algorithm provided in the embodiment.
[0028] Figure 2 This is a flowchart of a task scheduling method based on an improved genetic algorithm provided in the embodiments.
[0029] Figure 3 This is a block diagram of an electronic device provided in the embodiment. Detailed Implementation
[0030] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0031] like Figure 1 As shown in the figure, this embodiment provides a task scheduling system based on an improved genetic algorithm, including a data input module, a genetic algorithm establishment module, a parameter adaptive control module, and a result output and interpretation module.
[0032] The data input module transforms user-input task descriptions into structured data based on a Large Language Model (LLM). Task descriptions typically include task name, dependencies, resource constraints, and priorities. These descriptions are usually in unstructured text format, such as task descriptions in natural language. The data input module uses the LLM to parse this unstructured data, converting it into a structured data format, resulting in structured data such as task lists, task dependency matrices, and resource constraint tables.
[0033] For example, if the user inputs tasks A, B, and C, where task B depends on the completion of task A, and task C depends on task B, the data input module will convert this information into a dependency matrix, explicitly indicating the order of tasks. Simultaneously, for the resource requirements of each task, the data input module will also generate a specific resource allocation table, ensuring that the genetic algorithm can accurately obtain the resource requirements and dependency information for each task. This structured data is then passed to the genetic algorithm building module as the basis for subsequent optimization calculations.
[0034] The genetic algorithm establishment module constructs a genetic algorithm model based on the structured data provided by the data input module, initializes the population, and executes genetic operations. This module includes individual encoding, individual fitness calculation, and genetic operations, including selection, crossover, and mutation, and initiates the task scheduling search process through the initial population. Each individual (i.e., a scheduling scheme) is encoded as a gene sequence representing the task execution order and resource allocation.
[0035] In the individual coding process, the task scheduling problem is represented as a gene sequence, and the execution order of tasks is represented by the gene sequence. For example, the gene sequence "ACB" means that task A is executed first, followed by task C, and finally task B.
[0036] For each individual task, the fitness function is used to calculate the merits of the scheduling scheme, primarily using total completion time as the evaluation metric, while also considering resource constraints and task dependencies. The goal of the fitness function is to minimize the total task completion time to improve scheduling efficiency.
[0037] Selection can be achieved through tournament selection, which compares the fitness of multiple individuals and selects the better one to enter the next generation. During population initialization, the crossover operation randomly selects a crossover point to exchange gene segments between two parent individuals, thereby generating a new scheduling scheme; the mutation operation randomly adjusts the gene sequence to increase the diversity of the population and prevent the algorithm from getting trapped in local optima.
[0038] The generated initial population and individual information produced during genetic operations are passed to the parameter adaptive control module to further improve the algorithm performance by optimizing the key parameters of the genetic algorithm model.
[0039] The parameter adaptive control module analyzes the population characteristics of the current population in real time based on the large language model, and adaptively optimizes the crossover and mutation operators according to the population characteristics of the current population, as well as dynamically adjusts the mutation rate and crossover rate of the genetic algorithm model.
[0040] The parameter adaptive control module determines the current state of the population by monitoring the population fitness curve in real time, and dynamically adjusts the mutation rate and crossover rate in the genetic algorithm to ensure a balance between exploration and development at different stages. In the early stages of the population, if the fitness curve changes slowly and the population diversity is low, the large language model suggests increasing the mutation rate to expand the search space and avoid getting trapped in local optima. In the later stages of the algorithm, if the population fitness curve shows a significant improvement and the individual fitness differences are small, the large language model reduces the mutation rate and increases the probability of selecting superior individuals, thereby accelerating convergence. Through intelligent selection of crossover points and adjustment of mutation strategies, the large language model can dynamically adapt to the different stages of the scheduling task, thereby enhancing the global search capability and efficiency of the genetic algorithm.
[0041] This module determines parameter adjustment strategies by monitoring changes in the population fitness curve. When the fitness curve flattens out, indicating a slowdown in population evolution, the adaptive parameter control module increases the mutation rate to enhance the population's exploratory capabilities. Conversely, when the fitness curve rises sharply, the module decreases the mutation rate to ensure the transmission of superior genes and rapid population convergence. Through this dynamic parameter control mechanism, the genetic algorithm can automatically adjust the balance between exploration and development at different stages according to the needs of the actual scheduling task, ultimately improving the quality and reliability of the scheduling results.
[0042] The final scheduling scheme is processed by the results output and interpretation module, which generates a detailed execution report. This module uses a large language model to generate natural language reports for easy user understanding and application. The report content may include the start and end times of each task, resource allocation, and dependencies between tasks. For example, the report might show that task A starts at time 0, task B starts immediately after task A completes, and task C starts after task B completes. It also lists the usage of each resource throughout the scheduling process to ensure the rationality and optimization of resource utilization.
[0043] Furthermore, the results output and interpretation module can evaluate the scheduling scheme, identify potential areas for improvement, and provide specific adjustment suggestions. Through this output, users can gain a clearer understanding of the execution details and improvement potential of the scheduling scheme, enabling better application in real-world task scenarios.
[0044] More specifically, the data input module includes a task description parsing submodule and a dependency recognition submodule. The task description parsing submodule parses the input unstructured text task description, extracting key task information such as task name, priority, and resource requirements using natural language processing techniques. The dependency recognition submodule determines the dependencies between tasks based on the extracted key task information. Specifically, it can analyze the dependencies between tasks using graph theory algorithms to generate a dependency graph / table.
[0045] The genetic algorithm establishment module includes an individual encoding submodule, an individual fitness evaluation submodule, and a genetic operation execution submodule. The individual encoding submodule encodes individuals based on structured data, transforming the task scheduling problem into gene sequences, represented using strategies such as sequential encoding or priority encoding. The individual fitness evaluation submodule evaluates the merits of each scheduling scheme, specifically by defining an individual fitness function and calculating task completion time, resource utilization, and constraint violations. The genetic operation execution submodule executes genetic operations based on model parameters, including crossover operators, mutation operators, crossover rate, and mutation rate. These model parameters are adaptively and dynamically adjusted during genetic iteration.
[0046] In this embodiment, the individual fitness function is defined as follows: ,in, , , , All are weighting coefficients, and C max C represents the total completion time (i.e., the maximum completion time) of all tasks under this scheduling scheme. ref`r` represents the reference time used for normalization; `U` represents resource utilization; `P` represents the constraint violation penalty, used to reflect infeasibility situations such as task dependency conflicts, resource overruns, and deadline violations. The shorter the total completion time, the higher the resource utilization, and the fewer the constraint violations in the scheduling scheme, the smaller `Obj`, and the larger the corresponding individual fitness value, indicating a better individual. i t represents the resource consumption of task i. i Let R represent the execution time of task i, R represent the total available system resources, n represent the number of tasks, and P represent the total number of tasks. dep This indicates a violation of the dependency penalty, P res Indicates a penalty for exceeding resource limits, P ddl This indicates the penalty for violating the deadline; P=0 when all constraints are satisfied.
[0047] The parameter adaptive control module includes a real-time monitoring submodule and a dynamic adjustment strategy submodule. The real-time monitoring submodule monitors fitness changes during the execution of the genetic algorithm based on a large language model, analyzes current population characteristics, and provides timely feedback to the dynamic adjustment strategy submodule. The dynamic adjustment strategy submodule provides dynamic adjustment schemes for key parameters. Specifically, based on the real-time monitoring results, it generates optimized crossover operators, optimized mutation operators, and parameter adjustment strategies adapted to the current stage; then, based on this strategy, it outputs specific crossover and mutation rate values to maintain population diversity. The crossover rate, mutation rate, and selected crossover and mutation operators are fed back to the genetic operation execution submodule in the genetic algorithm establishment module for use in subsequent generation selection, crossover, and mutation processes.
[0048] The large language model can adopt the DeepSeek large model, whose structure can be a Transformer-based decoding large language model structure, including at least: an input embedding layer, a positional encoding layer, a multi-layer self-attention network layer, a feedforward neural network layer, a normalization layer, and an output layer; wherein, the input embedding layer is used to convert historical scheduling data, current population statistical features, task dependencies, resource constraint information, etc. into vector representations; the self-attention network layer is used to model the correlation between different generations, different features, and task constraints; the feedforward neural network layer is used to extract high-order semantic and policy features; and the output layer is used to output operator selection results, operator parameters, or parameter adjustment suggestions.
[0049] The input received by the large language model is not the original population encoding itself, but a multi-dimensional feature set after the genetic algorithm's running state has been structured and represented. The large language model can dynamically generate optimization operators that currently meet the preset evaluation objectives by analyzing historical data and current population characteristics. The historical data may include the optimal fitness, average fitness, fitness variance, and feasible solution ratio of the most recent several generations; it may also include the proportion of duplicate individuals, average Hamming distance or edit distance, premature convergence duration, historical crossover and mutation rates, fitness improvement after using different operators, and the proportion of infeasible solutions generated. The current population characteristics may include the optimal fitness, average fitness, fitness standard deviation, and feasible solution ratio of the current generation; it may also include population diversity indicators, task dependency density, resource conflict frequency, critical path length, and bottleneck resource occupancy rate. For example, if the optimal fitness only increases from 0.71 to 0.73 in the last 10 generations, the average fitness increases from 0.62 to 0.63, the average Hamming distance decreases from 0.28 to 0.10, and the proportion of feasible solutions remains above 92% for a long period, then the large language model can determine that the current population has reached a state of "feasible but tending towards homogeneity," and the search is gradually stagnating. In the future, conservative crossover should be reduced and mutation operations that can break the local structure should be increased. Conversely, if the optimal fitness increases rapidly but the proportion of infeasible solutions rises from 8% to 35%, then the model will determine that the current search is too aggressive. Constraint-preserving crossover should be prioritized, and the probability of high-destructive mutations should be reduced to reduce ineffective searches.
[0050] The preferred method for generating optimization operators is not to generate a completely new algorithm code out of thin air without constraints, but rather for the large language model to select, combine, or configure parameters from a candidate operator library and a parameterized template library. In other words, the system pre-stores several crossover operator templates and mutation operator templates, such as sequential crossover, partial mapping crossover, priority preservation crossover, single-point exchange mutation, insertion mutation, reverse order mutation, resource reallocation mutation, dependency repair mutation, etc. Based on historical data and current population characteristics, the large language model outputs a specific operator type and its parameters, such as crossover window length, retention priority rules, mutation application location, mutation strength, and whether feasible repair rules are enabled, and then instantiates the corresponding operator according to this output.
[0051] For crossover operators, the acquisition method leans more towards "selection of combination rules based on population structure and parent characteristics." For example, in task scheduling problems, the main goal of crossover operators is usually to maintain task order constraints and resource allocation rationality while inheriting superior gene segments. Therefore, large language models focus on analyzing information such as the similarity between parent individuals, the historical retention benefits of superior gene segments, dependency density, the proportion of current infeasible solutions, and resource conflict hotspots. For example, suppose the current scheduling task has a large number of sequential dependencies, and statistics show that after using ordinary sequential crossover OX in the last 5 generations, the proportion of infeasible solutions reached 30%, while using priority-preserving crossover PPX reduced the proportion of infeasible solutions to 8%, but the fitness improvement was slightly lower; at the same time, the current population diversity is still 0.22, not yet severely degraded. In this case, the large language model can output the following suggestion: select "dependency-preserving crossover operator" as the current optimized crossover operator, prioritize preserving the critical path task order in the parent generation, perform local order swaps for non-critical path tasks, and perform dependency repair once after crossover. Furthermore, a concrete example can be given: Suppose parent 1 is encoded as [A,C,B,D,E], and parent 2 is encoded as [C,A,D,B,E], where the constraints are A→B and C→D. The large language model determines that directly using ordinary sequential crossover could easily result in infeasible individuals where B precedes A and D precedes C. Therefore, it recommends using "priority constraint-preserving crossover," where the rule is to first copy gene segments that jointly satisfy the dependency relationship, and then insert them according to the resource conflict level of the remaining tasks. This generates offspring [A,C,D,B,E] or [C,A,B,D,E], and a repair step ensures the legality of the dependencies. In other words, obtaining the crossover operator focuses on the strategy selection for how to recombine the overall structure of the offspring.
[0052] For mutation operators, the acquisition method leans more towards "perturbation strategy selection based on local defects and stagnation states." Since mutation is primarily used to break local optima, restore diversity, and correct bottlenecks, the large language model focuses on analyzing: whether the fitness curve is stagnant, whether the proportion of duplicate individuals is too high, whether the critical path tasks are too fixed, whether resource bottlenecks are concentrated in certain periods, and what causes the infeasible structures in the current individuals. For example, if the optimal fitness has remained almost unchanged for the last eight generations, the proportion of duplicate individuals reaches 65%, but the feasible solution ratio is as high as 95%, it indicates that the current problem is not constraint violation, but rather that the population is too similar and local optima are obvious. In this case, the large language model can output: adopt "critical path perturbation-type insertion mutation" or "reverse mutation" as the current optimization mutation operator to locally rearrange the tasks with non-fixed predecessor constraints on the critical path to expand the search range. For example, if an entity is encoded as [A,C,D,B,E,F], model analysis reveals that resource bottlenecks are mainly concentrated in the concurrent execution phase of tasks D and E. While B depends on A, its position can be appropriately moved forward. Therefore, a mutation suggestion is given: insert task B from its current position before D, resulting in [A,C,B,D,E,F]. If this mutation causes a resource time window conflict, a "resource repair mutation" is triggered, changing the resource allocation of E from machine 1 to machine 2. In other words, the mutation operator focuses on targeted perturbation of local structures. Its triggering criteria differ from those of crossover, emphasizing stagnation detection, bottleneck identification, and local repair.
[0053] Regarding the calculation method of population fitness, each scheduling scheme can be evaluated first based on individual fitness, and then further statistical results at the population level can be obtained, including the optimal fitness f of the population. best Average fitness of the population f avg Population fitness variance It can also include the proportion of feasible solutions. . , , The fitness of the i-th individual in the population is represented by N, which is the number of individuals in the population, i.e., the population size. , , The number of feasible solutions is denoted by , and the proportion of feasible solutions reflects the percentage of individuals in the current population that satisfy the task dependency, resource constraints, and deadline constraints.
[0054] The current state of the population is determined by comprehensively utilizing indicators such as optimal fitness, average fitness, fitness variance, and feasible solution ratio. For example, suppose a population of a certain generation has 5 individuals with fitness values of 0.82, 0.78, 0.76, 0.52, and 0.30. Then, the optimal fitness of this generation is 0.82, the average fitness is 0.636, and the fitness variance is approximately 0.039264. This result indicates that although there are already relatively good individuals in the current generation, the differences between individuals are still significant, indicating that the population has not yet fully converged and still retains some search space. If there are 4 individuals that satisfy the constraints at this point, the feasible solution ratio is 4 / 5 = 0.8, indicating that most individuals are feasible, but some infeasible solutions still need further suppression.
[0055] Large language models do not merely observe a single fitness value in a particular generation, but rather analyze fitness change curves over several consecutive generations, such as the optimal fitness curve, the average fitness curve, the fitness variance curve, and the feasible solution proportion curve. Specifically, if the optimal fitness continuously increases and the average fitness increases synchronously, it indicates that the algorithm is in an effective evolutionary stage; if the optimal and average fitness remain relatively unchanged for a long time, it suggests that the search may have stagnated; if the optimal fitness increases while the average fitness decreases rapidly, it may indicate that a few excellent individuals dominate the population, while the remaining individuals are of lower quality, posing a risk of premature concentration; if the feasible solution proportion decreases significantly, it indicates that current crossover or mutation operations are violating constraints excessively, requiring a reduction in ineffective exploration.
[0056] Different suggestions can be given for large language models with different curve shapes:
[0057] In the first scenario, the population is currently in an effective convergence phase. If the optimal fitness and average fitness of the population have been steadily increasing for several generations, the proportion of feasible solutions remains at a high level (e.g., above 90%), and although population diversity has decreased, it remains within a reasonable range, and the population fitness variance is gradually decreasing, this usually indicates that the current parameter settings are appropriate, and the algorithm is gradually converging while maintaining a certain level of diversity. In this case, large language models can suggest keeping the current crossover operator unchanged and using a higher crossover rate and a lower mutation rate, for example, maintaining the crossover rate between 0.80 and 0.90 and the mutation rate between 0.02 and 0.06, in order to preferentially retain and propagate existing superior gene fragments and accelerate convergence.
[0058] The second scenario involves a population currently in a premature convergence or local optimum stagnation phase. If the optimal fitness remains relatively constant across multiple generations, the average fitness also tends to level off, and the fitness variance decreases significantly. This typically corresponds to premature convergence or local optimum stagnation, meaning the population becomes increasingly similar internally, but the overall quality no longer improves. In this case, the large language model will determine that exploration capabilities should be enhanced, suggesting a reduction in the crossover rate and an increase in the mutation rate. For example, the crossover rate could be lowered from 0.85 to 0.70–0.75, and the mutation rate increased from 0.04 to 0.10–0.15. Simultaneously, a more perturbation-capable mutation operator could be used, such as insertion mutation, reverse mutation, or critical path perturbation mutation. The reason for lowering the crossover rate is that if the parents are already highly similar, continuing high-frequency crossover often only repeats existing structures; increasing the mutation intensity is more effective in breaking the stagnation.
[0059] The third scenario involves overly aggressive crossover or mutation operations. The optimal fitness slightly increases, but the proportion of feasible solutions decreases significantly, for example, from 95% to 60%, or the average fitness fluctuates greatly. This usually indicates that while the algorithm is attempting to explore new regions, the crossover or mutation operations are too aggressive, generating many infeasible individuals that violate dependencies or resource constraints. In this case, the large language model would suggest reducing the intensity of highly destructive operations. Typically, the mutation rate can be lowered from 0.12 to 0.04–0.08, and the crossover rate can be appropriately lowered from 0.85 to 0.70–0.80. It would also be necessary to switch to dependency-preserving crossover operators, constraint-repairing mutation operators, or add a repair step after crossover. The core here is not simply "lowering all parameters," but rather matching the parameters with the operator style: if the operator itself is highly destructive, the corresponding probability should be lowered; if the operator has a feasibility-preserving or repair mechanism, the probability can be relatively higher.
[0060] The fourth scenario involves severe individual differentiation. Optimal fitness improves rapidly, but average fitness remains low for a prolonged period, and the population fitness variance is large. This typically indicates that a few high-quality individuals have emerged in the population, but most individuals have not yet caught up, resulting in severe differentiation in search results. In this case, large language models can suggest appropriately increasing the crossover rate, for example, from around 0.70 to 0.85, to enhance the dissemination of superior gene fragments within the population, while maintaining the mutation rate at a moderate level, such as 0.04–0.07, to avoid excessive mutation disrupting the newly formed superior structure.
[0061] In the fifth scenario, the average fitness increases significantly, but the optimal fitness improves slowly. This usually indicates that the overall quality of the population is improving, but it has not yet broken through the current optimal structure, possibly due to a lack of effective perturbation of the order of critical tasks or the allocation of bottleneck resources. In response, large language models can suggest targeted mutations of genes related to critical path tasks and bottleneck resources, or adopt crossover methods that emphasize structural reorganization to promote breakthroughs in the optimal solution.
[0062] For example, if the optimal fitness only increases from 0.81 to 0.82 and the average fitness from 0.78 to 0.785 in the last 10 generations, while the fitness variance decreases from 0.020 to 0.005, it can be determined that the population is highly homogenized and evolution has almost stagnated. In this case, the large language model can suggest increasing the mutation rate from 0.05 to 0.12, decreasing the crossover rate from 0.85 to 0.75, and enabling "critical path perturbation mutation" or "reverse mutation" to expand the search scope again. Conversely, if the optimal fitness increases from 0.70 to 0.84 in the last 10 generations, but the proportion of feasible solutions decreases from 0.95 to 0.60, it indicates that aggressive search has brought too many infeasible solutions. In this case, the model can suggest keeping the crossover rate unchanged or slightly decreasing it, replacing highly destructive mutations with dependency-maintaining mutations, and adding constraint repair operations after crossover.
[0063] The result output and interpretation module includes a scheduling result generation submodule and an execution report generation submodule. The scheduling result generation submodule generates the final task scheduling result, specifically transforming the optimized task scheduling scheme into a concrete execution plan, including the task's start and end times. The execution report generation submodule generates a highly readable execution report, specifically outputting the scheduling result in natural language, including information such as task completion status and resource usage statistics.
[0064] The large language model used in all the modules mentioned above is DeepSeekV3.2, which possesses strong capabilities in natural language understanding, information extraction, logical reasoning, policy generation, process analysis, and text generation. It can cover the entire process requirements of this invention, from task description parsing, population fitness analysis, crossover / mutation operator optimization, dynamic parameter adjustment, to result interpretation and output. In the task input stage, its semantic understanding and structured extraction capabilities can be used to convert unstructured task descriptions into structured data. In the genetic optimization stage, its reasoning and analysis capabilities can be used to judge population status, fitness changes, and diversity, and to provide suggestions for crossover operators, mutation operators, and parameter adjustment. In the result output stage, its text generation capabilities can be used to generate interpretable scheduling reports. Using the same DeepSeekV3.2 large model in different stages also helps maintain consistency in processing logic and semantic standards across stages, reducing interface adaptation, data conversion, and system complexity caused by switching between multiple models, and improving overall implementation efficiency, response speed, and engineering deployment stability.
[0065] The aforementioned system incorporates a large language model into the task scheduling genetic optimization process. This model not only reads the fitness values of the current individual or population but also integrates multi-dimensional information such as task description semantics, task dependencies, resource constraints, fitness change curves, population diversity, distribution of infeasible solutions, and the current evolutionary stage for comprehensive analysis. Based on this, it performs joint, adaptive, and dynamic optimization of crossover operators, mutation operators, and crossover and mutation rates. Compared to the mechanical parameter tuning methods in existing technologies that rely on fixed formulas, fixed thresholds, or single statistical indicators, the aforementioned system, through the large language model, implements a context-aware optimization mechanism oriented towards specific task scenarios and real-time evolutionary states. It can not only determine whether parameter adjustments are needed but also further determine which genetic operation strategy is more suitable for the current state, thereby more effectively suppressing premature convergence, reducing infeasible solution searches, improving global search capabilities, and enhancing scheduling quality and convergence efficiency under complex constraints.
[0066] See also Figure 2 Based on the same inventive concept, this embodiment also provides a task scheduling method based on an improved genetic algorithm, including the following steps:
[0067] S10, based on the large language model, transforms the task description information input by the user into structured data, and extracts the key information of each task and the dependencies between tasks;
[0068] S20, construct a genetic algorithm model based on the structured data, initialize the population, and perform genetic operations;
[0069] S30 analyzes the population characteristics of the current population in real time based on a large language model, and adaptively optimizes the crossover and mutation operators according to the population characteristics of the current population, as well as dynamically adjusts the mutation rate and crossover rate of the genetic algorithm model.
[0070] S40 performs genetic operations based on the optimized crossover and mutation operators, as well as the dynamically adjusted mutation and crossover rates;
[0071] S50, repeat steps S30-S40 until the termination condition is met, and output the final task scheduling result.
[0072] In step S10 above, the task description information input by the user is transformed into structured data using a large language model. Key information of each task, such as task name, priority and resource requirements, is extracted from the task description information. Then, the dependency relationship between tasks is analyzed using graph theory algorithm to generate a dependency graph.
[0073] More specifically, user interface (UI) tools (React) can be used to collect basic information about task requirements, such as task name, priority, and deadline; user input can be formatted into a structured data format that the system can process using a data processing library (Pandas); and user input can be analyzed using large language model APIs (Illamma series) to extract key features of the task (such as resource requirements and dependencies) to support subsequent processing.
[0074] Task feature extraction includes feature identification, feature encoding, and data storage. Data mining tools (Scikit-learn) can be used to analyze structured data, identifying task execution time, resource dependencies, and other key features. The identified features are then encoded into numerical data using a label encoder for subsequent processing and computation. Finally, the extracted features are stored in a database management system (MySQL) to ensure rapid access in subsequent steps.
[0075] In step S20 above, during population initialization, individual encoding is performed based on the key information of each task and the dependencies between tasks. Each individual represents a scheduling scheme, and the individual encoding represents the task scheduling problem as a gene sequence. The execution order of tasks is represented by the gene sequence. An initial population is generated by randomly combining tasks to ensure population diversity and lay the foundation for subsequent optimization. During genetic operations, the fitness function is used to evaluate the quality of individuals, and the better individuals are selected as the parents of the next generation. Crossover and mutation operations are performed on the parents. Furthermore, through subsequent optimization of the large language model to generate optimized crossover and mutation operators, and dynamically adjusted crossover and mutation rates, the population is improved, making the new individuals more adaptable and better able to cope with the scheduling problem.
[0076] More specifically, an initial scheduling scheme can be randomly generated based on task characteristics using a random number generation library (NumPy), with each scheme serving as an individual in the genetic algorithm. The generated individuals are then combined into an initial population to ensure sufficient diversity.
[0077] Fitness evaluation includes defining the fitness function, performing the evaluation, and ranking the results. The fitness function can be defined using a programming language (Python) based on the scheduling objective. Fitness is calculated for each individual, its performance under the current scheduling scheme is analyzed, and individuals are ranked using a sorting algorithm (quicksort). Individuals with higher fitness values are selected for the genetic operations phase.
[0078] Genetic operations include selection, crossover, and mutation. Selection algorithms (such as roulette wheel selection) are used to select parent individuals based on their fitness values. Crossover operators (single-point crossover or uniform crossover, etc.) are used to perform crossover on the selected parents, generating new offspring individuals. Mutation algorithms (such as random mutation) are used to randomly mutate the offspring individuals to introduce new gene combinations, increase population diversity, and then the newly mutated individuals are merged with the original population to form a new population.
[0079] In step S30 above, the changing trends of the optimal fitness curve, average fitness curve, variance curve, and feasible solution proportion curve over several consecutive generations are analyzed using a large language model to comprehensively determine the current state of the population. Based on the current state of the population, the optimized crossover operator and mutation operator are determined, and the mutation rate and crossover rate of the genetic algorithm model are dynamically adjusted to maintain the diversity of the population.
[0080] Monitoring tools (such as Matplotlib) can be used to monitor changes in the fitness of the current population in real time and analyze whether premature convergence occurs. Based on the changes in fitness, it can be determined whether to adjust the key parameters of the genetic algorithm (such as crossover rate and mutation rate). Automated scripts (Python scripts) can be used to adjust the parameters to ensure the continuous effectiveness of the optimization process.
[0081] In step S50 above, a natural language report is generated using a large language model. The report content may include the start and end times of each task, resource allocation, and dependencies between tasks.
[0082] The final scheduling scheme can be integrated using a data integration tool (Pandas) to ensure that the execution order and resource allocation of all tasks are configured reasonably. A scheduling execution report is generated, using a documentation library (LaTeX) to detail task completion, resource usage, and other key metrics. Finally, the scheduling results and report are provided to the user. User feedback can also be collected using a feedback collection tool (SurveyMonkey) to facilitate subsequent optimization and adjustments.
[0083] For more detailed instructions on how to perform each step in the above method, please refer to the relevant descriptions in the corresponding modules of the aforementioned system; they will not be repeated here.
[0084] This task scheduling system based on a genetic algorithm optimized from a large language model can be widely applied in multiple fields, and it demonstrates unique advantages, especially in the following key areas:
[0085] Intelligent Manufacturing: In the field of intelligent manufacturing, the system can optimize production line task scheduling, adjust production plans by analyzing production data in real time, thereby improving resource utilization and reducing production costs. Optimization algorithms based on large language models can quickly process large amounts of data and provide dynamic adjustment solutions to cope with various unexpected situations that may arise during the manufacturing process.
[0086] Logistics and Supply Chain Management: In logistics and supply chain management, this system can monitor transportation status in real time, predict delays, and optimize transportation routes. Through the adaptive characteristics of genetic algorithms, it can achieve efficient scheduling in complex network environments, ensuring on-time delivery of goods and reducing logistics costs.
[0087] Cloud computing resource management: In a cloud computing environment, this system can be used for dynamic resource scheduling, automatically adjusting the allocation of computing resources based on real-time load conditions to improve system performance and availability. Through the analytical capabilities of large language models, the system can better understand user needs, thereby achieving more intelligent resource allocation.
[0088] Potential application areas:
[0089] Traffic Management: In urban traffic management, the system can analyze traffic flow data, optimize traffic light scheduling, improve traffic efficiency, and reduce congestion.
[0090] Financial Services: In the financial industry, this system can be used to optimize trading strategies and risk management, and to assist decision-making through in-depth analysis of market data.
[0091] Healthcare: In the medical field, the system can optimize patient visit processes and improve service efficiency and patient satisfaction through intelligent scheduling of hospital resources.
[0092] like Figure 3 As shown, this embodiment also provides an electronic device that may include a processor and a memory, wherein the memory is coupled to the processor. It is worth noting that this figure is exemplary, and other types of structures can be used to supplement or replace this structure to achieve data extraction, report generation, communication, or other functions.
[0093] The electronic device may also include an input unit, a display unit, and a power supply. It is worth noting that the electronic device is not necessarily required to include all the components mentioned above; it may also include components not mentioned, as can be found in existing technologies.
[0094] A processor, sometimes also called a controller or operating control, may include a microprocessor or other processor device and / or logic device that receives input and controls the operation of various components of an electronic device.
[0095] The memory may be one or more of the following: a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It can store information such as the processor's configuration information and the instructions executed by the processor. The processor can execute programs stored in the memory to perform information storage or processing. In one embodiment, the memory also includes a buffer memory, or buffer, to store intermediate information.
[0096] This invention also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed in an electronic device, the program product causes the electronic device to perform the operation steps included in the method of this invention.
[0097] This invention also provides a storage medium storing computer-readable instructions that cause an electronic device to perform the operation steps included in the method of this invention.
[0098] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0099] The above specific embodiments are merely several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant teachings of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A task scheduling method based on an improved genetic algorithm, characterized in that, Includes the following steps: S10, based on the large language model, transforms the task description information input by the user into structured data, and extracts the key information of each task and the dependencies between tasks; S20, construct a genetic algorithm model based on the structured data, initialize the population, and perform genetic operations; S30 analyzes the population characteristics of the current population in real time based on a large language model, and adaptively optimizes the crossover and mutation operators according to the population characteristics of the current population, as well as dynamically adjusts the mutation rate and crossover rate of the genetic algorithm model. S40 performs genetic operations based on the optimized crossover and mutation operators, as well as the dynamically adjusted mutation and crossover rates; S50, repeat steps S30-S40 until the termination condition is met, and output the final task scheduling result.
2. The task scheduling method based on the improved genetic algorithm according to claim 1, characterized in that, In step S20, when initializing the population, individual encoding is performed based on the key information of each task and the dependencies between tasks. Each individual represents a scheduling scheme, which includes the task name and execution order. The initial population is generated by randomly combining tasks.
3. The task scheduling method based on the improved genetic algorithm according to claim 1, characterized in that, In step S30, the characteristics of the population include the optimal fitness f. best Average fitness of the population f avg Population fitness variance proportion of feasible solutions , , , Let N represent the fitness of the i-th individual in the population, and N be the number of individuals in the population. , , The number of feasible solutions.
4. The task scheduling method based on the improved genetic algorithm according to claim 3, characterized in that, In step S30, the large language model analyzes the changing trends of the optimal fitness curve, average fitness curve, variance curve, and feasible solution proportion curve over several consecutive generations, comprehensively judges the current state of the population, and determines the optimized crossover operator and mutation operator based on the current state of the population, as well as dynamically adjusts the mutation rate and crossover rate of the genetic algorithm model.
5. The task scheduling method based on the improved genetic algorithm according to claim 1, characterized in that, In step S50, the processing of the final task scheduling result includes: generating a natural language report based on a large language model. The report content includes the start and end times of each task, resource allocation, and dependencies between tasks.
6. A task scheduling system based on an improved genetic algorithm, characterized in that, include: The data input module is used to transform the task description information input by the user into structured data based on the large language model, and to extract the key information of each task and the dependencies between tasks. The genetic algorithm establishment module is used to construct a genetic algorithm model based on the structured data, initialize the population, and perform genetic operations based on the optimized crossover and mutation operators and the dynamically adjusted mutation and crossover rates. The parameter adaptive control module is used to analyze the population characteristics of the current population in real time based on the large language model, and adaptively optimize the crossover and mutation operators according to the population characteristics of the current population, as well as dynamically adjust the mutation rate and crossover rate of the genetic algorithm model. The results output and interpretation module is used to output the final task scheduling result after multiple generations of genetic operations have generated the final task scheduling result.
7. The task scheduling system based on the improved genetic algorithm according to claim 6, characterized in that, The parameter adaptive control module analyzes the changing trends of the optimal fitness curve, average fitness curve, variance curve, and feasible solution proportion curve over several consecutive generations based on the large language model, comprehensively judges the current state of the population, and determines the optimized crossover and mutation operators based on the current state of the population, as well as dynamically adjusts the mutation rate and crossover rate of the genetic algorithm model.
8. A computer program product comprising computer-readable instructions, characterized in that, The computer-readable instructions, when executed by a processor, implement the steps of the task scheduling method based on an improved genetic algorithm as described in any one of claims 1-5.
9. A computer-readable storage medium comprising computer-readable instructions, characterized in that, The computer-readable instructions, when executed by a processor, implement the steps of the task scheduling method based on an improved genetic algorithm as described in any one of claims 1-5.
10. An electronic device, characterized in that, include: Memory, which stores program instructions; The processor, connected to the memory, executes program instructions in the memory to implement the steps of the task scheduling method based on the improved genetic algorithm as described in any one of claims 1-5.