Task execution method and system, electronic equipment, storage medium and program product

By mounting a task processing model on the base of the large model, the efficient training ability of the LoRA network is used to generate an intelligent model that matches different task types, solving the problem of high deployment cost of multi-agent systems and achieving low-cost customized task execution.

CN120371324APending Publication Date: 2025-07-25ZHEJIANG ALIBABA ROBOT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410096587.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-23
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, the deployment cost of large-model-based multi-agent system is high, resulting in high cost and long time, making it difficult to effectively perform customized tasks.

Method used

The method of mounting multiple task processing models in a single large model base is adopted. Through the efficient training ability of the LoRA network, the same pre-trained model and task processing model parameters under different task types are combined to generate an agent model that matches different task types, and the low-cost deployment of multi-agent systems is achieved.

Benefits of technology

It realizes the need for customized multi-agent systems at a lower cost, reduces the deployment cost of the model, and can effectively perform different tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371324A_ABST
    Figure CN120371324A_ABST
Patent Text Reader

Abstract

The invention discloses a task execution method and system, electronic equipment, a storage medium and a program product, and relates to the field of large model technology and machine learning. The method comprises the following steps: determining a to-be-executed task; identifying the current task type of the to-be-executed task; at least one current agent model matched with the current task type is obtained in an agent model set, the agent model set comprises different agent models matched with different task types, and any agent model in the different agent models is used for processing the task according to the model parameters of the task processing model under the corresponding task type; multiplexing the same pre-training model; and inputting the to-be-executed task into the current agent model, and controlling the pre-training model to analyze the to-be-executed task by using the current model parameter under the current task type to obtain a task execution result. The technical problem that the deployment cost of the model is high is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of large model technology and machine learning. Specifically, it relates to a task execution method, system, electronic device, storage medium, and program product. Background Art

[0002] Currently, multi-agent systems based on large models are a hot topic in the field of artificial intelligence. Multi-agent systems can automatically complete complex tasks such as code generation and solution research.

[0003] In related technologies, the intelligent agent system is usually defined by using the method of "general large model + system instructions". However, this method has a high degree of dependence on the general large model, making the method costly and time-consuming, thus having the technical problem of high model deployment cost.

[0004] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] Embodiments of this application provide a task execution method, system, electronic device, storage medium, and program product to at least solve the technical problem of high model deployment cost.

[0006] According to one aspect of the embodiments of this application, a task execution method is provided. The method may include: determining a task to be executed; identifying the current task type of the task to be executed; in a set of intelligent agent models, obtaining at least one current intelligent agent model that matches the current task type, where the set of intelligent agent models includes different intelligent agent models that match different task types, and any intelligent agent model in the different intelligent agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; inputting the task to be executed into the current intelligent agent model, and using the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed, so as to obtain a task execution result.

[0007] According to another aspect of the embodiments of this application, a model deployment method is further provided. The method may include: determining different task types; obtaining task processing models under different task types; respectively combining the model parameters of the task processing models under different task types with the same pre-trained model to obtain intelligent agent models that respectively match different task types; outputting the intelligent agent models that respectively match different task types.

[0008] According to another aspect of the embodiments of the present application, there is also provided a method for generating another model. The method may include: respectively obtaining training samples under different task types; using the training samples under different task types to train a task processing model corresponding to the task type, wherein the model parameters of the task processing models under different task types are used to be combined with the same pre-trained model to obtain agent models respectively matching different task types, and the agent models are used to control the pre-trained model to analyze the input task to be executed by using the corresponding model parameters to obtain a task execution result.

[0009] According to another aspect of the embodiments of the present application, there is also provided another task execution method. The method can be applied to an agent system and may include: monitoring the task to be executed in the agent system by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is the task to be executed; identifying the current task type of the task to be executed; obtaining at least one current agent model matching the current task type from an agent model set, wherein the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; inputting the task to be executed into the current agent model, and using the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed to obtain a task execution result; and outputting the task execution result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the task execution result.

[0010] According to another aspect of the embodiments of the present application, there is also provided another task execution method. The method may include: in response to the inquiry information received in the dialogue interface, determining the task to be executed in the agent system in the inquiry information; displaying the current task type of the task to be executed on the dialogue interface; and displaying the reply information corresponding to the current task type on the dialogue interface, wherein the reply information is used to represent the task execution result of the task to be executed of the current task type, and the reply information is obtained by using the current model parameters under the current task type in the current agent model to control the pre-trained model to analyze the task to be executed, and the current agent model is obtained from the agent model set, and the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0011] According to another aspect of the embodiments of the present application, an agent system is further provided. The system may include: a model training end for training task processing models under different task types; a model deployment end for combining the model parameters of the task processing models under different task types with the same pre-trained model respectively to obtain agent models respectively matching different task types; and outputting the agent models respectively matching different task types.

[0012] According to another aspect of the embodiments of the present application, an electronic device is further provided. The electronic device may include a memory and a processor; the memory is used for storing computer-executable instructions, and the processor is used for executing the computer-executable instructions. When the above computer-executable instructions are executed by the processor, the above method of the embodiments of the present application is implemented.

[0013] According to another aspect of the embodiments of the present application, a processor is further provided. The processor is used for running a program, and when the program is running, the above method of any one of the above is executed.

[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored program, and when the program is running, the device where the storage medium is located is controlled to execute the above method of any one of the above.

[0015] According to another aspect of the embodiments of the present application, a computer program product is further provided. The computer program product may include computer instructions, and when the computer instructions are executed by the processor, the method of any one of the above is implemented.

[0016] In the embodiments of the present application, a task to be executed is determined; the current task type of the task to be executed is identified; in a set of agent models, at least one current agent model matching the current task type is obtained, where the set of agent models includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; the task to be executed is input into the current agent model, and the pre-trained model is controlled by the current model parameters under the current task type to analyze the task to be executed, and a task execution result is obtained. That is, in this embodiment, a corresponding task processing model can be trained for each task type. When a task to be executed is obtained, at least one current agent model can be called based on the current task type of the task to be executed. Among them, the agent model can include the model parameters of the task processing model under the corresponding task type and the same pre-trained model. The pre-trained model is controlled by the current model parameters in the current agent model to analyze the task to be executed, and an execution result is obtained. Thus, by using a single pre-trained model (for example, a large model base) and mounting the model parameters of the task processing model under each task type, this method can deploy different agent models by using the deployment cost of a single large model, and can meet the requirements of a customized multi-agent system at a relatively low cost, thereby achieving the technical effect of reducing the model deployment cost and solving the technical problem of high model deployment cost.

[0017] It is easy to note that the above general description and the following detailed description are only for exemplifying and explaining the present application, and do not constitute a limitation to the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:

[0019] Figure 1 is a schematic diagram of an application scenario of a task execution method according to an embodiment of the present application;

[0020] Figure 2 is a structural block diagram of a computing environment according to an embodiment of the present application;

[0021] Figure 3 is a flowchart of a task execution method according to an embodiment of the present application;

[0022] Figure 4 is a flowchart of the generation of a model according to an embodiment of the present application;

[0023] Figure 5 is a flowchart of another task execution method according to an embodiment of the present application;

[0024] Figure 6 is a flowchart of another task execution method according to an embodiment of the present application;

[0025] FIG. 7(a) is a flowchart of another task execution method according to an embodiment of the present application;

[0026] FIG. 7(b) is a schematic diagram of an agent system according to an embodiment of the present application;

[0027] Figure 8 is a schematic flowchart of an efficient implementation solution for a multi-agent system based on LoRA according to an embodiment of the present application;

[0028] Figure 9 is a schematic diagram of completing a task based on multi-agent interaction according to an embodiment of the present application;

[0029] Figure 10 is a schematic diagram of agent model deployment according to an embodiment of the present application;

[0030] Figure 11 is a hardware structure block diagram of a computer terminal (or mobile device) for a task execution method according to an embodiment of the present application;

[0031] Figure 12 is a schematic diagram of a task execution device according to an embodiment of the present application;

[0032] Figure 13 is a schematic diagram of a model generation device according to an embodiment of the present application;

[0033] Figure 14 is a schematic diagram of another task execution device according to an embodiment of the present application;

[0034] Figure 15 is a schematic diagram of another task execution device according to an embodiment of the present application;

[0035] Figure 16 is a schematic diagram of another task execution device according to an embodiment of the present application;

[0036] Figure 17 is a structure block diagram of a computer terminal according to an embodiment of the present application;

[0037] Figure 18 is a block diagram of an electronic device for a task execution method according to an embodiment of the present application. Detailed implementation manners

[0038] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0040] The technical solution provided by this application can be implemented using large model technology. Here, a large model refers to a deep learning model with a large number of model parameters, usually including hundreds of millions, tens of billions, hundreds of billions, trillions or even more than one hundred trillion model parameters. A large model can also be called a Foundation Model. Through large-scale pre-training of the large model using unlabeled corpora, a pre-trained model with more than one billion parameters is produced. This model can adapt to a wide range of downstream tasks and has good generalization ability. For example, large language models (LLMs), multi-modal pre-training models, etc.

[0041] It should be noted that in actual applications, the large model can be fine-tuned with a small number of samples on the pre-trained model so that the large model can be applied to different tasks. For example, the large model can be widely applied in the fields of Natural Language Processing (NLP), computer vision, speech processing, etc. Specifically, it can be applied to tasks in the field of computer vision such as Visual Question Answering (VQA), Image Caption (IC), image generation, etc., and can also be widely applied to tasks in the field of natural language processing such as text-based sentiment classification, text summary generation, machine translation, etc. Therefore, the main application scenarios of the large model include but are not limited to digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc. In the embodiments of this application, the data processing through a machine learning model in a dialogue scenario is taken as an example for explanation.

[0042] First, some nouns or terms that appear in the process of describing the embodiments of this application are applicable to the following explanations:

[0043] Multi-agent can refer to a system composed of multiple information processing and decision-making units existing in a shared environment, which can be used to interact in the shared environment to achieve the same or conflicting goals;

[0044] System prompt can be a special prompt that can be used to guide the behavior of the model. By formulating the system prompt, the style and tasks of the large model can be specified within a certain range, making it more customizable and adaptable to various use cases;

[0045] Low-Rank Adaptation (LoRA for short) can be an efficient training method for large models, which can be used to make adaptive adjustments between training data and test data.

[0046] Embodiment 1

[0047] According to a method of an embodiment of this application, a task execution method is provided. As an alternative implementation, the above task execution method can include but is not limited to being applied to an Figure 1 application scenario as shown. Figure 1 is a schematic diagram of an application scenario of a task execution method according to an embodiment of this application, as Figure 1As shown in the figure, in an application scenario, the terminal device 12 can, but is not limited to, communicate with the server 16 through the network 14. For example, it can be used to transmit tasks to be executed, task execution results, etc. The server 16 can, but is not limited to, perform operations on the database 18. For example, write data operations or read data operations. The above terminal device 12 can, but is not limited to, include a human-computer interaction screen, a processor, and a memory. The above human-computer interaction screen can, but is not limited to, be used to display a candidate product set and products to be recommended on the terminal device 12. The above processor can include, but is not limited to, being used to respond to the above human-computer interaction operations, execute corresponding operations, or generate corresponding instructions and send the generated instructions to the server 16. The above memory is used to store relevant processing data, such as task processing models, pre-trained models, etc.

[0048] As an alternative, the following steps in the task execution method can be performed on the server 16: Step S102, determine the task to be executed; Step S104, identify the current task type of the task to be executed; Step S106, in the set of agent models, obtain at least one current agent model that matches the current task type, where the set of agent models includes different agent models that match different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; Step S108, input the task to be executed into the current agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed to obtain a task execution result.

[0049] In the above manner, a corresponding task processing model is trained for each task type. When a task to be executed is obtained, at least one current agent model can be called based on the current task type of the task to be executed. Among them, the agent model can include the model parameters of the task processing model under the corresponding task type and the same pre-trained model. The pre-trained model is controlled by the current model parameters in the current agent model to analyze the task to be executed to obtain an execution result. Thus, a single pre-trained model (such as a large model base) can be used to mount the model parameters of the task processing model under each task type (which can also be called LoRA network parameters). Through this method, the deployment of different agent models can be achieved at the deployment cost of a single large model, and the requirements of a customized multi-agent system can be met at a relatively low cost, thereby achieving the technical effect of reducing the model deployment cost and solving the technical problem of high model deployment cost.

[0050] In another alternative embodiment, Figure 2 An embodiment is illustrated in block diagram form using a computer terminal (or mobile device) as a computing node in a computing environment 201. Figure 2 is a structural block diagram of a computing environment according to an embodiment of the present application, asFigure 2 As shown, the computing environment 201 includes multiple computing nodes (such as servers, shown as 210-1, 210-2, … in the figure) running on a distributed network. Each computing node contains local processing and memory resources, and end users 202 can remotely run applications or store data in the computing environment 201. The applications can be provided as multiple services 220-1, 220-2, 220-3, and 220-4 in the computing environment 201, representing services "A", "D", "E", and "H" respectively.

[0051] End users 202 can provide and access services through a web browser or other software applications on the client. In some embodiments, the provision and / or requests of end users 202 can be provided to the ingress gateway 230. The ingress gateway 230 can include a corresponding proxy to handle the provision and / or requests for services (one or more services provided in the computing environment 201).

[0052] Services are provided or deployed according to various virtualization technologies supported by the computing environment 201. In some embodiments, services can be provided based on virtual machine (VM)-based virtualization, container-based virtualization, and / or similar means. VM-based virtualization can simulate a real computer by initializing a virtual machine and execute programs and applications without directly accessing any actual hardware resources. While virtualizing the machine with a virtual machine, according to container-based virtualization, containers can be launched to virtualize the entire operating system (OS) so that multiple workloads can run on a single operating system instance.

[0053] In one embodiment of container-based virtualization, several containers of a service can be assembled into a computing unit (e.g., a Kubernetes Pod). For example, as Figure 2 shown, service 220-2 can be equipped with one or more computing units (Pods) Pod240-1, 240-2, …, 240-N (collectively referred to as Pods). A Pod can include a proxy 245 and one or more containers 242-1, 242-2, …, 242-M (collectively referred to as containers). One or more containers in a Pod handle requests related to one or more corresponding functions of the service, and the proxy 245 generally controls network functions related to the service, such as routing, load balancing, etc. Other services can also be equipped with Pods similar to Pods.

[0054] During operation, executing a user request from the end user 202 may require invoking one or more services in the computing environment 201, and executing one or more functions of a service may require invoking one or more functions of another service. As Figure 2 shown, service "A" 220-1 receives a user request from the end user 202 from the ingress gateway 230. Service "A" 220-1 may invoke service "D" 220-2, and service "D" 220-2 may request service "E" 220-3 to execute one or more functions.

[0055] The computing environment described above may be a cloud computing environment, where the allocation of resources is managed by a cloud service provider, allowing the development of functions without considering the implementation, adjustment, or expansion of servers. This computing environment allows developers to execute code in response to events without building or maintaining complex infrastructure. Services can be split into a set of functions that can be automatically scaled independently, rather than scaling a single hardware device to handle potential loads.

[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application, such as data like weather forecast results, are all information and data that have been authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0057] In the above operating environment, this application provides a task execution method. This method can be applied to an agent system or in situations where multiple large models and multiple agents execute tasks, etc. It should be noted that this is only an example here, and no specific restrictions are imposed on the application scenarios of the task execution method. Among them, the agent system can be implemented by a generative pre-trained language model or can be a system composed of multiple information processing units and decision-making units existing in a shared environment. Figure 3 is a flowchart of a task execution method according to an embodiment of this application.

[0058] As Figure 3 shown, the method may include the following steps:

[0059] Step S302, determine the task to be executed.

[0060] In the technical solution provided in step S302 of the present application, the task to be executed is determined. Among them, the task to be executed can be the work that needs to be completed in the intelligent agent system, which can be complex tasks such as code generation and solution research, or can be a customized task. For example, it can be an advertising and marketing task. It should be noted that the type of the task to be executed is not specifically limited here.

[0061] Optionally, the task to be executed in this embodiment can be the task to be executed in the intelligent agent system. It is necessary to first clarify the work that the intelligent agent system needs to complete, which may be a specific task. For example, the task of an autonomous vehicle driving safely on urban streets; or it may also be a more abstract goal, such as the energy-saving optimization of a smart home system. The task to be executed in the intelligent agent system can be determined by monitoring user input, system automatic monitoring, and other methods.

[0062] Step S304, identify the current task type of the task to be executed.

[0063] In the technical solution provided in step S304 of the present application, after determining the task to be executed in the intelligent agent system, the current task type of the task to be executed can be identified. Among them, the current task type can include scheduling task type, functional task type, evaluation task type, etc. This is only an example here, and the current task type is not specifically limited.

[0064] Optionally, after determining the task to be executed in the intelligent agent system, the task to be executed can be further identified to determine the current task type of the task to be executed.

[0065] For example, assume that there is currently a home service robot that can be used to help family members with housework. When the task to be executed input by the user through voice, text, etc. is obtained, it can be determined that the task to be executed in the home service robot is to correct the child's homework. The current task type of the task to be executed can be identified as a functional task.

[0066] Step S306, in the intelligent agent model set, obtain at least one current intelligent agent model that matches the current task type, where the intelligent agent model set includes different intelligent agent models that match different task types, and any intelligent agent model in the different intelligent agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0067] In the technical solution provided in step S306 of the present application, after identifying the current task type of the task to be executed, at least one current agent model matching the current task type can be obtained from the agent model set. The agent model set may include different agent models matching different task types. In the agent model, the same pre-trained model can be reused through the model parameters of the task processing model under the corresponding task type, which may include a scheduling model (also referred to as a scheduling agent), an evaluation model (also referred to as an evaluation agent), and a function model (also referred to as a function agent). It should be noted that this is only an example here, and there is no specific limitation on the type of the agent model. The task processing model can be a Low-Rank Adaptation (LoRA) model, also referred to as a LoRA network, and can be a LoRA model, which can be used to effectively and efficiently fine-tune a pre-trained large neural network model. The model parameters can include a low-rank matrix, which can be used to reduce the number of parameters of the task physical model, and is also referred to as LoRA network parameters. The pre-trained model is the large model base, which can be a base model, a backbone model, or a general large model, and can include a Convolutional Neural Network (CNN), a Recurrent Neural Network (RNN), a general language model, an image recognition model, or other deep learning models, etc. It should be noted that this is only an example here, and there is no specific limitation on the type of the pre-trained model.

[0068] Optionally, after training the task processing model and the pre-trained model based on the same large model base, the task processing model and the pre-trained model can be combined in an additive manner to obtain an agent model. In this way, multiple different agent models matching different task types can be pre-constructed to obtain an agent model set. After identifying the current task type of the task to be executed, at least one current agent model matching the current task type can be obtained from the agent model set.

[0069] Optionally, in the agent model, the same pre-trained model is reused through the model parameters of the task processing model under the corresponding task type. Therefore, different agent models can be distinguished according to system instructions or the differences in the LoRA network.

[0070] Optionally, when the agent model is deployed, N different LoRA networks can be loaded simultaneously; during inference, according to the current task type of the task to be executed, determine the LoRA network to be used, and the LoRA network to be used can be combined with the large model base in real time to obtain the current agent model that matches the current task type. After determining the current task type, the current agent model can be obtained from the agent model set.

[0071] Step S308: Input the task to be executed into the current agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed, and obtain the task execution result.

[0072] In the technical solution provided in step S308 of the present application above, after calling the agent model, the task to be executed can be input into the current agent model, and the current model parameters under the current task type can be used to control the pre-trained model to analyze the task to be executed, so as to obtain the task execution result. Among them, the current model parameters can be determined based on the model parameters of the task processing model in the agent model, or can be adjusted or trained model parameters. Here, the source of the current model parameters is not specifically limited. The task execution result can be used to determine the execution situation of the task, and can include that the task is processed and completed or the task is not processed and completed. For example, when the task to be executed is a classification task, the task execution result can also be a classification result. It should be noted that this is only an example, and the type of the task execution result is not specifically limited.

[0073] In this embodiment, by using the task processing model, trainable model parameters are injected into each layer of the neural network model architecture. Based on the supervised fine-tuning of the large model of LoRA, it is not necessary to modify the parameters of the pre-trained model, and only a small number of model parameters of the LoRA network need to be adjusted, which can reduce the requirements for machine specifications, thus realizing the technical problem of being able to effectively execute different tasks and solving the technical effect of being unable to effectively execute different tasks.

[0074] Optionally, determine the task to be executed in the agent system. For example, the task to be executed can be a text classification task, an image recognition task, a speech recognition task, etc. Identify the task to be executed to determine the current task type of the task to be executed. For example, the type of the text classification task may be sentiment analysis, topic classification, etc. According to the current task type, find a matching agent model in the agent model set to obtain at least one current agent model. This model can include a pre-trained model that matches different task types and the model parameters of the task processing model. The task to be executed can be input into the current agent model, and the pre-trained model in the current agent model can be controlled by the current model parameters to analyze the task to be executed, and the task execution result can be obtained.

[0075] For example, assume that the task to be executed is the sentiment analysis of a piece of text, and the current task type is determined to be sentiment analysis. At least one sentiment analysis model corresponding thereto (i.e., the current agent model) is found in the agent model set, and this model may be a pre-trained text classification model. The task to be executed (the text in the above) is input into the sentiment analysis model, and the pre-trained model in the sentiment analysis model is controlled by the current model parameters of the sentiment analysis model to analyze the text, and the result of the sentiment analysis (i.e., the task processing result) is obtained. For example, whether the sentiment tendency of the text is positive, negative or neutral.

[0076] In the embodiment of the present application, the task to be executed is determined; the current task type of the task to be executed is identified; in the agent model set, at least one current agent model matching the current task type is obtained, wherein the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; the task to be executed is input into the current agent model, and the pre-trained model is controlled by the current model parameters under the current task type to analyze the task to be executed, and the task execution result is obtained, so as to achieve the technical effect of reducing the deployment cost of the model and solve the technical problem of high deployment cost of the model.

[0077] The above method of this embodiment will be further introduced below.

[0078] As an alternative implementation manner, step S306, in the agent model set, obtaining at least one current agent model matching the current task type includes: in the agent model set, combining the current model parameters and the pre-trained model to obtain the current agent model.

[0079] In this embodiment, after determining the current task type, the model parameters of the task processing model corresponding thereto under the current task type can be determined in the agent model set. The current model parameters can be determined based on the model parameters of the task processing model, and the current model parameters and the pre-trained model are combined to obtain the current agent model.

[0080] Although the agent system with a general large model plus system instructions can facilitate users to get started quickly, this method has extremely high requirements for the capabilities of the large model, such as compliance and logical reasoning. Moreover, this method has a high degree of dependence on the general large model, resulting in problems of high costs, high time consumption, and high deployment costs. At the same time, for some customized tasks that rely on non-public data, it is almost impossible to complete them using the general large model only by rewriting instructions, thus leading to the technical problem of being unable to effectively execute different tasks. To solve the above technical problems, in this embodiment, a method of mounting multiple task processing models on a single large model base is adopted, and the model parameters of the task processing models and the pre-trained model are combined to obtain the current agent model. Through the above method, at least one current agent model can be obtained, so as to deploy multiple agent models at the deployment cost of a single large model, and further achieve the purpose of meeting the customer's need to build a highly customized multi-agent system at a lower cost. That is to say, this method utilizes the efficient training ability of the LoRA network to train an agent model with strong vertical capabilities for users at low cost, thereby achieving the technical effect of being able to effectively execute different tasks and solving the technical problem of being unable to effectively execute different tasks.

[0081] Optionally, in this embodiment, the current model parameters and the pre-trained model can be combined by means of replacement, fusion, stacking, mixing, etc. to obtain the current agent model. It should be noted that the combination method can be selected according to specific application scenarios and requirements to achieve the required performance and effects, and no specific restrictions are imposed on the selected combination method here.

[0082] For example, the pre-trained model can be a large pre-trained language model, which can be used for different natural language processing tasks such as text generation, question answering, and translation. For different task types, task processing models corresponding to different task types can be designed. The designed multiple task processing models can be independent or share model parameters. When processing the task to be executed, in the agent model set, the model parameters of the task processing model under the current task type can be determined as the current model parameters.

[0083] As another example, after determining the current model parameters, the current model parameters and the pre-trained model can be combined by replacement to obtain the current agent model. The current model parameters (e.g., parameters A and B of the LoRA network) can be directly replaced with the corresponding parameters of the pre-trained model, enabling the LoRA network to directly replace the large model base for inference and prediction. Or, after determining the current model parameters, the current model parameters and the pre-trained model can be combined by fusion to obtain the current agent model. By fusing the parameters A and B of the LoRA network with the corresponding parameters of the pre-trained model, when the current agent model processes data, the prediction results of both can be fused through a certain weighted method to obtain the final output.

[0084] Or, after determining the current model parameters, the current model parameters and the pre-trained model can be combined by stacking to obtain the current agent model. When the current agent model processes data, the LoRA network and the large model base can be respectively used for inference and prediction, and then the output results of both are stacked to obtain the final output.

[0085] Or, the current model parameters and the pre-trained model can be combined by mixing to obtain the current agent model. When the current agent model processes data, the output results of the LoRA network and the large model base are mixed, and they are mixed in a certain way to obtain the final output.

[0086] Through the above methods, the same large model base can be used to handle multiple different tasks, while keeping the size of the agent model controllable and reducing the computational cost.

[0087] As an alternative implementation, in the set of agent models, combining the current model parameters and the pre-trained model to obtain the current agent model includes: adjusting the current model parameters in the set of agent models; and superimposing the adjusted current model parameters onto the pre-trained model to obtain the current agent model.

[0088] In this embodiment, in the process of combining the current model parameters and the pre-trained model to obtain the current agent model, the current model parameters can be adjusted in the set of agent models, and the adjusted current model parameters are superimposed onto the pre-trained model to obtain the current agent model.

[0089] Optionally, a pre-trained model can be constructed in advance. After determining the to-be-executed task that needs to be performed, at least one current agent model can be invoked based on the current task type of the to-be-executed task. The current agent model can be constructed based on the pre-trained model, and the current model parameters (especially the low-rank part) have been fine-tuned for data in their respective fields.

[0090] As an alternative implementation, the method may further include: keeping the model parameters of the pre-trained model unchanged during the process of adjusting the current model parameters.

[0091] In this embodiment, during the process of adjusting the current model parameters, only the model parameters of the task processing model under the corresponding task processing type are adjusted, and the model parameters of the pre-trained model can remain unchanged.

[0092] Optionally, during the process of adjusting the current model parameters, only the model parameters of the LoRA network are adjusted, and it does not involve adjusting the model parameters of the pre-trained model. Therefore, the model parameters of the pre-trained model remain unchanged.

[0093] For example, select a pre-trained model that has been pre-trained on a large-scale dataset, and add LoRA network layers to the pre-trained model. These layers can be used to update the low-rank parameters during fine-tuning. Training data can be obtained, and the pre-trained model can be fine-tuned using the training data. During this process, only the low-rank parameters in the LoRA network layer will be updated, while most of the parameters of the pre-trained model remain unchanged. Through the above method, agent models under different task types can be finally trained. The agent models can be deployed to actual applications to predict, generate, or analyze new data.

[0094] In this embodiment, the training based on LoRA requires lower resource specifications and faster iteration speed compared to the supervised fine-tuning (SFT) of all parameters. Moreover, compared to the SFT training method that mixes different task data for training, the training based on LoRA can train a LoRA network separately for each task, and deploy the agent models by combining the current model parameters and the pre-trained model, so as to achieve the purpose of deploying all agent models at a cost close to that of a single large model, thereby achieving the technical effect of reducing the deployment cost of the model and solving the technical problem of high deployment cost of the model.

[0095] For example, a dataset for a specific task can be used to fine-tune the model parameters of the LoRA network in the agent model set. During this process, only the model parameters of the LoRA network are updated, while most of the parameters of the large model base can remain unchanged. The adjusted current model parameters can be superimposed on the pre-trained model to obtain the current agent model, thereby improving the processing efficiency and accuracy of the current agent model for the task to be executed.

[0096] As an alternative implementation, before step S306 of obtaining at least one current agent model that matches the current task type in the agent model set, the method further includes: obtaining a task processing model for the current task type, where the task processing model is trained based on training samples for the current task type; determining current model parameters based on the model parameters of the trained task processing model.

[0097] In this embodiment, task processing models corresponding to different task types can be pre-trained based on training data for different tasks. After identifying the current task type of the task to be executed, a trained task processing model for the current task type can be obtained, and the current model parameters can be determined based on the model parameters of the trained task processing model.

[0098] In this embodiment, the model obtained by LoRA-directed training is used as the agent model, replacing the agent method of "general large model + system instruction", thereby achieving the purpose of improving the ability of the multi-agent system to complete customized tasks.

[0099] As an alternative implementation, determining current model parameters based on the model parameters of the trained task processing model includes: identifying low-rank model parameters from the model parameters of the trained task processing model, where the number of parameters of the low-rank model parameters is less than a parameter quantity threshold; determining the low-rank model parameters as the current model parameters in the agent model set.

[0100] In this embodiment, after calling the trained task processing model, low-rank model parameters can be identified from the model parameters of the trained task processing model, and the low-rank model parameters can be determined as the current model parameters in the agent model set. Among them, the low-rank model parameters can be a trainable low-rank matrix, and the number of parameters is less than the parameter quantity threshold.

[0101] Optionally, the trained task processing model can include at least one low-rank matrix. For example, it can include a low-rank matrix A and a low-rank matrix B. The low-rank matrix can be determined as the current model parameters in the agent model set.

[0102] This embodiment utilizes the LoRA network to inject trainable low-rank matrices into each layer of the agent model set. For the supervised fine-tuning of large models based on the LoRA network, it is not necessary to modify the parameters of the large model base. Only a small number of LoRA network parameters need to be adjusted, thereby reducing the requirements for machine specifications. Among them, the agent model set can be a Transformer architecture.

[0103] Optionally, the model parameters of the LoRA network can include low-rank matrices A and B. The LoRA network and the large model base can be combined by addition. Therefore, multiple different LoRA networks can be loaded simultaneously during deployment; during inference, the LoRA network to be used can be determined according to the input task to be executed, and the LoRA network can be combined with the large model base in real time. Among them, multiple LoRA networks are trained based on the same large model base. Therefore, deployment can be carried out in the way of one large model base + N LoRA networks. Since the model parameters of the LoRA network are all low-rank matrices, the number of parameters of the LoRA network is usually less than 1% of the number of parameters of the large model base. When N < 100, the resource consumption of this efficient deployment method is similar to that of deploying a single large model.

[0104] Since the number of parameters of the low-rank model parameters is less than the parameter threshold, the number of parameters of the task processing model is usually less than 1% of the number of parameters of the large model base. When the number of task processing models called is less than 100, the resource consumption of this efficient deployment method is similar to that of deploying a single large model, thereby achieving the technical effect of reducing the deployment cost of the model.

[0105] As an alternative implementation, obtaining the task processing model under the current task type includes: obtaining the task processing model under the current task type among different task processing models under different task types, where the different task processing models under different task types are trained based on the training samples under the corresponding task types.

[0106] In this embodiment, different task processing models under different task types are pre-trained based on the training samples under different task types. After identifying the current task model of the task to be executed, the task processing model under the current task type can be obtained among the trained different task processing models under different task types.

[0107] As an alternative implementation, determining the task to be executed includes: obtaining multiple subtasks of the input task, where the task execution results of each of the multiple subtasks are used to determine the task execution result of the input task; determining the task to be executed among the multiple subtasks.

[0108] In this embodiment, multiple subtasks of the input task of the agent system are determined, and among the multiple subtasks, the task to be executed is determined. Among them, the task execution results of each of the multiple subtasks can be used to determine the task execution result of the input task. The subtasks can be scheduling tasks, functional tasks, evaluation tasks, etc. This is only an example here, and the type of subtasks is not specifically limited.

[0109] For example, to obtain the input task of the input agent system, the input task can be split into multiple subtasks. The split subtasks can be used to represent different stages or steps in the entire task execution process. For example, if the input task is "organize a meeting", the subtasks can include sending invitations, booking a meeting room, arranging catering, etc. Since different tasks are executed at different stages, the task to be executed can be determined among the multiple subtasks.

[0110] As an optional implementation manner, identifying the current task type of the task to be executed includes: determining the task stage where the task to be executed is located among the multiple subtasks as the current task type.

[0111] In this embodiment, among the multiple subtasks, the task to be executed can be determined, and the task stage where the task to be executed is located among the multiple subtasks can be determined as the current task type. Among them, the task stages can include a scheduling stage, a functional stage, an evaluation stage, etc. This is only an example here, and the type of task stages is not specifically limited.

[0112] Optionally, when the task stage is the scheduling stage, the current task type can be the scheduling task type. When the task stage is the functional stage, the current task type can be the functional task type. When the task stage is the evaluation stage, the current task type can be the evaluation task type.

[0113] In this embodiment, in addition to determining the current task type according to the task stage, the current task type corresponding to the subtask can also be determined according to the role of the subtask, the required resource information, and the application scenario content. It should be noted that this is only an example here, and the method for determining the current task type is not specifically limited. After determining the current task type, the current agent model required can be determined according to the current task type.

[0114] Optionally, this embodiment can also directly determine the current agent model corresponding to the subtask according to the task stage where the subtask is located.

[0115] For example, the agent model may include a scheduling agent model, a functional agent model, and an evaluation agent model. Among them, the scheduling agent model can be used to understand the task to be executed, determine the functional agent model that needs to be scheduled to solve the task to be executed, and determine the conditions for completing the task to be executed. The functional agent model can be used to receive scheduling and output the task execution result to other agent models or the evaluation agent model. The evaluation agent model can be used to determine whether the task to be executed has been completed and return the execution status of the task to be executed to the scheduling agent model. When a subtask is obtained, the scheduling agent model can be used to schedule the subtask. At this time, the task stage where the subtask is located is the scheduling stage, and the current task type can be determined to be the scheduling task type. The scheduling agent model needs to transmit the analyzed subtask to the functional agent model. At this time, the task stage where the subtask is located is the functional stage, and the current task type can be determined to be the functional task type. The functional agent model processes the subtask and outputs the output result to the evaluation agent to execute the evaluation task. Here, the subtask can be the evaluation task, the stage where the subtask is located is the evaluation stage, and the current task type can be the evaluation task type.

[0116] In the embodiment of the present application, a corresponding task processing model can be trained for each task type. When a task to be executed is obtained, at least one current agent model can be called based on the current task type of the task to be executed. Among them, the agent model can include the model parameters of the task processing model under the corresponding task type and the same pre-trained model. The pre-trained model is controlled by the current model parameters in the current agent model to analyze the task to be executed, and an execution result is obtained. Thus, by using a single pre-trained model (for example, a large model base) and mounting the model parameters of the task processing model under each task type (for example, LoRA network parameters), this method can deploy different agent models by using the deployment cost of a single large model, meet the requirements of a customized multi-agent system at a low cost, and thus achieve the technical effect of reducing the deployment cost of the model and solving the technical problem of high deployment cost of the model.

[0117] The embodiment of the present application also provides a method for generating a model. Figure 4 It is a flowchart of a method for deploying a model according to an embodiment of the present application, as Figure 4 shown. The method may include the following steps.

[0118] Step S402, determine different task types.

[0119] In the technical solution provided in step S402 of the present application, different task types to be processed by the agent model can be determined. Among them, the task types can include scheduling task types, functional task types, evaluation task types, etc. This is only an example here, and there is no specific limitation on the task types.

[0120] Step S404, obtain task processing models under different task types.

[0121] In the technical solution provided in step S404 of the present application, the model parameters of the task processing models under different task types can be pre-constructed to obtain the task processing models under different task types. Among them, the model parameters can be the low-rank model parameters of the task processing model, can be a trainable low-rank matrix, and the number of parameters is less than the parameter threshold. The task processing model can be a LoRA network, and can also be called a LoRA model.

[0122] Optionally, at least one low-rank matrix can be included in the model parameters of the task processing models under different task types. For example, an A low-rank matrix and a B low-rank matrix can be included.

[0123] Step S406, respectively combine the model parameters of the task processing models under different task types with the same pre-trained model to obtain agent models respectively matching different task types.

[0124] In the technical solution provided in step S406 of the present application, after obtaining the task processing models under different task types, the model parameters can be combined with the same pre-trained model to obtain agent models respectively matching different task types. Among them, the pre-trained model can be a large model base, can be a basic model or a backbone model. This is only an example here, and there is no specific limitation on the type of the pre-trained model.

[0125] In this embodiment, multiple task processing models can be trained based on the same large model base. Therefore, the large model can be deployed in the way of one large model base + N task processing models (for example, LoRA networks). Since the model parameters of the LoRA network are all low-rank matrices, this makes the number of parameters of the LoRA network usually less than 1% of the number of parameters of the large model base. When N < 100, the resource consumption of this efficient deployment method is similar to that of deploying a single large model, thus achieving the purpose of efficiently deploying the model.

[0126] Step S410, output agent models respectively matching different task types.

[0127] In the technical solution provided in step S410 of the present application, agent models respectively matching different task types can be output to perform subsequent processing on the tasks to be executed.

[0128] Optionally, the object of the output of the agent model may be an object that provides data processing services, such as a developer, an enterprise user, etc. There is no specific limitation on the output object of the agent model here.

[0129] In the embodiments of the present application, different task types are determined; task processing models under different task types are obtained; the model parameters of the task processing models under different task types are respectively combined with the same pre-trained model to obtain agent models respectively matching different task types; the agent models respectively matching different task types are output, thereby achieving the technical effect of reducing the deployment cost of the models and solving the technical problem of high deployment cost of the models.

[0130] According to the embodiments of the present application, a method for generating a model is also provided. Figure 5 It is a flowchart of a method for generating a model according to the embodiments of the present application. As Figure 5 shown, the method may include the following steps:

[0131] Step S502, obtain training samples under different task types respectively.

[0132] In the technical solution provided in step S502 of the present application above, during model training, training samples under different task types can be obtained respectively to train task processing models corresponding to different task types.

[0133] Step S504, use the training samples under different task types to train task processing models corresponding to the corresponding task types, where the model parameters of the task processing models under different task types are used to be combined with the same pre-trained model to obtain agent models respectively matching different task types, and the agent models are used to control the pre-trained model to analyze the input task to be executed by using the corresponding model parameters to obtain a task execution result.

[0134] In the technical solution provided in step S504 of the present application above, task processing models under different task types can be trained by using the training samples under different task types. The model parameters of the task processing models under different task types can be respectively combined with the same pre-trained model to obtain agent models respectively matching different task types. The pre-trained model can be controlled by the agent model to analyze the input task to be executed by using the corresponding model parameters to obtain a task execution result. Among them, the combination methods may include replacement, fusion, mixing, stacking, etc. This is only an example here and there is no specific limitation on the combination methods. The task execution result may include task execution results in different task stages.

[0135] In this embodiment, training samples under different task types are used to train a task processing model corresponding to each task type. A task processing model obtained by directional training based on LoRA is constructed to obtain an agent model, replacing the agent method of "general large model + system instruction", thereby achieving the purpose of improving the ability of the multi-agent system to complete customized tasks.

[0136] As an alternative embodiment, using training samples under different task types to train a task processing model corresponding to each task type includes: using training samples under different task types to train a pre-trained model to obtain a task processing model corresponding to each task type.

[0137] In this embodiment, when performing model training, a common model base can be shared to train training models under different task types. That is, training samples under different task types can be used to train a pre-trained model to obtain a task processing model corresponding to each task type. This embodiment uses the deployment method of a general model base + N large models to achieve the purpose of efficient model deployment, realizing the technical effect of reducing the model deployment cost and solving the technical problem of high model deployment cost.

[0138] In the embodiments of the present application, training samples under different task types are obtained respectively; training samples under different task types are used to train a task processing model corresponding to each task type. Among them, the model parameters of the task processing models under different task types are used to be combined with the same pre-trained model to obtain agent models respectively matching different task types. The agent models are used to control the pre-trained model to analyze the input task to be executed using the corresponding model parameters to obtain a task execution result, thereby achieving the technical effect of reducing the model deployment cost and solving the technical problem of high model deployment cost.

[0139] According to the embodiments of the present application, another task execution method is also provided. This method can be applied to an agent system. Figure 6 It is a flowchart of another task execution method according to the embodiments of the present application. As Figure 6 shown, this method may include the following steps:

[0140] Step S602, monitoring the task to be executed in the agent system by calling a first interface, where the first interface includes a first parameter, and the parameter value of the first parameter is the task to be executed.

[0141] In the technical solution provided in step S602 of the present application, the to-be-executed tasks in the intelligent agent system can be monitored by calling the first interface. Among them, the first interface can include a first parameter, and the parameter value of the first parameter can be the to-be-executed task. The to-be-executed task can be generated during the operation of the application program in the cloud native scenario. The to-be-executed task can be the work that the intelligent agent system needs to complete, which can be complex tasks such as code generation and solution research, or can be a customized task. For example, it can be an advertising and marketing task. It should be noted that the type of the to-be-executed task is not specifically limited here.

[0142] For example, the terminal device (i.e., the user) can pass the to-be-executed task as the parameter value of the first parameter through the application programming interface (API) of the software as a service (SAAS) service provider, so as to process the to-be-executed task. The system of the SAAS service provider will receive and process the to-be-executed task. Among them, the first interface can be an API endpoint provided by the SAAS platform, and the user can send the to-be-executed task by calling this interface, while the first parameter is used to transfer the to-be-executed task. In this way, the user can use the functions provided by the SAAS platform to process the customized to-be-executed task. The SAAS platform can be the platform on which the intelligent agent system is deployed. Here is only an example, and the type of the SAAS platform is not specifically limited.

[0143] Step S604, identify the current task type of the to-be-executed task.

[0144] Step S606, in the intelligent agent model set, obtain at least one current intelligent agent model that matches the current task type. Among them, the intelligent agent model set includes different intelligent agent models that match different task types, and any intelligent agent model in the different intelligent agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0145] Step S608, input the to-be-executed task into the current intelligent agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the to-be-executed task, and obtain the task execution result.

[0146] Step S610, output the task execution result by calling the second interface. Among them, the second interface includes a second parameter, and the parameter value of the second parameter is the task execution result.

[0147] In the technical solution provided in step S610 of the present application, the task execution result can be output by calling the second interface. Among them, the second interface may include a second parameter, and the parameter value of the second parameter may be the task execution result.

[0148] For example, through the application programming interface, the task execution result can be sent out as the parameter value of the second parameter, so as to provide the task execution result to the terminal device. The system of the SAAS service provider will transmit the processed task execution result to the terminal device and / or the platform device through the interface. Among them, the second interface can be an API endpoint provided by the SAAS platform. The second parameter can be sent by calling this interface, and the second parameter is used to pass the task execution result.

[0149] In the embodiment of the present application, the to-be-executed task in the intelligent agent system is monitored by calling the first interface. Among them, the first interface includes a first parameter, and the parameter value of the first parameter is the to-be-executed task; the current task type of the to-be-executed task is identified; in the intelligent agent model set, at least one current intelligent agent model matching the current task type is obtained. The intelligent agent model set includes different intelligent agent models matching different task types. Any intelligent agent model in the different intelligent agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; the to-be-executed task is input into the current intelligent agent model, and the pre-trained model is controlled by the current model parameters under the current task type to analyze the to-be-executed task to obtain the task execution result; the task execution result is output by calling the second interface. Among them, the second interface includes a second parameter, and the parameter value of the second parameter is the task execution result, so as to achieve the technical effect of reducing the deployment cost of the model and solve the technical problem of high deployment cost of the model.

[0150] According to the embodiment of the present application, another task execution method is also provided. This method can be applied to the intelligent agent system. Fig. 7(a) is a flowchart of another task execution method according to the embodiment of the present application. As shown in Fig. 7(a), the method may include the following steps:

[0151] Step S702, in response to the inquiry information received in the dialogue interface, determine the to-be-executed task in the intelligent agent system in the inquiry information.

[0152] In the technical solution provided in step S702 of the present application, the inquiry information received in the dialogue interface can be obtained, and the to-be-executed task in the intelligent agent system can be determined in the inquiry information. Among them, the dialogue interface can be the chat interface of the mobile terminal. For example, it can be the interface of the mobile phone or the computer. The inquiry information can be content such as natural language information and voice information. This is only an example here, and the type of the inquiry information is not specifically limited.

[0153] For example, in response to receiving the inquiry information "I am writing a novel about future cities. Are there any interesting settings that can be recommended?" in the dialogue interface, in the inquiry information, the tasks to be executed in the agent system can be determined as "providing inspiration" and "story clues".

[0154] Step S704, display the current task type of the task to be executed on the dialogue interface.

[0155] In this embodiment, by identifying the current task type of the task to be executed, the current task type of the task to be executed can be displayed on the dialogue interface.

[0156] Step S706, display the reply information corresponding to the current task type on the dialogue interface, where the reply information is used to represent the task execution result of the task to be executed of the current task type, and the reply information is obtained by controlling the pre-trained model to analyze the task to be executed using the current model parameters under the current task type in the current agent model. The current agent model is obtained from a set of agent models, and the set of agent models includes different agent models that match different task types. Any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0157] In this embodiment, among the model parameters of the task processing model under different task types, obtain the current model parameters of the task processing model under the current task type; combine the current model parameters and the pre-trained model to obtain at least one current agent model that matches the current task type. Obtain at least one current agent model to process the task to be executed to obtain the reply content corresponding to the current task type. Among them, the reply content can be used to represent the task execution result of the task to be executed of the current task type, and can be the task execution result in different task stages.

[0158] For example, in response to receiving the inquiry information "I am writing a novel about future cities. Are there any interesting settings that can be recommended?" in the dialogue interface, in the inquiry information, the tasks to be executed in the agent system can be determined as "providing inspiration" and "story clues". The current task types of the above two tasks to be executed can be respectively identified, and it is determined that the task execution results of the tasks to be executed of the current task type are the provided inspiration content and story clue content. The inspiration content and story clue content can be displayed on the dialogue interface.

[0159] As an optional embodiment, the inquiry information is multimodal information, and the types of multimodal information include at least one of the following: text information containing character information, video frame information containing frame image information, audio information, and the types of reply information include at least one of the following: text information, image information, video information, and voice information.

[0160] In this embodiment, the query information can be multimodal information, which can include text information containing character information, video frame information containing frame image information, audio information, etc. The types of response information can at least include text information, image information, video information, voice information, etc. It should be noted that this is only an example, and there are no specific restrictions on the types of query information and response information.

[0161] In the embodiment of the present application, in response to the query information received in the dialogue interface, in the query information, determine the task to be executed in the agent system; display the current task type of the task to be executed on the dialogue interface; display the response information corresponding to the current task type on the dialogue interface, where the response information is used to represent the task execution result of the task to be executed of the current task type, and the response information is obtained by controlling the pre-trained model to analyze the task to be executed using the current model parameters of the current task type in the current agent model. The current agent model is obtained from the agent model set, and the agent model set includes different agent models matching different task types. Any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type, so as to achieve the technical effect of effectively executing different tasks and solve the technical problem of high model deployment cost.

[0162] Embodiment 2

[0163] According to the embodiment of the present application, an embodiment of an agent system is further provided. FIG. 7(b) is a schematic diagram of an agent system according to the embodiment of the present application. As shown in FIG. 7(b), the agent system 70 may include: a model training end 72 and a model deployment end 74.

[0164] The model training end 72 is used to train the task processing models under different task types.

[0165] In this embodiment, the model training end 72 can obtain training data of different task types. For example, training data of functional tasks, training data of scheduling tasks, training data of evaluation tasks, etc. Based on the training data of different task types, train to obtain task processing models of different task types.

[0166] Optionally, to obtain the training data of different task types, the model training end 72 can train the large model base based on the training data of different task types to obtain task processing models of different task types.

[0167] Optionally, when the model training end 72 performs model training, it can determine the user's needs and determine the task processing models to be trained. Among them, the task processing models can include a scheduling model, an evaluation model, and a function model. It should be noted that only examples are given here, and the types of task processing models are not specifically limited. Obtain the corresponding training data and train the task processing models under different character types.

[0168] The model deployment end 74 is used to combine the model parameters of the task processing models under different task types with the same pre-trained model respectively to obtain agent models respectively matching different task types; output the agent models respectively matching different task types.

[0169] In this embodiment, the model deployment end 74 can monitor the task to be executed and identify the current task type of the task to be executed. According to the current task type, the model parameters of the task processing models under different task types are respectively combined with the same pre-trained model to obtain agent models respectively matching different task types, and output the agent models respectively matching different task types.

[0170] In this embodiment, the agent system can include a model training end 702 and a model deployment end 704, so that the agent system can continuously perform model training and optimization, so as to continuously improve its learning ability and adaptability.

[0171] In this embodiment, through the model training end 72, the task processing models under different task types are trained; through the model deployment end 74, the model parameters of the task processing models under different task types are respectively combined with the same pre-trained model to obtain agent models respectively matching different task types; output the agent models respectively matching different task types, so as to achieve the technical effect of reducing the deployment cost of the model and solve the technical problem of high deployment cost of the model.

[0172] Embodiment 3

[0173] Currently, multi-agent systems based on large models are a hot topic in the field of artificial intelligence. For example, the AutoGen framework, which is based on generative pre-trained models (such as GPT-3.5 or GPT-4), allows developers to define the roles of agents and the interaction methods between agents in natural language and computer code. This framework can automate complex tasks such as code generation and solution research. Although this intelligent agent system with a general large model plus system instructions is convenient for users to get started quickly, this method has extremely high requirements for the large model's capabilities such as compliance and logical reasoning, and has a high degree of dependence on the general large model, resulting in problems such as high costs, high time consumption, and high deployment costs. At the same time, for some customized tasks that rely on non-public data, it is almost impossible to complete them using the general large model only by rewriting instructions, leading to the technical problem of high model deployment costs.

[0174] As an alternative embodiment, general large models represented by GPT-4 have strong instruction-following and role-playing capabilities. This method assumes that the general large model can accurately understand and complete tasks according to role definitions, and uses the general "large model + system instructions" to add system instructions to the input text when calling the general large model. For example, to define an automatic evaluation agent for an advertising and marketing task, the following system instructions can be submitted to the general large model together with the sample to be evaluated: "You are an expert in the field of advertising and marketing. When you receive a product profile and a piece of advertising copy designed for this product, you need to judge whether this advertising copy is suitable for this product from three aspects: accuracy, attractiveness, and fluency." However, this method relies on the high-order capabilities of the general large model such as role-playing and world knowledge, and is not suitable for customized tasks that rely on non-public data. For example, when a painter customer wants to generate images consistent with their own style, this method is not applicable; at the same time, since the inference time of large models with a high number of parameters is higher than that of models with a low number of parameters, this method's repeated calls to the general large model result in high capital and time costs, thus resulting in the technical problem of high model deployment costs.

[0175] To solve the above problems, in this embodiment, an efficient implementation method of a multi-agent system based on LoRA is proposed. To reduce the requirements for the capabilities of large models and meet the customized needs of customers, this embodiment utilizes the efficient training capabilities of LoRA to train vertical capabilities for customers at low cost. To avoid the rapid growth of model deployment costs as the number of agent types increases, the solution of "mounting multiple LoRA networks on a single large model base" is adopted to deploy multiple agent models at the deployment cost of a single large model, thereby achieving the purpose of meeting the needs of customers to build highly customized multi-agent systems at a lower cost, and further achieving the technical effect of reducing the model deployment cost and solving the technical problem of high model deployment cost.

[0176] The following further introduces an efficient implementation method of a multi-agent system based on LoRA proposed in the embodiments of the present application.

[0177] In this embodiment, a multi-agent system is constructed for customers with highly customized needs based on a pre-trained large model with a relatively small number of parameters. Among them, the multi-agent system may include at least one agent model. Figure 8 It is a schematic flowchart of an efficient implementation solution of a multi-agent system based on LoRA according to an embodiment of the present application. As Figure 8 shown, the method may include:

[0178] Step S801, determine the agent model to be trained for the customer and perform efficient training.

[0179] In this embodiment, according to the needs of the customer, the agent model to be trained is determined. Among them, the trained agent model may include a scheduling agent, an evaluation agent, and a functional agent. It should be noted that only examples are given here, and there are no specific restrictions on the trained agent model. The agent model may include the model parameters of the task processing model and the pre-trained model.

[0180] Optionally, training the agent model mainly involves adjusting the model parameters of the task processing model in the agent model, and the model parameters of the pre-trained model may remain unchanged.

[0181] For example, as Figure 8 shown, the training data of functional task 81 can be obtained for agent-1 training,..., the training data of functional task 8N can be obtained for agent-N training, the training data of scheduling task 82 can be obtained for scheduling agent training, and the training data of evaluation task 83 can be obtained for evaluation agent training. The trained agent model can be an agent model that matches the user's needs.

[0182] Optionally, the agent model may include a scheduling agent model, a functional agent model, and an evaluation agent model. Among them, the scheduling agent model can be used to understand the task to be executed, determine the functional agent models that need to be scheduled to solve the task to be executed, and determine the conditions for completing the task to be executed. The functional agent model can be used to accept scheduling and output the task execution result to other agent models or the evaluation agent model. The evaluation agent model can be used to judge whether the task to be executed has been completed and return the execution status of the task to be executed to the scheduling agent model.

[0183] For example, Figure 9 is a schematic diagram of completing a task based on multi-agent interaction according to an embodiment of the present application, as Figure 9 shown, the scheduling agent model 902 obtains the input task 901 to be executed, and determines the functional agent models 903 and 904 that need to be scheduled for the task 901 to be executed. The functional agent models 903 and 904 process the task 901 to be executed and output the processing results to the functional agent model 905. The functional agent model 905 can further process the processing results and output the final results to the evaluation agent model 906. The evaluation agent model 906 can judge whether the task to be executed is completed. If the task to be executed is not completed, it can return the status of the task to be executed to the scheduling agent model 902. If the task to be executed is completed, it can output the task execution result 907.

[0184] In this embodiment, the training based on LoRA requires lower resource specifications and faster iteration speed compared to the supervised fine-tuning (SFT) of all parameters. Moreover, compared with the SFT training method that mixes different task data for training, the training based on LoRA can train a LoRA network for each task separately, and deploy the agent model by combining the current model parameters and the pre-trained model, so as to achieve the purpose of deploying all agent models at a cost close to that of a single large model, and further achieve the technical effect of reducing the deployment cost of the model, and solve the technical problem of high deployment cost of the model.

[0185] For example, select a pre-trained model that has been pre-trained on a large-scale dataset. Add LoRA network layers to the pre-trained model. These layers can be used to update the low-rank parameters during the fine-tuning process. Training data can be obtained and used to fine-tune the pre-trained model. During this process, only the low-rank parameters in the LoRA network layers will be updated, while most of the parameters of the pre-trained model remain unchanged. Through the above method, intelligent agent models for different task types can be finally trained. The intelligent agent models can be deployed into actual applications to predict, generate, or analyze new data.

[0186] In this embodiment, aiming at the shortcoming that the "general large model + system instruction" solution is difficult to implement customized tasks that rely on non-public data, this embodiment proposes an efficient training method based on LoRA to meet the customized needs of customers. Use the model trained by LoRA-directed training as an intelligent agent to replace the intelligent agent solution of "general large model + system instruction", thereby improving the ability of the multi-intelligent agent system to complete customized tasks.

[0187] Step S802, perform efficient deployment of the intelligent agent model based on the large model base.

[0188] In this embodiment, at least one current intelligent agent model matching the current task type can be obtained from the trained intelligent agent model set, and at least one selected current intelligent agent model can be deployed. Among them, the current intelligent agent model can be the trained intelligent agent model.

[0189] Optionally, as Figure 8 shown, select task processing model 84 (LoRA-agent-1), task processing model 85 (LoRA-agent-2), task processing model 86 (LoRA-agent-1), task processing model 87 (LoRA-evaluation agent), and task processing model 88 (scheduling agent), and combine the task processing models with the large model base to obtain at least one current intelligent agent model.

[0190] For example, Figure 10 is a schematic diagram of the deployment of an intelligent agent model according to an embodiment of the present application. As Figure 10As shown in the figure, the model parameters of the LoRA network can include low-rank matrices A and B, and the LoRA network and the large model base 1001 can be combined by addition. In this way, multiple different LoRA networks can be loaded simultaneously during deployment; during inference, the LoRA network to be used can be determined according to the input task to be executed, and the LoRA network can be combined with the large model base in real time to obtain at least one intelligent agent model. Among them, multiple LoRA networks are trained based on the same large model base. Therefore, deployment can be carried out in the way of one large model base + N LoRA networks. Since the model parameters of the LoRA network are all low-rank matrices, the number of parameters of the LoRA network is usually less than 1% of the number of parameters of the large model base. When N < 100, the resource consumption of this efficient deployment method is similar to that of deploying a single large model. Among them, the low-rank matrices A and B can be obtained through the LoRA router 1002.

[0191] Optionally, the input task to be executed is processed by the deployed intelligent agent model 1003 to obtain the output task execution result.

[0192] Since the number of parameters of the low-rank model parameters is less than the parameter threshold, the number of parameters of the task processing model is usually less than 1% of the number of parameters of the large model base. When the number of task processing models called is less than 100, the resource consumption of this efficient deployment method is similar to that of deploying a single large model, thus achieving the technical effect of reducing the deployment cost of the model.

[0193] In this embodiment, the proposed efficient training + efficient deployment scheme realizes the deployment of the entire multi-agent system at the deployment cost close to that of a single large model, which can effectively reduce the calling cost of the large model to solve the problem that the "general large model + system instruction" method requires high capital and time costs.

[0194] In this embodiment, a corresponding task processing model can be trained for each task type. When a task to be executed is obtained, at least one current intelligent agent model can be called based on the current task type of the task to be executed. The intelligent agent model can include the model parameters of the task processing model under the corresponding task type and the same pre-trained model. The current model parameters in the current intelligent agent model are used to control the pre-trained model to analyze the task to be executed to obtain the execution result. Thus, by using a single pre-trained model (such as the large model base) and mounting the model parameters of the task processing models under each task type (which can also be called LoRA network parameters), different intelligent agent models can be deployed at the deployment cost of a single large model, and the requirements of a customized multi-agent system can be met at a relatively low cost, thereby achieving the technical effect of reducing the deployment cost of the model and solving the technical problem of high deployment cost of the model.

[0195] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Figure 11 It is a hardware structure block diagram of a computer terminal (or mobile device) for a task execution method according to an embodiment of this application. As Figure 11 shown, the computer terminal 110 (or mobile device) may include one or more processors 1102 (shown as 1102a, 1102b,..., 1102n in the figure) (the processor 1102 may include, but is not limited to, processing devices such as a microcontroller unit (MCU) or a field programmable gate array (FPGA)), a memory 1104 for storing data, and a transmission device 1106 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 11 the structure shown is only schematic and does not limit the structure of the above electronic device. For example, the computer terminal 110 may further include more or fewer components than Figure 11 shown, or have a different configuration from Figure 11 shown.

[0196] Figure 11 The shown hardware structure block diagram can not only be used as an exemplary block diagram of the above computer terminal 110 (or mobile device), but also as an exemplary block diagram of the above server. In an alternative embodiment, Figure 2 a block diagram shows an embodiment in which the above Figure 11 shown computer terminal 110 (or mobile device) is used as a computing node in the computing environment 201.

[0197] The memory 1104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data processing method in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 1104, that is, implements the above-mentioned data processing method. The memory 1104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 1104 may further include a memory remotely disposed relative to the processor, and these remote memories can be connected to the computer terminal 110 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.

[0198] The transmission device 1106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the computer terminal 110. In one instance, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 1106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0199] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables a user to interact with the user interface of the computer terminal 110 (or mobile device).

[0200] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the object or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for the object to select authorization or rejection.

[0201] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0202] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments 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 such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application.

[0203] Embodiment 4

[0204] According to an embodiment of the present application, there is also provided a task execution device for implementing the Figure 3 task execution method shown above.

[0205] Figure 12 FIG. is a schematic diagram of a task execution device according to an embodiment of the present application. As Figure 12 shown, the task execution device 1200 may include: a first determination unit 1202, a first recognition unit 1204, a first acquisition unit 1206, and a first processing unit 1208.

[0206] The first determination unit 1202 is configured to determine a task to be executed.

[0207] The first recognition unit 1204 is configured to recognize the current task type of the task to be executed;

[0208] The first acquisition unit 1206 is configured to obtain at least one current agent model matching the current task type from an agent model set, where the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0209] The first processing unit 1208 is configured to input the task to be executed into the current agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed, so as to obtain a task execution result.

[0210] Here, the first determination unit 1202, the first recognition unit 1204, the first acquisition unit 1206, and the first processing unit 1208 correspond to steps S302 to S308 in Embodiment 1. The instances and application scenarios implemented by the four units and the corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above units may be hardware components or software components stored in a memory (for example, memory 1104) and processed by one or more processors (for example, processors 1102a, 1102b,..., 1102n). The above units may also be part of a device and may run in the computer terminal 110 provided in Embodiment 3.

[0211] According to an embodiment of the present application, there is also provided a model deployment device for implementing the above Figure 4 model deployment method shown.

[0212] Figure 13 is a schematic diagram of a model deployment device according to an embodiment of the present application. As Figure 13 shown, the model deployment device 1300 may include: a second determination unit 1302, a first acquisition unit 1304, a processing unit 1306, and a first output unit 1308.

[0213] The second determination unit 1302 is configured to determine different task types.

[0214] The first acquisition unit 1304 is configured to acquire task processing models under different task types.

[0215] The processing unit 1306 is configured to respectively combine the model parameters of the task processing models under different task types with the same pre-trained model to obtain agent models respectively matching different task types.

[0216] The first output unit 1308 is configured to output agent models respectively matching different task types.

[0217] Here, it should be noted that the above second determination unit 1302, first acquisition unit 1304, processing unit 1306, and first output unit 1308 correspond to steps S402 to S408 in Embodiment 1. The instances and application scenarios implemented by the five units and the corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above units may be hardware components or software components stored in a memory (for example, memory 1104) and processed by one or more processors (for example, processors 1102a, 1102b,..., 1102n). The above units may also be part of a device and may run in the computer terminal 110 provided in Embodiment 3.

[0218] According to an embodiment of the present application, there is also provided a model generation device for implementing the model generation method shown above. Figure 5 The model generation device for implementing the model generation method shown above.

[0219] Figure 14 FIG. 6 is a schematic diagram of a model generation device according to an embodiment of the present application. As shown in FIG. 6, the model generation device 1400 may include: a second acquisition unit 1402 and a training unit 1404. Figure 14 The second acquisition unit 1402 is configured to acquire training samples under different task types respectively;

[0220] The training unit 1404 is configured to use the training samples under different task types to train a task processing model corresponding to the task type. Among them, the model parameters of the task processing models under different task types are used to be combined with the same pre-trained model to obtain an agent model respectively matching different task types. The agent model is configured to use the corresponding model parameters to control the pre-trained model to analyze the input task to be executed and obtain a task execution result.

[0221] It should be noted here that the above-mentioned second acquisition unit 1402 and training unit 1404 correspond to steps S502 to S504 in Embodiment 1. The two units have the same implementation examples and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned units may be hardware components or software components stored in a memory (for example, memory 1104) and processed by one or more processors (for example, processors 1102a, 1102b..., 1102n). The above-mentioned units may also be part of the device and may run in the computer terminal 110 provided in Embodiment 3.

[0222]

[0223] According to an embodiment of the present application, there is also provided a task execution device for implementing the task execution method shown above. The device may be applied to an agent system. Figure 6 The task execution device for implementing the task execution method shown above. The device may be applied to an agent system.

[0224] Figure 15 Figure 15 FIG. 7 is a schematic diagram of another task execution device according to an embodiment of the present application. As shown in FIG. 7, the task execution device 1500 may include: a second monitoring unit 1502, a third recognition unit 1504, a third acquisition unit 1506, a second processing unit 1508, and a second output unit 1510. The second monitoring unit 1502 is configured to monitor the task to be executed in the agent system by invoking a first interface. The first interface includes a first parameter, and the parameter value of the first parameter is the task to be executed.

[0225]

[0226] ​​The third recognition unit 1504 is configured to recognize the current task type of the task to be executed.

[0227] The third acquisition unit 1506 is configured to acquire at least one current agent model that matches the current task type from the set of agent models, where the set of agent models includes different agent models that match different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0228] The second processing unit 1508 is configured to input the task to be executed into the current agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed, so as to obtain a task execution result.

[0229] The second output unit 1510 is configured to output the task execution result by invoking the second interface, where the second interface includes a second parameter, and the parameter value of the second parameter is the task execution result.

[0230] It should be noted here that the above-mentioned second monitoring unit 1502, third recognition unit 1504, third acquisition unit 1506, second processing unit 1508, and second output unit 1510 correspond to steps S602 to S610 in Embodiment 1. The instances and application scenarios implemented by the five units and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned units may be hardware components or software components stored in a memory (for example, memory 1104) and processed by one or more processors (for example, processors 1102a, 1102b..., 1102n), and the above-mentioned units may also be part of a device and may run in the computer terminal 110 provided in Embodiment 3.

[0231] According to an embodiment of the present application, there is also provided a task execution device for implementing the task execution method shown in FIG. 7(a) above. This device can be applied to an agent system.

[0232] Figure 16 is a schematic diagram of another task execution device according to an embodiment of the present application, as Figure 16 shown. The task execution device 1600 may include: a third determination unit 1602, a first display unit 1604, and a second display unit 1606.

[0233] The third determination unit 1602 is configured to determine the task to be executed in the agent system in the query information in response to the query information received in the dialogue interface.

[0234] The first display unit 1604 is configured to display the current task type of the task to be executed on the dialogue interface.

[0235] A second display unit 1606, configured to display reply information corresponding to the current task type on the dialogue interface, where the reply information is used to represent the task execution result of the to-be-executed task of the current task type, and the reply information is obtained by controlling a pre-trained model to analyze the to-be-executed task by using the current model parameters of the current task type in the current agent model. The current agent model is obtained from a set of agent models, and the set of agent models includes different agent models matching different task types. Any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0236] It should be noted here that the above-mentioned third determination unit 1602, the first display unit 1604, and the second display unit 1606 correspond to steps S702 to S706 in Embodiment 1. The functions of the three units are the same as those of the corresponding steps in terms of the implemented examples and application scenarios, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above units may be hardware components or software components stored in a memory (for example, memory 1104) and processed by one or more processors (for example, processors 1102a, 1102b..., 1102n), and the above units may also be part of a device and can run in the computer terminal 110 provided in Embodiment 3.

[0237] In this task execution device, a corresponding task processing model can be trained for each task type. When a to-be-executed task is obtained, at least one current agent model can be called based on the current task type of the to-be-executed task. The agent model may include the model parameters of the task processing model under the corresponding task type and the same pre-trained model. The pre-trained model is controlled by the current model parameters in the current agent model to analyze the to-be-executed task, and an execution result is obtained. Thus, by using a single pre-trained model (for example, a large model base) and attaching the model parameters of the task processing model under each task type (for example, LoRA network parameters), this method can deploy different agent models by using the deployment cost of a single large model, meet the requirements of a customized multi-agent system at a relatively low cost, and thus achieve the technical effect of reducing the model deployment cost and solve the technical problem of high model deployment cost.

[0238] Embodiment 5

[0239] An embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above computer terminal may also be replaced with a terminal device such as a mobile terminal.

[0240] Optionally, in this embodiment, the above computer terminal may be at least one network device among multiple network devices of a computer network.

[0241] In this embodiment, the above computer terminal may execute program code for the following steps in the task execution method: determining a task to be executed; identifying a current task type of the task to be executed; in a set of agent models, obtaining at least one current agent model that matches the current task type, where the set of agent models includes different agent models that match different task types, and any agent model among the different agent models reuses the same pre-trained model through model parameters of a task processing model under the corresponding task type; inputting the task to be executed into the current agent model, and using the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed, so as to obtain a task execution result.

[0242] Optionally, Figure 17 is a structural block diagram of a computer terminal according to an embodiment of the present application, as Figure 17 shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 1702, a memory 1704, and a transmission device 1706.

[0243] Among them, the memory may be used to store software programs and modules, such as program instructions / modules corresponding to the task execution method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above task execution method. The memory may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely provided relative to the processor, and these remote memories may be connected to the computer terminal A through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0244] The processor may call information and application programs stored in the memory through the transmission device to execute the following steps: determining a task to be executed; identifying a current task type of the task to be executed; in a set of agent models, obtaining at least one current agent model that matches the current task type, where the set of agent models includes different agent models that match different task types, and any agent model among the different agent models reuses the same pre-trained model through model parameters of a task processing model under the corresponding task type; inputting the task to be executed into the current agent model, and using the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed, so as to obtain a task execution result.

[0245] Optionally, the above-mentioned processor may also execute the program code of the following steps: in the set of agent models, combine the current model parameters and the pre-trained model to obtain the current agent model.

[0246] Optionally, the above-mentioned processor may also execute the program code of the following steps: adjust the current model parameters in the set of agent models; superimpose the adjusted current model parameters on the pre-trained model to obtain the current agent model.

[0247] Optionally, the above-mentioned processor may also execute the program code of the following steps: keep the model parameters of the pre-trained model unchanged during the process of adjusting the current model parameters.

[0248] Optionally, the above-mentioned processor may also execute the program code of the following steps: obtain the task processing model under the current task type, where the task processing model is trained based on the training samples under the current task type; determine the current model parameters based on the model parameters of the trained task processing model.

[0249] Optionally, the above-mentioned processor may also execute the program code of the following steps: identify the low-rank model parameters from the model parameters of the trained task processing model, where the number of parameters of the low-rank model parameters is less than the parameter threshold; determine the low-rank model parameters as the current model parameters in the set of agent models.

[0250] Optionally, the above-mentioned processor may also execute the program code of the following steps: obtain the task processing model under the current task type from different task processing models under different task types, where the different task processing models under different task types are trained based on the training samples under the corresponding task types.

[0251] Optionally, the above-mentioned processor may also execute the program code of the following steps: obtain multiple subtasks of the input task, where the task execution results of each of the multiple subtasks are used to determine the task execution result of the input task; determine the task to be executed among the multiple subtasks.

[0252] The processor may call the information and application programs stored in the memory through the transmission device to execute the following steps: determine different task types; obtain the task processing models under different task types; respectively combine the model parameters of the task processing models under different task types with the same pre-trained model to obtain agent models respectively matching different task types; output the agent models respectively matching different task types.

[0253] The processor can call the information and application programs stored in the memory through a transmission device to execute the following steps: respectively obtain training samples under different task types; use the training samples under different task types to train task processing models corresponding to the task types, wherein the model parameters of the task processing models under different task types are used to be combined with the same pre-trained model to obtain agent models respectively matching different task types, and the agent models are used to control the pre-trained model to analyze the input task to be executed by using the corresponding model parameters to obtain a task execution result.

[0254] Optionally, the above-mentioned processor can also execute the program code of the following steps: use the training samples under different task types to train the pre-trained model to obtain task processing models corresponding to the task types.

[0255] The processor can call the information and application programs stored in the memory through a transmission device to execute the following steps: monitor the task to be executed in the agent system by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is the task to be executed; identify the current task type of the task to be executed; in the agent model set, obtain at least one current agent model matching the current task type, wherein the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; input the task to be executed into the current agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed to obtain a task execution result; output the task execution result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the task execution result.

[0256] The processor can call the information and application programs stored in the memory through a transmission device to execute the following steps: in response to the inquiry information received in the dialogue interface, determine the task to be executed in the agent system in the inquiry information; display the current task type of the task to be executed on the dialogue interface; display the reply information corresponding to the current task type on the dialogue interface, wherein the reply information is used to represent the task execution result of the task to be executed of the current task type, and the reply information is obtained by using the current model parameters under the current task type in the current agent model to control the pre-trained model to analyze the task to be executed, and the current agent model is obtained from the agent model set, and the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0257] By adopting the embodiments of the present application, a corresponding task processing model can be trained for each task type. When a task to be executed is obtained, at least one current agent model can be called based on the current task type of the task to be executed. Among them, the agent model can include the model parameters of the task processing model under the corresponding task type and the same pre-trained model. The pre-trained model is controlled by the current model parameters in the current agent model to analyze the task to be executed, and an execution result is obtained. Thus, by using a single pre-trained model (for example, a large model base), the model parameters of the task processing models under each task type can be mounted. This method can deploy different agent models by using the deployment cost of a single large model, and can meet the requirements of a customized multi-agent system at a relatively low cost, thereby achieving the technical effect of reducing the model deployment cost and solving the technical problem of high model deployment cost.

[0258] Those of ordinary skill in the art can understand that Figure 17 the structure shown is only schematic, and computer terminal A can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (abbreviated as MID), a PAD and other terminal devices. Figure 17 It does not limit the structure of the above computer terminal A. For example, computer terminal A may further include more or fewer components (such as a network interface, a display device, etc.) than those shown in Figure 17 or have a different configuration from that shown in Figure 17 shown.

[0259] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program, and the program can be stored in a computer-readable storage medium. The storage medium may include: a flash drive, a read-only memory (abbreviated as ROM), a random access memory (abbreviated as RAM), a magnetic disk or an optical disc, etc.

[0260] Embodiment 6

[0261] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the above computer-readable storage medium can be used to store the program code executed by the task execution method provided in the first embodiment above.

[0262] Optionally, in this embodiment, the above computer-readable storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0263] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for performing the following steps: determining a task to be executed; identifying the current task type of the task to be executed; in the set of agent models, obtaining at least one current agent model that matches the current task type, where the set of agent models includes different agent models that match different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; inputting the task to be executed into the current agent model, and using the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed to obtain a task execution result.

[0264] Optionally, the above computer-readable storage medium may also execute program codes for the following steps: in the set of agent models, combining the current model parameters and the pre-trained model to obtain the current agent model.

[0265] Optionally, the above computer-readable storage medium may also execute program codes for the following steps: adjusting the current model parameters in the set of agent models; superimposing the adjusted current model parameters on the pre-trained model to obtain the current agent model.

[0266] Optionally, the above computer-readable storage medium may also execute program codes for the following steps: during the process of adjusting the current model parameters, keeping the model parameters of the pre-trained model unchanged.

[0267] Optionally, the above computer-readable storage medium may also execute program codes for the following steps: obtaining the task processing model under the current task type, where the task processing model is trained based on the training samples under the current task type; determining the current model parameters based on the model parameters of the trained task processing model.

[0268] Optionally, the above computer-readable storage medium may also execute program codes for the following steps: identifying low-rank model parameters from the model parameters of the trained task processing model, where the number of parameters of the low-rank model parameters is less than the parameter threshold; determining the low-rank model parameters as the current model parameters in the set of agent models.

[0269] Optionally, the above computer-readable storage medium may also execute program codes for the following steps: obtaining the task processing model under the current task type from the different task processing models under different task types, where the different task processing models under different task types are trained based on the training samples under the corresponding task types.

[0270] Optionally, the above computer-readable storage medium may also execute program code for the following steps: determining different task types; obtaining task processing models for different task types; respectively combining the model parameters of the task processing models for different task types with the same pre-trained model to obtain agent models respectively matching different task types; and outputting the agent models respectively matching different task types.

[0271] As an optional example, the computer-readable storage medium is configured to store program code for performing the following steps: determining different task types; obtaining task processing models for different task types; respectively combining the model parameters of the task processing models for different task types with the same pre-trained model to obtain agent models respectively matching different task types; and outputting the agent models respectively matching different task types.

[0272] As an optional example, the computer-readable storage medium is configured to store program code for performing the following steps: respectively obtaining training samples for different task types; using the training samples for different task types to train task processing models for corresponding task types, where the model parameters of the task processing models for different task types are used to be combined with the same pre-trained model to obtain agent models respectively matching different task types, and the agent models are used to control the pre-trained model to analyze the input task to be executed by using the corresponding model parameters to obtain a task execution result.

[0273] Optionally, the above computer-readable storage medium may also execute program code for the following steps: using the training samples for different task types to train the pre-trained model to obtain a task processing model for the corresponding task type.

[0274] As an optional example, the computer-readable storage medium is configured to store program code for performing the following steps: monitoring the task to be executed in the agent system by calling a first interface, where the first interface includes a first parameter, and the parameter value of the first parameter is the task to be executed; identifying the current task type of the task to be executed; obtaining at least one current agent model matching the current task type from an agent model set, where the agent model set includes different agent models respectively matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model for the corresponding task type; inputting the task to be executed into the current agent model, and using the current model parameters for the current task type to control the pre-trained model to analyze the task to be executed to obtain a task execution result; and outputting the task execution result by calling a second interface, where the second interface includes a second parameter, and the parameter value of the second parameter is the task execution result.

[0275] As an alternative example, a computer-readable storage medium is configured to store program code for performing the following steps: in response to query information received in a dialogue interface, determine, in the query information, a task to be executed in an agent system; display, on the dialogue interface, the current task type of the task to be executed; display, on the dialogue interface, reply information corresponding to the current task type, where the reply information is used to represent the task execution result of the task to be executed of the current task type, and the reply information is obtained by controlling a pre-trained model to analyze the task to be executed by using the current model parameters of the current task type in the current agent model, the current agent model is obtained from an agent model set, the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type.

[0276] In an embodiment of the present application, a corresponding task processing model can be trained for each task type. When a task to be executed is obtained, at least one current agent model can be called based on the current task type of the task to be executed. Among them, the agent model can include the model parameters of the task processing model under the corresponding task type and the same pre-trained model. The pre-trained model is controlled by using the current model parameters in the current agent model to analyze the task to be executed, and an execution result is obtained. Thus, the model parameters of the task processing model under each task type can be mounted by using a single pre-trained model (for example, a large model base). This method can deploy different agent models by using the deployment cost of a single large model, and can meet the requirements of a customized multi-agent system at a relatively low cost, thereby achieving the technical effect of reducing the model deployment cost and solving the technical problem of high model deployment cost.

[0277] Embodiment 6

[0278] An embodiment of the present application can provide an electronic device, and the electronic device can include a memory and a processor.

[0279] Figure 18 It is a block diagram of an electronic device for a task execution method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present application described and / or claimed herein.

[0280] Such as Figure 18As shown, device 1800 includes a computing unit 1801, which can perform various appropriate actions and processes according to computer programs stored in a read-only memory (ROM) 1802 or computer programs loaded from a storage unit 1808 into a random access memory (RAM) 1803. In the RAM 1803, various programs and data required for the operation of device 1800 can also be stored. The computing unit 1801, the ROM 1802, and the RAM 1803 are connected to each other via a bus 1804. An input / output (I / O) interface 1805 is also connected to the bus 1804.

[0281] Multiple components in device 1800 are connected to the I / O interface 1805, including: an input unit 1806, such as a keyboard, a mouse, etc.; an output unit 1804, such as various types of displays, speakers, etc.; a storage unit 1808, such as a magnetic disk, an optical disc, etc.; and a communication unit 1809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1809 allows device 1800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0282] The computing unit 1801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1801 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1801 executes the various methods and processes described above, such as the data verification method. For example, in some embodiments, the data verification method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 1808. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 1800 via the ROM 1802 and / or the communication unit 1809. When the computer program is loaded into the RAM 1803 and executed by the computing unit 1801, one or more steps of the data verification method described above can be executed. Alternatively, in other embodiments, the computing unit 1801 can be configured to execute the data verification method in any other appropriate way (e.g., by means of firmware).

[0283] According to an embodiment of the present application, a task execution method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0284] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0285] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program codes can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.

[0286] In the context of this application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0287] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display, monitor)) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0288] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.

[0289] A computer system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.

[0290] Embodiments of the present application also provide a computer program product, including computer instructions, which implement the state detection method of the database product provided by the embodiments of the present application when executed by a processor.

[0291] In this embodiment, the above computer instructions may be stored in a read-only memory (ROM), or be computer instructions loaded from a storage unit into a random access memory (RAM) to perform various appropriate actions and processes in the state detection method of the database product by the processor.

[0292] In some embodiments, part or all of the above computer instructions may be loaded and / or installed onto an electronic device via the read-only memory and / or the communication unit. When the computer instructions are loaded into the random access memory and executed by the computing unit, one or more steps in the state detection method of the database product described above may be executed.

[0293] It should be noted that the serial numbers of the above embodiments of the present application are only for description and do not represent the superiority or inferiority of the embodiments.

[0294] In the above embodiments of the present application, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0295] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other may be through some interfaces, and the indirect couplings or communication connections of units or modules may be in electrical or other forms.

[0296] 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 may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0297] In addition, in each embodiment of the present application, each functional unit may be integrated into a processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0298] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0299] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A task execution method, characterized in that, Including: Determine the task to be executed; Identify the current task type of the task to be executed; In the set of agent models, obtain at least one current agent model that matches the current task type, where the set of agent models includes different agent models that match different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; Input the task to be executed into the current agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed, and obtain a task execution result.

2. The method according to claim 1, wherein In the set of agent models, obtaining at least one current agent model that matches the current task type includes: In the set of agent models, combine the current model parameters and the pre-trained model to obtain the current agent model.

3. The method according to claim 2, wherein In the set of agent models, combining the current model parameters and the pre-trained model to obtain the current agent model includes: In the set of agent models, adjust the current model parameters; Overlay the adjusted current model parameters on the pre-trained model to obtain the current agent model.

4. The method according to claim 3, characterized in that The method further includes: During the process of adjusting the current model parameters, keep the model parameters of the pre-trained model unchanged.

5. The method according to claim 1, characterized in that, Before obtaining at least one current agent model that matches the current task type in the set of agent models, the method further includes: Obtain the task processing model under the current task type, where the task processing model is trained based on the training samples under the current task type; Based on the model parameters of the trained task processing model, determine the current model parameters.

6. The method according to claim 5, wherein Based on the model parameters of the trained task processing model, determining the current model parameters includes: From the model parameters of the trained task processing model, identify low-rank model parameters, where the number of parameters of the low-rank model parameters is less than the parameter threshold; Determine the low-rank model parameters as the current model parameters in the set of agent models.

7. The method according to claim 5, characterized in that, Obtaining the task processing model under the current task type includes: In the different task processing models under the different task types, obtain the task processing model under the current task type, where the different task processing models under the different task types are trained based on the training samples under the corresponding task types.

8. The method according to any one of claims 1 to 7, characterized in that Determining the task to be executed includes: Obtain multiple subtasks of the input task, where the task execution results of the multiple subtasks are used to determine the task execution result of the input task; Among the multiple subtasks, determine the task to be executed.

9. A method for deploying a model, characterized in that Including: Determine different task types; Obtain the task processing models under the different task types; Respectively combine the model parameters of the task processing models under the different task types with the same pre-trained model to obtain agent models that respectively match the different task types; Output agent models that respectively match the different task types.

10. A method for generating a model, characterized in that, Including: Obtain training samples under different task types respectively; Use the training samples under the different task types to train task processing models corresponding to the task types. Among them, the model parameters of the task processing models under the different task types are used to be combined with the same pre-trained model to obtain agent models respectively matching the different task types. The agent models are used to control the pre-trained model to analyze the input task to be executed by using the corresponding model parameters and obtain a task execution result.

11. The method according to claim 10, wherein Using the training samples under the different task types to train task processing models corresponding to the task types includes: Use the training samples under the different task types to train the pre-trained model to obtain the task processing model corresponding to the task type.

12. A task execution method, characterized in that Applied to an agent system, it includes: Monitor the task to be executed in the agent system by calling a first interface. Among them, the first interface includes a first parameter, and the parameter value of the first parameter is the task to be executed; Identify the current task type of the task to be executed; In an agent model set, obtain at least one current agent model matching the current task type. Among them, the agent model set includes different agent models matching different task types, and any agent model in the different agent models reuses the same pre-trained model through the model parameters of the task processing model under the corresponding task type; Input the task to be executed into the current agent model, and use the current model parameters under the current task type to control the pre-trained model to analyze the task to be executed to obtain a task execution result; Output the task execution result by calling a second interface. Among them, the second interface includes a second parameter, and the parameter value of the second parameter is the task execution result.

13. An agent system, characterized in that, It includes: A model training end for training task processing models under different task types; A model deployment end for respectively combining the model parameters of the task processing models under the different task types with the same pre-trained model to obtain agent models respectively matching the different task types; Output agent models respectively matching the different task types.

14. An electronic device, characterized in that, It includes: A memory and a processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 12 are implemented.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program. When the program runs, it controls the device where the storage medium is located to execute the method described in any one of claims 1 to 12.

16. A computer program product, characterized in that, It includes computer instructions. When the computer instructions are executed by the processor, the steps of the method described in any one of claims 1 to 12 are implemented.