Task migration method, system, storage medium and computer program product

CN122963537APending Publication Date: 2026-10-23GUANGDONG-HONG KONG-MACAO GREATER BAY AREA DIGITAL ECONOMY RESEARCH INSTITUTE (INTERNATIONAL ADVANCED TECHNOLOGY APPLICATION PROMOTION CENTER (SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611158351.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0002]大语言模型(Large Language Model, LLM)程序进化系统在跨任务场景中,一般基于RAG(检索增强生成)、多任务优化模型、知识图谱辅助等方式实现任务迁移经验复用,仅依靠语义相似度、单任务回报、模型拟合效果做经验筛选,缺乏对任务迁移经验进行量化分析的统一指标,极易召回语义相似但实际产生负迁移的经验,导致复用的任务迁移经验准确性不佳

Benefits of technology

[0028]本发明提出的一种应用于大语言模型的任务迁移方法,根据待优化任务从预设经验库中确定多个候选任务迁移经验;基于待优化任务、各候选任务迁移经验及对应的当前历史相关性指标计算各候选任务迁移经验的相关性指标,得到各候选任务迁移经验的当前相关性指标;基于所述各候选任务迁移经验的当前相关性指标,确定目标任务迁移经验以及所述目标任务迁移经验的目标相关性指标;根据目标相关性指标、目标任务迁移经验和待优化任务通过第一大语言模型,得到待优化任务的目标程序,即先根据待优化任务从预设经验库中确定多个候选任务迁移经验,使得预设经验库中的已优化任务的任务迁移经验转换为当前待优化任务可查询、可比较和可更新的数据,然后通过待优化任务、各候选任务迁移经验及对应的当前历史相关性指标计算各候选任务迁移经验的相关性指标,得到各候选任务迁移经验的当前相关性指标;从而根据得到各候选任务迁移经验的当前相关性指标确定目标任务迁移经验以及目标任务迁移经验的目标相关性指标,一方面可以将已完成任务的任务迁移经验用于当前待优化任务,另一方面相关性指标可作为各候选任务迁移经验的统一量化指标,计算相关性指标以得到目标任务迁移经验以及目标任务迁移经验的目标相关性指标,则可主动避免负迁移,实现每个候选任务迁移经验的适配度可量化、可迭代更新,从而有效提高大语言模型在跨任务场景中任务迁移经验复用的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963537A_ABST
    Figure CN122963537A_ABST
Patent Text Reader

Abstract

The application discloses a task migration method and system, a storage medium and a computer program product. The method comprises the following steps: obtaining a to-be-optimized task, and determining a plurality of candidate task migration experiences from a preset experience library according to the to-be-optimized task, wherein the preset experience library comprises a plurality of task migration experiences; calculating a correlation index of each candidate task migration experience based on the to-be-optimized task, each candidate task migration experience and a current historical correlation index of each candidate task migration experience, to obtain a current correlation index of each candidate task migration experience; determining a target task migration experience and a target correlation index of the target task migration experience based on the current correlation index of each candidate task migration experience; and obtaining a target program of the to-be-optimized task by a first large language model according to the target correlation index, the target task migration experience and the to-be-optimized task. The application aims to improve the accuracy of task migration experience reuse of a large language model in a cross-task scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a task transfer method, task transfer system, storage medium, and computer program product for large language models. Background Technology

[0002] In cross-task scenarios, Large Language Model (LLM) program evolution systems typically reuse task transfer experience based on methods such as RAG (Retrieval Enhanced Generation), multi-task optimization models, and knowledge graph assistance. However, they rely solely on semantic similarity, single-task rewards, and model fitting effects for experience screening, lacking a unified indicator for quantitative analysis of task transfer experience. This makes it easy to recall semantically similar experiences that actually produce negative transfer, resulting in poor accuracy of reused task transfer experience. Summary of the Invention

[0003] The main objective of this invention is to provide a task migration method, task migration system, storage medium, and computer program product for large language models, aiming to improve the accuracy of task migration experience reuse in cross-task scenarios for large language models.

[0004] To achieve the above objectives, this invention provides a task transfer method applied to a first large language model, the task transfer method comprising the following steps: Obtain the task to be optimized, and determine multiple candidate task migration experiences from a preset experience base based on the task to be optimized, wherein the preset experience base contains multiple task migration experiences; Based on the task to be optimized, the migration experience of each candidate task, and the current historical relevance index of each candidate task migration experience, the relevance index of each candidate task migration experience is calculated to obtain the current relevance index of each candidate task migration experience. The current historical relevance index is the latest updated relevance index among all historical relevance indices of the candidate task migration experience stored in the preset experience base. Based on the current relevance index of the migration experience of each candidate task, the migration experience of the target task and the target relevance index of the migration experience of the target task are determined. Based on the target relevance index, the target task migration experience, and the task to be optimized, the target program of the task to be optimized is obtained through the first large language model.

[0005] In one embodiment, the step of obtaining the task to be optimized and determining multiple candidate task migration experiences from a preset experience base based on the task to be optimized includes: Calculate the task description similarity between the task to be optimized and each task migration experience in the preset experience base, and determine a first experience set based on the task description similarity. The first experience set includes multiple first task migration experiences, which are determined from the preset experience base based on the task description similarity. Calculate the applicability similarity between the task to be optimized and each first task migration experience in the first experience set, and determine a second experience set based on the applicability similarity, wherein the second experience set includes multiple second task migration experiences, and the second task migration experiences are determined from the first experience set based on the applicability similarity. The comprehensive matching score for each second task migration experience is determined based on the task description similarity, applicable condition similarity, status flag, current historical relevance index, and update time. Multiple candidate task migration experiences are determined from the second experience set based on the comprehensive matching score.

[0006] In one embodiment, the step of calculating the correlation index of each candidate task migration experience based on the task to be optimized, the migration experience of each candidate task, and the current historical correlation index of each candidate task migration experience, and obtaining the current correlation index of each candidate task migration experience, includes: A reference strategy is constructed based on the key parameters of the task to be optimized. Multiple splicing strategies are generated based on the reference strategy and the current historical relevance indicators of the migration experience of each candidate task; The evaluation increment of each splicing strategy is calculated using the first large language model, along with the reference strategy and each splicing strategy. Based on the candidate task migration experience corresponding to the splicing strategy, the splicing candidate task migration experience is obtained; The effect stability component is calculated based on the reference strategy, each of the splicing strategies, and each of the splicing candidate task migration experiences. The effect stability component represents the degree of influence of the splicing candidate task migration experience on the target program that generates the task to be optimized. The correlation index of the migration experience of each splicing candidate task is calculated based on the stability component and the evaluation increment, and the current correlation index of the migration experience of each splicing candidate task is obtained.

[0007] In one embodiment, the step of constructing a reference strategy based on the key parameters of the task to be optimized includes: Obtain the key parameters of the task to be optimized, wherein the key parameters include task description, constraints, and evaluation function; A reference strategy is constructed based on the key parameters of the task to be optimized and the input and output formats of the first large language model.

[0008] In one embodiment, the step of generating multiple stitching strategies based on the reference strategy and the current historical relevance indicators of the migration experience of each candidate task includes: Based on the current historical relevance index and the first threshold of the migration experience of each candidate task, an injection level is set for the migration experience of each candidate task. A splicing strategy is generated based on the reference strategy and the injection points of the migration experience of each candidate task.

[0009] In one embodiment, the step of setting an injection level for each candidate task migration experience based on the current historical relevance index and a first threshold includes: If the current historical relevance index of the candidate task migration experience is less than the first threshold, the injection level of the candidate task migration experience is set to skip level. If the current historical relevance index of the candidate task migration experience is greater than or equal to the first threshold, the injection level of the candidate task migration experience is set as the injection level.

[0010] In one embodiment, the step of generating a splicing strategy based on the reference strategy and the injection profiles of each candidate task migration experience includes: If the injection file of the candidate task migration experience is an injection file, then the reference strategy and the experience text of the candidate task migration experience are combined to obtain a splicing strategy.

[0011] In one embodiment, the step of calculating the evaluation increment of each concatenation strategy using the reference strategy and each of the concatenation strategies through the first large language model includes: Each of the splicing strategies is input into the first large language model to generate a first candidate program, and each first candidate program is evaluated by an evaluation function to obtain an evaluation score; The reference strategy is input into the first large language model to generate a reference program, and the reference program is evaluated by the evaluation function to obtain a reference score; By comparing the reference score with each of the evaluation scores, the evaluation increment for each splicing strategy is obtained.

[0012] In one embodiment, the step of calculating the action stability component based on the reference strategy, each of the stitching strategies, and each of the stitching candidate task migration experiences includes: The migration experience of each of the splicing candidate tasks is used to construct the migration experience of the perturbation task through the second language model; A perturbation stitching strategy is generated based on the migration experience of each perturbation task and the reference strategy. The effect feature matrix is ​​calculated based on the splicing strategy and the perturbation splicing strategy; The action stability components are calculated based on the action characteristic matrix and the normalized upper bound.

[0013] In one embodiment, the step of constructing perturbation task transfer experience from each of the concatenated candidate task transfer experiences using a second large language model includes: The second language model is used to process the experience text of the splicing candidate task transfer experience to obtain the first type of perturbation experience text, the second type of perturbation experience text and the third type of perturbation experience text respectively. The first type of perturbation task migration experience is generated based on the experience text of the spliced ​​candidate task migration experience and the first type of perturbation experience text. The second type of perturbation task migration experience is generated based on the experience text of the spliced ​​candidate task migration experience and the experience text of the second type of perturbation. The third type of perturbation task migration experience is generated based on the experience text of the spliced ​​candidate task migration experience and the experience text of the third type of perturbation. Based on the migration experience of the first type of perturbation task, the migration experience of the second type of perturbation task, and the migration experience of the third type of perturbation task, the perturbation task migration experience of the splicing candidate task is obtained.

[0014] In one embodiment, the step of processing the empirical text of the concatenated candidate task transfer experience through the second large language model to obtain the first type of perturbation empirical text, the second type of perturbation empirical text, and the third type of perturbation empirical text includes: The key phrases in the experience text of the splicing candidate task migration experience are deleted by the second language model to obtain the corresponding first type of perturbation experience text. The algorithm name in the experience text of the concatenated candidate task migration experience is replaced with a synonym by the second language model to obtain the corresponding second type of perturbation experience text. The second major language model is used to describe the identifiers of the programming language in the experience text of the concatenated candidate task migration experience in textual description, thereby obtaining the corresponding third type of perturbation experience text.

[0015] In one embodiment, the step of calculating the action feature matrix based on the splicing strategy and the perturbation splicing strategy includes: Each of the aforementioned perturbation splicing strategies is used to generate a second candidate program through the first large language model; Construct a first abstract syntax tree and a second abstract syntax tree for each of the first candidate programs and each of the corresponding second candidate programs; By comparing the first abstract syntax tree and the corresponding second abstract syntax tree, an abstract syntax tree difference set is constructed. The action feature matrix is ​​obtained from the difference set of the abstract syntax tree.

[0016] In one embodiment, the step of calculating the action stability components based on the action characteristic matrix and the normalized upper bound includes: Calculate the principal singular values ​​of the action feature matrix; The action stability component is calculated based on the principal singular value and the normalized upper bound.

[0017] In one embodiment, the step of calculating the correlation index of the migration experience of the splicing candidate tasks based on the action stability component and the evaluation increment, and obtaining the current correlation index of the migration experience of each splicing candidate task, includes: Obtain the latest historical correlation index of the splicing candidate task migration experience, and calculate the change in correlation index by decreasing step size based on the latest historical correlation index. The latest historical correlation index is the previous historical correlation index of the current historical correlation index of the splicing candidate task migration experience. The verification value of the migration experience of the splicing candidate task is calculated based on the evaluation increment, the stability component of the action, and the decreasing step size; Based on the change in the correlation index and the verification value, the correlation index of the migration experience of each splicing candidate task is calculated to obtain the current correlation index of the migration experience of each splicing candidate task.

[0018] In one embodiment, the step of calculating the change in the correlation index based on the latest historical correlation index by decreasing the step size includes: The decreasing step size is determined based on the number of updates to the correlation index of the migration experience of the splicing candidate tasks, and the decreasing step size is negatively correlated with the number of updates; A first coefficient is determined based on the decreasing step size, and the change in the correlation index is calculated based on the first coefficient and the latest historical correlation index, wherein the first coefficient is negatively correlated with the decreasing step size.

[0019] In one embodiment, the step of calculating the verification value of the splicing candidate task migration experience based on the evaluation increment, the action stability component, and the decreasing step size includes: The evaluation increment and the stability component of the effect are coupled and calculated to obtain the coupling result; Based on the coupling result and the decreasing step size, the verification value of the migration experience of the splicing candidate task is obtained.

[0020] In one embodiment, the step of determining the target task migration experience and the target relevance index of the target task migration experience based on the current relevance index of the migration experiences of each candidate task includes: The current historical relevance index of the splicing candidate task migration experience is updated based on the current relevance index of each splicing candidate task migration experience, wherein the historical relevance index includes the current relevance index. Obtain a preset number of historical correlation indicators of the migration experience of the splicing candidate tasks; Set a sliding window for the preset number of historical correlation indicators to obtain the sliding result; Based on the sliding results, the target migration experience and the target relevance index of the target migration experience are determined.

[0021] In one embodiment, the step of determining the target migration experience and the target relevance index of the target migration experience based on the sliding result includes: If the sliding result satisfies the preset iteration condition, then the current historical relevance index of the candidate task migration experience corresponding to the sliding result is updated according to the sliding result, and the process of calculating the relevance index of each candidate task migration experience based on the task to be optimized, each candidate task migration experience, and the current historical relevance index of each candidate task migration experience is returned to be executed, so as to obtain the current relevance index of each candidate task migration experience; the step of determining the target task migration experience and the target relevance index of the target task migration experience based on the current relevance index of each candidate task migration experience is continued until the target relevance index satisfies the preset stop iteration condition, and the target task migration experience and the target relevance index of the target task migration experience are determined.

[0022] In one embodiment, determining the target task migration experience and the target relevance index of the target task migration experience based on the sliding result further includes: If the sliding result does not meet the preset iteration conditions, the migration experience of the splicing candidate task corresponding to the sliding result is isolated to obtain the migration experience of the isolated candidate task. The target relevance index is recalculated based on the migration experience of the isolated candidate tasks to obtain the isolation update index; If the isolation update metric meets the preset iteration condition, then the current historical relevance metric of the candidate task migration experience corresponding to the sliding result is updated according to the isolation update metric, and the process of calculating the relevance metric of each candidate task migration experience based on the task to be optimized, each candidate task migration experience, and the current historical relevance metric of each candidate task migration experience is returned to be executed, so as to obtain the current relevance metric of each candidate task migration experience; the step of determining the target task migration experience and the target relevance metric of the target task migration experience based on the current relevance metric of each candidate task migration experience is continued until the target relevance metric meets the preset stop iteration condition, and the target task migration experience and the target relevance metric of the target task migration experience are determined.

[0023] In one embodiment, the step of recalculating the target relevance index based on the migration experience of the isolated candidate tasks to obtain the isolation update index includes: The process involves updating the preset experience base based on the migration experience of the isolated candidate tasks, returning to execute the step of obtaining the task to be optimized, and determining multiple candidate task migration experiences based on the task to be optimized; calculating the correlation index of each candidate task migration experience based on the task to be optimized, each candidate task migration experience, and the current historical correlation index of each candidate task migration experience, to obtain the current correlation index of each candidate task migration experience; determining the target task migration experience and the target correlation index of the target task migration experience based on the current correlation index of each candidate task migration experience, and using the target correlation index as the isolation update index.

[0024] In one embodiment, the step of obtaining the target program of the task to be optimized based on the target relevance index, the target task migration experience, and the task to be optimized through the first large language model includes: Obtain the comprehensive matching score of the target task migration experience, and determine the candidate target task migration experience based on the comprehensive matching score; Based on the migration experience of the candidate target tasks and the task to be optimized through the first large language model, candidate target programs are obtained; The evaluation score of the candidate target program is calculated using an evaluation function, and the target program of the task to be optimized is obtained based on the evaluation score.

[0025] Furthermore, to achieve the above objectives, this application also proposes a task migration system, which includes: An experience retrieval module is used to obtain the task to be optimized and determine multiple candidate task migration experiences from a preset experience library based on the task to be optimized, wherein the preset experience library contains multiple task migration experiences. The indicator calculation module is used to calculate the correlation index of each candidate task migration experience based on the task to be optimized, the migration experience of each candidate task, and the current historical correlation index of each candidate task migration experience, so as to obtain the current correlation index of each candidate task migration experience. The current historical correlation index is the latest updated correlation index of the candidate task migration experience stored in the preset experience base. The experience and indicator confirmation module is used to determine the target task migration experience and the target relevance indicator of the target task migration experience based on the current relevance indicator of the migration experience of each candidate task. The decision module is used to obtain the target program of the task to be optimized based on the target relevance index, the target task migration experience, and the task to be optimized through the first large language model.

[0026] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the task migration method as described in any of the preceding claims.

[0027] In addition, to achieve the above objectives, this application also proposes a computer program product comprising a computer program that, when executed by a processor, implements the steps of the task migration method as described in any of the preceding claims.

[0028] This invention proposes a task migration method applied to a large language model. The method involves: determining multiple candidate task migration experiences from a pre-set experience base based on the task to be optimized; calculating the relevance index of each candidate task migration experience based on the task to be optimized, the migration experiences of each candidate task, and their corresponding current historical relevance indices, thus obtaining the current relevance index of each candidate task migration experience; determining the target task migration experience and its target relevance index based on the current relevance index of each candidate task migration experience; and obtaining the target program of the task to be optimized through a first large language model based on the target relevance index, the target task migration experience, and the task to be optimized. In essence, this method first determines multiple candidate task migration experiences from the pre-set experience base based on the task to be optimized, making the task migration experiences of optimized tasks in the pre-set experience base searchable, comparable, and applicable to the current task to be optimized. The updated data is then used to calculate the relevance index of each candidate task's migration experience based on the task to be optimized, the migration experience of each candidate task, and the corresponding current historical relevance index. This yields the current relevance index of each candidate task's migration experience. Based on the current relevance index of each candidate task's migration experience, the target task's migration experience and its target relevance index are determined. On the one hand, the migration experience of completed tasks can be used for the current task to be optimized. On the other hand, the relevance index can serve as a unified quantitative index for each candidate task's migration experience. By calculating the relevance index to obtain the target task's migration experience and its target relevance index, negative migration can be actively avoided. This allows the adaptability of each candidate task's migration experience to be quantified and iteratively updated, thereby effectively improving the accuracy of task migration experience reuse in cross-task scenarios for large language models. Attached Figure Description

[0029] Figure 1 This is a flowchart illustrating an embodiment of the task migration method of the present invention; Figure 2 This is a detailed flowchart of step S10 in an embodiment of the task migration method of the present invention; Figure 3 This is a detailed flowchart of step S20 in an embodiment of the task migration method of the present invention; Figure 4 This is a schematic diagram of the functional modules of an embodiment of the task migration system of the present invention; Figure 5 This is a schematic diagram of the hardware structure of the operating environment involved in the task migration system of the present invention.

[0030] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0031] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0032] In related technologies, Large Language Model (LLM) program evolution systems in cross-task scenarios generally rely on methods such as RAG (Retrieval Enhanced Generation), multi-task optimization models, and knowledge graph assistance to reuse task transfer experience. They only rely on semantic similarity, single-task rewards, and model fitting effects for experience screening, and lack a unified indicator for quantitative analysis of task transfer experience. This makes it easy to recall semantically similar experiences that actually produce negative transfer, resulting in poor accuracy of reused task transfer experience.

[0033] The main solution of this application embodiment is to propose a task migration method applied to a first large language model. The method includes: acquiring a task to be optimized, and determining multiple candidate task migration experiences from a preset experience base based on the task to be optimized, wherein the preset experience base contains multiple task migration experiences; calculating the relevance index of each candidate task migration experience based on the task to be optimized, each candidate task migration experience, and the current historical relevance index of each candidate task migration experience, obtaining the current relevance index of each candidate task migration experience, wherein the current historical relevance index is the most recently updated relevance index among all historical relevance indices stored in the preset experience base; determining a target task migration experience and a target relevance index of the target task migration experience based on the current relevance index of each candidate task migration experience; and obtaining the target program of the task to be optimized through the first large language model based on the target relevance index, the target task migration experience, and the task to be optimized.

[0034] This application provides the above-mentioned solution. First, based on the task to be optimized, multiple candidate task migration experiences are determined from a preset experience base. This transforms the task migration experiences of optimized tasks in the preset experience base into queryable, comparable, and updatable data for the current task to be optimized. Then, the relevance index of each candidate task migration experience is calculated using the task to be optimized, the migration experiences of each candidate task, and the corresponding current historical relevance index. This yields the current relevance index of each candidate task migration experience. Based on the current relevance index of each candidate task migration experience, the target task migration experience and its target relevance index are determined. On the one hand, the task migration experience of completed tasks can be used for the current task to be optimized. On the other hand, the relevance index can serve as a unified quantitative index for each candidate task migration experience. By calculating the relevance index to obtain the target task migration experience and its target relevance index, negative migration can be actively avoided. This allows the adaptability of each candidate task migration experience to be quantified and iteratively updated, thereby effectively improving the accuracy of task migration experience reuse in cross-task scenarios for large language models.

[0035] In this embodiment, for ease of description, the task migration system will be used as the execution subject in the following description.

[0036] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or task migration system capable of performing the above functions. The following description uses a task migration system as an example to illustrate this embodiment and the subsequent embodiments.

[0037] Based on this, embodiments of this application provide a task transfer method applied to a first large language model. The first large language model is used to generate candidate programs according to a concatenation strategy. The concatenation strategy is the program generation and optimization scheme adopted by the first large language model when processing the current task to be optimized. The first large language model can be an LLM. (Refer to...) Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the task migration method of this application. The task migration method of this application is used to optimize the task to be optimized and obtain the target program.

[0038] In this embodiment, the task migration method includes steps S10 to S40. During the entire task optimization process, the task to be optimized is optimized through at least one iteration of steps S10-S30. Preferably, this embodiment takes multiple iterations as an example.

[0039] Step S10: Obtain the task to be optimized, and determine multiple candidate task migration experiences from a preset experience base based on the task to be optimized, wherein the preset experience base contains multiple task migration experiences.

[0040] In this embodiment, the task to be optimized is the target task that needs to be processed. This task originates from the user or the upper-level system and can be assigned a task number according to its arrival order. The parameters of the task to be optimized include key parameters, a search budget, and the input and output formats of the first large language model. The key parameters include a task description, applicable conditions, and an evaluation function. The task description and applicable conditions specify the requirements that the task to be optimized must meet during optimization. The applicable conditions are the constraints on the task to be optimized. The evaluation function is the standard for evaluating the quality of the generated candidate programs and can be used to test the pass rate of the candidate programs. The search budget is the maximum number of candidate tasks whose transfer experience can be selected from the preset experience base in each iteration. The input and output formats of the first large language model are the required formats for the current task to be optimized input into the first large language model, and the output format of the optimized task generated by the current task to be optimized through the first large language model.

[0041] The preset experience library is derived from the write-back records (task migration experience) of each task to be optimized after optimization. The tasks to be optimized are considered optimized tasks after optimization. The preset experience library can be an empty library during the initial deployment, or it can import existing write-back records. Each time an optimized task is obtained, the relevant experience fields of the optimized task are extracted from the task log of that optimized task and written back to the preset experience library. Therefore, the preset experience library is a continuously updated database.

[0042] The pre-defined experience base includes multiple task migration experiences and search budgets. Each task migration experience is derived from the write-back records of task migration experiences of optimized tasks up to the current time. Each task migration experience includes an experience number, the source of the optimized task, the task migration experience text, applicable conditions, association strategies, historical evaluation increments, historical impact feature matrix, historical correlation indicators, status flags, and update time.

[0043] The optimized task source of task migration experience indicates which optimized task the task migration experience originates from. Each task migration experience can correspond to one or more optimized tasks.

[0044] Relevance metrics are used to represent the correlation between task migration experience and the corresponding optimization task. For any task migration experience applied to each optimization iteration of each task to be optimized, a correlation metric (current correlation metric) will be obtained after each optimization iteration. This correlation metric is saved in a preset experience base in chronological order of optimization iterations, serving as the historical correlation metric for that task migration experience. In other words, the historical correlation metric originates from the correlation metrics of the task migration experience used in each iteration during the optimization process from the task to the optimized task. Each task migration experience can have one or more historical correlation metrics. Historical correlation metrics include the latest historical correlation metric and the current historical correlation metric. The current historical correlation metric is the most recently updated correlation metric among all historical correlation metrics stored in the preset experience base for the candidate task migration experience, and the latest historical correlation metric is the historical correlation metric preceding the current historical correlation metric of that task migration experience stored in the preset experience base.

[0045] The applicable conditions are derived from the constraints of the optimization task. The association strategy is a method for generating candidate programs based on the optimization task corresponding to the task migration experience. The historical evaluation increment is the evaluation increment of the corresponding task migration experience determined before the current moment; it represents the difference between using and not using the task migration experience when optimizing the task. The method for determining it can be found in subsequent embodiments. The action feature matrix is ​​a matrix formed by the difference set of the abstract syntax trees of the candidate programs generated by the corresponding candidate task migration experience and its perturbed task migration experience. The update time is the time of the latest write-back or correlation index update of the corresponding task migration experience. In some implementations, the system saves multiple update times; in this case, the latest update time is the most recent update time among them.

[0046] The status flag indicates the state of the corresponding task migration experience. The status flag can include available, unavailable, or isolated. For each task to be optimized, before the corresponding candidate experience list is determined, the status flag of all task migration experiences in the preset experience library is unavailable. After the candidate experience list is determined, the status flag of the candidate task migration experiences is updated to available. After it is determined that a candidate task migration experience needs to be isolated, its status is updated to isolated.

[0047] In this embodiment, after calculating the similarity between the information (task description and / or applicable conditions, etc.) in the candidate task migration experience and the parameters (task description and / or applicable conditions, etc.) in the task to be optimized, multiple candidate task migration experiences that match the task to be optimized are determined from the preset experience base. This allows the task migration experience of optimized tasks in the preset experience base to be converted into queryable, comparable and updatable data for the current task to be optimized.

[0048] In another embodiment, a candidate experience list can be obtained based on a combination of determined candidate task migration experiences.

[0049] Step S20: Calculate the correlation index of each candidate task migration experience based on the task to be optimized, the migration experience of each candidate task, and the current historical correlation index of each candidate task migration experience, to obtain the current correlation index of each candidate task migration experience. The current historical correlation index is the latest updated correlation index among all historical correlation indices of the candidate task migration experience stored in the preset experience database.

[0050] In this embodiment, step S20 can specifically be as follows: First, generate multiple splicing strategies based on the migration experience of each candidate task, the current historical correlation index of the migration experience of each candidate task, and the task to be optimized; then, calculate the correlation index of the migration experience of the corresponding candidate task based on the stability component and evaluation increment of the splicing strategy, thereby obtaining the current correlation index of the migration experience of each candidate task.

[0051] Here, the concatenation strategy is the input parameter of the first language model, or it can be the scheme adopted by the first language model to generate and optimize the target program when processing the current task to be optimized; the effect stability component represents the stability of the optimization effect of the candidate task transfer experience corresponding to the concatenation strategy on the task to be optimized, which can be determined based on the candidate task transfer experience corresponding to the concatenation strategy; the evaluation increment represents the gain of the candidate task transfer experience corresponding to the concatenation strategy applied to the task to be optimized, which can be determined based on the score value of the candidate program output by the corresponding concatenation strategy in the first language model.

[0052] Step S30: Based on the current relevance index of the migration experience of each candidate task, determine the migration experience of the target task and the target relevance index of the migration experience of the target task.

[0053] In this embodiment, after obtaining the current relevance index of each candidate task migration experience, when the current relevance index of each candidate task migration experience meets the preset stopping iteration condition, the candidate task migration experience is determined as the target task migration experience, and its corresponding current relevance index is determined as the target relevance index of the target task migration experience.

[0054] Step S40: Based on the target relevance index, the target task migration experience, and the task to be optimized, the target program of the task to be optimized is obtained through the first large language model.

[0055] In this embodiment, a target concatenation strategy corresponding to the target task migration experience can be generated based on the target task migration experience, the target relevance index corresponding to the target task migration experience, and the task to be optimized. The generated target concatenation strategies are then input into the first large language model to obtain candidate target programs. Based on the candidate target programs and the evaluation function, one of the multiple candidate target programs is determined as the target program. Specifically, the evaluation score of each candidate target program can be calculated using the evaluation function in the task to be optimized, and one of the multiple candidate target programs is determined as the target program for the task to be optimized based on the obtained evaluation score. After obtaining the target program, the task to be optimized becomes an optimized task.

[0056] Through steps S20 to S40 above, on the one hand, the task transfer experience of completed tasks can be used for the current task to be optimized. On the other hand, the correlation index can be used as a unified quantitative index for the transfer experience of each candidate task. By calculating the correlation index to obtain the target task transfer experience and the target correlation index of the target task transfer experience, negative transfer can be actively avoided. The adaptability of each candidate task transfer experience can be quantified and iteratively updated, thereby effectively improving the accuracy of task transfer experience reuse in cross-task scenarios of large language models, making the optimization process of the task to be optimized more complete and accurate, and the target program obtained is more in line with the optimization requirements.

[0057] In one feasible implementation, refer to Figure 2 Step S10 includes steps S11 to S14.

[0058] Step S11: Calculate the task description similarity between the task to be optimized and each task migration experience in the preset experience library, and determine a first experience set based on the task description similarity. The first experience set includes multiple first task migration experiences, which are determined from the preset experience library based on the task description similarity.

[0059] Task description similarity represents the semantic similarity between the task description of the task to be optimized and the task description of an optimized task corresponding to a task migration experience. The task description similarity between the task to be optimized and each task migration experience in the preset experience base is calculated using text vectorization and cosine similarity retrieval techniques. The calculated task description similarities are then sorted from high to low. The first number of task migration experiences ranked highest in task description similarity are designated as the first experience set, which contains a first number of first task migration experiences, where the first number can be H.

[0060] Step S12: Calculate the applicability similarity between the task to be optimized and each first task migration experience in the first experience set, and determine a second experience set based on the applicability similarity, wherein the second experience set includes multiple second task migration experiences, and the second task migration experiences are determined from the first experience set based on the applicability similarity.

[0061] The applicability similarity characterizes the semantic similarity between the constraints of the task to be optimized and the applicability of the first task transfer experience. The applicability similarity between the task to be optimized and each first task transfer experience in the first experience set is calculated using text vectorization and cosine similarity retrieval techniques. The calculated applicability similarities are then sorted from high to low. The second number of first task transfer experiences with the highest applicability similarity are considered as the second experience set, where the second experience set contains a second number of second task transfer experiences, where the second number is J, and J ≤ H.

[0062] The second quantity can be the maximum number of candidate task migration experiences that can be retrieved from the preset experience base in each iteration, determined by system configuration or based on the search budget.

[0063] Step S13: Determine the comprehensive matching score of each second task migration experience based on the task description similarity, applicable condition similarity, status label, current historical relevance index and update time.

[0064] Based on the experience number of the second task migration experience in the second experience set, obtain the corresponding status tag, current relevance index, and update time.

[0065] The similarity of task descriptions, similarity of applicable conditions, status markers, current historical relevance indicators, and update time are weighted and summed to obtain the comprehensive matching score of the corresponding second task migration experience. The current historical relevance indicator is the most recently updated historical relevance indicator among all historical relevance indicators stored in a preset experience base for candidate task migration experiences.

[0066] Step S14: Determine multiple candidate task migration experiences from the second experience set based on the comprehensive matching score.

[0067] The second task migration experiences in the second experience set are arranged in descending order of comprehensive matching score. The top K second task migration experiences with the highest comprehensive matching scores are selected as multiple candidate task migration experiences for task matching to be optimized, thus obtaining a candidate experience list. The candidate task migration experiences in the candidate experience list are sorted in descending order of comprehensive matching score.

[0068] In this embodiment, the above method can accurately filter out the list of candidate experiences applicable to the task to be optimized from the preset experience base.

[0069] In other embodiments, the matching score can be determined directly based on the similarity of task description, similarity of applicable conditions, status flag, current historical relevance index and update time of each task migration experience in the preset experience base. The task migration experiences are sorted from high to low according to the matching scores, and the a task migration experiences with the highest matching scores are used as multiple candidate task migration experiences for task matching to be optimized.

[0070] In one feasible implementation, refer to Figure 3 Step S20 includes steps S21 to S26.

[0071] Step S21: Construct a reference strategy based on the key parameters of the task to be optimized; In this embodiment, key parameters of the task to be optimized are obtained, including task description, constraints, and evaluation function. A reference strategy is constructed based on the key parameters of the task to be optimized and the input and output formats of the first large language model. Specifically, the task description, constraints, evaluation function, and the input and output formats of the first large language model are combined to obtain the reference strategy.

[0072] This reference strategy does not include any information about candidate task migration experience. It serves as a reference scheme when there is no task migration experience to intervene, and can also be used as a hint for the task to be optimized to generate optimization tasks through the first major language model.

[0073] Step S22: Generate multiple splicing strategies based on the reference strategy and the current historical relevance indicators of the migration experience of each candidate task; In this embodiment, multiple splicing strategies are generated based on a reference strategy, the current historical relevance index of each candidate task migration experience, and the experience text of the candidate task migration experience. Specifically, when the current historical relevance index of each candidate task migration experience meets a set condition, the experience text of the corresponding candidate task migration experience is obtained and combined with the reference strategy as a splicing strategy, resulting in multiple splicing strategies. The number of splicing strategies is denoted as K1.

[0074] In this embodiment, an injection level is set for each candidate task migration experience based on the current historical relevance index and a first threshold; a splicing strategy is generated according to the reference strategy and the injection level of each candidate task migration experience.

[0075] The current historical relevance index of each candidate task migration experience meets the set conditions, including the current historical relevance index being greater than or equal to a first threshold. The step of setting the injection level for each candidate task migration experience based on its current historical relevance index and the first threshold includes: if the current historical relevance index of the candidate task migration experience is less than the first threshold (e.g., 0), the injection level of the candidate task migration experience is set to skip; if the current historical relevance index of the candidate task migration experience is greater than or equal to the first threshold, the injection level of the candidate task migration experience is set to inject. A skip level indicates that the candidate task migration experience is not used in the current task optimization iteration, indicating that the candidate task migration experience is weakly or unrelated to the current task to be optimized; an inject level indicates that the candidate task migration experience is applied to optimize the current task to be optimized in the current task optimization iteration, indicating that the candidate task migration experience is strongly related to the current task to be optimized. Since the injection level determines the text strength and injection position of the candidate task migration experience in the concatenation strategy, the influence of the candidate task migration experience on the candidate programs generated by the first large language model can be controlled.

[0076] The step of generating a splicing strategy based on the reference strategy and the injection file of each candidate task migration experience includes: if the injection file of the candidate task migration experience is an injection file, then the reference strategy and the experience text of the candidate task migration experience are combined to obtain a splicing strategy.

[0077] If the injection level of the candidate task migration experience is skipped, then the candidate task migration experience will not participate in this task optimization iteration, its status will be updated to unavailable, and it will be put back into the preset experience library.

[0078] Step S23: Calculate the evaluation increment of each splicing strategy using the first large language model, using the reference strategy and each splicing strategy respectively. The evaluation increment represents the gain of applying the candidate task migration experience corresponding to the splicing strategy to the task to be optimized.

[0079] In this embodiment, the process of calculating the evaluation increment of each splicing strategy is as follows: each splicing strategy is input into the first large language model to generate a first candidate program, and each first candidate program is evaluated by the evaluation function of the task to be optimized to obtain an evaluation score; the reference strategy is input into the first large language model to generate a reference program, and the reference program is evaluated by the evaluation function to obtain a reference score; the reference score and each evaluation score are compared to obtain the evaluation increment of each splicing strategy.

[0080] Specifically, the evaluation increment for each splicing strategy is determined based on the difference or ratio between the evaluation score and the reference score.

[0081] The evaluation increment determined in the above manner can accurately characterize the gain of the splicing strategy that applies candidate task transfer experience in the task to be optimized compared with the reference strategy that does not apply the candidate task transfer experience, thereby further improving the accuracy of the large language model in reusing task transfer experience in cross-task scenarios.

[0082] Step S24: Obtain the splicing candidate task migration experience based on the candidate task migration experience corresponding to the splicing strategy; Step S25: Calculate the effect stability component based on the reference strategy, each of the splicing strategies, and each of the splicing candidate task migration experiences. The effect stability component represents the degree of influence of the splicing candidate task migration experience on the target program for generating the task to be optimized. In this embodiment, step S25 includes steps S251 to S254: Step S251: The migration experience of each of the splicing candidate tasks is used to construct the migration experience of the perturbation task through the second language model.

[0083] In this embodiment, the experience text of the concatenated candidate task migration experience is processed by the second large language model to obtain a first type of perturbation experience text, a second type of perturbation experience text, and a third type of perturbation experience text. A first type of perturbation task migration experience is generated based on the experience text of the concatenated candidate task migration experience and the first type of perturbation experience text. A second type of perturbation task migration experience is generated based on the experience text of the concatenated candidate task migration experience and the second type of perturbation experience text. A third type of perturbation task migration experience is generated based on the experience text of the concatenated candidate task migration experience and the third type of perturbation experience text. Based on the first type of perturbation task migration experience, the second type of perturbation task migration experience, and the third type of perturbation task migration experience, the perturbation task migration experience of the concatenated candidate task migration experience is obtained, wherein each perturbation task migration experience contains one perturbation experience text, and each type of perturbation experience text corresponds to one type of perturbation task migration experience.

[0084] Each perturbation task transfer experience includes at least a sample number, the corresponding experience number of the concatenated candidate task transfer experience, the perturbation experience text, and the perturbation type. Each perturbation task transfer experience is arranged in the order of the concatenated candidate task transfer experiences, ensuring the reproducibility of the row order in the subsequent action feature matrix. There is a one-to-one correspondence between the concatenated candidate task transfer experiences and the perturbation task transfer experiences. This one-to-one correspondence means that there is a corresponding relationship between the concatenated candidate task transfer experiences and the perturbation task transfer experiences; one concatenated candidate task transfer experience corresponds to one perturbation task transfer experience.

[0085] The second largest language model is the lightweight large language model, such as GPT-4.1-mini.

[0086] In this embodiment, the experience text of the concatenated candidate task transfer experience is processed using the second large language model to obtain three types of perturbation experience text. Specifically, the second large language model is used to delete key phrases from the experience text of the concatenated candidate task transfer experience to obtain the corresponding first type of perturbation experience text; the second large language model is used to replace the algorithm names in the experience text of the concatenated candidate task transfer experience with synonyms to obtain the corresponding second type of perturbation experience text; and the second large language model is used to describe the identifiers of programming languages ​​in the experience text of the concatenated candidate task transfer experience with text to obtain the corresponding third type of perturbation experience text.

[0087] The second language model is used to delete key phrases from the experience text of the candidate task transfer experience to obtain the corresponding first-type perturbation experience text. Specifically, through dependency parsing, rule lexicon, or perturbation generation model structured extraction, the second language model identifies A key phrases (e.g., verb-object phrases, predicate phrases, step phrases, etc.) representing the core operation in the experience text of the candidate task transfer experience. Then, one phrase is deleted sequentially according to its order of appearance in the experience text, resulting in A first-type perturbation experience texts. That is, only one key phrase is deleted at a time, not all A key phrases at once, to determine the impact of a single key phrase on the policy effect, thus obtaining one first-type perturbation experience text. For example, if the experience text of the candidate task transfer experience is "first establish a symmetrical grid, then fine-tune the overlapping position," deleting "fine-tune the overlapping position" yields "first establish a symmetrical grid," which serves to detect whether this key phrase is a key source of policy effectiveness.

[0088] The algorithm names in the experience text of the concatenated candidate task transfer experience are replaced with synonyms using the second language model to obtain the corresponding second-type perturbation experience text. Specifically, the second language model identifies B algorithm names in the experience text of the concatenated candidate task transfer experience, and each identified algorithm name is replaced with a synonym. The experience text of the concatenated candidate task transfer experience after replacing the algorithm names is taken as the second-type perturbation experience text (B). For example, if 5 algorithm names are identified in a concatenated candidate task transfer experience, each algorithm name is replaced in the order of identification to obtain 5 second-type perturbation experience texts. For example, "greedy" is replaced with "heuristic", "divide and conquer" is replaced with "recursive splitting", etc. The purpose is to detect whether the candidate task transfer experience applied to optimize the task to be optimized depends on specific terms.

[0089] The second language model is used to describe the identifiers of programming languages ​​in the experience text of the concatenated candidate task transfer experience, resulting in corresponding third-type perturbation experience text. Specifically, the second language model identifies C identifiers of programming languages ​​(e.g., specific programming language names, library function names, API names, and syntax keywords) in the experience text of the concatenated candidate task transfer experience. These C identifiers are then replaced one by one with task-level descriptions (textual descriptions). The resulting concatenated candidate task transfer experience text is then used as the third-type perturbation experience text, resulting in C third-type perturbation experience texts. For example, "maintain a min-heap using Python heapq" is rewritten as "maintain the current minimum candidate using a priority queue." This does not involve deleting all text containing programming language keywords, but rather generalizing the language implementation layer expression to a task-level description. Its purpose is to detect whether the candidate task transfer experience can maintain a stable effect regardless of the specific language expression.

[0090] Step S252: Generate a perturbation splicing strategy based on the migration experience of each perturbation task and the reference strategy.

[0091] The perturbation experience text of each perturbation task migration experience is combined with the reference strategy to obtain the corresponding perturbation splicing strategy.

[0092] Step S253: Calculate the effect feature matrix based on the splicing strategy and the perturbation splicing strategy.

[0093] In this embodiment, step S253 includes steps S2531 to S2534: Step S2531: Generate second candidate programs for each of the perturbation splicing strategies using the first large language model.

[0094] Step S2532: Construct a first abstract syntax tree and a second abstract syntax tree for each of the first candidate programs and the corresponding second candidate programs, respectively.

[0095] The first abstract syntax tree (AST) is obtained by constructing the corresponding abstract syntax tree for the first candidate program using frameworks such as Tree-Sitter (an incremental parser generation tool and parsing library). The second abstract syntax tree is obtained by constructing the corresponding abstract syntax tree (AST) for the second candidate program using frameworks such as Tree-Sitter.

[0096] Step S2533: Construct the abstract syntax tree difference set by comparing the first abstract syntax tree and the corresponding second abstract syntax tree.

[0097] The first abstract syntax tree (AST) and its corresponding second AST are compared by node differences to obtain the AST difference set, which includes all differing nodes between the two ASTs. Parsers for languages ​​such as Tree-sitter, Python's ast module (a tool for converting code into a tree structure), and JavaParser (an open-source Java library that parses Java source code into ASTs) can be used to parse the AST and AST. The parsed ASTs are then compared using tree edit distance, node type, node path matching, and statement-level structure hashing to identify the differing nodes between them. Each concatenation strategy corresponds to a specific AST difference set.

[0098] Step S2534: Obtain the action feature matrix based on the difference set of the abstract syntax tree.

[0099] The difference set of abstract syntax trees is transformed into an action feature matrix. In the action feature matrix R, the i-th row and j-th column indicates that "the j-th node in the i-th second abstract syntax tree causes a change in the first abstract syntax tree". That is, R[i,j] = 1 indicates that the j-th node in the i-th second abstract syntax tree differs from the first abstract syntax tree, and R[i,j] = 0 indicates that there is no difference between them. Each difference set of abstract syntax trees corresponds to a specific action feature matrix.

[0100] The action feature matrix R does not directly determine the quality of the generated first candidate program, but serves as input for subsequent calculation of action stability components and correlation indicators. It transforms the empirical text differences of task migration experience into computable program structure changes, thereby improving the quantification of the matching degree between the spliced ​​candidate task migration experience and the task to be optimized, and further improving the accuracy of the subsequently determined target program.

[0101] Step S254: Calculate the action stability component based on the action characteristic matrix and the normalized upper bound.

[0102] In this embodiment, the principal singular values ​​of the action feature matrix are first calculated, where the principal singular values ​​are the largest singular values ​​in the singular value decomposition of the action feature matrix; then, the action stability components are calculated based on the principal singular values ​​and the normalized upper bound.

[0103] In one application example, the principal singular value σ s Normalized upper bound σ max The relationship between Vs and the stability component is as follows: k )=clip(1-σ s ²(T k ) / σ max ²), where Vs(T) k ) represents the task T to be optimized. k The effect of the stability component, clip() means to reduce Vs(T) to a certain value. k The results are limited to the interval [0,1]. The larger the stability component, the smaller or more dispersed the change in the target program structure caused by the migration experience of the perturbation task relative to the migration experience of the splicing candidate task. The influence of the migration experience of the splicing candidate task on the target program of the task to be optimized is small. The closer the principal singular value is to the normalization upper bound, the more concentrated the change in the target program structure caused by the migration experience of the perturbation task relative to the migration experience of the splicing candidate task is, and the smaller the stability component.

[0104] Each action feature matrix corresponds to the calculation of an action stability component, and each of the above-mentioned splicing candidate task transfer experiences corresponds to the calculation of an action stability component.

[0105] The stability component determined by the above method can accurately characterize the degree of influence of the splicing candidate task transfer experience on the target program of the optimization task, which is conducive to further improving the accuracy of task transfer experience reuse in cross-task scenarios of large language models.

[0106] Step S26: Calculate the correlation index of the migration experience of the splicing candidate tasks based on the stability component and the evaluation increment, and obtain the current correlation index of the migration experience of each splicing candidate task.

[0107] In this embodiment, the correlation index of the migration experience of each splicing candidate task is calculated based on the stability component, the evaluation increment, and the current historical correlation index, so as to obtain the current correlation index of the migration experience of each splicing candidate task.

[0108] In this embodiment, by determining the evaluation increment and the stability component, the relevance index of the splicing candidate task transfer experience is updated. Task transfer experience with negative transfer effect can be accurately identified without relying on natural language similarity, thereby effectively improving the accuracy of task transfer experience reuse in cross-task scenarios of large language models.

[0109] In one feasible implementation, step S26 includes steps S261 to S263: Step S261: Obtain the latest historical correlation index of the splicing candidate task migration experience, and calculate the change in correlation index by decreasing step size based on the latest historical correlation index. The latest historical correlation index is the previous historical correlation index of the current historical correlation index of the splicing candidate task migration experience.

[0110] In this embodiment, the decreasing step size is determined based on the number of updates to the correlation index of the migration experience of the splicing candidate task, and the decreasing step size is negatively correlated with the number of updates; a first coefficient is determined based on the decreasing step size, and the change in the correlation index is calculated based on the first coefficient and the latest historical correlation index, wherein the first coefficient is negatively correlated with the decreasing step size.

[0111] In this embodiment, the decreasing step size η n = c / (n + n0), where n is the number of updates (i.e. the number of iterations), and c and n0 are both system default coefficients.

[0112] Based on this, the change Φ of the correlation index is calculated according to the following formula. s (n)': Φ s (n)'=(1-η n )·Φ s (n); Where, Φ s (n) represents the latest historical correlation index, (1-η) n ) is the first coefficient, and Φ does not exist during the first update. s When (n), the initial Φ can be preset. s (n)'.

[0113] Step S262: Calculate the verification value of the migration experience of the splicing candidate task based on the evaluation increment, the stability component, and the decreasing step size.

[0114] In this embodiment, the evaluation increment and the stability component are coupled and calculated to obtain the coupling result; based on the coupling result and the decreasing step size, the verification value of the migration experience of the splicing candidate task is obtained.

[0115] In this embodiment, the check value is calculated as follows: η n · [ sign(Δ s (n+1)) V s (T k )]; Where sign() is the sign function. This is a coupled multiplication operator, whose left-hand input is the evaluation increment Δ. s The sign function is (n+1), and the input on the right is the action stability component V. s (T k The calculation formula first checks whether the result of the symbolic function belongs to {-1,0,1}, and then checks whether the action stability component is located in [0,1]. When the above checks pass, it is calculated by scalar multiplication. Based on this, the verification value can ensure that the correlation index is always updated in the range of [-1,1].

[0116] Step S263: Calculate the correlation index of the migration experience of the splicing candidate task based on the change in the correlation index and the verification value, and obtain the current correlation index of the migration experience of each splicing candidate task.

[0117] The sum of the change in the correlation index and the verification value is determined as the current correlation index Φ for splicing candidate task migration experience. s (n+1) can be represented as: Φ s (n+1) =(1-η n )·Φ s (n) + η n ·[ sign(Δ s (n+1) V s (T k )]; It can also be expressed as: Φ s (n+1) =(1-η n )·Φ s (n) + η n ·[ sign(Δ s (n+1) clip(1-σ s ²(T k ) / σ max ², 0, 1).

[0118] In one possible implementation, step S30 includes steps S31 to S34.

[0119] Step S31: Update the current historical relevance index of the splicing candidate task migration experience according to the current relevance index of each splicing candidate task migration experience, wherein the historical relevance index includes the current relevance index.

[0120] The current relevance metric Φ of the experience in transferring splicing candidate tasks. s (n+1) Write back to the preset experience base, and update the current historical relevance index with the current relevance index. At this time, the historical relevance indexes of the splicing candidate task migration experience stored in the preset experience base are arranged in Φ order from earliest to latest update time. s (1), Φ s (2), ..., Φ s (n), Φ s (n+1), the current relevance index is the updated current historical relevance index, and the updated current historical relevance index is used as the current historical relevance index in the next task optimization iteration.

[0121] Step S32: Obtain a preset number of historical correlation indicators of the splicing candidate task migration experience.

[0122] In the updated preset experience base, a preset third number of historical relevance indicators are determined from all historical relevance indicators corresponding to the migration experience of the candidate splicing task. These indicators are closest to the updated current historical relevance indicator, thus obtaining a set of historical relevance indicators. The preset third number of historical relevance indicators are ordered sequentially in the set according to their update time from earliest to latest, and the last historical relevance indicator (the current historical relevance indicator) is the current relevance indicator. Each migration experience of the candidate splicing task corresponds to one set of historical relevance indicators.

[0123] Extract the latest fourth (e.g., M) relevance indicators from all historical relevance indicators of the splicing candidate task migration experience, i.e., Φ. s (n-M+2), ..., Φ s (n), Φ s (n+1) to obtain the set of historical correlation indicators.

[0124] Step S33: Set a sliding window for the preset number of historical correlation indicators to obtain the sliding result.

[0125] A sliding window is set in the set of historical correlation indicators. The sliding window length and sliding step size can be preset, such as N for the window length, L for the sliding step size, and M-N+L for the number of sliding windows. The sliding window moves through the set of historical correlation indicators in ascending order of their update time, with the preset sliding step size. Each historical correlation indicator in each sliding window is taken as the sliding result. For example, if M=3, N=2, L=1, and the number of sliding windows is 2, then the sliding result in the first sliding window is {Φ}. s (n+1), Φ s (n)}, the sliding result in the second sliding window is {Φ s (n), Φ s (n-1)}.

[0126] Step S34: Based on the sliding results, determine the target task migration experience and the target relevance index of the target task migration experience.

[0127] In this embodiment, if the sliding result meets the preset iteration condition, the current historical relevance index of the candidate task migration experience corresponding to the sliding result is updated according to the sliding result, and the execution steps S20 and S30 are returned until the target relevance index meets the preset stop iteration condition, and the target task migration experience and the target relevance index of the target task migration experience are determined.

[0128] Within a sliding window, the historical relevance index ranked higher among any two adjacent historical relevance indices is set as the first index, and the historical relevance index ranked lower is set as the second index. If, within the same sliding window, any second index is not higher than the first index, then the historical relevance index of the candidate task migration experience is determined to be monotonically decreasing. If, within the same sliding window, the minimum value among all historical relevance indices is lower than a second threshold, then the historical relevance index of the candidate task migration experience is determined to be low-relevance. If, within the same sliding window, the minimum value among all historical relevance indices is not lower than the second threshold, then the historical relevance index of the candidate task migration experience is determined to be high-relevance. Based on this, the preset iteration conditions satisfied by the sliding result include at least one of the following: within any sliding window, the historical relevance index of the candidate task migration experience is neither monotonically decreasing nor highly correlated.

[0129] The preset stopping iteration conditions include at least one of the following: when the number of candidate task migration experiences is greater than or equal to the maximum number, which can be determined according to the search budget of the task to be optimized; when the target relevance index of the spliced ​​candidate task migration experiences is less than a third threshold; when the difference between the latest historical relevance index and the target relevance index of any one of the spliced ​​candidate task migration experiences is less than a fourth threshold.

[0130] When the sliding result meets the preset iteration conditions, at least one corresponding splicing candidate task migration experience is obtained and used as the target task migration experience, the number of which is denoted as K2; all target task migration experiences are used as multiple candidate task migration experiences for the next task optimization iteration of the task to be optimized.

[0131] In this embodiment, steady-state convergence is achieved by recursively updating the correlation index in a decreasing step size manner. Each iteration only needs to use the correlation index obtained in the previous iteration, the stability component of the current iteration, and the evaluation increment. There is no need to re-statisticate the entire history, so that the long-running program evolution system can still maintain the task migration experience state at a low cost, simplify the computational complexity of the task migration process, and improve the accuracy of task migration experience reuse through steady-state convergence.

[0132] In one feasible implementation, step S34 further includes: if the sliding result does not meet the preset iteration conditions, then the splicing candidate task migration experience corresponding to the sliding result is isolated to obtain isolated candidate task migration experience; the target relevance index is recalculated for the isolated candidate task migration experience to obtain the isolation update index; if the isolation update index meets the preset iteration conditions, then the current historical relevance index of the candidate task migration experience corresponding to the sliding result is updated according to the isolation update index, and steps S20 and S30 are returned until the target relevance index meets the preset stop iteration conditions, and the target task migration experience and the target relevance index of the target task migration experience are determined.

[0133] In this embodiment, the sliding result does not meet the preset iteration conditions including at least one of the following: the historical correlation index of the migration experience of the splicing candidate task decreases monotonically or has low correlation within any window.

[0134] At least one candidate task migration experience whose sliding result does not meet the preset iteration conditions is designated as an isolated candidate task migration experience, and its number is denoted as K3. An isolation zone can be set in the preset experience library to isolate the isolated candidate task migration experiences, and the status flag of the isolated candidate task migration experiences is set to isolated, and participation in the next task optimization iteration is suspended.

[0135] After isolating the migration experience of the isolated candidate task, the target relevance index can be recalculated to obtain the isolation update index. The isolation period of the migration experience of the isolated candidate task is less than the total number of optimization iterations of the task to be optimized.

[0136] The process of recalculating the target relevance index based on the migration experience of the isolated candidate tasks to obtain the isolation update index is as follows: update the preset experience base according to the migration experience of the isolated candidate tasks, and return to execute steps S10 to S30, using the target relevance index obtained in step S30 as the isolation update index.

[0137] Specifically, firstly, the isolated candidate task migration experience is put back into the preset experience library and its status is updated to unavailable; then, step S10 is executed to redetermine multiple candidate task migration experiences, the number of which is recorded as K4; then, steps S20 and S30 are executed to redetermine at least one target task migration experience that meets the preset iteration conditions and the target relevance index of the target task migration experience, the number of redetermined target task migration experiences is recorded as K5; finally, the target relevance index of the re-output target task migration experience is used as the isolation update index, and the current historical relevance index of its corresponding candidate task migration experience is updated according to the isolation update index; at this time, the status of the re-obtained target task migration experience can be marked as available, and it can be re-enabled for optimization iteration. In the first optimization iteration after re-enabled, its injection level is set to injection level, that is, the K5 re-obtained target task migration experiences are used as candidate task migration experiences in the next optimization iteration.

[0138] In this embodiment, the migration experience of isolated candidate tasks is re-evaluated after the isolation period ends, and the isolated candidate task migration experience is reactivated when the preset iteration conditions are met. This helps to reduce the impact of negative migration experience on the task migration process and further improves the accuracy of task migration experience reuse.

[0139] In one feasible implementation, step S40 includes: determining candidate target task migration experiences based on the comprehensive matching score of the target task migration experience, obtaining candidate target programs based on the candidate target task migration experiences and the task to be optimized through the first large language model; calculating the evaluation score of the candidate target programs through an evaluation function, and obtaining the target program of the task to be optimized based on the evaluation score.

[0140] The comprehensive matching score for the target task migration experience here is the comprehensive matching score determined in steps S11 to S13 above.

[0141] The steps for determining candidate target task migration experiences based on the comprehensive matching score include: sorting all target task migration experiences from high to low according to the comprehensive matching score, and selecting the target task migration experiences with the highest comprehensive matching scores as candidate target task migration experiences, the number of which is denoted as K6.

[0142] The specific steps for obtaining candidate target programs based on the candidate target task migration experience and the task to be optimized through the first large language model include: determining the corresponding injection level based on the current historical relevance index and a first threshold of the candidate target task migration experience; if the injection level of the candidate target task migration experience is an injection level, then combining the candidate target task migration experience with the reference strategy constructed corresponding to the key parameters of the task to be optimized to obtain the corresponding target splicing strategy; inputting each target splicing strategy into the first large language model to obtain multiple candidate target programs. Each target splicing strategy corresponds one-to-one with a candidate target program. The process of determining the injection level of the candidate target task migration experience and the process of determining the target splicing strategy can be analogous to step S22 above, and will not be elaborated here.

[0143] The evaluation score of each candidate target program is calculated using the evaluation function of the task to be optimized, and the candidate target program with the highest evaluation score is selected as the target program.

[0144] In this embodiment, it is beneficial to further improve the accuracy of the determined target program, thereby effectively improving the accuracy of the large language model in reusing task transfer experience in cross-task scenarios.

[0145] This application also provides a task migration system, referring to... Figure 4 The task migration system includes: The experience retrieval module 1000 is used to obtain the task to be optimized and determine multiple candidate task migration experiences from a preset experience library based on the task to be optimized, wherein the preset experience library contains multiple task migration experiences. The indicator calculation module 2000 is used to calculate the correlation index of each candidate task migration experience based on the task to be optimized, the migration experience of each candidate task, and the current historical correlation index of each candidate task migration experience, so as to obtain the target task migration experience and the target correlation index of the target task migration experience. The experience and indicator confirmation module 3000 is used to determine the target task migration experience and the target relevance indicator of the target task migration experience based on the current relevance indicator of the migration experience of each candidate task. The decision module 4000 is used to obtain the target program of the task to be optimized through the first large language model based on the target relevance index, the target task migration experience, and the task to be optimized.

[0146] In this embodiment, the implementation of each module in the task migration system can be carried out with reference to the above steps S10-S40, and will not be repeated here.

[0147] In this embodiment, refer to Figure 5The task migration system may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1002 or loaded from storage device 1003 into random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the task migration system. The processing device 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input device 1007; output device 1008; storage device 1003; and communication device 1009. Communication device 1009 allows the task migration system to exchange data via wireless or wired communication with other devices.

[0148] The task migration system provided in this application, employing the task migration method described in the above embodiments, can solve the technical problem of how to improve the accuracy of task migration experience reuse in cross-task scenarios for large language models. Compared with the prior art, the beneficial effects of the task migration system provided in this application are the same as those of the task migration method provided in the above embodiments, and other technical features of this task migration system are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0149] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0150] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the task migration method described in the above embodiments.

[0151] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium. The aforementioned computer-readable storage medium may be included in a task migration system; or it may exist independently and not assembled into a task migration system.

[0152] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the task migration system, the task migration system implements the task migration method provided in the above embodiments and achieves the same beneficial effects, which will not be elaborated here.

[0153] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described task migration method. This addresses the technical problem of improving the accuracy of task migration experience reuse in cross-task scenarios using large language models. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the task migration method provided in the above embodiments, and will not be elaborated upon here.

[0154] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the task migration method described above.

[0155] The computer program product provided in this application can solve the technical problem of how to improve the reuse of task migration experience in cross-task scenarios for large language models. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the task migration method provided in the above embodiments, and will not be repeated here.

[0156] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A task transfer method applied to a first-largest language model, characterized in that, The task migration method includes the following steps: Obtain the task to be optimized, and determine multiple candidate task migration experiences from a preset experience base based on the task to be optimized, wherein the preset experience base contains multiple task migration experiences; Based on the task to be optimized, the migration experience of each candidate task, and the current historical relevance index of the migration experience of each candidate task, the relevance index of the migration experience of each candidate task is calculated to obtain the current relevance index of the migration experience of each candidate task. The current historical relevance index is the latest updated relevance index among all historical relevance indices of the migration experience of the candidate task stored in the preset experience base. Based on the current relevance index of the migration experience of each candidate task, the migration experience of the target task and the target relevance index of the migration experience of the target task are determined. Based on the target relevance index, the target task migration experience, and the task to be optimized, the target program of the task to be optimized is obtained through the first large language model.

2. The task migration method as described in claim 1, characterized in that, The steps of obtaining the task to be optimized and determining multiple candidate task migration experiences from a preset experience base based on the task to be optimized include: Calculate the task description similarity between the task to be optimized and each task migration experience in the preset experience base, and determine a first experience set based on the task description similarity. The first experience set includes multiple first task migration experiences, which are determined from the preset experience base based on the task description similarity. Calculate the applicability similarity between the task to be optimized and each first task migration experience in the first experience set, and determine a second experience set based on the applicability similarity, wherein the second experience set includes multiple second task migration experiences, and the second task migration experiences are determined from the first experience set based on the applicability similarity. The comprehensive matching score for each second task migration experience is determined based on the task description similarity, applicable condition similarity, status flag, current historical relevance index, and update time. Multiple candidate task migration experiences are determined from the second experience set based on the comprehensive matching score.

3. The task migration method as described in claim 1, characterized in that, The step of calculating the correlation index of each candidate task's migration experience based on the task to be optimized, the migration experience of each candidate task, and the current historical correlation index of each candidate task's migration experience, and obtaining the current correlation index of each candidate task's migration experience, includes: A reference strategy is constructed based on the key parameters of the task to be optimized. Multiple splicing strategies are generated based on the reference strategy and the current historical relevance indicators of the migration experience of each candidate task; The evaluation increment of each splicing strategy is calculated using the first large language model, along with the reference strategy and each splicing strategy. Based on the candidate task migration experience corresponding to the splicing strategy, the splicing candidate task migration experience is obtained; The effect stability component is calculated based on the reference strategy, each of the splicing strategies, and each of the splicing candidate task migration experiences. The effect stability component represents the degree of influence of the splicing candidate task migration experience on the target program that generates the task to be optimized. The correlation index of the migration experience of each splicing candidate task is calculated based on the stability component and the evaluation increment, and the current correlation index of the migration experience of each splicing candidate task is obtained.

4. The task migration method as described in claim 3, characterized in that, The steps for constructing a reference strategy based on the key parameters of the task to be optimized include: Obtain the key parameters of the task to be optimized, wherein the key parameters include task description, constraints, and evaluation function; A reference strategy is constructed based on the key parameters of the task to be optimized and the input and output formats of the first large language model.

5. The task migration method as described in claim 3, characterized in that, The step of generating multiple stitching strategies based on the reference strategy and the current historical relevance indicators of the migration experience of each candidate task includes: Based on the current historical relevance index and the first threshold of the migration experience of each candidate task, an injection level is set for the migration experience of each candidate task. A splicing strategy is generated based on the reference strategy and the injection points of the migration experience of each candidate task.

6. The task migration method as described in claim 5, characterized in that, The step of setting an injection level for each candidate task migration experience based on the current historical relevance index and a first threshold includes: If the current historical relevance index of the candidate task migration experience is less than the first threshold, the injection level of the candidate task migration experience is set to skip level. If the current historical relevance index of the candidate task migration experience is greater than or equal to the first threshold, the injection level of the candidate task migration experience is set as the injection level.

7. The task migration method as described in claim 6, characterized in that, The step of generating a splicing strategy based on the reference strategy and the injection points of each candidate task migration experience includes: If the injection file of the candidate task migration experience is an injection file, then the reference strategy and the experience text of the candidate task migration experience are combined to obtain a splicing strategy.

8. The task migration method as described in claim 3, characterized in that, The step of calculating the evaluation increment of each concatenation strategy using the reference strategy and each concatenation strategy through the first large language model includes: Each of the splicing strategies is input into the first large language model to generate a first candidate program, and each first candidate program is evaluated by an evaluation function to obtain an evaluation score; The reference strategy is input into the first large language model to generate a reference program, and the reference program is evaluated by the evaluation function to obtain a reference score; By comparing the reference score with each of the evaluation scores, the evaluation increment for each splicing strategy is obtained.

9. The task migration method as described in claim 3, characterized in that, The step of calculating the effect stability component based on the reference strategy, each of the splicing strategies, and each of the splicing candidate task migration experience includes: The migration experience of each of the splicing candidate tasks is used to construct the migration experience of the perturbation task through the second language model; A perturbation stitching strategy is generated based on the migration experience of each perturbation task and the reference strategy. The effect feature matrix is ​​calculated based on the splicing strategy and the perturbation splicing strategy; The action stability components are calculated based on the action characteristic matrix and the normalized upper bound.

10. The task migration method as described in claim 9, characterized in that, The step of constructing perturbation task transfer experience from each of the concatenated candidate task transfer experiences using the second large language model includes: The second language model is used to process the experience text of the splicing candidate task transfer experience to obtain the first type of perturbation experience text, the second type of perturbation experience text and the third type of perturbation experience text respectively. The first type of perturbation task migration experience is generated based on the experience text of the spliced ​​candidate task migration experience and the first type of perturbation experience text. The second type of perturbation task migration experience is generated based on the experience text of the spliced ​​candidate task migration experience and the experience text of the second type of perturbation. The third type of perturbation task migration experience is generated based on the experience text of the spliced ​​candidate task migration experience and the experience text of the third type of perturbation. Based on the migration experience of the first type of perturbation task, the migration experience of the second type of perturbation task, and the migration experience of the third type of perturbation task, the perturbation task migration experience of the splicing candidate task is obtained.

11. The task migration method as described in claim 10, characterized in that, The step of processing the empirical text of the concatenation candidate task transfer experience through the second large language model to obtain the first type of perturbation empirical text, the second type of perturbation empirical text, and the third type of perturbation empirical text includes: The key phrases in the experience text of the splicing candidate task migration experience are deleted by the second language model to obtain the corresponding first type of perturbation experience text. The algorithm name in the experience text of the concatenated candidate task migration experience is replaced with a synonym by the second language model to obtain the corresponding second type of perturbation experience text. The second major language model is used to describe the identifiers of the programming language in the experience text of the concatenated candidate task migration experience in textual description, thereby obtaining the corresponding third type of perturbation experience text.

12. The task migration method as described in claim 9, characterized in that, The step of calculating the effect feature matrix based on the splicing strategy and the perturbation splicing strategy includes: Each of the aforementioned perturbation splicing strategies is used to generate a second candidate program through the first large language model; Construct a first abstract syntax tree and a second abstract syntax tree for each of the first candidate programs and each of the corresponding second candidate programs; By comparing the first abstract syntax tree and the corresponding second abstract syntax tree, an abstract syntax tree difference set is constructed. The action feature matrix is ​​obtained from the difference set of the abstract syntax tree.

13. The task migration method as described in claim 9, characterized in that, The step of calculating the action stability components based on the action characteristic matrix and the normalized upper bound includes: Calculate the principal singular values ​​of the action feature matrix; The action stability component is calculated based on the principal singular value and the normalized upper bound.

14. The task migration method as described in claim 3, characterized in that, The step of calculating the correlation index of the migration experience of each candidate splicing task based on the stability component and the evaluation increment, and obtaining the current correlation index of the migration experience of each candidate splicing task, includes: Obtain the latest historical correlation index of the splicing candidate task migration experience, and calculate the change in correlation index by decreasing step size based on the latest historical correlation index. The latest historical correlation index is the previous historical correlation index of the current historical correlation index of the splicing candidate task migration experience. The verification value of the migration experience of the splicing candidate task is calculated based on the evaluation increment, the stability component of the action, and the decreasing step size; Based on the change in the correlation index and the verification value, the correlation index of the migration experience of each splicing candidate task is calculated to obtain the current correlation index of the migration experience of each splicing candidate task.

15. The task migration method as described in claim 14, characterized in that, The step of calculating the change in the correlation index based on the latest historical correlation index by decreasing the step size includes: The decreasing step size is determined based on the number of updates to the correlation index of the migration experience of the splicing candidate tasks, and the decreasing step size is negatively correlated with the number of updates; A first coefficient is determined based on the decreasing step size, and the change in the correlation index is calculated based on the first coefficient and the latest historical correlation index, wherein the first coefficient is negatively correlated with the decreasing step size.

16. The task migration method as described in claim 14, characterized in that, The step of calculating the verification value of the migration experience of the splicing candidate task based on the evaluation increment, the action stability component, and the decreasing step size includes: The evaluation increment and the stability component of the effect are coupled and calculated to obtain the coupling result; Based on the coupling result and the decreasing step size, the verification value of the migration experience of the splicing candidate task is obtained.

17. The task migration method as described in claim 3, characterized in that, The step of determining the target task migration experience and the target relevance index of the target task migration experience based on the current relevance index of each candidate task migration experience includes: The current historical relevance index of the splicing candidate task migration experience is updated based on the current relevance index of each splicing candidate task migration experience, wherein the historical relevance index includes the current relevance index. Obtain a preset number of historical correlation indicators of the migration experience of the splicing candidate tasks; Set a sliding window for the preset number of historical correlation indicators to obtain the sliding result; Based on the sliding results, the target migration experience and the target relevance index of the target migration experience are determined.

18. The task migration method as described in claim 17, characterized in that, The step of determining the target migration experience and the target relevance index of the target migration experience based on the sliding result includes: If the sliding result satisfies the preset iteration condition, then the current historical relevance index of the candidate task migration experience corresponding to the sliding result is updated according to the sliding result, and the process of calculating the relevance index of each candidate task migration experience based on the task to be optimized, each candidate task migration experience, and the current historical relevance index of each candidate task migration experience is returned to be executed, so as to obtain the current relevance index of each candidate task migration experience; the step of determining the target task migration experience and the target relevance index of the target task migration experience based on the current relevance index of each candidate task migration experience is continued until the target relevance index satisfies the preset stop iteration condition, and the target task migration experience and the target relevance index of the target task migration experience are determined.

19. The task migration method as described in claim 17, characterized in that, The step of determining the target task migration experience and the target relevance index of the target task migration experience based on the sliding result further includes: If the sliding result does not meet the preset iteration conditions, the migration experience of the splicing candidate task corresponding to the sliding result is isolated to obtain the migration experience of the isolated candidate task. The target relevance index is recalculated based on the migration experience of the isolated candidate tasks to obtain the isolation update index; If the isolation update metric meets the preset iteration condition, then the current historical relevance metric of the candidate task migration experience corresponding to the sliding result is updated according to the isolation update metric, and the process of calculating the relevance metric of each candidate task migration experience based on the task to be optimized, each candidate task migration experience, and the current historical relevance metric of each candidate task migration experience is returned to be executed, so as to obtain the current relevance metric of each candidate task migration experience; the step of determining the target task migration experience and the target relevance metric of the target task migration experience based on the current relevance metric of each candidate task migration experience is continued until the target relevance metric meets the preset stop iteration condition, and the target task migration experience and the target relevance metric of the target task migration experience are determined.

20. The task migration method as described in claim 19, characterized in that, The step of recalculating the target relevance index based on the migration experience of the isolated candidate tasks to obtain the isolation update index includes: The process involves updating the preset experience base based on the migration experience of the isolated candidate tasks, returning to execute the step of obtaining the task to be optimized, and determining multiple candidate task migration experiences based on the task to be optimized; calculating the correlation index of each candidate task migration experience based on the task to be optimized, each candidate task migration experience, and the current historical correlation index of each candidate task migration experience, to obtain the current correlation index of each candidate task migration experience; determining the target task migration experience and the target correlation index of the target task migration experience based on the current correlation index of each candidate task migration experience, and using the target correlation index as the isolation update index.

21. The task migration method according to any one of claims 1-20, characterized in that, The step of obtaining the target program for the task to be optimized based on the target relevance index, the target task migration experience, and the task to be optimized through the first large language model includes: Obtain the comprehensive matching score of the target task migration experience, and determine the candidate target task migration experience based on the comprehensive matching score; Based on the migration experience of the candidate target tasks and the task to be optimized through the first large language model, candidate target programs are obtained; The evaluation score of the candidate target program is calculated using an evaluation function, and the target program of the task to be optimized is obtained based on the evaluation score.

22. A task migration system, characterized in that, The task migration system includes: An experience retrieval module is used to obtain the task to be optimized and determine multiple candidate task migration experiences from a preset experience library based on the task to be optimized, wherein the preset experience library contains multiple task migration experiences. The indicator calculation module is used to calculate the correlation index of each candidate task migration experience based on the task to be optimized, the migration experience of each candidate task, and the current historical correlation index of each candidate task migration experience, so as to obtain the current correlation index of each candidate task migration experience. The current historical correlation index is the latest updated correlation index of the candidate task migration experience stored in the preset experience base. The experience and indicator confirmation module is used to determine the target task migration experience and the target relevance indicator of the target task migration experience based on the current relevance indicator of the migration experience of each candidate task. The decision module is used to obtain the target program of the task to be optimized through the first large language model based on the target relevance index, the target task migration experience, and the task to be optimized.

23. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the task migration method as described in any one of claims 1 to 21.

24. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the task migration method as described in any one of claims 1 to 21.