Agent-based task processing method and apparatus, electronic device, and storage medium

CN123011490APending Publication Date: 2026-10-30BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611031840.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-30

AI Technical Summary

Benefits of technology

[0010]根据本公开的技术,能够充分模仿人类的记忆思维模式,参考历史记忆对任务指令进行准确、有效地响应,有效地提高任务处理的准确性以及任务处理效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011490A_ABST
    Figure CN123011490A_ABST
Patent Text Reader

Abstract

The present disclosure discloses an agent-based task processing method and device, electronic equipment and storage medium, which are related to the technical fields of human-computer interaction and artificial intelligence. The specific implementation scheme is: obtaining a task instruction; using an agent, based on pre-stored instantaneous memory, working memory, episodic memory and factual memory, obtaining a target memory matched with the task instruction; the instantaneous memory is a memory extracted based on the conversation content of a preset number of rounds before the current time; the working memory is a memory extracted based on the nearest neighbor working content before the current time; the episodic memory is a memory extracted from historical conversations based on episodic multi-elements; the factual memory is a memory extracted from historical conversations based on factual multi-elements; using the agent, responding to the task instruction based on the target memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, specifically to the fields of human-computer interaction and artificial intelligence, and in particular to a task processing method, apparatus, electronic device and storage medium based on intelligent agents. Background Technology

[0002] With the rapid development of artificial intelligence (AI) technology, machines are now able to simulate human intelligent behaviors, such as perceiving the environment, understanding information, reasoning and making judgments, and making autonomous decisions. This allows machines to be equipped with a "brain," enabling them to learn and solve problems on their own.

[0003] As AI technology matures, its applications are expanding. Intelligent agents, as entities that utilize AI technology, are able to autonomously complete tasks. Therefore, intelligent agents can also be called AI agents. For example, an intelligent agent is an independent intelligent entity capable of perceiving its environment, making autonomous decisions, taking proactive actions, and being goal-oriented. It can empower various industries and improve task processing efficiency. Summary of the Invention

[0004] This disclosure provides a task processing method, apparatus, electronic device, and storage medium based on intelligent agents.

[0005] According to one aspect of this disclosure, an agent-based task processing method is provided, comprising: Get task instructions; An intelligent agent is employed to acquire target memories that match the task instructions, based on pre-stored instantaneous memory, working memory, contextual memory, and factual memory. The instantaneous memory is extracted from dialogue content of a preset number of rounds prior to the current moment. The working memory is extracted from the nearest neighbor's work content prior to the current moment. The contextual memory is extracted from historical conversations based on multiple contextual elements. The factual memory is extracted from historical conversations based on multiple factual elements. The intelligent agent responds to the task instructions based on the target memory.

[0006] According to another aspect of this disclosure, an agent-based task processing apparatus is provided, comprising: The instruction acquisition module is used to acquire task instructions; The memory acquisition module is used by an intelligent agent to acquire target memories that match the task instructions based on pre-stored instantaneous memory, working memory, contextual memory, and factual memory. The instantaneous memory is extracted from dialogue content of a preset number of rounds prior to the current moment. The working memory is extracted from the nearest neighbor's work content prior to the current moment. The contextual memory is extracted from historical conversations based on multiple contextual elements. The factual memory is extracted from historical conversations based on multiple factual elements. The response module is used to respond to the task instructions using the intelligent agent, based on the target memory.

[0007] According to another aspect of this 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 to enable the at least one processor to perform the methods described above and any possible implementations.

[0008] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described above and any possible implementation thereof.

[0009] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the aspects and any possible implementations described above.

[0010] According to the technology disclosed herein, it is possible to fully mimic human memory and thinking patterns, and respond accurately and effectively to task instructions by referring to historical memories, thereby effectively improving the accuracy and efficiency of task processing.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure; Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure; Figure 3This is a schematic diagram according to the third embodiment of the present disclosure; Figure 4 This is a schematic diagram according to the fourth embodiment of the present disclosure; Figure 5 This is a block diagram of an electronic device used to implement the methods of the embodiments of this disclosure. Detailed Implementation

[0013] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0014] Obviously, the described embodiments are only some, not all, of the embodiments disclosed herein. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0015] It should be noted that the terminal devices involved in the embodiments of this disclosure may include, but are not limited to, smart devices such as mobile phones, personal digital assistants (PDAs), wireless handheld devices, and tablet computers; the display devices may include, but are not limited to, personal computers, televisions, and other devices with display functions.

[0016] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0017] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure; as shown Figure 1 As shown, this embodiment provides a task processing method based on an intelligent agent, which may specifically include the following steps: S101, Obtain task instructions; S102. An intelligent agent is employed to retrieve the target memory matching the task instruction based on pre-stored instantaneous memory, working memory, episodic memory, and factual memory. Instantaneous memory is the memory extracted from the dialogue content of a preset number of rounds prior to the current moment. Working memory is the memory extracted from the nearest neighbor's work content prior to the current moment. Episodic memory is the memory extracted from historical conversations based on multiple elements of the context. Factual memory is the memory extracted from historical conversations based on multiple elements of facts. S103. Respond to task instructions based on target memory.

[0018] The task processing method based on intelligent agents in this embodiment can be specifically applied in intelligent agents to process and respond to task instructions.

[0019] Specifically, the technical solution of this embodiment can be applied to any field where intelligent agents are enabled. For example, the intelligent agent in this embodiment can be an intelligent butler applied in a home scenario; it can also be an intelligent customer service representative applied at the front desk of a conference center, or it can be an intelligent agent with other functions in other scenarios, without limitation here.

[0020] In this embodiment, the historical interaction information of the intelligent agent can be stored according to various dimensions of memory, such as instantaneous memory, working memory, episodic memory, and factual memory, mimicking the human memory thinking pattern.

[0021] In this embodiment, instantaneous memory is memory extracted from dialogue content of a preset number of rounds prior to the current moment; working memory is memory extracted from the nearest neighbor's working content prior to the current moment; contextual memory is memory extracted from historical conversations based on multiple contextual elements; and factual memory is memory extracted from historical conversations based on multiple factual elements.

[0022] In practical applications, when a person receives a task instruction, they usually recall relevant historical memories and then refer to those memories to execute the task instruction. In this embodiment, the agent's immediate memory, working memory, episodic memory, and factual memory are all memories extracted from conversational information in historical sessions. Thus, when the agent receives a task instruction, it can retrieve the target memory matching the task instruction from pre-stored immediate memory, working memory, episodic memory units, and factual memory; and then respond to the task instruction based on the target memory. This effectively mimics human memory and thought processes, enabling accurate and effective responses to task instructions.

[0023] The agent-based task processing method of this embodiment can use an agent to obtain target memory that matches the task instruction from pre-stored instantaneous memory, working memory, episodic memory and factual memory, and then respond to the task instruction based on the target memory. It fully imitates the human memory thinking mode, and responds to the task instruction accurately and effectively by referring to historical memory, thereby effectively improving the accuracy and efficiency of task processing.

[0024] Figure 2 This is a schematic diagram based on the second embodiment of the present disclosure; the agent-based task processing method of this embodiment is described above. Figure 1 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 2 As shown, the agent-based task processing method in this embodiment may specifically include the following steps: S201, Obtain task instructions; S202. Using an intelligent agent, multiple candidate memories related to the task instructions are retrieved from the instantaneous memory in the instantaneous memory storage unit, the working memory in the working memory storage unit, the contextual memory in the contextual memory storage unit, and the factual memory in the factual memory storage unit. In this embodiment, a pre-set instantaneous memory storage unit is used to store instantaneous memories consisting of a preset number of dialogue rounds prior to the current moment. Specifically, each round of dialogue can be stored as an instantaneous memory. That is, an instantaneous memory can include a task instruction and its corresponding response. The preset number of rounds can be set according to the needs of the actual scenario or experience. For example, it can be 8 rounds, 10 rounds, 15 rounds, or 16 rounds, etc., and is not limited here.

[0025] In this embodiment, a preset number of working memories from the nearest neighbors before the current time can be extracted to record the work content of the agent's nearest neighbors. These preset number of working memories are then stored in the working memory storage unit. Each working memory includes work topic information and a summary of the work content. The number of working memories to be stored can be set according to actual needs or experience. In practical applications, a first-in, first-out (FIFO) rule can be followed; if the number of stored working memories exceeds the preset number, the earliest stored working memory can be deleted.

[0026] In this embodiment, contextual memories can also be extracted from historical conversations. Specifically, contextual memories can include multiple contextual elements, such as time, place, people, actions, and results. To facilitate the extraction of contextual memories, content analysis can be performed on the multi-turn dialogue information of each conversation in the historical conversation to extract the included contextual elements and obtain the contextual memories. All extracted contextual memories are then stored in the contextual memory storage unit. In practical applications, one, two, or more contextual memories can be extracted from the multi-turn dialogue content of a single conversation. Of course, it is possible that no effective contextual memories may be extracted from some conversations.

[0027] In practical implementation, to facilitate session management, when an agent receives a task instruction for the first time, it can assign a session identifier and respond to the task instruction in the manner described in this embodiment, completing one round of dialogue. If a new task instruction is received subsequently, the agent can analyze whether the new task instruction belongs to the same topic as the previous round of dialogue. If they do, the agent determines that the current session is still ongoing, the session identifier remains unchanged, and it continues to respond to the new task instruction in the manner described in this embodiment. Otherwise, if the new task instruction is detected to belong to a different topic than the previous round of dialogue, it can be considered that the previous topic's session has ended. In this case, a new session identifier needs to be reassigned to manage the session initiated by the new task instruction, and the agent continues to respond to the new task instruction in the manner described in this embodiment. Based on the above, it can be seen that each session corresponds to a unique session identifier, and each session can include one, two, or multiple rounds of dialogue.

[0028] In this embodiment, factual memory can also be extracted from the multi-turn dialogue information of each session in the historical conversation. The factual memory in this embodiment can include multiple factual elements, such as subject, predicate, and object. The extracted facts are then stored in the factual memory storage unit. Similarly, one, two, or more contextual memories can be extracted from the multi-turn dialogue information of a single session. Likewise, it is possible that no effective factual memory may be extracted from some sessions.

[0029] In this embodiment, an intelligent agent can be used to retrieve multiple candidate memories related to task instructions from memories of various dimensions.

[0030] Further, optionally, in one embodiment of this disclosure, step S202 may include the following steps: (a) Retrieve multiple transient memories from the transient memory storage unit; Multiple transient memories can be all transient memories in a transient memory storage unit.

[0031] (b) Retrieve multiple working memory entries from working memory storage units; Multiple working memories can refer to all working memories within a working memory storage unit.

[0032] Considering that the number of transient memories stored in the transient memory storage unit is relatively small, and the number of working memories stored in the working memory storage unit is also relatively small, in this embodiment, when obtaining candidate memories, all transient memories in the transient memory storage unit and all working memories in the working memory storage unit can be used to screen candidate memories.

[0033] (c) Using an intelligent agent, based on task instructions, multiple alternative contextual memories and multiple alternative factual memories related to the task instructions are obtained from the contextual memory storage unit and the factual memory storage unit, respectively; Since the number of memories stored in the episodic memory storage unit and the factual memory storage unit is relatively large, this step can first perform a preliminary screening of episodic memories and factual memories based on the task instructions, so as to obtain multiple candidate episodic memories and multiple candidate factual memories related to the task instructions.

[0034] Further optionally, in one embodiment of this disclosure, when this step (c) is specifically implemented, an intelligent agent may be used to obtain multiple alternative scenario memories and multiple alternative fact memories related to the task instruction from the scenario memory storage unit and the fact memory storage unit, respectively, based on the task instruction and using at least two retrieval methods.

[0035] Optionally, in this embodiment, at least two retrieval methods may include vector retrieval and BestMatch (BM) 25 retrieval. In practical applications, other retrieval methods may also be included, which are not limited here.

[0036] To support vector retrieval, the vector representation of each context memory in the context memory storage unit can be pre-calculated and stored in the context memory storage unit; and the vector representation of each fact memory in the fact memory storage unit can be pre-calculated and stored in the fact memory storage unit.

[0037] The following describes in detail the acquisition scheme for multiple alternative scenario memories related to task instructions in this embodiment, using vector retrieval and BM25 word retrieval as examples.

[0038] For example, vector retrieval can be used to retrieve multiple contextual memories related to the task instruction from the contextual memory storage unit. Specifically, if the vector similarity between the vector representation of a contextual memory and the vector representation of the task instruction is greater than a preset similarity threshold, the contextual memory can be considered related to the task instruction. Simultaneously, BM25 retrieval can also be used to retrieve multiple contextual memories related to the task instruction from the contextual memory storage unit. Specifically, if the relevance score between the contextual memory and the task instruction calculated based on the BM25 formula is greater than a preset score, the contextual memory is considered related to the task instruction. Then, the results obtained from the two retrieval methods are merged and deduplicated, serving as multiple candidate contextual memories.

[0039] Alternatively, a vector retrieval method can be used to calculate the vector similarity between the task instruction and each scene memory in the scene memory storage unit; and a BM25 retrieval method can be used to calculate the relevance score between the task instruction and each scene memory in the scene memory storage unit; then, according to the preset weight ratio of the two retrieval methods, a weighted summation method using the following formula can be used to calculate the comprehensive score of each scene memory and the task instruction. S = a1*s1 + a2*s2 Where S is a comprehensive score of an episodic memory and a task instruction, s1 is the vector similarity between the episodic memory and the task instruction, a1 is the weight of vector retrieval, s2 is the relevance score between the episodic memory and the task instruction, and a2 is the weight of BM25 retrieval.

[0040] Then, based on the comprehensive score of each scene memory, multiple scene memories with scores greater than the preset score are selected as multiple candidate scene memories.

[0041] Similarly, by following the above methods for obtaining multiple alternative scenario memories, multiple alternative factual memories can also be obtained. For details, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0042] Alternatively, in practical applications, the above two retrieval methods can also be used to obtain multiple alternative contextual memories and multiple alternative factual memories related to the task instructions in other ways, which will not be listed in detail here.

[0043] Following the method described above in this embodiment, multiple alternative scenario memories and multiple alternative fact memories can be obtained accurately and effectively.

[0044] (d) Using an intelligent agent, based on multiple instantaneous memories, multiple working memories, multiple alternative episodic memories and multiple alternative factual memories, to obtain multiple candidate memories related to task instructions.

[0045] Based on the description of the above embodiments, it can be understood that multiple candidate memories are selected from a memory set composed of multiple instantaneous memories, multiple working memories, multiple alternative episodic memories, and multiple alternative factual memories.

[0046] Optionally, since multiple candidate episodic memories and multiple candidate factual memories have already been screened, multiple instantaneous memories, multiple working memories, multiple candidate episodic memories, and multiple candidate factual memories can be directly used as multiple candidate memories without secondary screening.

[0047] Alternatively, an intelligent agent can be used to perform a secondary screening from multiple instantaneous memories, multiple working memories, multiple alternative episodic memories, and multiple alternative factual memories to obtain multiple candidate memories related to the task instructions.

[0048] For example, step (d) can be implemented by including the following steps: (1) Using an intelligent agent, the semantic relevance between the task instruction and each instantaneous memory, each working memory, each alternative episodic memory and each alternative factual memory is calculated respectively; (2) Based on the semantic relevance of the task instruction with each instantaneous memory, each working memory, each alternative contextual memory and each alternative factual memory, and the preset semantic relevance threshold, multiple candidate memories related to the task instruction are obtained from multiple instantaneous memories, multiple working memories, multiple alternative contextual memories and multiple alternative factual memories.

[0049] Since vector representations can more accurately and effectively identify semantics, in this embodiment, an intelligent agent can be used to calculate the semantic relevance between the task instruction and each instantaneous memory, each working memory, each alternative contextual memory, and each alternative factual memory based on vector similarity calculation. Then, multiple memories with semantic relevance greater than a preset semantic relevance threshold are selected from the memory set as multiple candidate memories. The preset semantic relevance threshold can be set based on experience and is not limited here.

[0050] Using the above method, multiple candidate memories related to task instructions can be obtained comprehensively, accurately, and effectively.

[0051] S203. Detect whether there is a content conflict among multiple candidate memories; if there is a content conflict among multiple candidate memories, proceed to step S204; if there is no content conflict among multiple candidate memories, proceed to step S206. In this embodiment, multiple candidate memories can be memories generated at different times, and memories from different times may have content conflicts. For example, in candidate memory 1, user 1's preferred decision is 1, while in candidate memory 2, user 1's preferred decision is 2. In this case, candidate memory 1 and candidate memory 2 can be considered to have content conflicts.

[0052] S204. Obtain the weight of each candidate memory in the two candidate memories with content conflict; proceed to step S205. Since content conflicts inevitably occur between two candidate memories, this embodiment compares multiple candidate memories pairwise to detect whether content conflicts exist between them. After one round of conflict resolution, the check is repeated until no content conflicts exist, at which point the target memory is determined. In other words, the target memory in this embodiment is not limited to just one; it can be two or more.

[0053] Specifically, the weight of each candidate memory can be stored in a corresponding type of memory storage unit, and retrieved from the corresponding type of memory storage unit when needed. For example, when the candidate memory is a sensory memory, it is stored in a sensory memory storage unit; when the candidate memory is a working memory, it is stored in a working memory storage unit; when the candidate memory is an episodic memory, it is stored in an episodic memory storage unit; and when the candidate memory is a factual memory, it is stored in a factual memory storage unit.

[0054] The weight of each candidate memory is inversely proportional to the time difference between its occurrence time and the current time; that is, the smaller the time difference between the occurrence time and the current time, the greater the weight of the corresponding candidate memory; conversely, the greater the time difference between the occurrence time and the current time, the smaller the weight of the corresponding candidate memory. In this embodiment, the weight of each candidate memory can be updated by the agent based on the time difference between its occurrence time and the current time.

[0055] S205. Based on the weights of each candidate memory in the two candidate memories with content conflict, perform conflict resolution on the two candidate memories with content conflict to obtain the target memory; proceed to step S207. Based on the above analysis, it can be concluded that the larger the weight value of a candidate memory, the smaller the time difference between the appearance time of the candidate memory and the current time. Therefore, the candidate memory can be considered more accurate, has a higher priority in content conflict adjudication, and a greater probability of being adopted in subsequent task responses. Accordingly, among two candidate memories with content conflicts, the one with the higher weight can be retained, while the one with the lower weight, having a lower priority, can be deleted.

[0056] By performing content conflict detection on each pair of multiple candidate memories, and removing candidate memories with lower weights while retaining those with higher weights when conflicts exist, the rationality and accuracy of conflict resolution are effectively improved, thereby significantly enhancing the accuracy of the target memory. Following this method, after performing content conflict detection and conflict resolution on multiple candidate memories, the final target memory can be obtained. In this embodiment, the final number of target memories can be one, two, or more.

[0057] S206. Select multiple candidate memories as target memories; proceed to step S207. In other words, when multiple candidate memories do not conflict in content, they can all be used as the target memory.

[0058] S207. Employ an intelligent agent that responds to task instructions based on target memory; execute step S208. In this way, the intelligent agent can refer to historical instantaneous memory, working memory, episodic memory, and factual memory to acquire target memory and respond to task instructions based on the target memory. Compared with existing technologies that do not refer to historical memory, this can more accurately and effectively improve the accuracy and efficiency of task processing.

[0059] S208. Based on the task instructions and the agent's response to the task instructions, update the transient memory stored in the transient memory storage unit; execute step S209; Referring to the above embodiments, the transient memories stored in the transient memory storage unit are always dialogue information from a preset number of rounds prior to the current moment. Based on this storage logic, in this embodiment, after the agent responds to the task instruction in each round of dialogue, the transient memories stored in the transient memory storage unit can be updated promptly and accurately based on the received task instruction and the agent's response to the task instruction. Specifically, during the update, if the number of transient memories stored in the transient memory storage unit has reached a preset number, the earliest dialogue round must be removed first. Then, space is freed up to store the task instruction and the agent's response to the task instruction.

[0060] Optionally, considering that each transient memory also needs to participate in the conflict resolution of subsequent memory content, this embodiment further needs to extract the occurrence time of each transient memory, which is the end time of the dialogue corresponding to that transient memory. A weight is then configured for each transient memory, for example, a first preset value. The occurrence time and corresponding weight of each transient memory are then stored in the transient memory storage unit. Alternatively, the occurrence time and corresponding weight of each transient memory can also be stored elsewhere outside the transient memory storage unit, as long as they are accessible during use.

[0061] By adopting the above method, the accuracy of the transient memories stored in the transient memory storage unit can be effectively improved, providing effective data support for subsequent task processing.

[0062] S209. Collect multiple dialogue messages of the current session, including task instructions and the agent's response to the task instructions; execute step S210. Referring to the interpretation of multiple dialogue messages in a single session as described above, the conversation topic can be detected by using the agent's response to the task instruction, the agent's response to the task instruction, and related contextual information. Multiple dialogue messages belonging to the same conversation topic can be used as multiple dialogue messages of the current session, which can effectively improve the accuracy of the collected multiple dialogue messages of the current session.

[0063] S210. Employ an intelligent agent to extract working memory, episodic memory, and factual memory from multiple dialogue messages in the current session; execute step S211. Specifically, an intelligent agent is used to extract work topic information and a summary of work content from multiple dialogue messages in the current session, as a working memory.

[0064] An intelligent agent is used to extract multi-element contextual information from multiple dialogue messages in the current session, and use it as a contextual memory.

[0065] An intelligent agent is used to extract multi-element information about facts from multiple dialogue messages in the current session, and use it as a fact memory.

[0066] Using the above method, working memory, episodic memory, and factual memory can be accurately and effectively extracted from multiple dialogue messages in the current session.

[0067] S211, Record the times of occurrence of the retrieved working memory, episodic memory, and factual memory; execute step S212; The time of occurrence of working memory can be the end time of multiple dialogue messages in the current session. The time of occurrence of episodic memory can be the end time of the session in which multiple elements of the episodic memory are retrieved. The time of occurrence of factual memory can be the end time of the session in which multiple elements of the factual memory are retrieved.

[0068] S212. Configure the weights of the working memory, contextual memory, and factual memory in the storage as first preset values; execute step S213; For example, for convenience, the first preset value can be set to 1. In actual applications, it can also be other values, which are not limited here.

[0069] S213. Based on the extracted working memory, episodic memory, and factual memory, as well as the occurrence time and weight of each memory, update the corresponding type of memory storage unit; execute step S214; For example, it checks whether the working memory storage unit contains the retrieved working memory. If it does, it updates the occurrence time and weight of the corresponding working memory in the working memory storage unit based on the occurrence time and weight of the retrieved working memory. If it does not contain the retrieved working memory, it stores the retrieved working memory, occurrence time, and weight in the working memory storage unit.

[0070] The same principle applies to updating contextual memories. It checks whether the contextual memory storage unit contains the extracted contextual memory. If it does, it updates the occurrence time and weight of the corresponding contextual memory in the contextual memory storage unit based on the occurrence time and weight of the extracted contextual memory. If it does not contain the extracted contextual memory, it stores the extracted contextual memory, its occurrence time, and weight into the contextual memory storage unit.

[0071] The principle for updating factual memories is the same, so it will not be elaborated here.

[0072] In this embodiment, the example is that each type of memory, along with its occurrence time and weight, is stored in a corresponding memory storage unit. In practical applications, the occurrence time and weight of each type of memory are stored outside of the corresponding memory storage unit. For example, they can be stored in a large table that includes the identifier, type, occurrence time, and weight of each memory. In this case, the corresponding memory storage units can be updated based solely on the extracted working memory, contextual memory, and factual memory. This update may include checking whether the working memory storage unit contains the extracted working memory. If it does, the working memory unit is not updated. If it does not, the extracted working memory is stored in the working memory storage unit. Simultaneously, the information in the large table needs to be updated based on the occurrence time and weight of the extracted memory.

[0073] By adopting the above method, the accuracy of the memories stored in the working memory storage unit, the context memory storage unit, and the fact memory storage unit, as well as the corresponding occurrence time and weight, can be effectively improved, thereby providing effective support for the subsequent task processing of the intelligent agent.

[0074] S214. Check whether the time difference between the occurrence time of each memory in the working memory storage unit, the context memory storage unit, and the fact memory storage unit and the current time reaches the first preset duration; execute step S215. S215. In response to reaching the first preset duration, detect whether the time difference between the occurrence time of the corresponding memory and the current time reaches the second preset duration; if it does, execute step S216; otherwise, if it does not, execute step S217. The second preset duration is longer than the first preset duration. For example, the first preset duration can be one week, and the second preset duration can be one month. The values ​​of the first and second preset durations can be set to other durations based on experience, and are not limited here.

[0075] S216. Delete the corresponding memory and end.

[0076] S217. Update the weight of the corresponding memory to the second preset value. The second preset value is less than the first preset value. End.

[0077] In this embodiment, the weight of each memory is set to two levels: a first preset value and a second preset value. In practical applications, multiple levels can be set according to a similar principle. Alternatively, the weight can be directly configured as an expression that decays with the time difference between the current time and the time of occurrence. For example, in this embodiment, the first preset value can be 1, and the second preset value can be any number between 0 and 1, such as 0.5 or 0.6, etc., without limitation.

[0078] By employing the above method, the weights of various types of memories can be updated in a timely manner to ensure the accuracy of content conflict resolution. Furthermore, if the time difference between the occurrence time and the current time is too large, such as reaching a second preset duration, the memory can be deleted, thus promptly removing invalid memories that are too old and avoiding waste of storage space in the memory storage unit, thereby improving the utilization rate of storage space.

[0079] It should be noted that in practical applications, the storage of all working memory, episodic memory, and factual memory extracted from all historical conversation information can be achieved by following steps 208-214, which can effectively ensure the comprehensiveness and accuracy of the stored working memory, episodic memory, and factual memory.

[0080] Furthermore, the updating and maintenance of the weights of all memories can be achieved according to steps S215-S218, which can adjust the weights of memories in a timely manner and delete memories in a timely manner when they are invalid.

[0081] The agent-based task processing method in this embodiment, by adopting the above approach, can fully mimic the human memory and thinking pattern. When responding to task instructions, it can refer to historical memory to respond to task instructions accurately and effectively, thereby effectively improving the accuracy and efficiency of task processing.

[0082] In this embodiment, the system can also mimic human memory thinking patterns, accurately and effectively extracting and storing memories from historical conversation information from multiple dimensions, including immediate memory, working memory, episodic memory, and factual memory. Furthermore, the weight of memories can be adjusted based on their relevance to the current moment; memories that are too distant are deleted. This fully mimics human memory thinking patterns, giving higher weight to memories whose occurrence is closer to the current moment, thus increasing their probability of being adopted during task instruction responses. In summary, this embodiment can fully mimic human memory thinking patterns, accurately and effectively managing and maintaining all memories, thereby enabling accurate and effective task processing based on memory during task instruction responses.

[0083] Figure 3 This is a schematic diagram based on the third embodiment of the present disclosure; as shown Figure 3 As shown, this embodiment provides a task processing device 300 based on an intelligent agent, which can be applied in an intelligent agent and may specifically include: Instruction acquisition module 301 is used to acquire task instructions; The memory acquisition module 302 is used by an intelligent agent to acquire a target memory that matches the task instruction based on pre-stored instantaneous memory, working memory, contextual memory, and factual memory. The instantaneous memory is the memory extracted from the dialogue content of a preset number of rounds prior to the current moment. The working memory is the memory extracted from the nearest neighbor's work content prior to the current moment. The contextual memory is the memory extracted from historical conversations based on multiple contextual elements. The factual memory is the memory extracted from historical conversations based on multiple factual elements. The response module 303 is used to respond to the task instruction using the intelligent agent based on the target memory.

[0084] The agent-based task processing device in this embodiment achieves the same implementation principle and technical effect as the above-mentioned related method embodiments by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0085] Figure 4 This is a schematic diagram according to the fourth embodiment of the present disclosure; the agent-based task processing device 400 of this embodiment, in the above... Figure 3 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 4 As shown, the agent-based task processing device 400 of this embodiment may include... Figure 3 The modules with the same name and function shown are: instruction acquisition module 401, memory acquisition module 402, and response module 403.

[0086] For example, the memory retrieval module 402 in this embodiment includes: The candidate acquisition unit 4021 is used to use the intelligent agent to acquire multiple candidate memories related to the task instruction from the instantaneous memory in the instantaneous memory storage unit, the working memory in the working memory storage unit, the contextual memory in the contextual memory storage unit, and the factual memory in the factual memory storage unit. The conflict detection unit 4022 is used to detect whether there is a content conflict among the plurality of candidate memories; The weight acquisition unit 4023 is used to acquire the weight of each candidate memory in the two candidate memories that have content conflicts when there are two candidate memories with content conflicts among the plurality of candidate memories; The conflict resolution unit 4024 is used to resolve the conflict between the two candidate memories with content conflict based on the weights of each candidate memory in the two candidate memories with content conflict, and obtain the target memory.

[0087] Further optionally, in one embodiment of this disclosure, the candidate acquisition unit 4021 is configured to: Retrieve multiple transient memories from the transient memory storage unit; Retrieve multiple working memory entries from the working memory storage unit; Using the intelligent agent, based on the task instruction, multiple alternative scenario memories and multiple alternative fact memories related to the task instruction are obtained from the scenario memory storage unit and the fact memory storage unit, respectively; Using the aforementioned intelligent agent, based on the multiple instantaneous memories, the multiple working memories, the multiple alternative contextual memories, and the multiple alternative factual memories, the agent obtains the multiple candidate memories related to the task instructions.

[0088] Further optionally, in one embodiment of this disclosure, the candidate acquisition unit 4021 is configured to: Using the intelligent agent, based on the task instruction, at least two retrieval methods are employed to retrieve the multiple candidate scenario memories and the multiple candidate fact memories related to the task instruction from the scenario memory storage unit and the fact memory storage unit, respectively.

[0089] Further optionally, in one embodiment of this disclosure, the candidate acquisition unit 4021 is configured to: Using the aforementioned intelligent agent, the semantic relevance between the task instruction and each of the instantaneous memories, each of the working memories, each of the alternative contextual memories, and each of the alternative factual memories is calculated respectively; Based on the semantic relevance of the task instruction with each of the instantaneous memories, each of the working memories, each of the alternative contextual memories and each of the alternative factual memories, and a preset semantic relevance threshold, the multiple candidate memories related to the task instruction are obtained from the multiple instantaneous memories, the multiple working memories, the multiple alternative contextual memories and the multiple alternative factual memories.

[0090] Further optional, such as Figure 4 As shown, in one embodiment of this disclosure, the agent-based task processing device 400 further includes: The memory update module 404 is used to update the transient memory stored in the transient memory storage unit based on the task instruction and the agent's response to the task instruction.

[0091] Further optional, such as Figure 4 As shown, in one embodiment of this disclosure, the agent-based task processing device 400 further includes: The conversation collection module 405 is used to collect multiple dialogue information of the current conversation, including the task instruction and the agent's response to the task instruction, using the agent. The memory retrieval module 406 is used to extract working memory, episodic memory and factual memory from multiple dialogue messages in the current session using the intelligent agent. The memory update module 404 is also used to update the corresponding type of memory storage unit based on the extracted working memory, contextual memory and factual memory.

[0092] Further optionally, in one embodiment of this disclosure, the memory retrieval module 406 is used to employ the agent to extract working topic information and a summary of working content from multiple dialogue messages of the current session as a working memory; The memory retrieval module 406 is used to extract information of multiple contextual elements from multiple dialogue messages in the current session using the intelligent agent, as a contextual memory; The memory retrieval module 406 is used to extract multi-element information of facts from multiple dialogue messages in the current session using the intelligent agent, as a fact memory.

[0093] Further optional, such as Figure 4 As shown, in one embodiment of this disclosure, the agent-based task processing device 400 further includes: The time recording module 407 is used to record the occurrence times of the working memory, the episodic memory, and the factual memory; The weight configuration module 408 is used to configure the weights of the stored working memory, the contextual memory, and the factual memory to be first preset values; The memory update module 404 is also used to update the memory storage unit of the corresponding type based on the extracted working memory, the contextual memory and the factual memory, as well as the occurrence time and weight of each memory.

[0094] Further optional, such as Figure 4 As shown, in one embodiment of this disclosure, the agent-based task processing device 400 further includes: The duration detection module 409 is used to detect whether the time difference between the occurrence time of each memory in the working memory in the working memory storage unit, the context memory in the context memory storage unit, and the fact memory in the fact memory storage unit and the current time reaches the first preset duration. The duration detection module 409 is further configured to, in response to reaching the first preset duration, detect whether the time difference between the occurrence time of the corresponding memory and the current time reaches a second preset duration; the second preset duration is longer than the first preset duration; The deletion module 410 is used to delete the corresponding memory in response to the second preset time period being reached.

[0095] The weight configuration module 408 is also used to update the corresponding memorized weight to a second preset value when the second preset duration has not been reached, wherein the second preset value is less than the first preset value.

[0096] Further optionally, in one embodiment of this disclosure, the session collection module 405 is configured to: The agent's response to the task instruction, the agent's response to the task instruction, and related context information are used to detect the conversation topic. Multiple dialogue messages belonging to the same conversation topic are taken as multiple dialogue messages of the current conversation.

[0097] The agent-based task processing device in this embodiment achieves the same implementation principle and technical effect as the above-mentioned related method embodiments by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0098] The collection, acquisition, storage, use, processing, transmission, application, provision, and disclosure of any type of information, such as user personal information, in this technical solution comply with relevant laws and regulations and do not violate public order and good morals.

[0099] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0100] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0101] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0102] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0103] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the methods of this disclosure. For example, in some embodiments, the methods of this disclosure may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the methods of this disclosure described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the methods of this disclosure by any other suitable means (e.g., by means of firmware).

[0104] Various embodiments 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-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0105] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

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

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

[0108] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0109] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0110] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0111] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A task processing method based on intelligent agents, comprising: Get task instructions; An intelligent agent is employed to acquire target memories that match the task instructions, based on pre-stored instantaneous memory, working memory, contextual memory, and factual memory. The instantaneous memory is extracted from dialogue content of a preset number of rounds prior to the current moment. The working memory is extracted from the nearest neighbor's work content prior to the current moment. The contextual memory is extracted from historical conversations based on multiple contextual elements. The factual memory is extracted from historical conversations based on multiple factual elements. The intelligent agent responds to the task instructions based on the target memory.

2. The method according to claim 1, wherein, Employing an intelligent agent, based on pre-stored instantaneous memory, working memory, episodic memory, and factual memory, to retrieve target memory matching the task instructions, including: Using the aforementioned intelligent agent, multiple candidate memories related to the task instruction are obtained from the transient memory in the transient memory storage unit, the working memory in the working memory storage unit, the contextual memory in the contextual memory storage unit, and the factual memory in the factual memory storage unit. Detect whether there are content conflicts among the multiple candidate memories; When two candidate memories with conflicting content exist among the plurality of candidate memories, the weights of each candidate memory among the two conflicting candidate memories are obtained; Based on the weights of the two candidate memories with content conflict, a conflict resolution is performed on the two candidate memories with content conflict to obtain the target memory.

3. The method according to claim 2, wherein, Using the aforementioned intelligent agent, multiple candidate memories related to the task instruction are retrieved from the transient memory in the transient memory storage unit, the working memory in the working memory storage unit, the episodic memory in the episodic memory storage unit, and the factual memory in the factual memory storage unit, including: Retrieve multiple transient memories from the transient memory storage unit; Retrieve multiple working memory entries from the working memory storage unit; Using the intelligent agent, based on the task instruction, multiple alternative scenario memories and multiple alternative fact memories related to the task instruction are obtained from the scenario memory storage unit and the fact memory storage unit, respectively; Using the aforementioned intelligent agent, based on the multiple instantaneous memories, the multiple working memories, the multiple alternative contextual memories, and the multiple alternative factual memories, the agent obtains the multiple candidate memories related to the task instructions.

4. The method according to claim 3, wherein, Using the aforementioned intelligent agent, based on the task instruction, multiple candidate scenario memories and multiple candidate fact memories related to the task instruction are retrieved from the scenario memory storage unit and the fact memory storage unit, respectively, including: Using the intelligent agent, based on the task instruction, at least two retrieval methods are employed to retrieve the multiple candidate scenario memories and the multiple candidate fact memories related to the task instruction from the scenario memory storage unit and the fact memory storage unit, respectively.

5. The method according to claim 3, wherein, Using the aforementioned intelligent agent, based on the multiple instantaneous memories, the multiple working memories, the multiple alternative contextual memories, and the multiple alternative factual memories, the agent acquires the multiple candidate memories related to the task instruction, including: Using the aforementioned intelligent agent, the semantic relevance between the task instruction and each of the instantaneous memories, each of the working memories, each of the alternative contextual memories, and each of the alternative factual memories is calculated respectively; Based on the semantic relevance of the task instruction with each of the instantaneous memories, each of the working memories, each of the alternative contextual memories and each of the alternative factual memories, and a preset semantic relevance threshold, the multiple candidate memories related to the task instruction are obtained from the multiple instantaneous memories, the multiple working memories, the multiple alternative contextual memories and the multiple alternative factual memories.

6. The method according to claim 1, wherein, After the agent responds to the task instruction based on the target memory, the method further includes: Based on the task instruction and the agent's response to the task instruction, the transient memory stored in the transient memory storage unit is updated.

7. The method according to claim 6, wherein, After updating the transient memory stored in the transient memory storage unit based on the task instruction and the agent's response to the task instruction, the method further includes: Using the intelligent agent, multiple dialogue messages of the current session are collected, including the task instructions and the intelligent agent's response to the task instructions; The intelligent agent is used to extract working memory, episodic memory, and factual memory from multiple dialogue messages in the current session. Based on the extracted working memory, contextual memory, and factual memory, the corresponding memory storage units are updated respectively.

8. The method according to claim 7, wherein, Using the aforementioned agent, working memory is extracted from multiple dialogue messages in the current session, including: Using the aforementioned intelligent agent, work topic information and work content summary are extracted from multiple dialogue messages in the current session and used as a working memory; Using the aforementioned intelligent agent, contextual memory is extracted from multiple dialogue messages in the current session, including: Using the aforementioned intelligent agent, information on multiple elements of the context is extracted from multiple dialogue messages in the current session and used as a context memory. Using the aforementioned intelligent agent, factual memories are extracted from multiple dialogue messages in the current session, including: The intelligent agent is used to extract multi-element information of facts from multiple dialogue messages in the current session and use it as a fact memory.

9. The method according to claim 7, wherein, The agent, after extracting working memory, episodic memory, and factual memory from multiple dialogue messages in the current session, further includes: Record the times when the working memory, the episodic memory, and the factual memory occur; The weights of the working memory, the contextual memory, and the factual memory stored in the configuration are each set to a first preset value; Based on the extracted working memory, episodic memory, and factual memory, the corresponding types of memory storage units are updated, including: Based on the extracted working memory, episodic memory, and factual memory, as well as the occurrence time and weight of each memory, the corresponding type of memory storage unit is updated.

10. The method according to claim 9, wherein, The method further includes: The time difference between the occurrence time of each memory in the working memory storage unit, the episodic memory storage unit, and the factual memory storage unit and the current time is detected separately to see if it reaches the first preset time. In response to reaching the first preset duration, it is detected whether the time difference between the occurrence time of the corresponding memory and the current time reaches the second preset duration; the second preset duration is longer than the first preset duration. In response to reaching the second preset time period, the corresponding memory is deleted; In response to the failure to reach the second preset duration, the weight of the corresponding memory is updated to the second preset value, which is less than the first preset value.

11. The method according to claim 7, wherein, Using the intelligent agent, multiple dialogue messages of the current session are collected, including the task instructions and the intelligent agent's responses to the task instructions, including: The agent's response to the task instruction, the agent's response to the task instruction, and related context information are used to detect the conversation topic. Multiple dialogue messages belonging to the same conversation topic are taken as multiple dialogue messages of the current conversation.

12. A task processing device based on intelligent agents, comprising: The instruction acquisition module is used to acquire task instructions; The memory acquisition module is used by an intelligent agent to acquire target memories that match the task instructions based on pre-stored instantaneous memory, working memory, contextual memory, and factual memory. The instantaneous memory is extracted from dialogue content of a preset number of rounds prior to the current moment. The working memory is extracted from the nearest neighbor's work content prior to the current moment. The contextual memory is extracted from historical conversations based on multiple contextual elements. The factual memory is extracted from historical conversations based on multiple factual elements. The response module is used to respond to the task instructions using the intelligent agent, based on the target memory.

13. An electronic device, characterized in that, include: At least one processor; as well as 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 to enable the at least one processor to perform the method according to any one of claims 1-11.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-11.

15. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-11.