Task execution method and device based on large model

By splitting task requirements and optimizing the program execution module, the large model module solves the problem of inaccurate execution in the existing technology in terms of logical reasoning and achieves more efficient task completion.

CN118519680APending Publication Date: 2024-08-20TSINGHUA UNIVERSITY
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202410682765.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-08-20

AI Technical Summary

Technical Problem

Existing large language models have flaws in logical reasoning capabilities and cannot accurately perform tasks, especially when precise logical calculations are required.

Method used

By inputting task requirements into the pre-built large model module for task splitting, combined with the program execution module to perform sub-tasks, and optimizing when the results do not meet the requirements, the knowledge-general analysis and code generation capabilities of the large model are integrated to achieve more accuracy. logical reasoning.

Benefits of technology

It improves the performance of logical reasoning based on large models, can better complete user tasks, and provides more accurate execution results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118519680A_ABST
    Figure CN118519680A_ABST
Patent Text Reader

Abstract

The invention provides a task execution method and device based on a large model, and the method comprises the steps: inputting an obtained task demand into a pre-constructed large model module, carrying out the task splitting based on the large model module according to the task demand, and obtaining at least one subtask; executing the subtasks based on the large model module and a pre-constructed program execution module connected with the large model module, and integrating execution results of the subtasks to obtain a first comprehensive result; and under the condition that the first comprehensive result does not meet the task requirement, optimizing the sub-task and / or the execution result of the sub-task based on the large model module to obtain a task execution result. According to the method, based on the large model module, the large model knowledge general analysis capability, the code generation capability and the computer code accurate execution capability are fused, large model-based logical reasoning with better performance is realized, and thus user tasks are better completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a task execution method and device based on a large model. Background Art

[0002] With the development of artificial intelligence, neural networks have been applied to all walks of life, especially in recent years, the development of large language models (LLM) has greatly improved the level of artificial intelligence. However, neural network models such as LLM have serious "hallucination" problems, that is, sometimes they will only output answers that look diverse and complete, but they do not conform to facts and logic. In addition, neural network models such as LLM do not have the ability of precise logical reasoning, which makes it impossible to accurately complete a precise program step by step. For example, in some LLM usage scenarios, it can easily generate code to complete a task, but may not be able to give an answer to a simple math problem. Traditional computer programs will execute accurately according to the process defined by the program, but they do not have the ability to generalize outside the scope of the program and the ability to use general knowledge.

[0003] In order to solve this problem and maximize the powerful combinatorial generalization ability of LLM, some studies have added reasonable guidance to the input. The process of how to design better input to guide the large model to get the desired output is called prompt engineering. Furthermore, a technology related to prompt engineering is called Chain of Thoughts (CoT). CoT and few-show prompting are both commonly used techniques for constructing LLM inputs. In addition, there are various prompting techniques that enable LLM to complete difficult tasks such as code generation. In addition, based on data sets in specific fields, LLM can also be trained to perform better on domain-specific tasks.

[0004] However, both prompting technology and training technology ultimately rely on the ability of LLM itself, that is, it still has problems such as "illusion" and inaccurate logical process. Although it has the ability to generate code, it does not have the ability to execute code as accurately as a computer.

[0005] In summary, the existing technology has the problem of poor logical reasoning ability. Summary of the invention

[0006] The present invention provides a task execution method and device based on a large model, which are used to solve the defect of poor logical reasoning ability in the prior art, and realize logical reasoning based on a large model with better performance, so as to better complete user tasks.

[0007] The present invention provides a task execution method based on a large model, comprising: Inputting the acquired task requirements into a pre-built large model module, splitting the task according to the task requirements based on the large model module to obtain at least one subtask; Executing the subtasks based on the large model module and a pre-built program execution module connected to the large model module and integrating the execution results of the subtasks to obtain a first comprehensive result; In the case where the first comprehensive result does not meet the task requirement, optimizing the subtasks and / or the execution results of the subtasks based on the large model module to obtain the task execution result; Wherein, the large model module includes at least one pre-trained large language model.

[0008] According to a large model-based task execution method provided by the present invention, the large model module is used to split the task according to the task requirements to obtain at least one subtask, which specifically includes: Analyze the process of completing the task requirements based on the large model module; According to the analysis result, the task requirement is split according to whether precise logic calculation is involved, so as to obtain precise logic calculation subtasks and other subtasks.

[0009] According to a task execution method based on a large model provided by the present invention, the large model module and the pre-built program execution module connected to the large model module execute the subtasks and integrate the execution results of the subtasks to obtain a first comprehensive result, which specifically includes: Generate an execution program code based on the large model module according to the precise logic calculation subtask, send the execution program code to the program execution module according to a pre-built program execution interface, and obtain the execution result of the precise logic calculation subtask according to the program execution interface; Execute the other subtasks based on the large model module to obtain execution results of the other subtasks; Based on the large model module, the execution result of the precise logic calculation subtask and the execution results of the other subtasks are integrated to obtain a first comprehensive result.

[0010] According to a large model-based task execution method provided by the present invention, the large language model is trained by a hybrid training method using a pre-constructed training data set based on a deep neural network; wherein the training data set includes a task splitting data set, a task classification data set and a program generation data set; the hybrid training includes a combination of one or more of task splitting training, task classification training, code generation or optimization training; wherein the task splitting training includes training based on a deep neural network using the task splitting data set using a preset training algorithm to learn the correspondence between the task requirement input and the output subtasks in the task splitting data set; the task classification training includes training based on a deep neural network using the task classification data set using a preset training algorithm to learn the correspondence between the subtasks input and the subtask classifications output in the task classification data set, and the code generation or optimization training includes training based on a deep neural network using the program generation data set using a preset training algorithm to learn the correspondence between the precise logical calculation subtasks input in the program generation data set and the output computer program.

[0011] According to a large model-based task execution method provided by the present invention, the execution program code is generated based on the large model module according to the precise logic calculation subtask, the execution program code is sent to the program execution module according to a pre-built program execution interface, and the execution result of the precise logic calculation subtask is obtained according to the program execution interface, which specifically includes: Generate a solution according to the precise logic calculation subtask based on the large model module, establish a simulation model for the scenario involved in the precise logic calculation subtask, and obtain a target task simulation model according to the solution and the simulation model; convert the target task simulation model into an execution program code based on the large model module, and send the execution program code to a program execution module according to a pre-built program execution interface; The precise logic calculation subtask execution result is obtained according to the program execution interface.

[0012] According to a large model-based task execution method provided by the present invention, the target task simulation model is converted into an execution program code based on the large model module, and the execution program code is sent to the program execution module according to a pre-built program execution interface, which also includes: The precise logic calculation subtasks are allocated to the agents based on the large model module.

[0013] According to a large model-based task execution method provided by the present invention, the program execution module includes executing a simulation program and / or at least one pre-trained large language model corresponding to an agent; Among them, the execution simulation program is used to simulate the execution program code, the agent and its corresponding large language model are used to generate the agent decision strategy according to the assigned precise logical calculation subtask, and assist the execution simulation program in simulation according to the agent decision strategy and the acquired environmental information.

[0014] The present invention also provides a task execution device based on a large model, comprising: A splitting unit, used for inputting the acquired task requirements into a pre-built large model module, and performing task splitting according to the task requirements based on the large model module to obtain at least one subtask; An execution unit, configured to execute the subtasks based on the large model module and a pre-built program execution module connected to the large model module and integrate the execution results of the subtasks to obtain a first comprehensive result; an optimization unit, configured to optimize the subtasks and / or the execution results of the subtasks based on the large model module to obtain a task execution result when the first comprehensive result does not meet the task requirement; Wherein, the large model module includes at least one pre-trained large language model.

[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the large model-based task execution methods described above.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the large model-based task execution methods described above.

[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned large model-based task execution methods.

[0018] The task execution method and device based on a large model provided by the present invention, by inputting the acquired task requirements into a pre-built large model module, splitting the task according to the task requirements based on the large model module to obtain at least one subtask; executing the subtask based on the large model module and the pre-built program execution module connected to the large model module and integrating the execution results of the subtask to obtain a first comprehensive result; in the case where the first comprehensive result does not meet the task requirements, optimizing the subtask and / or the execution results of the subtask based on the large model module to obtain the task execution result; wherein the large model module includes at least one pre-trained large language model. The present invention integrates the general analysis capability of large model knowledge, the code generation capability and the computer's precise code execution capability based on the large model module, thereby executing subtasks in a targeted manner, integrating the execution results and optimizing them when the task requirements are not met, and achieving better performance of logical reasoning based on the large model, thereby better completing user tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 This is one of the flow charts of the large model-based task execution method provided by the present invention.

[0021] Figure 2 This is the second flowchart of the large model-based task execution method provided by the present invention.

[0022] Figure 3 This is the third flow chart of the large model-based task execution method provided by the present invention.

[0023] Figure 4 This is the fourth flow chart of the large model-based task execution method provided by the present invention.

[0024] Figure 5 This is the fifth flow chart of the large model-based task execution method provided by the present invention.

[0025] Figure 6 This is the sixth flow chart of the large model-based task execution method provided by the present invention.

[0026] Figure 7 It is a structural schematic diagram of a task execution device based on a large model provided by the present invention.

[0027] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] Combine the following Figure 1-Figure 6 Describe the task execution method based on the large model of the present invention, such as Figure 1 As shown, the method includes step 110 , step 120 and step 130 .

[0030] Step 110: input the acquired task requirements into a pre-built large model module, and split the task according to the task requirements based on the large model module to obtain at least one subtask; It should be noted that the task requirement refers to the task requirement of the user. In response to the user inputting the task requirement into the large model module, the large model module splits the task according to the task requirement. It should be pointed out that the present invention does not limit the user's input method, which can be input in the form of text or voice.

[0031] Furthermore, the present invention does not limit the description form of the task requirements. In some embodiments, the task requirements are described in natural language.

[0032] It should be noted that the task splitting referred to in the present invention is carried out according to whether precise calculation or logic execution is required in the process of completing the task requirements. It should be emphasized that the precise calculation or logic execution referred to in the present invention includes mathematical calculation tasks, such as various linear and nonlinear calculations.

[0033] In some embodiments, the large model module is used to split the task according to the task requirements to obtain at least one subtask, specifically including: Analyze the process of completing the task requirements based on the large model module; According to the analysis result, the task requirement is split according to whether precise logic calculation is involved, so as to obtain precise logic calculation subtasks and other subtasks.

[0034] Specifically, the large model module first uses reasoning capabilities to analyze task requirements, understands task requirements input by users including those in natural language, and splits the process of completing task requirements into subtasks based on whether precise logical calculations are involved. Subtasks involving precise logical calculations are recorded as precise logical calculation subtasks, and subtasks not involving precise logical calculations are recorded as other subtasks.

[0035] It is understandable that for a task requirement, the process of completing it may not involve precise logic calculations, in which case the precise logic calculation subtask is empty. Naturally, it may also be all precise logic calculations, in which case the other subtasks are empty.

[0036] That is to say, splitting the task based on the large model module according to the task requirements to obtain at least one subtask can also be performed by the following steps: Analyze the process of completing the task requirements based on the large model module; If the process of completing the task involves precise calculation or logic execution, split the task into precise logic calculation subtasks and other subtasks; If the process of completing a task does not involve precise calculations or logical execution, define all tasks involved as other subtasks; If the process of completing a task involves precise calculation or logic execution, all the tasks involved are defined as precise logic calculation subtasks.

[0037] Step 120: executing the subtasks based on the large model module and the pre-built program execution module connected to the large model module and integrating the execution results of the subtasks to obtain a first comprehensive result; After splitting the task requirements, the large model module processes them according to the type of subtask. Specifically, the large model module uses its reasoning ability to execute other subtasks and obtain execution results. At the same time, it uses its programming ability to generate corresponding execution program codes according to the precise logical calculation subtask requirements and distributes them to the program execution module to obtain the program execution results. The large model module then combines the results of the precise execution of the program and the results obtained by the large model module for other subtasks to generate the first comprehensive result.

[0038] It should be pointed out that the program execution module is a collection of tools called by the large model module to better complete the task, including computers or machines with the ability to execute programs.

[0039] In some embodiments, the pre-built program execution module based on the large model module and connected to the large model module executes the subtask and integrates the execution results of the subtask to obtain a first comprehensive result, specifically including: generating an execution program code based on the large model module according to the precise logic calculation subtask, sending the execution program code to the program execution module according to the pre-built program execution interface, and obtaining the execution result of the precise logic calculation subtask according to the program execution interface; Execute the other subtasks based on the large model module to obtain execution results of the other subtasks; Based on the large model module, the execution result of the precise logic calculation subtask and the execution results of the other subtasks are integrated to obtain a first comprehensive result.

[0040] Specifically, Figure 2 As shown, the large model module (large language model) uses its own programming capabilities to generate corresponding execution program codes according to the requirements of the precise logical calculation subtask, and sends the execution program codes to the program execution module through the pre-built program execution interface that connects the large model module and the program execution module. The received execution program codes are executed by the program execution module, and the execution results of the precise logical calculation subtask are obtained and returned to the large model module.

[0041] It should be pointed out that the program execution interface is an interface for using a computer that is pre-built by the large model module.

[0042] At the same time, the large model module executes other subtasks and obtains the execution results of other subtasks. Then, the execution results of other subtasks are integrated with the execution results of the precise logic calculation subtask to obtain the first comprehensive result.

[0043] It should be further explained that the execution results of each subtask are sequentially fused according to the order of the subtasks. The specific fusion is generated inside the large language model, that is, the execution results of each subtask are connected in sequence based on natural language using the reasoning ability of the large language to output the first comprehensive result.

[0044] Furthermore, the first comprehensive result is compared with the task requirement to determine whether the first comprehensive result meets the task requirement.

[0045] Step 130: When the first comprehensive result does not meet the task requirement, the subtasks and / or the execution results of the subtasks are optimized based on the large model module to obtain the task execution result.

[0046] If it is not reached, the execution program code is modified based on the large model module, and the execution results of other subtasks are optimized until the task requirements are met. If the task requirements are met, the task execution ends.

[0047] During the reasoning process of the large model module, the user can design a corresponding prompt (such as CoT technology) to guide the LLM to complete the above process. In the case where the user has encapsulated the LLM application, a prompt can be added to indicate that the computer in the program execution module can be used to run the program, and a computer operation interface can be provided.

[0048] During this process, historical execution data can also be added to the training database of the large model module to train the large language model in the large model module.

[0049] In some embodiments, the program execution module includes an execution simulation program, wherein the execution simulation program is used to simulate the execution program code.

[0050] Based on the above embodiments, in some embodiments, generating an execution program code based on the large model module according to the precise logic calculation subtask, sending the execution program code to a program execution module according to a pre-built program execution interface, and obtaining the execution result of the precise logic calculation subtask according to the program execution interface specifically includes: Generate a solution according to the precise logic calculation subtask based on the large model module, establish a simulation model for the scenario involved in the precise logic calculation subtask, and obtain a target task simulation model according to the solution and the simulation model; convert the target task simulation model into an execution program code based on the large model module, and send the execution program code to a program execution module according to a pre-built program execution interface; The precise logic calculation subtask execution result is obtained according to the program execution interface.

[0051] Specifically, the precise logic calculation subtask executed by the computer can be a simulation based on the ABM model, that is, the program execution module is used to realize the simulation of the ABM model. That is, in the process of generating solutions, the system can verify the accuracy of the solution based on the simulation results of the ABM and further optimize the solution, that is, give the existing artificial intelligence system the ability to generate instant simulation. Figure 3 shown.

[0052] In the specific implementation process, the large model module first proposes a solution based on the requirements of the precise logic calculation subtask, and establishes an ABM simulation model for the scenario involved in the task, and integrates the solution into the model to obtain the target task simulation model. The large model module then uses its programming capabilities to convert the ABM model into execution program code and distributes it to the program execution module, and then obtains the ABM simulation results (i.e., the precise logic calculation subtask execution results) from the program execution module.

[0053] Then, a judgment is made as to whether the task requirements are met. It should be noted that in this case, if there are multiple subtasks, such as multiple precise logic calculation subtasks or other subtasks, it is still necessary to compare the first comprehensive result after integrating the execution results of other subtasks with the task requirements to determine whether the first comprehensive result meets the task requirements. If not, a solution is regenerated based on the large model module and the simulation model is modified according to the optimized solution, and the executable program is regenerated for simulation, while optimizing the execution results of other subtasks until the task requirements are met. If there is only one precise logic calculation subtask, the execution result of the precise logic calculation subtask is used to compare with the task requirements and make subsequent adjustments, which will not be elaborated in the present invention.

[0054] It should be pointed out that the large model module referred to in the embodiment of the present invention includes at least one pre-trained large language model (LLM).

[0055] In the above process, the user may not be aware that LLM uses a computer. That is, the user does not directly know that LLM generates a computer program, but LLM determines whether to generate a computer program and what kind of program to generate. In this case, the large language model needs to be trained to achieve the automation of task completion.

[0056] In some embodiments, the large language model is trained based on a deep neural network using a pre-constructed training data set using a hybrid training method; wherein the training data set includes a task splitting data set, a task classification data set and a program generation data set; the hybrid training includes a combination of one or more of task splitting training, task classification training, code generation or optimization training; wherein the task splitting training includes training based on a deep neural network using the task splitting data set using a preset training algorithm to learn the correspondence between the task requirement input and the output subtasks in the task splitting data set; the task classification training includes training based on a deep neural network using the task classification data set using a preset training algorithm to learn the correspondence between the subtasks input and the subtask classifications output in the task classification data set, and the code generation or optimization training includes training based on a deep neural network using the program generation data set using a preset training algorithm to learn the correspondence between the precise logical calculation subtasks input in the program generation data set and the output computer program.

[0057] Specifically, Figure 4As shown, the hybrid training method of the large language model included in the large model module referred to in the embodiment of the present invention includes three different trainings. Training 1 is task splitting training, which uses the total task description (task requirements)-subtask list sample data pairs stored in the task splitting data set, and uses a preset fine-tuning algorithm to perform training until the preset end condition is reached to obtain the first training result. Specifically, in the task splitting data set, the input of each sample is the total task description, and the output is the list of subtasks after splitting. The task splitting data set is used to enable the large language model to learn the correspondence between the input task requirement input and the output subtask, so as to complete the aforementioned task of "splitting the task based on the task requirement of the large model module to obtain at least one subtask", that is, the first training result after training can be split into at least one subtask according to different task requirement inputs. It should be noted that the data format of each group of samples included in the task splitting data set is <total task, list of subtasks after splitting>.

[0058] Furthermore, training 2 is task classification training, the purpose of which is to train the large model so that it can identify the part that can be accurately implemented by a computer from a subtask. It uses the subtask-subtask classification sample data pairs stored in the task classification data set, and uses the preset fine-tuning algorithm to train until the preset end condition is reached to obtain the second training result. Specifically, in the task classification data set, the input of each sample is a subtask, and the output is a subtask classification. The task classification data set is used to enable the large language model to learn the correspondence between the input subtask and the output subtask classification, so that the classification of precise logical calculation subtasks and other subtasks can be completed, that is, the task classification of the split subtasks can be performed. In a specific embodiment, the classification of subtasks is mainly divided into two categories, the first category is tasks that do not involve precise calculation / logical execution (represented as 0), and the second category is tasks that involve precise calculation / logical execution (represented as 1). Based on this, each group of data format of the samples included in the task classification data set is <task, 0 / 1>.

[0059] Furthermore, training 3 is a separate code generation / optimization training, that is, according to the description of the program generation task, a corresponding computer program is generated, which uses the subtask-subtask classification sample data pairs stored in the program generation data set, and uses the preset fine-tuning algorithm to train until the preset end condition is reached to obtain the third training result. Specifically, in the program generation data set, the input of each sample is a program generation subtask (precise logic calculation subtask), and the output is a computer program. The program generation data set is used to enable the large language model to learn the correspondence between the input precise logic calculation subtask and the output computer program, so that it can complete the task of "generating execution program code based on the large model module according to the precise logic calculation subtask", that is, it can generate a corresponding computer program according to the task description of precise calculation / logical execution as needed, so as to perform these precise calculation / logical execution tasks through the computer program.

[0060] In a specific embodiment, the program generates a data set using data sets such as SAGE and HumanEval-X.

[0061] After obtaining the first training result, the second training result and the third training result, the first training result, the second training result and the third training result are fused to obtain a large language model in the large model module.

[0062] It should be emphasized that the present invention does not limit the preset fine-tuning algorithm and the preset end condition, and can be selected according to actual conditions. In some embodiments, the preset fine-tuning algorithm includes a LoRA (Low Rank Adaption) low-rank adaptive fine-tuning algorithm.

[0063] In some embodiments, the preset termination condition includes a limit on the maximum number of iterations. In a specific embodiment, the maximum number of iterations is set to 100.

[0064] Furthermore, in the large model module, multiple large language models can be used to collaborate to complete different parts of the above tasks, such as Figure 5 In a specific embodiment, LLM1 can complete the overall understanding of user task requirements and answer organization, while LLM2 completes the tasks generated by the computer program.

[0065] Based on the above embodiments, in some embodiments, the target task simulation model is converted into an execution program code based on the large model module, and the execution program code is sent to the program execution module according to a pre-built program execution interface, and the process also includes: The precise logic calculation subtasks are allocated to the agents based on the large model module.

[0066] Specifically, after analyzing the task requirements, the large model module establishes task-related simulation scenarios, abstracts and processes the tasks, and assigns them to different intelligent agents.

[0067] Furthermore, in the program execution module, the decision content of the agent in the ABM can be replaced by a large language model.

[0068] Based on the above embodiments, in some embodiments, the program execution module includes at least one pre-trained large language model corresponding to the agent; The intelligent agent and its corresponding large language model are used to generate an intelligent agent decision strategy according to the assigned precise logic calculation subtask, and assist the execution simulation program to perform simulation according to the intelligent agent decision strategy and the acquired environmental information.

[0069] Specifically, Figure 6 As shown in the figure, after analyzing the task, the large model module (LLM1) establishes a simulation scenario related to the task and abstracts and specializes the task to different agents. The large model module will then use its programming ability to convert the ABM model into an execution program code and distribute it to the program execution module (computer or machine with program execution capability, etc.), while the large language model connected to the agent generates decisions based on the tasks assigned to its own agent, and is used to participate in the simulation process of the ABM model. That is, in each step of the simulation, the large language model LLM2 obtains the environmental information perceived by its own agent, and generates corresponding decision actions based on its own tasks and returns them to the simulation environment. After the simulation process is completed, the computer returns the simulation results (precise logic calculation subtask execution results) to LLM1.

[0070] Then, it is judged whether the task requirements are met. It should be noted that in this case, if there are multiple subtasks, such as multiple precise logic calculation subtasks or other subtasks, it is still necessary to compare the first comprehensive result after integrating the execution results of other subtasks with the task requirements to determine whether the first comprehensive result meets the task requirements. If not, the tasks assigned to the intelligent agent are further optimized based on the large model module, and simulation and decision-making are re-performed. At the same time, the execution results of other subtasks are optimized until the simulation results are sufficient to analyze and answer the user's answer. If there is only one precise logic calculation subtask, the execution result of the precise logic calculation subtask is used to compare with the task requirements and subsequent adjustments, which are not elaborated in the present invention.

[0071] In order to further illustrate the simulation of the execution simulation program assisted by the large model, a specific embodiment is given. Enter a chess endgame, and the subtask is: determine whether the black side is likely to win in the end, and if it is possible to win, what kind of chess strategy should be adopted. In this task, the ABM model simulates the process of the two agents continuing the subsequent duel in the endgame. LLM2 represents the chess strategy of one of the agents. N different strategies can be tried, and finally the probability of the black side winning the game is returned to the user, and a strategy that can win is given.

[0072] The task execution method based on a large model provided by the present invention is to input the acquired task requirements into a pre-built large model module, split the task according to the task requirements based on the large model module, and obtain at least one subtask; execute the subtask based on the large model module and the pre-built program execution module connected to the large model module and integrate the execution results of the subtask to obtain a first comprehensive result; when the first comprehensive result does not meet the task requirements, optimize the subtask and / or the execution results of the subtask based on the large model module to obtain the task execution result; wherein the large model module includes at least one pre-trained large language model. The present invention integrates the general analysis capability of large model knowledge, the code generation capability and the computer's precise code execution capability based on the large model module, so as to execute subtasks in a targeted manner, integrate the execution results and optimize them when the task requirements are not met, and achieve better performance of logical reasoning based on the large model, so as to better complete user tasks.

[0073] The following is a description of the task execution device based on a large model provided by the present invention. The task execution device based on a large model described below and the task execution method based on a large model described above can be referred to in correspondence with each other. Figure 7 As shown, the device includes a splitting unit 710 , an execution unit 720 and an optimization unit 730 .

[0074] A splitting unit 710 is used to input the acquired task requirements into a pre-built large model module, and split the task according to the task requirements based on the large model module to obtain at least one subtask; An execution unit 720, configured to execute the subtasks based on the large model module and a pre-built program execution module connected to the large model module and integrate the execution results of the subtasks to obtain a first comprehensive result; An optimization unit 730, configured to optimize the subtasks and / or the execution results of the subtasks based on the large model module to obtain a task execution result when the first comprehensive result does not meet the task requirement; Wherein, the large model module includes at least one pre-trained large language model.

[0075] According to a task execution device based on a large model provided by the present invention, the task is split based on the large model module according to the task requirements to obtain at least one subtask, specifically including: Analyze the process of completing the task requirements based on the large model module; According to the analysis result, the task requirement is split according to whether precise logic calculation is involved, so as to obtain precise logic calculation subtasks and other subtasks.

[0076] According to a task execution device based on a large model provided by the present invention, the program execution module based on the large model module and the pre-built program execution module connected to the large model module executes the subtasks and integrates the execution results of the subtasks to obtain a first comprehensive result, which specifically includes: Generate an execution program code based on the large model module according to the precise logic calculation subtask, send the execution program code to the program execution module according to a pre-built program execution interface, and obtain the execution result of the precise logic calculation subtask according to the program execution interface; Execute the other subtasks based on the large model module to obtain execution results of the other subtasks; Based on the large model module, the execution result of the precise logic calculation subtask and the execution results of the other subtasks are integrated to obtain a first comprehensive result.

[0077] According to a task execution device based on a large model provided by the present invention, the large language model is trained by a hybrid training method using a pre-constructed training data set based on a deep neural network; wherein the training data set includes a task splitting data set, a task classification data set and a program generation data set; the hybrid training includes a combination of one or more of task splitting training, task classification training, code generation or optimization training; wherein the task splitting training includes training based on a deep neural network using the task splitting data set using a preset training algorithm to learn the correspondence between the task requirement input and the output subtasks in the task splitting data set; the task classification training includes training based on a deep neural network using the task classification data set using a preset training algorithm to learn the correspondence between the subtasks input and the subtask classifications output in the task classification data set, and the code generation or optimization training includes training based on a deep neural network using the program generation data set using a preset training algorithm to learn the correspondence between the precise logical calculation subtasks input in the program generation data set and the output computer program.

[0078] According to a task execution device based on a large model provided by the present invention, the execution program code is generated based on the large model module according to the precise logic calculation subtask, the execution program code is sent to the program execution module according to a pre-built program execution interface, and the execution result of the precise logic calculation subtask is obtained according to the program execution interface, which specifically includes: Generate a solution according to the precise logic calculation subtask based on the large model module, establish a simulation model for the scenario involved in the precise logic calculation subtask, and obtain a target task simulation model according to the solution and the simulation model; convert the target task simulation model into an execution program code based on the large model module, and send the execution program code to a program execution module according to a pre-built program execution interface; The precise logic calculation subtask execution result is obtained according to the program execution interface.

[0079] According to a task execution device based on a large model provided by the present invention, the target task simulation model is converted into an execution program code based on the large model module, and the execution program code is sent to the program execution module according to a pre-built program execution interface, and the device also includes: The precise logic calculation subtasks are allocated to the agents based on the large model module.

[0080] According to a large model-based task execution device provided by the present invention, the program execution module includes executing a simulation program and / or at least one pre-trained large language model corresponding to an agent; Among them, the execution simulation program is used to simulate the execution program code, the agent and its corresponding large language model are used to generate the agent decision strategy according to the assigned precise logical calculation subtask, and assist the execution simulation program in simulation according to the agent decision strategy and the acquired environmental information.

[0081] The task execution device based on a large model provided by the present invention inputs the acquired task requirements into a pre-built large model module, splits the task based on the large model module according to the task requirements, and obtains at least one subtask; executes the subtask based on the large model module and a pre-built program execution module connected to the large model module and integrates the execution results of the subtask to obtain a first comprehensive result; when the first comprehensive result does not meet the task requirements, optimizes the subtask and / or the execution results of the subtask based on the large model module to obtain the task execution result; wherein the large model module includes at least one pre-trained large language model. The present invention integrates the general analysis capability of large model knowledge, the code generation capability and the computer's precise code execution capability based on the large model module, thereby executing subtasks in a targeted manner, integrating the execution results and optimizing them when the task requirements are not met, and achieving better performance of logical reasoning based on the large model, thereby better completing user tasks.

[0082] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute a task execution method based on a large model, the method comprising: inputting the acquired task requirements into a pre-built large model module, splitting the task according to the task requirements based on the large model module to obtain at least one subtask; executing the subtask based on the large model module and the pre-built program execution module connected to the large model module and integrating the execution results of the subtask to obtain a first comprehensive result; in the case where the first comprehensive result does not meet the task requirements, optimizing the subtask and / or the execution results of the subtask based on the large model module to obtain a task execution result; wherein the large model module includes at least one pre-trained large language model.

[0083] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0084] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the large model-based task execution method provided by the above methods, the method including: inputting the acquired task requirements into a pre-built large model module, splitting the task according to the task requirements based on the large model module to obtain at least one subtask; executing the subtasks based on the large model module and a pre-built program execution module connected to the large model module and integrating the execution results of the subtasks to obtain a first comprehensive result; when the first comprehensive result does not meet the task requirements, optimizing the subtasks and / or the execution results of the subtasks based on the large model module to obtain the task execution result; wherein, the large model module includes at least one pre-trained large language model.

[0085] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the large model-based task execution method provided by the above-mentioned methods, the method comprising: inputting the acquired task requirements into a pre-built large model module, splitting the task according to the task requirements based on the large model module to obtain at least one subtask; executing the subtasks based on the large model module and a pre-built program execution module connected to the large model module and integrating the execution results of the subtasks to obtain a first comprehensive result; when the first comprehensive result does not meet the task requirements, optimizing the subtasks and / or the execution results of the subtasks based on the large model module to obtain the task execution result; wherein the large model module includes at least one pre-trained large language model.

[0086] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A task execution method based on a large model, characterized in that: include: Inputting the acquired task requirements into a pre-built large model module, splitting the task according to the task requirements based on the large model module to obtain at least one subtask; Executing the subtasks based on the large model module and a pre-built program execution module connected to the large model module and integrating the execution results of the subtasks to obtain a first comprehensive result; In the case where the first comprehensive result does not meet the task requirement, optimizing the subtasks and / or the execution results of the subtasks based on the large model module to obtain the task execution result; Wherein, the large model module includes at least one pre-trained large language model.

2. The task execution method based on a large model according to claim 1 is characterized in that: The task is split based on the large model module according to the task requirements to obtain at least one subtask, specifically including: Analyze the process of completing the task requirements based on the large model module; According to the analysis result, the task requirement is split according to whether precise logic calculation is involved, so as to obtain precise logic calculation subtasks and other subtasks.

3. The task execution method based on a large model according to claim 2 is characterized in that: The pre-built program execution module based on the large model module and connected to the large model module executes the subtasks and integrates the execution results of the subtasks to obtain a first comprehensive result, which specifically includes: Generate an execution program code based on the large model module according to the precise logic calculation subtask, send the execution program code to the program execution module according to a pre-built program execution interface, and obtain the execution result of the precise logic calculation subtask according to the program execution interface; Execute the other subtasks based on the large model module to obtain execution results of the other subtasks; Based on the large model module, the execution result of the precise logic calculation subtask and the execution results of the other subtasks are integrated to obtain a first comprehensive result.

4. The task execution method based on a large model according to claim 1 is characterized in that: The large language model is trained by using a pre-constructed training data set based on a deep neural network using a hybrid training method; wherein the training data set includes a task splitting data set, a task classification data set and a program generation data set; the hybrid training includes a combination of one or more of task splitting training, task classification training, code generation or optimization training; wherein the task splitting training includes training based on a deep neural network using the task splitting data set using a preset training algorithm to learn the correspondence between the task requirement input and the output subtasks in the task splitting data set; the task classification training includes training based on a deep neural network using the task classification data set using a preset training algorithm to learn the correspondence between the subtasks input and the subtask classifications output in the task classification data set, and the code generation or optimization training includes training based on a deep neural network using the program generation data set using a preset training algorithm to learn the correspondence between the precise logical calculation subtasks input in the program generation data set and the output computer program.

5. The task execution method based on a large model according to claim 3 is characterized in that: The step of generating an execution program code based on the large model module according to the precise logic calculation subtask, sending the execution program code to a program execution module according to a pre-built program execution interface, and obtaining an execution result of the precise logic calculation subtask according to the program execution interface specifically includes: Generate a solution according to the precise logic calculation subtask based on the large model module, establish a simulation model for the scenario involved in the precise logic calculation subtask, and obtain a target task simulation model according to the solution and the simulation model; convert the target task simulation model into an execution program code based on the large model module, and send the execution program code to a program execution module according to a pre-built program execution interface; The precise logic calculation subtask execution result is obtained according to the program execution interface.

6. The task execution method based on a large model according to claim 5 is characterized in that: The method of converting the target task simulation model into an execution program code based on the large model module and sending the execution program code to a program execution module according to a pre-built program execution interface also includes: The precise logic calculation subtasks are allocated to the agents based on the large model module.

7. The task execution method based on a large model according to claim 6 is characterized in that: The program execution module includes executing a simulation program and / or at least one pre-trained large language model corresponding to the agent; Among them, the execution simulation program is used to simulate the execution program code, the agent and its corresponding large language model are used to generate the agent decision strategy according to the assigned precise logical calculation subtask, and assist the execution simulation program in simulation according to the agent decision strategy and the acquired environmental information.

8. A task execution device based on a large model, characterized in that: include: A splitting unit, used for inputting the acquired task requirements into a pre-built large model module, and performing task splitting according to the task requirements based on the large model module to obtain at least one subtask; An execution unit, configured to execute the subtasks based on the large model module and a pre-built program execution module connected to the large model module and integrate the execution results of the subtasks to obtain a first comprehensive result; an optimization unit, configured to optimize the subtasks and / or the execution results of the subtasks based on the large model module to obtain a task execution result when the first comprehensive result does not meet the task requirement; Wherein, the large model module includes at least one pre-trained large language model.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the large model-based task execution method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the large model-based task execution method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Task execution method based on large language model and related equipment

    CN119067094A

  • Code generation method and device based on large model and electronic equipment

    CN119759356A

  • Code generation method, device and electronic equipment based on large model

    CN119759356B

  • Task scheduling method and device, electronic equipment, readable storage medium and computer program product

    CN119759520A

  • Task processing method, system and device based on large model, equipment and medium

    CN120012948A