Task processing method and device of agent based on large language model, electronic equipment, medium and program product

The task processing method for intelligent agents addresses the issue of unpredictable execution orders by determining user intent, identifying tasks, and executing them sequentially, enhancing intelligence and user experience.

CN119090007APending Publication Date: 2024-12-06BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202411109980.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The high coupling between module components in traditional intelligent agent systems leads to unpredictable execution orders and interference, affecting the intelligence level and user experience.

Method used

A task processing method for intelligent agents that determines user query intent, identifies relevant tasks, establishes an execution order, and executes these tasks sequentially to improve the intelligence level and user experience by reducing loading failures and operation errors.

Benefits of technology

Enhances the correctness and rationality of task scheduling, improving the intelligence level and user experience by ensuring efficient and error-free task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090007A_ABST
    Figure CN119090007A_ABST
Patent Text Reader

Abstract

The invention provides an agent task processing method and device based on a large language model, electronic equipment, a medium and a program product, relates to the technical field of artificial intelligence, in particular to the fields of large language models, agents and the like, and can be used for application scenes such as generative search, document intelligent editing, intelligent assistants, virtual assistants and intelligent e-commerce. According to the implementation scheme, a query intention of a user is determined based on query information provided by the user; determining at least one to-be-executed task for responding to the query intention; determining an execution sequence of the at least one to-be-executed task; sequentially executing at least one to-be-executed task based on the execution sequence; and responding to the query intention of the user based on the execution result of the at least one to-be-executed task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the fields of large language models and intelligent agents. It can be used in application scenarios such as generative search, intelligent document editing, intelligent assistants, virtual assistants, and intelligent e-commerce, and specifically relates to a task processing method, device, electronic device, computer-readable storage medium, and computer program product for intelligent agents. Background Art

[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] Intelligent agents are an emerging technology that has gradually developed in recent years with the implementation of large language model technology. The industry is still in the exploration and research stage of intelligent agents, and improving the intelligence of intelligent agents is still one of the hot topics.

[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention

[0005] The present disclosure provides a task processing method, device, electronic device, computer-readable storage medium and computer program product for an intelligent agent.

[0006] According to one aspect of the present disclosure, a task processing method for an intelligent agent is provided, comprising: determining a user's query intent based on query information provided by the user; determining at least one task to be performed to respond to the query intent; determining an execution order of at least one task to be performed; executing at least one task to be performed in sequence based on the execution order; and responding to the user's query intent based on an execution result of at least one task to be performed.

[0007] According to another aspect of the present disclosure, a task processing device for an intelligent agent is provided, comprising: an intention determination module, configured to determine the query intention of a user based on query information provided by the user; a task determination module, configured to determine at least one task to be performed to respond to the query intention; a sequence determination module, configured to determine the execution order of the at least one task to be performed; a task execution module, configured to execute the at least one task to be performed in sequence based on the execution order; and a response module, configured to respond to the query intention of the user based on the execution result of the at least one task to be performed.

[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method as described above.

[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method as described above.

[0010] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method described above when executed by a processor.

[0011] According to one or more embodiments of the present disclosure, the intelligence level of an intelligent agent can be improved.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0014] Figure 1 A schematic diagram is shown of an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure.

[0015] Figure 2 A flowchart of a task processing method for an intelligent agent according to an embodiment of the present disclosure is shown.

[0016] Figure 3 A schematic diagram of determining user query intention according to an embodiment of the present disclosure is shown.

[0017] Figure 4A and Figure 4B A schematic diagram of task flow generation according to an embodiment of the present disclosure is shown.

[0018] Figure 5A and Figure 5B A schematic diagram of task flow generation according to another embodiment of the present disclosure is shown.

[0019] Figure 6 A schematic diagram is shown of determining dependencies between tasks through a directed acyclic graph according to an embodiment of the present disclosure.

[0020] Figure 7 A schematic diagram of an intelligent agent architecture according to an embodiment of the present disclosure is shown.

[0021] Figure 8 A structural block diagram of a task processing device for an intelligent agent according to an embodiment of the present disclosure is shown.

[0022] Fig. 9 A structural block diagram of a task processing device for an intelligent agent according to another embodiment of the present disclosure is shown.

[0023] Fig.10 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0024] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0025] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0026] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0027] In the related technology, in the traditional intelligent agent design, the high coupling between the module components within the intelligent agent system may lead to the system architecture design being too closed, the execution order of each module is unpredictable and the mutual coupling will affect or interfere with the final execution efficiency, which may also affect the intelligence level of the intelligent agent.

[0028] To this end, an embodiment of the present disclosure provides a task processing method for an intelligent agent, which can improve the correctness and rationality of task scheduling, thereby helping to improve the intelligence level of the intelligent agent to enhance the user experience.

[0029] Before describing the method of the present invention in detail, Figure 1 Exemplary systems are described in which the methods described herein may be implemented.

[0030] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0031] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the task processing method for the agent.

[0032] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0033] exist Figure 1In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0034] The user may provide query information to the agent using client devices 101, 102, 103, 104, 105 and / or 106. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0035] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0036] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0037] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0038] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0039] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.

[0040] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0041] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0042] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0043] Figure 1 The system 100 may be configured and operated in various ways to enable the application of the various methods described in accordance with the present disclosure.

[0044] Various aspects of the task processing method for an intelligent agent according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0045] Figure 2 A flowchart of a task processing method 200 for an intelligent agent according to an embodiment of the present disclosure is shown.

[0046] like Figure 2 As shown, method 200 includes steps S201, S202, S203, S204 and S205.

[0047] In step S201, the user's query intention is determined based on the query information provided by the user.

[0048] In the example, the agent may provide an interface for interacting with the user, so that the user can provide query information to the agent based on the interface, so as to obtain the desired information or assistance with the help of the agent. Accordingly, step S201 may involve the process of the agent identifying the user's query intention based on the query information provided by the user, and this step may be performed at the intention layer in the architecture of the agent. The intention layer may be the topmost layer or the layer closest to the user's needs in the architecture of the agent, and its function is to identify the user's true intention and convert the identification result into an operation instruction that can be understood and executed by the machine system. Therefore, step S201 may involve part of the above functions of the intention layer.

[0049] In step S202, at least one task to be performed for responding to the query intention is determined.

[0050] In the example, the agent's response to the user's query intention may include providing the user with the information or assistance he or she expects to obtain. To this end, the agent needs to determine the task to be performed. In practical applications, the agent can perform tasks by calling plug-ins, so determining the task to be performed may also refer to determining the plug-in to be called. Each plug-in can handle a specific type of task, such as data processing, algorithm execution, external system interface, etc. Accordingly, step S202 can be used to convert the intent recognition result obtained by step S201 into an operation instruction that can be understood and executed by the machine system, so step S202 may involve another part of the above-mentioned functions of the intent layer. That is, the intent layer in the architecture of the agent can be implemented by steps S201 and S202.

[0051] In step S203, the execution order of at least one task to be executed is determined.

[0052] In the example, there may be a certain logical relationship between the plug-ins. If these plug-ins are not called according to this logical relationship, loading failure or operation error may occur. Therefore, this logical relationship between plug-ins can reflect the execution order of tasks. In the framework of the intelligent agent, a plug-in layer can be set under the intention layer to implement specific business functions, so the process of determining the execution order of tasks can be carried out in the plug-in layer. In the plug-in layer, plug-ins can be dynamically loaded and / or unloaded according to business needs, and the logical relationship between these plug-ins can also be re-determined based on updated plug-ins.

[0053] In the example, the intelligent agent may generally have a certain specific business function, such as acting as a travel planning assistant, a food recommendation assistant, etc. Therefore, the list of plug-ins that may be called and the logical relationship between the plug-ins can be pre-determined within the framework of the specific business function, so that when the user uses the intelligent agent, the plug-in to be called and the order in which the plug-ins are called can be directly determined from the plug-in list.

[0054] In step S204, at least one to-be-executed task is executed in sequence based on the execution order.

[0055] In step S205, a response is made to the user's query intention based on the execution result of at least one task to be executed.

[0056] In the example, the agent's response to the user's query intent may include presenting text, images or videos to the user, pushing a web page or URL, etc.

[0057] In the task processing method 200 for an intelligent agent according to an embodiment of the present disclosure, by introducing consideration of the execution order of tasks to be executed in the task processing process of the intelligent agent, and executing the tasks in sequence based on the determined execution order, problems such as loading failure or operation errors can be effectively avoided during the task execution process, thereby ensuring the correctness and rationality of task scheduling, and further helping to improve the intelligence level of the intelligent agent to enhance the user experience.

[0058] In some embodiments, Figure 2 The step S201 shown in FIG. 2 may include determining the user's query intent based on the query information provided by the user, and may include: parsing the query information to match at least one candidate intent; and in response to the presence of a candidate intent that is hit via matching in at least one candidate intent, determining the hit candidate intent as the user's query intent.

[0059] In the example, the query information provided by the user may be in the form of text, voice, etc. In the case where the query information is in a non-text form such as voice, it may be first converted into a text form to facilitate parsing operations. The technology of voice-to-text conversion is known to those skilled in the art, so this article will not elaborate on it in detail to avoid confusing the main purpose of the present disclosure.

[0060] In the example, the query information may be rewritten to make the expression of the query information more accurate or more suitable for processing by the machine system. The rewriting operation may be implemented through engineering methods of natural language processing (such as synonym replacement, stem extraction, grammar correction, etc.), or may be implemented with the aid of the text understanding capabilities of a large language model. However, if the expression of the query information is already accurate enough, the rewriting operation may be skipped. Afterwards, the rewritten or unrewritten query information may be subjected to analysis operations such as semantic understanding, keyword extraction, and / or slot filling to further understand the user's query intent. Therefore, parsing the query information may include the above-mentioned rewriting operation and analysis operation or may only include the analysis operation.

[0061] In the example, considering that the agent can generally have a certain specific business function, such as acting as a travel planning assistant, it is possible to predetermine candidate query intentions that may appear within the framework of the specific business function, such as developing a travel route, evaluating a travel budget, booking travel accommodation, etc. Once one or more of the candidate query intentions are matched by parsing the user's query information, the matched candidate intentions can be determined as the user's query intention. For example, when the query information provided by the user is "Shanghai three-day tour route", the agent can match the query intention about the user's desire to develop a Shanghai three-day tour route through the agent by parsing the query information.

[0062] Therefore, the user's query intent can be quickly and effectively determined by matching it with predetermined candidate intents, so that the process of determining the query intent can converge towards a known possible direction, avoiding unreasonable intent recognition results, thereby helping to improve the intelligence level of the agent.

[0063] Figure 3 A schematic diagram of determining user query intention according to an embodiment of the present disclosure is shown.

[0064] like Figure 3 As shown, user 301 may provide query information 302. Query information 302 may be in various forms such as text, voice, image, gesture, etc.

[0065] A parsing operation 310 may be performed on the query information 302. Taking the query information 302 in text form as an example, in the parsing operation 310, a rewriting operation 310a may be performed on the query information 302 to make the expression of the query information 302 more accurate or more suitable for processing by the machine system. As an example, Figure 3 It is also shown that the rewriting operation 310a can be skipped and the analysis operation 310b can be directly performed in the parsing operation 310. That is, the analysis operation 310b can be performed on the rewritten or non-rewritten query information 302 to further understand the user's query intention.

[0066] After the parsing operation 310, the parsed query intent of the user may be matched with at least one candidate intent through the matching operation 320. If there is a candidate intent hit through the matching operation 320, the hit candidate intent may be determined as the query intent of the user.

[0067] In some embodiments, each candidate intent of at least one candidate intent may have a corresponding predetermined task sequence, and the predetermined task sequence may include at least one predetermined task with a predetermined execution order. Figure 2 The step S202 of determining at least one task to be performed to respond to the query intent may include: determining at least one predetermined task in the predetermined task sequence corresponding to the hit candidate intent as the at least one task to be performed. Figure 2 The step S203 of determining the execution order of at least one task to be executed may include: determining the predetermined execution order of at least one predetermined task as the execution order of the at least one task to be executed.

[0068] In the example, taking the agent acting as a travel planning assistant as an example, at least one candidate intent may include such as planning a travel route, evaluating a travel budget, booking travel accommodation, etc. As an example, the predetermined task sequence corresponding to the candidate intent of evaluating the travel budget may include four predetermined tasks, such as determining the paid scenic spot expenditure, determining the accommodation expenditure, determining the average daily consumption expenditure of the tourist destination, and estimating the total expenditure, and the predetermined execution order between the four predetermined tasks may include the need to execute the fourth task after completing the first three tasks, wherein there is no specific order between the first three tasks, and they can be executed simultaneously or sequentially. That is, the three tasks of determining the paid scenic spot expenditure, determining the accommodation expenditure, and determining the average daily consumption expenditure of the tourist destination can be executed simultaneously or sequentially, and then the task of estimating the total expenditure is executed.

[0069] In an example, the method of generating a task flow associated with the above process may involve the generation of a static task flow, because the tasks in the task flow are determined from known predetermined tasks, and the execution order of the tasks is also determined from a known predetermined execution order, so it is called "static".

[0070] Therefore, since the corresponding predetermined task sequence and its predetermined execution order have been set in advance for the predetermined candidate intentions, once the user's query intention is determined by matching the candidate intentions, the tasks to be performed and their execution order can be determined quickly and effectively, which can help the intelligent agent respond to the user's query intention efficiently.

[0071] Figure 4A and Figure 4B A schematic diagram of task flow generation according to an embodiment of the present disclosure is shown.

[0072] like Figure 4A and Figure 4B As shown, an example of generating a static task flow is shown. As mentioned above, the tasks in the static task flow are determined from known predetermined tasks, and the execution order of the tasks is also determined from the known predetermined execution order.

[0073] exist Figure 4A and Figure 4B In the example shown, it is assumed that the candidate intents that have been determined to be hit correspond to four predetermined tasks M, G, U, and Z. The four predetermined tasks M, G, U, and Z may have a predetermined execution order. Figure 4A As shown in , it may be necessary to execute tasks M, G, and U simultaneously before executing task Z. Alternatively, Figure 4B As shown in , it is also necessary to perform tasks U, G, M in sequence, and then perform task Z. For illustration purposes only, Figure 4A and Figure 4BTwo exemplary predetermined execution orders of four predetermined tasks M, G, U, and Z are shown respectively.

[0074] Therefore, after the four scheduled tasks M, G, U, and Z are determined as tasks to be executed, the scheduled execution order of the four scheduled tasks M, G, U, and Z (such as Figure 4B The U, G, M, Z) shown is determined as the final execution order.

[0075] Understandably, Figure 4A and Figure 4B Only four tasks M, G, U, and Z are taken as an example for description, but the embodiments of the present disclosure are not limited thereto.

[0076] In some embodiments, Figure 2 The step S203 of determining the execution order of at least one task to be executed may include: determining a dependency relationship between at least one task to be executed; and determining the execution order of at least one task to be executed based on the dependency relationship.

[0077] In the example, the dependency between tasks may mean that the tasks have a logical order. For example, if the execution of a first task requires the execution result of a second task, it can be considered that the first task depends on the second task, and therefore the second task needs to be executed before the first task. On the other hand, the lack of dependency between tasks means that the tasks can be executed in parallel. In other words, the dependency between tasks can be used as a representation of the order in which tasks are executed to accurately reflect the inherent logic of the order in which tasks are executed.

[0078] In the example, since the execution of tasks can be achieved by calling plug-ins, the determination of dependencies between tasks can also be achieved by determining the dependencies between plug-ins. Accordingly, the dependencies between tasks can be determined at the plug-in layer in the agent architecture to determine the execution order of tasks.

[0079] In the example, the method of generating a task flow associated with the above process may involve the generation of a static task flow or the generation of a dynamic task flow. For the generation of a dynamic task flow, if the agent determines that the user's current query intent is a further refinement of a candidate intent (i.e., there is a further refined intent relative to the candidate intent), resulting in the inability to directly adopt the predetermined task sequence and predetermined execution order corresponding to the candidate intent, the agent may call upon the capabilities of the large language model to instantly determine at least one task corresponding to the further refined intent and the dependency relationship between the at least one task and the above predetermined task sequence. Therefore, the generation of a dynamic task flow may involve the process of instantly determining tasks and the order of task execution, so it is called "dynamic".

[0080] Therefore, the dependencies between tasks can be used to reflect the inherent logic of the task execution order, which helps to accurately and effectively determine the task execution order and avoid problems such as loading failure or running errors during task execution.

[0081] Figure 5A and Figure 5B A schematic diagram of task flow generation according to an embodiment of the present disclosure is shown.

[0082] like Figure 5A and Figure 5B As shown, an example of generating a dynamic task flow is shown. As mentioned above, the generation of a dynamic task flow may involve a process of determining tasks and the order in which tasks are executed in real time, so it is called "dynamic". For the purpose of illustration, it is assumed that four tasks Y, Q, N, and C to be executed have been determined, so it is necessary to further determine the dependency relationship between the four tasks to be executed, and then determine the execution order of the four tasks to be executed based on the dependency relationship.

[0083] In this example, suppose the dependency relationship between the four pending tasks Y, Q, N, and C is: the execution of task Q depends on the execution of task Y, and the execution of task C depends on the execution of task N. Then the execution order of the four pending tasks Y, Q, N, and C only needs to ensure that task Y is executed before task Q, and task N is executed before task C. Therefore, it can be Figure 5A As shown, after executing tasks Y and N simultaneously, tasks Q and C are executed simultaneously. Alternatively, Figure 5B As shown, tasks Y, Q, N, and C are executed in sequence.

[0084] Understandably, Figure 5A and Figure 5B Only four tasks Y, Q, N, and C are taken as an example for description, but the embodiments of the present disclosure are not limited thereto.

[0085] In some embodiments, the above-mentioned step of determining the dependency relationship between at least one task to be executed may include: determining at least one node corresponding to at least one task to be executed in a predetermined directed acyclic graph; and determining the dependency relationship between at least one task to be executed based on the directed edge corresponding to at least one node.

[0086] In the example, the plug-in layer in the architecture of the agent can implement the organization and scheduling of plug-ins through the concept and mechanism of directed acyclic graph (DAG). In DAG, each node can represent a plug-in or a part of a plug-in, and the directed edge between two nodes can represent the dependency relationship between two plug-ins. In the case where the agent has a certain specific business function (such as acting as a travel planning assistant), the corresponding DAG can be predetermined for the specific business function, that is, the plug-ins associated with the specific business function are managed and maintained in the form of DAG organization for easy traversal.

[0087] Therefore, by using DAG to express the dependencies between tasks, it can help to simply and effectively traverse the dependencies between tasks and accurately determine the execution order between tasks.

[0088] Figure 6 A schematic diagram showing a method of determining dependencies between tasks through DAG according to an embodiment of the present disclosure.

[0089] like Figure 6 As shown, the DAG includes six nodes 601, 602, 603, 604, 605 and 606, and the six nodes correspond to tasks L, D, H, V, E and R, respectively. Assuming that three tasks V, D and H to be executed have been determined, the three nodes 604, 602 and 603 corresponding to the three tasks V, D and H to be executed can be determined in the DAG first, and then the corresponding two directed edges 607 and 608 can be determined based on the three nodes 604, 602 and 603, that is, the dependency relationship between the three tasks V, D and H to be executed is that task H depends on task V, and task V depends on task D, and then the execution order of the three tasks V, D and H to be executed can be determined as first executing task D, then executing task V, and finally executing task H.

[0090] Understandably, Figure 6 The DAG including six nodes is taken as an example for description, but the embodiments of the present disclosure are not limited thereto.

[0091] In some embodiments, the query information provided by the user can be obtained based on multiple rounds of interactions between the agent and the user.

[0092] In the example, the initial interaction information provided by the user to the agent may not be accurately understood by the agent. In this case, the agent can actively interact with the user through the intent clarification mechanism. Accordingly, the further interaction information provided by the user and the agent in the interaction can be used as the overall query information for subsequent intent recognition.

[0093] Therefore, the query information provided by the user can be effectively captured through the multi-round interaction mechanism of the intelligent agent, which helps to accurately identify the user's true intention on this basis.

[0094] In some embodiments, an intelligent agent based on a large language model is also provided, which can call at least one large language model to execute the task processing method as described above.

[0095] Figure 7 A schematic diagram of an intelligent agent architecture 700 according to an embodiment of the present disclosure is shown.

[0096] like Figure 7 As shown, an example of an agent architecture 700 based on an intent layer 710, a plug-in layer 720, and a common component layer 730 is shown.

[0097] The intention layer 710 can be configured to understand the user's true intention through intention recognition 711 and convert the intention into operational instructions that can be executed at the system level.

[0098] The plug-in layer 720 may be configured to implement specific services and automatically generate a static task flow 721 or a dynamic task flow 722 according to the user intent identified by the intent layer 710 .

[0099] The common component layer 730 can be configured to provide basic services and support for the system under the overall framework, such as Figure 7 The vectorization 731, large language model 732 and database 733 shown can, for example, perform large model integration, database access, logging, network communication, etc. All components corresponding to the common component layer 730 can be shared by multiple business modules and plug-ins.

[0100] An embodiment of the present disclosure also provides a task processing device for an intelligent agent.

[0101] like Figure 8 A structural block diagram of a task processing device for an intelligent agent according to an embodiment of the present disclosure is shown.

[0102] like Figure 8As shown, the device 800 includes an intention determination module 801, a task determination module 802, a sequence determination module 803, a task execution module 804 and a response module 805. The intention determination module 801 is configured to determine the user's query intention based on the query information provided by the user. The task determination module 802 is configured to determine at least one task to be executed for responding to the query intention. The sequence determination module 803 is configured to determine the execution order of at least one task to be executed. The task execution module 804 is configured to execute at least one task to be executed in sequence based on the execution order. The response module 805 is configured to respond to the user's query intention based on the execution result of at least one task to be executed.

[0103] The operations of the intention determination module 801, the task determination module 802, the sequence determination module 803, the task execution module 804 and the response module 805 may correspond to the following: Figure 2 The steps S201, S202, S203, S204 and S205 are shown in FIG. Therefore, the details of each aspect are not repeated here.

[0104] Fig. 9 A structural block diagram of a task processing device 900 for an intelligent agent according to another embodiment of the present disclosure is shown.

[0105] like Fig. 9 As shown, the apparatus 900 may include an intention determination module 901, a task determination module 902, a sequence determination module 903, a task execution module 904, and a response module 905. The operations of the above modules may be similar to those of Figure 8 The operations of the intention determination module 801, the task determination module 802, the order determination module 803, the task execution module 804 and the response module 805 are the same. In addition, the above modules may also include further sub-modules.

[0106] In some embodiments, the intent determination module 901 may include: an intent parsing module 9011, configured to parse query information to match at least one candidate intent; an intent matching module 9012, configured to determine the hit candidate intent as the user's query intent in response to the presence of a candidate intent hit through matching in at least one candidate intent.

[0107] In some embodiments, each candidate intent of at least one candidate intent may have a corresponding predetermined task sequence, and the predetermined task sequence may include at least one predetermined task with a predetermined execution order. The task determination module 902 may be configured to determine at least one predetermined task in the predetermined task sequence corresponding to the hit candidate intent as at least one task to be executed; the sequence determination module 903 may be configured to determine the predetermined execution order of at least one predetermined task as the execution order of at least one task to be executed.

[0108] In some embodiments, the sequence determination module 903 may include: a first sub-determination module 9031, configured to determine the dependency relationship between at least one task to be executed; and a second sub-determination module 9032, configured to determine the execution order of at least one task to be executed based on the dependency relationship.

[0109] In some embodiments, the first sub-determination module 9031 may include: a node determination module 9031a, configured to determine at least one node corresponding to at least one task to be executed in a predetermined directed acyclic graph; and a relationship determination module 9031b, configured to determine the dependency relationship between at least one task to be executed based on the directed edge corresponding to at least one node.

[0110] In some embodiments, query information can be obtained based on multiple rounds of interactions between the agent and the user.

[0111] According to an embodiment of the present disclosure, an electronic device is also provided, comprising at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.

[0112] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable a computer to execute the method as described above.

[0113] According to an embodiment of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the method as described above when executed by a processor.

[0114] refer to Fig.10 , a block diagram of an electronic device 1000 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0115] like Fig.10As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0116] Multiple components in the electronic device 1000 are connected to the I / O interface 1005, including: an input unit 1006, an output unit 1007, a storage unit 1008, and a communication unit 1009. The input unit 1006 can be any type of device that can input information to the electronic device 1000. The input unit 1006 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 1007 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1008 can include but is not limited to a disk and an optical disk. The communication unit 1009 allows the electronic device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device and / or the like.

[0117] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1001 performs the various methods and processes described above. For example, in some embodiments, the method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or a communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the method described above in any other appropriate manner (e.g., by means of firmware).

[0118] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being 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 special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0119] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0120] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0121] To provide 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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, voice input, or tactile input).

[0122] 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 with a graphical user interface or a web browser through which a user can interact with implementations 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), the Internet, and a blockchain network.

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

[0124] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0125] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0126] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A task processing method for an intelligent agent, include: Determining the query intention of the user based on the query information provided by the user; Determining at least one task to be performed for responding to the query intention; Determining an execution order of the at least one task to be executed; Execute the at least one task to be executed in sequence based on the execution order; as well as Based on the execution result of the at least one task to be executed, respond to the query intention of the user.

2. The method according to claim 1, in, The determining the query intention of the user based on the query information provided by the user includes: parsing the query information to match at least one candidate intent; and In response to the presence of a candidate intent hit via the match in the at least one candidate intent, the hit candidate intent is determined as the query intent of the user.

3. The method according to claim 2, in, Each candidate intent of the at least one candidate intent has a corresponding predetermined task sequence, the predetermined task sequence including at least one predetermined task having a predetermined execution order, and Wherein, the determining of at least one task to be performed to respond to the query intent comprises: determining at least one predetermined task in the predetermined task sequence corresponding to the hit candidate intent as the at least one task to be performed; The determining of the execution order of the at least one task to be executed includes: determining the predetermined execution order of the at least one predetermined task as the execution order of the at least one task to be executed.

4. The method according to claim 1 or 2, in, The determining the execution order of the at least one task to be executed includes: Determining a dependency relationship between the at least one task to be performed; and The execution order of the at least one task to be executed is determined based on the dependency relationship.

5. The method according to claim 4, in, The determining the dependency relationship between the at least one task to be executed includes: Determining at least one node corresponding to the at least one task to be performed in a predetermined directed acyclic graph; and A dependency relationship between the at least one to-be-performed task is determined based on the directed edge corresponding to the at least one node.

6. The method according to any one of claims 1 to 5, in, The query information is obtained based on multiple rounds of interactions between the agent and the user.

7. An intelligent agent based on a large language model, in, The agent calls at least one large language model to execute the task processing method according to any one of claims 1 to 6.

8. A task processing device for an intelligent agent, include: An intention determination module, configured to determine the query intention of the user based on the query information provided by the user; A task determination module, configured to determine at least one task to be performed for responding to the query intention; An order determination module, configured to determine the execution order of the at least one task to be executed; A task execution module, configured to execute the at least one to-be-executed task in sequence based on the execution order; as well as The response module is configured to respond to the query intention of the user based on the execution result of the at least one task to be executed.

9. The device according to claim 8, in, The intention determination module includes: an intent parsing module, configured to parse the query information to match at least one candidate intent; and The intent matching module is configured to, in response to the presence of a candidate intent hit through the match in the at least one candidate intent, determine the hit candidate intent as the query intent of the user.

10. The device according to claim 9, in, Each candidate intent of the at least one candidate intent has a corresponding predetermined task sequence, the predetermined task sequence including at least one predetermined task having a predetermined execution order, and Wherein, the task determination module is configured to determine the at least one predetermined task in the predetermined task sequence corresponding to the hit candidate intention as the at least one task to be executed; The sequence determination module is configured to determine the predetermined execution sequence of the at least one predetermined task as the execution sequence of the at least one task to be executed.

11. The device according to claim 8 or 9, in, The sequence determination module comprises: A first sub-determining module is configured to determine a dependency relationship between the at least one task to be executed; and The second sub-determination module is configured to determine the execution order of the at least one to-be-executed task based on the dependency relationship.

12. The device according to claim 11, in, The first sub-determination module includes: a node determination module, configured to determine at least one node corresponding to the at least one task to be performed in a predetermined directed acyclic graph; and The relationship determination module is configured to determine the dependency relationship between the at least one to-be-executed task based on the directed edge corresponding to the at least one node.

13. The device according to any one of claims 8 to 12, in, The query information is obtained based on multiple rounds of interactions between the agent and the user.

14. An electronic device, include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 6.

15. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to make a computer execute the method according to any one of claims 1 to 6.

16. A computer program product comprising a computer program, in, The computer program implements the method according to any one of claims 1 to 6 when executed by a processor.

Citation Information

Patent Citations

  • Information interaction method and device based on large language model and electronic equipment

    CN118093801A

  • Intelligent agent scheduling method, system and equipment based on large language model and medium

    CN118132227A

  • Question and answer processing method and device

    CN118260404A

Cited By

  • Plug-in parallel scheduling method, electronic equipment and storage medium

    CN120687169A

  • Multi-agent information processing method and device based on large model, electronic equipment, storage medium and program product

    CN120763321A