Interaction method, system, computer device and storage medium
By managing intelligent agents and pre-trained language models to generate multiple tasks and selecting the target task execution agent, the problem of users entering clear natural language multiple times is solved, and the effect of rapid feedback results and simplified operations is achieved.
Patent Information
- Application Number
- CN202410108302.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-01-25
AI Technical Summary
In existing natural language processing technologies, users need to input clear natural language multiple times to determine their purpose, which makes the operation cumbersome and affects the interaction efficiency.
By managing the intelligent agent to receive the user's natural language input, using the pre-trained language model and domain knowledge base to generate multiple tasks, selecting the target task execution agent and generating execution results, user operations are simplified.
It can quickly feedback results without multiple interactions, improve user experience, execute multiple tasks in parallel, and simplify the operation process.
Smart Images

Figure CN120509474B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of natural language processing, and in particular to an interaction method, system, computer device, and storage medium. Background Art
[0002] Natural language processing technology provides users with feedback based on their natural language input. When users interact with machines through natural language, they often input natural language that doesn't clearly express their intent. For example, the user's natural language input is ambiguous or very concise. Current interaction methods involve multiple interactions with users to determine their intent, and then providing feedback based on that intent.
[0003] In each interaction, users are guided to enter natural language input that clearly expresses their purpose. This requires users to enter natural language input multiple times, making the feedback process more cumbersome. Simplifying the feedback process has become a pressing issue. Summary of the Invention
[0004] In view of this, embodiments of the present disclosure provide an interaction method, system, computer device, and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides an interaction method, the method comprising:
[0006] The management agent receives a user's natural language input; uses a first pre-trained language model and, based on a domain knowledge base, generates a plurality of tasks corresponding to the natural language input and obtains task information for each of the plurality of tasks, wherein the domain knowledge base includes information indicating tasks involved in each of a plurality of processes, and the plurality of tasks are tasks involved in processes related to the natural language input; for each of the plurality of tasks, selects a target task execution agent corresponding to the task from at least one task execution agent corresponding to the type of the task, and provides the task information for the task to the target task execution agent corresponding to the task;
[0007] For each of the plurality of tasks, a target task execution agent corresponding to the task generates an execution result corresponding to the task based on the domain knowledge base and the task information of the task using a second pre-trained language model corresponding to the target task execution agent;
[0008] The management agent feeds back the execution result corresponding to each task to the user.
[0009] In one possible implementation, the method further includes:
[0010] For each of the multiple tasks, the target task execution agent corresponding to the task writes the execution result corresponding to the task into the execution result message queue, wherein the management agent obtains the execution result corresponding to the task from the execution result message queue.
[0011] In one possible implementation, providing the task information of the task to the target task execution agent corresponding to the task includes: the management agent writes the task information of the task into the task message queue, wherein the target task execution agent corresponding to the task obtains the task information of the task from the task message queue.
[0012] In one possible implementation, the multiple tasks have an execution order, and the multiple tasks include a first task indicated by the execution order and subsequent tasks after the first task indicated by the execution order; and the method further includes:
[0013] Sending a prompt word corresponding to the first task to the target task execution agent corresponding to the first task to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the first task, where the prompt word corresponding to the first task indicates the target of the first task;
[0014] For each subsequent task among the multiple tasks, after the execution of the previous task of the subsequent task is completed, a prompt word corresponding to the subsequent task is sent to the target task execution agent corresponding to the subsequent task to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the subsequent task, wherein the prompt word corresponding to the subsequent task indicates that the goal of the previous task of the subsequent task has been achieved and the goal of the subsequent task needs to be achieved.
[0015] In one possible implementation, feeding back the execution result corresponding to each task to the user includes: generating an execution result report including the execution result corresponding to each task; writing the execution result report to the execution result message queue, wherein the user's device obtains the execution result report from the execution result message queue.
[0016] In one possible implementation, the method further includes:
[0017] The management agent receives feedback information from the user's device and updates the domain knowledge base based on the feedback information, wherein the feedback information includes at least one of the following: information indicating that the corresponding task among the multiple tasks is not the task that the user expects to perform, and information indicating that there is no task that the user expects among the multiple tasks.
[0018] In a second aspect, an embodiment of the present disclosure provides an interactive system, the system comprising:
[0019] A management agent is configured to receive natural language input from a user; generate, using a first pre-trained language model and based on a domain knowledge base, a plurality of tasks corresponding to the natural language input and obtain task information for each of the plurality of tasks, wherein the domain knowledge base includes information indicating tasks involved in each of a plurality of processes, and the plurality of tasks are tasks involved in processes related to the natural language input; for each of the plurality of tasks, select a target task execution agent corresponding to the task from at least one task execution agent corresponding to the type of the task, and provide the task information for the task to the target task execution agent corresponding to the task; and provide feedback to the user on the execution result corresponding to each task;
[0020] A task execution agent is used to generate an execution result corresponding to the task based on the domain knowledge base and the task information of the task by using the second pre-trained language model corresponding to the task execution agent when the task execution agent is the target task execution agent corresponding to the task.
[0021] In one possible implementation, the task execution agent is used to write the execution result corresponding to the task into the execution result message queue when the task execution agent is the target task execution agent corresponding to the task, wherein the management agent obtains the execution result corresponding to the task from the execution result message queue.
[0022] In one possible implementation, the management agent is used to write the task information of the task into a task message queue, wherein the target task execution agent corresponding to the task obtains the task information of the task from the task message queue.
[0023] In a possible implementation, the multiple tasks have an execution order, and the multiple tasks include a first task indicated by the execution order and subsequent tasks after the first task indicated by the execution order; and the interactive system further includes:
[0024] A planning unit is used to send a prompt word corresponding to the first task to the target task execution agent corresponding to the first task, so as to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the first task, and the prompt word corresponding to the first task indicates the goal of the first task; for each subsequent task among the multiple tasks, after the execution of the previous task of the subsequent task is completed, send a prompt word corresponding to the subsequent task to the target task execution agent corresponding to the subsequent task, so as to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the subsequent task, wherein the prompt word corresponding to the subsequent task indicates that the goal of the previous task of the subsequent task has been achieved and the goal of the subsequent task needs to be achieved.
[0025] In one possible implementation, the management agent is used to generate an execution result report including the execution results corresponding to each task; and write the execution result report to the execution result message queue, wherein the user's device obtains the execution result report from the execution result message queue.
[0026] In one possible implementation, the management agent is used to receive feedback information from the user's device and update the domain knowledge base based on the feedback information, and the feedback information includes at least one of the following: information indicating that the corresponding task among the multiple tasks is not the task that the user expects to perform, and information indicating that there is no task that the user expects among the multiple tasks.
[0027] In a third aspect, an embodiment of the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions stored in the memory, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0028] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0029] The interactive method provided by the disclosed embodiments includes a management agent receiving a user's natural language input; utilizing a first pre-trained language model to generate multiple tasks corresponding to the natural language input based on a domain knowledge base; obtaining task information for each of the multiple tasks based on the domain knowledge base; selecting a target task execution agent corresponding to each of the multiple tasks from at least one task execution agent corresponding to the task type, and providing the task information to the target task execution agent; utilizing a second pre-trained language model corresponding to the target task execution agent, based on the domain knowledge base and the task information, to generate an execution result corresponding to each of the multiple tasks; and providing feedback to the user based on the management agent. This eliminates the need for multiple interactions with the user to determine the user's intent. This simplifies user operations during the feedback process, allowing for faster feedback, enhancing the user experience. Furthermore, multiple task execution agents can operate in parallel, enabling simultaneous feedback of execution results to different users. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 It is a structural diagram of an example of an interactive system provided by an embodiment of the present disclosure.
[0032] Figure 2 is a flowchart of an interactive method provided by an embodiment of the present disclosure;
[0033] Figure 3 is a flowchart of another interactive method provided by an embodiment of the present disclosure;
[0034] Figure 4 It is a schematic diagram of the hardware structure of the computer device provided in the embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.
[0036] refer to Figure 1 , which shows a structural diagram of an example of an interactive system provided by an embodiment of the present disclosure.
[0037] The interactive system 100 includes: a user's device 101, a management agent 102, and a task execution agent 103. Figure 1 Only one task execution agent, namely, task execution agent 103, is shown as an example. In the disclosed embodiment, there can be multiple task execution agents, and multiple task execution agents can work in parallel. Task execution agent 103 is a target task execution agent selected by management agent 102 and corresponding to one of the multiple tasks.
[0038] In the embodiment of the present disclosure, the management agent 102 and the task execution agent 103 can both be software modules, and the management agent 102 and the task execution agent 103 run on corresponding servers respectively.
[0039] Management agent 102 receives a user's natural language input from user device 101. Management agent 102 uses a first pre-trained language model and a domain knowledge base to generate multiple tasks corresponding to the user's natural language input. The multiple tasks include: Task 1 corresponding to the user's natural language input, Task 2 corresponding to the user's natural language input, and Task N corresponding to the user's natural language input. Management agent 102 uses the first pre-trained language model and the domain knowledge base to obtain task information for each of the multiple tasks. Management agent 102 writes the task information for each task into a task message queue. Task execution agent 103 obtains task information for the task executed by task execution agent 103 from the task message queue and generates an execution result corresponding to the task using a second pre-trained language model corresponding to task execution agent 103, based on the domain knowledge base and the task information of the task. Task execution agent 103 writes the execution result corresponding to the task into an execution result message queue. Management agent 102 can obtain the execution result corresponding to each task from the execution result message queue and provide feedback to the user.
[0040] refer to Figure 2, which shows a flow chart of an interactive method provided by an embodiment of the present disclosure. The method can be executed by a computer device, such as a server. The management agent and the task execution agent can both be software modules, and the management agent and the task execution agent respectively run on corresponding servers.
[0041] In step S201, the management agent receives the user's natural language input; using the first pre-trained language model, based on the domain knowledge base, multiple tasks corresponding to the natural language input are generated and task information of each of the multiple tasks is obtained; for each of the multiple tasks, a target task execution agent corresponding to the task is selected from at least one task execution agent corresponding to the type of the task, and the task information of the task is provided to the target task execution agent corresponding to the task.
[0042] The domain knowledge base may include information indicating the tasks involved in each of the multiple processes.
[0043] For process A among multiple processes, based on the domain knowledge base, it is possible to determine which tasks are involved in process A. Process A is any one of the multiple processes.
[0044] The multiple tasks corresponding to the user's natural language input are all tasks involved in a process related to the natural language input.
[0045] In step S201, the management agent uses the first pre-trained language model to generate multiple tasks corresponding to the user's natural language input based on the domain knowledge base.
[0046] The first pre-trained language model may be a large-scale language model (LLM).
[0047] For example, consider a user's natural language input with ambiguous intent, such as "I need to find a candidate with good teamwork skills." The process associated with this natural language input is the recruitment process, which involves multiple tasks, such as creating a job description, screening resumes, and scheduling interviews. The generated tasks corresponding to the user's natural language input include: creating a job description, screening resumes, scheduling interviews, and scheduling interviews.
[0048] The domain knowledge base may include: usage information of each of the multiple processes. Process A is used to describe the usage of process A. In step S201, when the first pre-trained language model uses the first pre-trained language model to generate multiple tasks corresponding to the natural language input input by the user according to the domain knowledge base, the first pre-trained language model can analyze the semantics of the user's natural language input and the correlation between each of the multiple processes, and determine the process with the highest correlation between usage information and the user's natural language input as the process related to the natural language input. According to the domain knowledge base, multiple tasks involved in the process related to the natural language input, that is, multiple tasks corresponding to the natural language input input by the user, are determined, and multiple tasks corresponding to the natural language input input by the user are generated.
[0049] In step S201, for task A among multiple tasks corresponding to the user's natural language input, the management agent uses the first pre-trained language model to obtain task information of task A based on the domain knowledge base. The task information of task A is the information required to execute task A.
[0050] Task A may be any one of multiple tasks corresponding to the user's natural language input.
[0051] The task information of task A may include a template required to perform task A, a form required to perform task A, each step involved in task A, and the like.
[0052] As an example, a user's natural language input is an input with an ambiguous purpose, such as "I need to find a candidate with good teamwork skills." This natural language input is related to the recruitment process. The recruitment process involves multiple tasks, such as creating a job description, screening resumes, and scheduling interviews. The generated tasks corresponding to the user's natural language input include creating a job description, screening resumes, and scheduling interviews. In this example, the domain knowledge base includes a job description template, which includes fields such as responsibilities, qualifications, and job requirements. The domain knowledge base also includes pre-interview steps, in-interview steps, post-interview steps, example interview questions, and a candidate evaluation form for evaluating candidates. The candidate evaluation form is used to assess a candidate's skills and experience during the interview process. The task information for creating a job description includes the job description template. The task information for screening resumes includes multiple resumes. The task information for scheduling an interview includes pre-interview steps, in-interview steps, post-interview steps, example interview questions, and a candidate evaluation form for evaluating candidates.
[0053] In step S201, the management agent selects a target task execution agent corresponding to each of the multiple tasks corresponding to the user's natural language input from at least one task execution agent corresponding to the type of the task.
[0054] For task A among multiple tasks corresponding to the user's natural language input, each task execution agent corresponding to the type of task A is a task execution agent that can execute tasks of the type of task A.
[0055] Task A can be any one of the multiple tasks. When the management agent selects a target task execution agent of the type corresponding to task A from at least one task execution agent of the type corresponding to task A, it can randomly select a task execution agent from the at least one task execution agent of the type corresponding to task A and use the random task execution agent as the target task execution agent for task A. It can also select the currently most idle task execution agent from the at least one task execution agent of the type corresponding to task A and use the currently most idle task execution agent as the target task execution agent for task A.
[0056] As an example, the multiple tasks corresponding to the natural language input entered by the user include: creating a job description task, screening resumes task, arranging interview tasks, and the like. For the task of creating a job description, a target task execution agent corresponding to the task of creating a job description is selected from at least one task execution agent corresponding to the task type of creating a job description. For the task of screening resumes, a target task execution agent corresponding to the task of screening resumes is selected from at least one task execution agent corresponding to the task type of screening resumes. For the task of arranging an interview, a target task execution agent corresponding to the task of arranging an interview is selected from at least one task execution agent corresponding to the task type of arranging an interview.
[0057] In step S202, for each of the multiple tasks, the target task execution agent corresponding to the task uses the second pre-trained language model corresponding to the target task execution agent to generate an execution result corresponding to the task based on the domain knowledge base and the task information of the task.
[0058] The second pre-trained language model can be a large-scale language model. The domain knowledge base may include prompt words corresponding to the type of the task. The target task execution agent corresponding to the task may obtain the prompt words corresponding to the type of the task from the domain knowledge base, and provide the prompt words corresponding to the type of the task to the second pre-trained language model corresponding to the target task execution agent corresponding to the task. The prompt words corresponding to the type of the task may prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the task to perform the task according to the content in the domain knowledge base and the task information of the task. The prompt words corresponding to the type of task may also include some examples of historical tasks of the type that perform the task, prompting the second pre-trained language model how to perform the task.
[0059] When the second pre-trained language model corresponding to the target task execution agent of a task executes the task, it can search for the field values of the fields in the template and table in the task information of the task, and generate the execution result corresponding to the task based on the task information of the task and the searched field values.
[0060] As an example, the natural language input entered by the user is a natural language input related to a recruitment process. The multiple tasks corresponding to the natural language input entered by the user include: creating a job description task, screening resumes task, arranging interview tasks, and the like.
[0061] The task information for creating a job description task includes a job description template. The task information for screening resumes task includes: multiple resumes. The task information for arranging an interview task includes the steps before the interview, the steps during the interview, the steps after the interview, examples of interview questions, and a candidate evaluation form for evaluating candidates. The execution result corresponding to the task of creating a job description is the job description information. The execution result corresponding to the task of screening resumes includes the resume information of the screened candidates. The execution result corresponding to the task of arranging an interview includes the interview arrangement information for the candidates. The domain knowledge base includes: a job description template. The job description template includes fields such as responsibilities, qualification requirements, and job requirements. The domain knowledge base includes the steps before the interview, the steps during the interview, the steps after the interview, examples of interview questions, and a candidate evaluation form for evaluating candidates.
[0062] The target task execution agent corresponding to the job description creation task uses the second pre-trained language model corresponding to the target task execution agent to search for the field values of each field in the job description template and generate job description information.
[0063] The target task execution agent corresponding to the resume screening task uses the second pre-trained language model corresponding to the target task execution agent to screen out candidate information from the database storing the applicant's resume information based on the field values of each field in the job description information.
[0064] The target task execution agent corresponding to the interview arrangement task uses the second pre-trained language model corresponding to the target task execution agent to generate the candidate's interview arrangement information including the candidate's interview time, the candidate's interview location, the steps before the interview, the steps during the interview, the steps after the interview, examples of interview questions, and a candidate evaluation form for evaluating the candidate.
[0065] In step S203, the management agent feeds back the execution result corresponding to each task to the user.
[0066] In step S203, the management agent may generate an execution result report including the execution result corresponding to each task, and send the execution result report including the execution result corresponding to each task to the user's device, thereby feeding back the execution result corresponding to each task to the user.
[0067] refer to Figure 3 , which shows a flow chart of another interactive method provided by an embodiment of the present disclosure. The method can be executed by a computer device such as a server.
[0068] In step S301, the management agent receives the user's natural language input; using the first pre-trained language model, based on the domain knowledge base, multiple tasks corresponding to the natural language input are generated and task information of each of the multiple tasks is obtained; for each of the multiple tasks, a target task execution agent corresponding to the task is selected from at least one task execution agent corresponding to the type of the task, and the task information of the task is provided to the target task execution agent corresponding to the task.
[0069] In step S301, the management agent provides the task information of the task to the target task execution agent corresponding to the task, including: the management agent writes the task information of the task into the task message queue, wherein the target task execution agent corresponding to the task obtains the task information of the task from the task message queue.
[0070] The task message queue can ensure the orderliness of task scheduling. Each task execution agent can communicate with the management agent through the task message queue, and each task execution agent can work in parallel.
[0071] In step S302, for each of the multiple tasks, the target task execution agent corresponding to the task uses the second pre-trained language model corresponding to the target task execution agent to generate an execution result corresponding to the task based on the domain knowledge base and the task information of the task.
[0072] The plurality of tasks have an execution order, and the plurality of tasks include a first task indicated by the execution order and subsequent tasks following the first task indicated by the execution order.
[0073] During the execution of step S302, a prompt word corresponding to the first task can be sent to the target task execution agent corresponding to the first task to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the first task, and the prompt word corresponding to the first task indicates the goal of the first task; for each subsequent task among the multiple tasks, after the execution of the previous task of the subsequent task is completed, a prompt word corresponding to the subsequent task is sent to the target task execution agent corresponding to the subsequent task to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the subsequent task, wherein the prompt word corresponding to the subsequent task indicates that the goal of the previous task of the subsequent task has been achieved and the goal of the subsequent task needs to be achieved.
[0074] During the execution of step S302, a prompt word is sent to the target task execution agent, so that the second pre-trained language model corresponding to the target task execution agent can determine the target of the task that needs to be executed by the second pre-trained language model corresponding to the target task execution agent based on the prompt word, and execute the task according to the target of the task.
[0075] Step S303: For each of the multiple tasks, the target task execution agent corresponding to the task writes the execution result corresponding to the task into the execution result message queue.
[0076] The management agent obtains the execution result corresponding to the task from the execution result message queue.
[0077] In step S304, the management agent generates an execution result report including the execution result corresponding to each task, writes the execution result report into the execution result message queue, and the user's device obtains the execution result report from the execution result message queue.
[0078] Thus, the execution result corresponding to each task is fed back to the user. The user can obtain the execution result report through the message queue, so that the user can fully understand the effect of the task execution agent executing the task.
[0079] Step S305: receiving feedback information from the user's device, and updating the domain knowledge base based on the feedback information.
[0080] The feedback information includes at least one of the following: information indicating that the corresponding task among the multiple tasks is not the task that the user expects to perform, and information indicating that there is no task that the user expects among the multiple tasks; and updating the domain knowledge base according to the feedback information.
[0081] If the feedback information includes information indicating that the corresponding task among the multiple tasks is not the task the user expected to perform, the information indicating that the corresponding task is included in the process involving the multiple tasks is deleted from the domain knowledge base. If the feedback information includes information indicating that the user's expected task is not included in the multiple tasks, information indicating that the process involving the multiple tasks includes the user's expected task is added to the domain knowledge base. Updating the domain knowledge base based on the feedback information can improve the accuracy of the tasks involved in the process related to the user's natural language input, ensuring that the execution result corresponding to the task fed back to the user is the execution result corresponding to the task the user expected.
[0082] The present disclosure provides an interactive system, which includes:
[0083] A management agent is configured to receive natural language input from a user; generate, using a first pre-trained language model and based on a domain knowledge base, a plurality of tasks corresponding to the natural language input and obtain task information for each of the plurality of tasks, wherein the domain knowledge base includes information indicating tasks involved in each of a plurality of processes, and the plurality of tasks are tasks involved in processes related to the natural language input; for each of the plurality of tasks, select a target task execution agent corresponding to the task from at least one task execution agent corresponding to the type of the task, and provide the task information for the task to the target task execution agent corresponding to the task; and provide feedback to the user on the execution result corresponding to each task;
[0084] A task execution agent is used to generate an execution result corresponding to the task based on the domain knowledge base and the task information of the task by using the second pre-trained language model corresponding to the task execution agent when the task execution agent is the target task execution agent corresponding to the task.
[0085] In one possible implementation, the task execution agent is used to write the execution result corresponding to the task into the execution result message queue when the task execution agent is the target task execution agent corresponding to the task, wherein the management agent obtains the execution result corresponding to the task from the execution result message queue.
[0086] In one possible implementation, the management agent is used to write the task information of the task into a task message queue, wherein the target task execution agent corresponding to the task obtains the task information of the task from the task message queue.
[0087] In a possible implementation, the multiple tasks have an execution order, and the multiple tasks include a first task indicated by the execution order and subsequent tasks after the first task indicated by the execution order; and the interactive system further includes:
[0088] A planning unit is used to send a prompt word corresponding to the first task to the target task execution agent corresponding to the first task, so as to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the first task, and the prompt word corresponding to the first task indicates the goal of the first task; for each subsequent task among the multiple tasks, after the execution of the previous task of the subsequent task is completed, send a prompt word corresponding to the subsequent task to the target task execution agent corresponding to the subsequent task, so as to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the subsequent task, wherein the prompt word corresponding to the subsequent task indicates that the goal of the previous task of the subsequent task has been achieved and the goal of the subsequent task needs to be achieved.
[0089] In one possible implementation, the management agent is used to generate an execution result report including the execution results corresponding to each task; and write the execution result report to the execution result message queue, wherein the user's device obtains the execution result report from the execution result message queue.
[0090] In this embodiment, the interactive system is presented in the form of functional units, where the units refer to ASIC circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0091] The further functional description of each unit in the above system is the same as that of the above method embodiment and will not be repeated here.
[0092] refer to Figure 4, which shows a structural schematic diagram of a computer device provided by an embodiment of the present disclosure, the computer device may have the above-mentioned system, and the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0093] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0094] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0095] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0096] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0097] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means.
[0098] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0099] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0100] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. An interactive method, applied to an interactive system, characterized in that: The interactive system includes: a management agent and a task execution agent, and the method includes: The management agent receives a natural language input from a user; uses a first pre-trained language model and, based on a domain knowledge base, generates a plurality of tasks corresponding to the natural language input and obtains task information for each of the plurality of tasks, wherein the domain knowledge base includes information indicating tasks involved in each of a plurality of processes, and the plurality of tasks are tasks involved in processes related to the natural language input; for each of the plurality of tasks, selects a target task execution agent corresponding to the task from at least one task execution agent corresponding to the type of the task, and provides the task information for the task to the target task execution agent corresponding to the task; For each of the plurality of tasks, a target task execution agent corresponding to the task generates an execution result corresponding to the task based on the domain knowledge base and the task information of the task using a second pre-trained language model corresponding to the target task execution agent; The management agent feeds back the execution result corresponding to each task to the user.
2. The method according to claim 1, characterized in that The method further comprises: For each of the multiple tasks, the target task execution agent corresponding to the task writes the execution result corresponding to the task into the execution result message queue, wherein the management agent obtains the execution result corresponding to the task from the execution result message queue.
3. The method according to claim 1, characterized in that Providing the task information of the task to the target task execution agent corresponding to the task includes: The management agent writes the task information of the task into the task message queue, wherein the target task execution agent corresponding to the task obtains the task information of the task from the task message queue.
4. The method according to claim 1, wherein The plurality of tasks have an execution order, the plurality of tasks including a first task indicated by the execution order and subsequent tasks after the first task indicated by the execution order; the method further comprising: Sending a prompt word corresponding to the first task to a target task execution agent corresponding to the first task to prompt a second pre-trained language model corresponding to the target task execution agent corresponding to the first task, wherein the prompt word corresponding to the first task indicates a target of the first task; For each subsequent task among the multiple tasks, after the execution of the previous task of the subsequent task is completed, a prompt word corresponding to the subsequent task is sent to the target task execution agent corresponding to the subsequent task to prompt the second pre-trained language model corresponding to the target task execution agent corresponding to the subsequent task, wherein the prompt word corresponding to the subsequent task indicates that the goal of the previous task of the subsequent task has been achieved and the goal of the subsequent task needs to be achieved.
5. The method according to claim 1, wherein Feeding back the execution result corresponding to each task to the user includes: Generate an execution result report including the execution result corresponding to each task; The execution result report is written into the execution result message queue, wherein the user's device obtains the execution result report from the execution result message queue.
6. The method according to claim 1, characterized in that The method further comprises: The management agent receives feedback information from the user's device and updates the domain knowledge base based on the feedback information, wherein the feedback information includes at least one of the following: information indicating that the corresponding task among the multiple tasks is not the task that the user expects to perform, and information indicating that there is no task that the user expects among the multiple tasks.
7. An interactive system, characterized in that: The system comprises: A management agent is configured to receive natural language input from a user; generate, using a first pre-trained language model and based on a domain knowledge base, a plurality of tasks corresponding to the natural language input and obtain task information for each of the plurality of tasks, wherein the domain knowledge base includes information indicating tasks involved in each of a plurality of processes, and the plurality of tasks are tasks involved in processes related to the natural language input; for each of the plurality of tasks, select a target task execution agent corresponding to the task from at least one task execution agent corresponding to the type of the task, and provide the task information for the task to the target task execution agent corresponding to the task; and provide feedback to the user on the execution result corresponding to each task; A task execution agent is used to generate an execution result corresponding to the task based on the domain knowledge base and the task information of the task by using the second pre-trained language model corresponding to the task execution agent when the task execution agent is the target task execution agent corresponding to the task.
8. The system according to claim 7, characterized in that The task execution agent is used to write the execution result corresponding to the task into the execution result message queue when the task execution agent is the target task execution agent corresponding to the task, wherein the management agent obtains the execution result corresponding to the task from the execution result message queue.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 6 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-agent cooperation system and strategy method suitable for industrial digitization
CN117649129A