User intention deflection processing method and device in multi-agent reasoning

CN123014221APending Publication Date: 2026-10-30GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611498813.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种多智能体推理中的用户意图偏转处理方法及装置,以至少解决传统多智能体推理方案中遇到用户意图偏转只能从头重新推理,浪费计算资源的技术问题

Benefits of technology

[0021]在本申请实施例中,通过引入思维流图谱数据结构,可以将多智能体的推理过程从线性管道升级为动态生长的有向无环图,图谱中各节点表示推理状态,有向边表示推理依赖关系;当用户发起新交互时,系统不会销毁旧节点,通过以节点软挂起代替硬中断,可以将显存中的推理中间态序列化为快照存入节点,实现推理状态的原子级保留;通过执行最近公共祖先定位,可以创建嫁接边,将新思维流连接至已有挂起节点,也可以在图谱中创建分叉节点,使新思维流从旧图谱的最近公共祖先节点处分叉生长,整个过程尽可能实现已完成推理的复用,避免了完全重启导致的计算资源浪费;配合底层双缓冲消息队列,可以实现推理生产流与前端输出消费流的解耦,使前端在句末边界处完成无感热切换,提升用户体验。本申请有效解决了传统多智能体推理方案中遇到用户意图偏转只能从头重新推理,浪费计算资源的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014221A_ABST
    Figure CN123014221A_ABST
Patent Text Reader

Abstract

The application discloses a user intention deflection processing method and device in multi-agent reasoning. The method comprises the following steps: obtaining a thinking flow graph of a task, wherein the graph comprises nodes reflecting reasoning states of subtasks and directed edges reflecting reasoning dependency relationships of the subtasks; in response to an intention deflection instruction of a user, determining a common ancestor node of a current active node in the graph and the intention deflection instruction, and suspending the current active node; determining semantic similarities between the intention deflection instruction and a plurality of historical suspended nodes in the graph; if there is a suspended node with a similarity higher than a threshold, establishing a directed edge from the common ancestor node to the suspended node to continue reasoning; and if there is no suspended node with a similarity higher than the threshold, creating a new branch node at the common ancestor node based on the intention deflection instruction, and continuing reasoning based on the new branch node. The application solves the technical problem that in a traditional multi-agent reasoning scheme, when a user intention deflection is encountered, the calculation resources are wasted because the reasoning is restarted from the beginning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a method and apparatus for handling user intent deflection in multi-agent reasoning. Background Technology

[0002] With the rapid development of artificial intelligence technology, multi-agent collaborative systems based on large language models have been widely used in fields such as intelligent customer service, smart homes, and industrial decision-making. In multi-agent collaborative reasoning, the system typically parses user requests into a series of atomic tasks, which are then serially distributed to each sub-agent by the master agent, forming a fixed linear reasoning pipeline. Each sub-agent completes its task sequentially through synchronous blocking calls, and the process from task distribution to result output constitutes a unidirectional, irreversible directed line segment.

[0003] However, existing technologies have significant drawbacks when handling dynamic user interaction scenarios. First, the inference chain lacks flexibility. When the user's intent changes, the system cannot branch and evolve while retaining existing inference results. Instead, it must destroy the entire inference pipeline and rebuild it from scratch. This hard interruption mechanism results in a noticeable discontinuity in the interactive interface, requiring users to wait for the process to be regenerated, severely impacting the continuity and experience of human-computer interaction. Second, because the hard interruption mechanism completely destroys all intermediate inference states, if there is logical overlap between the old and new instructions (e.g., only changing the destination from Hangzhou to Suzhou while keeping the rest of the itinerary planning logic unchanged), the system still needs to consume a large amount of computing power to recalculate all the content. It cannot achieve cross-branch reuse of intermediate inference states, which not only reduces the system's response efficiency but also causes significant redundancy and waste of computing resources.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method and apparatus for handling user intent deflection in multi-agent reasoning, which at least solves the technical problem that traditional multi-agent reasoning schemes can only start reasoning from scratch when encountering user intent deflection, wasting computing resources.

[0006] According to one aspect of the embodiments of this application, a method for handling user intent deflection in multi-agent reasoning is provided, comprising: obtaining a mind flow graph corresponding to a target task, wherein the target task is parsed into multiple subtasks, and the mind flow graph includes: nodes for reflecting the reasoning state of the subtasks, and directed edges for reflecting the reasoning dependencies between subtasks; responding to a user's intent deflection command, determining the common ancestor node of the currently active target node in the mind flow graph and the intent deflection command, and adjusting the target active node to a suspended state that retains the intermediate reasoning state; determining the semantic similarity between the intent deflection command and multiple historical suspended nodes in the mind flow graph; if there is a target historical suspended node with a semantic similarity higher than a first preset threshold, establishing a directed edge from the common ancestor node to the target historical suspended node, and continuing reasoning based on the target historical suspended node; if there is no target historical suspended node with a semantic similarity higher than the first preset threshold, creating a new branch node at the common ancestor node based on the intent deflection command, and continuing reasoning based on the new branch node.

[0007] Optionally, obtaining the thought graph corresponding to the target task includes: receiving the target task, extracting the initial intent semantic vector and initial task parameters from the target task, and encapsulating the initial intent semantic vector and initial task parameters into an initial context; splitting the target task into multiple sub-tasks based on the initial context, and determining the inference dependencies between each sub-task; creating a root node, serializing the initial context into a snapshot and storing it in the root node, and marking the state of the root node as running; creating sub-task nodes corresponding to each sub-task, and marking the state of each sub-task node as pending execution; constructing directed edges between each sub-task node based on the inference dependencies between each sub-task, as well as directed edges from the root node to the highest-level sub-task node, to obtain the initial thought graph; scheduling multiple agents to execute each sub-task, and updating the state of the corresponding sub-task node during the inference process.

[0008] Optionally, in response to the user's intent deflection command, determining the common ancestor node between the currently active target node in the mind flow graph and the intent deflection command includes: receiving the intent deflection command input by the user during the reasoning process, and extracting the target intent semantic vector and target task parameters from the intent deflection command; starting from the target active node in the mind flow graph, backtracking layer by layer along the directed edge towards the parent node, determining the semantic deviation between the context semantic vector of each node on the backtracking path and the target intent semantic vector, and determining the deepest node among the nodes with a semantic deviation lower than a second preset threshold as a candidate common ancestor node; checking whether the task parameters corresponding to the candidate common ancestor node conflict with the target task parameters, and if there is no conflict, determining the candidate common ancestor node as the common ancestor node.

[0009] Optionally, adjusting the target active node to a suspended state that retains the inference intermediate state includes: adjusting the state of the target active node to a suspended state; asynchronously triggering the serialization of the inference intermediate state of the target active node in the video memory of the computing device into a snapshot and storing it in the target storage area; retaining the pointer of the inference intermediate state in the video memory of the computing device for a preset duration; and releasing the pointer of the inference intermediate state in the video memory of the computing device after the preset duration.

[0010] Optionally, a directed edge is established from the common ancestor node to the target historical suspended node, and reasoning is continued based on the target historical suspended node, including: establishing a grafting edge from the common ancestor node to the target historical suspended node; and redirecting the system active pointer to the target historical suspended node to reuse the reasoning state of the target historical suspended node.

[0011] Optionally, a new branch node is created at the common ancestor node based on the intent deflection instruction, and reasoning continues based on the new branch node, including: creating a new branch node based on the intent deflection instruction, wherein the new branch node inherits the context information of the common ancestor node; establishing a fork edge from the common ancestor node to the new branch node; and redirecting the system active pointer to the new branch node for reasoning.

[0012] Optionally, redirecting the system active pointer includes: decoupling the production flow of inference data from the consumption flow of front-end output through a double-buffered message queue, wherein the double-buffered message queue includes a production buffer and a consumption buffer; sending an invalidation signal to the production buffer when switching inference path branches, wherein the invalidation signal is used to indicate the cessation of inference data production at the target active node; monitoring the output tokens in the consumption buffer, and performing an atomic pointer switch when a sentence end marker is detected, redirecting the system active pointer from the target active node to the target historical suspended node or a new branch node; and writing a preset transition text to the consumption buffer for front-end rendering output.

[0013] Optionally, subgraph topological isomorphism detection is periodically performed on each target reasoning branch in the thought flow graph, wherein the type of the target reasoning branch includes at least one of the following: completed reasoning branch, suspended reasoning branch; if there is a topologically isomorphic subgraph, for each pair of isomorphic nodes in the topologically isomorphic subgraph, one node is determined as a retained node and the other node as a redundant node; all incoming edge target pointers pointing to the redundant node are redirected to the retained node; the output buffers of the redundant node and the retained node are merged and deduplication is performed; the computing device memory resources occupied by the redundant node are released and the merging operation log is recorded.

[0014] Optionally, periodically perform subgraph topological isomorphism detection on each target reasoning branch in the thought flow graph, including: periodically grouping all target reasoning branches in the thought flow graph into multiple pairs of reasoning branches; for each target reasoning branch in each pair of reasoning branches, determining the topological feature hash value of each node in the target reasoning branch and forming a set of topological feature hash values, wherein the topological feature hash value of each node is recursively generated based on the node's task type, semantic vector, task parameters, and the topological feature hash values ​​of its corresponding child nodes; determining the intersection of the two sets of topological feature hash values ​​corresponding to the reasoning branch pair, and determining the two nodes corresponding to each topological feature hash value in the intersection as a pair of candidate isomorphic nodes; for each pair of candidate isomorphic nodes, determining the semantic similarity between the two nodes in the candidate isomorphic node pair; if the semantic similarity is higher than a third preset threshold, recursively comparing the number of child nodes, edge type sequence, and child node topology of the two nodes; if the recursive comparison results are consistent, determining that the two subgraphs corresponding to the candidate isomorphic node pair are isomorphic, wherein the subgraph includes: the candidate isomorphic node and all its corresponding child nodes.

[0015] Optionally, reasoning can continue based on the new branch node, including: determining the suspended reasoning branch to which the target active node belongs, and extracting conclusive knowledge fragments from the suspended reasoning branch; performing compatibility assessment and information gain assessment on the conclusive knowledge fragments, wherein the compatibility assessment is used to determine whether there is a conflict between the conclusive knowledge fragments and the context of the new branch node; if the assessment results meet preset conditions, appending the conclusive knowledge fragments to the context snapshot of the new branch node for reasoning, and creating distillation edges to record the knowledge source.

[0016] Optionally, knowledge fragments with information gain higher than a fourth preset threshold are periodically extracted from the thought graph corresponding to the historical conversation, and all deduplicated knowledge fragments are stored in the global knowledge base; when encapsulating the initial context, target knowledge fragments that match the initial intent semantic vector and the initial task parameters are determined from the global knowledge base, and the initial intent semantic vector, the initial task parameters, and the target knowledge fragments are encapsulated into the initial context.

[0017] Optionally, version snapshots and snapshot identifiers of the mind graph are generated periodically. The snapshot identifier includes at least one of the following information: version number, timestamp, number of nodes, and active branch identifier. If the number of nodes in the mind graph exceeds the fifth preset threshold, the least recently accessed suspended node is compressed and archived to the target storage area based on the least recently used strategy, and only the metadata of the corresponding node is retained.

[0018] According to another aspect of the embodiments of this application, a user intent deflection processing device in multi-agent reasoning is also provided, comprising: an acquisition module, configured to acquire a thought flow graph corresponding to a target task, wherein the target task is parsed into multiple subtasks, and the thought flow graph includes: nodes reflecting the reasoning state of the subtasks, and directed edges reflecting the reasoning dependencies between subtasks; a node determination module, configured to, in response to a user's intent deflection command, determine the common ancestor node of the currently active target active node in the thought flow graph and the intent deflection command, and adjust the target active node to a suspended state that retains the intermediate reasoning state; a semantic calculation module, configured to determine the semantic similarity between the intent deflection command and multiple historical suspended nodes in the thought flow graph; a first processing module, configured to, when there is a target historical suspended node with a semantic similarity higher than a first preset threshold, establish a directed edge from the common ancestor node to the target historical suspended node, and continue reasoning based on the target historical suspended node; and a second processing module, configured to, when there is no target historical suspended node with a semantic similarity higher than the first preset threshold, create a new branch node at the common ancestor node based on the intent deflection command, and continue reasoning based on the new branch node.

[0019] According to another aspect of the embodiments of this application, a computer program product is also provided, the computer program product comprising: a computer program, wherein the computer program, when executed by a processor, implements the above-described user intent deflection processing method in multi-agent inference.

[0020] According to another aspect of the embodiments of this application, an electronic device is also provided, the electronic device including: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described user intent deflection processing method in multi-agent inference through the computer program.

[0021] In this embodiment, by introducing a thought flow graph data structure, the reasoning process of multi-agent systems can be upgraded from a linear pipeline to a dynamically growing directed acyclic graph. Each node in the graph represents a reasoning state, and directed edges represent reasoning dependencies. When a user initiates a new interaction, the system does not destroy old nodes. By using soft suspending of nodes instead of hard interruption, intermediate reasoning states in memory can be serialized into snapshots and stored in the nodes, achieving atomic-level preservation of reasoning states. By performing nearest common ancestor (LCA) localization, grafting edges can be created to connect new thought flows to existing suspended nodes. Alternatively, branching nodes can be created in the graph, allowing new thought flows to branch and grow from the LCA node of the old graph. The entire process maximizes the reuse of completed reasoning, avoiding the waste of computational resources caused by a complete restart. Combined with an underlying double-buffered message queue, the reasoning production flow and the front-end output consumption flow can be decoupled, enabling seamless hot switching at sentence boundaries and improving user experience. This application effectively solves the technical problem in traditional multi-agent reasoning schemes where user intent deviation necessitates starting the reasoning process anew, wasting computational resources. Attached Figure Description

[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0023] Figure 1 This is a schematic diagram of the structure of an optional intelligent interactive system according to an embodiment of this application;

[0024] Figure 2 This is a flowchart illustrating an optional multi-agent inference user intent deflection processing method according to an embodiment of this application;

[0025] Figure 3 This is a schematic diagram of an optional mind map construction process according to an embodiment of this application;

[0026] Figure 4 This is a schematic diagram of an optional inference process after user intent deflection according to an embodiment of this application;

[0027] Figure 5 This is a schematic diagram of the structure of an optional user intent deflection processing device in multi-agent inference according to an embodiment of this application;

[0028] Figure 6 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first," "second," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] According to an embodiment of this application, an intelligent interaction system is first provided, such as... Figure 1 As shown, the system includes: user access layer 11, master control scheduling layer 12, control subsystem layer 13, graph data layer 14, intelligent agent execution layer 15, and scheduling resource layer 16.

[0032] The user access layer 11 is used for interaction with users, including: user terminal 111 and front-end interaction layer 112; the main scheduling layer 12 is used for centrally coordinating and managing other modules, including: master control scheduling agent 121; the control subsystem layer 13 is used for task analysis and graph management operations, including: event listening module 131, intent recognition engine 132, nearest common ancestor locator 133, graph operation interface 134, node state manager 135 and edge relationship manager 136; the graph data layer 14 is used to store thought flow graph related data, including: thought flow graph storage engine 141, node type storage engine 142 and edge type storage engine 143; the agent execution layer 15 is used to specifically perform task reasoning, knowledge distillation and other related work, including: sub-agent cluster 151, topology comparison engine 152 and thought flow distiller 153; the scheduling resource layer 16 is used to provide related computing resources, including: double buffered output scheduler 161 and computing resource pool 162.

[0033] Based on the aforementioned intelligent interaction system, this application provides a user intent deflection processing method in multi-agent inference executed by the intelligent interaction system. It should be noted that although the steps in the flowchart show a logical order, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0034] Figure 2 This is a flowchart illustrating a user intent deflection processing method in multi-agent inference according to an embodiment of this application, as shown below. Figure 2 As shown, the method includes the following steps S202-S210:

[0035] Step S202: Obtain the thought flow graph corresponding to the target task. The target task is parsed into multiple sub-tasks. The thought flow graph includes: nodes that reflect the reasoning state of the sub-tasks and directed edges that reflect the reasoning dependencies between the sub-tasks.

[0036] Step S204: In response to the user's intention deflection command, determine the common ancestor node of the currently active target active node and the intention deflection command in the mind flow graph, and adjust the target active node to a suspended state that retains the intermediate state of reasoning.

[0037] Step S206: Determine the semantic similarity between the intention deflection instruction and multiple historical suspended nodes in the mind flow graph;

[0038] Step S208: If there is a target historical suspended node with a semantic similarity higher than the first preset threshold, establish a directed edge from the common ancestor node to the target historical suspended node, and continue reasoning based on the target historical suspended node.

[0039] Step S210: If there is no target historical suspended node with semantic similarity higher than the first preset threshold, a new branch node is created at the common ancestor node based on the intent deflection instruction, and reasoning continues based on the new branch node.

[0040] The following section explains the steps of the interaction between modules in the intelligent interaction system and the user intent deflection processing method in multi-agent reasoning, based on the specific implementation process.

[0041] As an optional implementation method, such as Figure 3 As shown, the mind map corresponding to the target task can be obtained through the following steps S11-S16:

[0042] S11: Receive the target task, extract the initial intent semantic vector and initial task parameters from the target task, and encapsulate the initial intent semantic vector and initial task parameters into an initial context.

[0043] For example, when a user inputs a target task (such as "plan a trip to Hangzhou") via voice or text, the event listening module captures the input, the intent recognition engine performs semantic encoding on the input, generates an initial intent semantic vector, and extracts initial task parameters (such as destination, number of travelers, date, etc.), which are then encapsulated into an initial context and submitted to the master control scheduling agent.

[0044] S12, based on the initial context, the target task is split into multiple subtasks, and the inference dependencies between each subtask are determined.

[0045] For example, after receiving the initial context, the master scheduling agent can decompose the target task into a set of subtasks (such as hotel query, route planning, attraction recommendation, etc.) based on the initial intent semantic vector and the initial task parameters, and configure independent input parameters, execution priority and expected output format for each subtask to form a structured task distribution.

[0046] S13, create the root node, serialize the initial context into a snapshot and store it in the root node, and mark the root node's state as running; create subtask nodes corresponding to each subtask, and mark the state of each subtask node as pending execution; construct directed edges between each subtask node based on the reasoning dependencies between each subtask, as well as directed edges from the root node to the highest-level subtask node, to obtain the initial thought flow graph.

[0047] For example, the master scheduling agent can call the graph operation interface to create a root node in the thought flow graph storage engine, set the task type to root task and the status to running, and serialize the initial context into the context snapshot; then, it can create subtask nodes for each subtask, connect the root node and the highest-level subtask node through the main edge, and construct the main edge between each subtask node based on the reasoning dependency relationship between each subtask to obtain the initialized thought flow graph, in which the active node pointer points to the root node.

[0048] S14: Schedule multiple agents to execute various subtasks and update the state of the corresponding subtask nodes during inference.

[0049] For example, the sub-agent cluster reads task parameters from the context snapshot of each sub-task node, applies for computing resources in the computing resource pool to start inference in parallel, and writes the output token to the output buffer of the corresponding sub-task node in real time during the inference process; the node state manager continuously monitors the inference progress, updates the status to completed when the sub-task is completed, and generates the next layer of sub-nodes to continue inference if further decomposition is required.

[0050] As an optional implementation, when a user's intent deflection command is detected, the common ancestor node corresponding to the target active node and the intent deflection command can be determined through the following steps S21-S23:

[0051] S21, receive the intent deflection instruction input by the user during the reasoning process, and extract the target intent semantic vector and target task parameters from the intent deflection instruction.

[0052] For example, when a user modifies their intent during inference (e.g., "change to Suzhou travel"), the event listening module captures the new instruction, and the intent recognition engine extracts the target intent semantic vector and target task parameters.

[0053] S22, starting from the target active node in the thought flow graph, backtrack layer by layer along the directed edge towards the parent node, determine the semantic deviation between the context semantic vector of each node on the backtracking path and the target intention semantic vector, and determine the node with the deepest level among the nodes with semantic deviation below the second preset threshold as the candidate common ancestor node.

[0054] For example, the common ancestor node locator starts from the currently active node and backtracks along the PRIMARY edge to the parent node layer by layer, calculating the semantic deviation between the context semantic vector and the target intent semantic vector of each node using the following formula: In the formula, This represents the context semantic vector of the i-th node. Represents the semantic vector of target intent. This indicates the corresponding semantic deviation. Then, the deepest node with a semantic deviation lower than a second preset threshold (e.g., 0.3) can be selected as a candidate common ancestor node.

[0055] S23, check whether the task parameters corresponding to the candidate common ancestor node conflict with the target task parameters. If there is no conflict, determine the candidate common ancestor node as the common ancestor node.

[0056] For example, the common ancestor node locator detects whether the task parameters corresponding to the candidate common ancestor node conflict with the target task parameters. For instance, if the subtree of the candidate common ancestor node includes the parameter "Hangzhou", which conflicts with the parameter "Suzhou" in the target task parameters, then it cannot be used as a common ancestor node and needs to be searched again; if there is no conflict, it can be used as a common ancestor node.

[0057] As an optional implementation, the target active node can be adjusted to a suspended state that retains the inference intermediate state through the following steps S31-S34:

[0058] S31, adjust the status of the target active node to suspended state;

[0059] S32, asynchronously triggers serialization of the inference intermediate state of the target active node in the video memory of the computing device into a snapshot and stores it in the target storage area;

[0060] S33, within a preset time period, retain the pointer of the inference intermediate state in the video memory of the computing device;

[0061] S34, after a preset time, releases the pointer to the inference intermediate state in the computing device's video memory.

[0062] For example, the node state manager can send a suspension signal to the target active node, setting its state to suspended, and triggering an asynchronous copy of the GPU memory intermediate state. This serializes the model inference state and the remaining content of the output buffer into a snapshot, stores it in the context snapshot, and updates the last access timestamp. In resource-rich scenarios, the GPU memory pointer can be retained for a period (e.g., 30 seconds) for quick recovery; after the timeout, the GPU memory pointer is automatically released, retaining only the serialized snapshot in host memory.

[0063] As an optional implementation method, such as Figure 4 As shown, after determining the common ancestor node, the inference after the user intent deviation can be completed through the following steps S41-S44:

[0064] S41, determine the semantic similarity between the intention deflection instruction and multiple historical suspended nodes in the mind flow graph;

[0065] S42, determine whether there is a target historical suspended node with a semantic similarity higher than the first preset threshold;

[0066] S43, if it exists, establish a grafting edge from the common ancestor node to the target historical suspended node, and redirect the system active pointer to the target historical suspended node to reuse the inference state of the target historical suspended node.

[0067] S44, if it does not exist, create a new branch node based on the intent deflection instruction. The new branch node inherits the context information of the common ancestor node, establishes a fork from the common ancestor node to the new branch node, and redirects the system active pointer to the new branch node for reasoning.

[0068] The above solution completely overturns the traditional interruption-restart fault mode. By abstracting the multi-agent reasoning process into a graph-structured thought process, it endows the reasoning process with fluid characteristics that can be branched, suspended, merged, and grafted. It replaces hard interrupt destruction with soft interrupt suspension, so that the user's intention deflection is processed in the form of graph branching. The whole process realizes the reuse of completed reasoning as much as possible, effectively avoiding the waste of computing resources caused by a complete restart.

[0069] As an optional implementation, to improve the user's interactive experience, the system active pointer can be redirected through the following steps S51-S54:

[0070] S51 decouples the production flow of inference data from the consumption flow of front-end output through a double-buffered message queue, wherein the double-buffered message queue includes a production buffer and a consumption buffer.

[0071] S52, when switching inference path branches, send an invalidation signal to the production buffer, wherein the invalidation signal is used to indicate the cessation of inference data production of the target active node;

[0072] S53 monitors the output tokens in the consumption buffer. When a sentence end marker is detected, it performs an atomic pointer switch, redirecting the system active pointer from the target active node to the target historical suspended node or a new branch node.

[0073] S54 writes the preset transition text into the consumption buffer for front-end rendering output.

[0074] For example, after receiving a switching request, the double-buffered output scheduler can send an invalidation signal to the production buffer. This signal can carry the identifier of the target active node, transition text (such as "Okay, you have switched to Suzhou"), and a flag indicating the end of the sentence. The consumer continuously detects output tokens until it detects a token carrying the sentence end flag (is_sentence_end=true), ensuring that the current sentence is output completely. Then, the system active pointer is atomically updated from the old node to the new node, the new node's state is set to running, and the transition text is injected into the consumption buffer for immediate rendering by the front end. If the new node's GPU memory pointer is null, the model state can be restored from the context snapshot deserialization, and the inference thread can be started to continue streaming output.

[0075] The above process, through waiting at the end of the sentence boundary and introducing transitional text, ensures that users will not see sentence breaks or long periods without output results, enabling seamless hot switching of the front-end interface. At the same time, the interaction delay is reduced from the existing full reconstruction delay to the fork node creation delay, greatly improving the user's interactive experience.

[0076] As an optional implementation method, in order to save storage resources, this application also proposes an incremental node merging scheme for homogeneous topological subgraphs, the specific execution steps of which are shown in S61-S62 below:

[0077] S61, Periodically perform subgraph topological isomorphism detection on each target reasoning branch in the thought flow graph, wherein the type of the target reasoning branch includes at least one of the following: completed reasoning branch, suspended reasoning branch.

[0078] Alternatively, subgraph topological isomorphism detection can be performed through the following steps S611-S614:

[0079] S611, periodically group all target reasoning branches in the mind flow graph into pairs to obtain multiple pairs of reasoning branches.

[0080] S612, for each target inference branch in each pair of inference branches, determine the topological feature hash value of each node in the target inference branch and form a set of topological feature hash values.

[0081] The topological feature hash value of each node is recursively generated based on the node's task type, semantic vector, task parameters, and the topological feature hash values ​​of its corresponding child nodes, as shown in the following formula:

[0082]

[0083] In the formula, The hash value representing the topological characteristics of a node. A hash value jointly generated based on the task type, semantic vector, and task parameters of a node. The value obtained by concatenating the topological feature hash values ​​of all child nodes of this node in an ordered manner.

[0084] S613, determine the intersection of the two sets of topological feature hash values ​​corresponding to the inference branch pair, and determine the two nodes corresponding to each topological feature hash value in the intersection as a set of candidate isomorphic node pairs.

[0085] S614. For each pair of candidate isomorphic nodes, determine the semantic similarity between the two nodes in the pair. If the semantic similarity is higher than the third preset threshold, recursively compare the number of child nodes, edge type sequence, and child node topology of the two nodes. If the recursive comparison results are consistent, determine that the two subgraphs corresponding to the candidate isomorphic node pair are isomorphic. The subgraph includes the candidate isomorphic node and all its corresponding child nodes.

[0086] Specifically, considering that the topological feature hash values ​​of isomorphic node pairs are generally the same, candidate isomorphic node pairs can be initially screened out by determining the intersection of the topological feature hash value sets to narrow down the comparison range. Then, a fine comparison is made based on semantic similarity, number of child nodes, edge type sequence, and child node topology to screen out isomorphic node pairs and their corresponding isomorphic subgraphs.

[0087] S62, if there is a topologically isomorphic subgraph, for each pair of isomorphic nodes in the topologically isomorphic subgraph, determine one node as the reserved node and the other node as the redundant node, redirect all incoming edge target pointers pointing to the redundant node to the reserved node, merge the output buffers of the redundant node and the reserved node and perform deduplication processing, release the computing device memory resources occupied by the redundant node, and record the merge operation log.

[0088] For example, the topology comparison engine can select nodes created earlier or in active branches as retained nodes, mark another node as a redundant node, redirect all its incoming edge target pointers to the retained node, merge the output buffer and remove duplicates; the node state manager can release the GPU memory pointer of the redundant node, return the memory block to the GPU memory pool, and record the merge operation log in the graph metadata, including information such as timestamp, merged node, retained node, and amount of resources released.

[0089] As an optional implementation, in order to make full use of the relevant knowledge that has already been reasoned, when creating a new branch node and continuing reasoning based on the new branch node, the following steps S71-S73 can be performed:

[0090] S71, determine the suspended reasoning branch to which the target active node belongs, and extract conclusive knowledge fragments from the suspended reasoning branch.

[0091] S72 performs compatibility evaluation and information gain evaluation on the conclusive knowledge fragments. The compatibility evaluation is used to determine whether there is a conflict between the conclusive knowledge fragment and the context of the new branch node. The information gain evaluation can use common information gain algorithms to filter out low-gain or high-redundancy knowledge and prevent context inflation.

[0092] S73, if the evaluation result meets the preset conditions, the conclusive knowledge fragment is appended to the context snapshot of the new branch node for reasoning, and a distillation edge is created to record the source of knowledge.

[0093] For example, the suspended reasoning branch here can include all nodes from the common ancestor node to the target active node and their corresponding child nodes. Considering that the relevant knowledge in the suspended reasoning branch may provide a reference for the reasoning of new intentions, the mind flow distiller can extract conclusive knowledge fragments from the leaf nodes of the suspended reasoning branch and perform compatibility evaluation and information gain evaluation. If the evaluation passes, the selected knowledge can be appended to the context snapshot of the new branch node in the form of background knowledge. At the same time, the graph operation interface creates distillation edges to record information such as knowledge source, content summary and migration timestamp, so as to realize the cumulative effect of computing power investment.

[0094] As an optional implementation, knowledge fragments with information gain higher than the fourth preset threshold can be extracted periodically from the thought graph corresponding to the historical session, and all deduplicated knowledge fragments can be stored in the global knowledge base. When a user initiates a similar intent, matching background knowledge can be retrieved from the global knowledge base first and injected into the initial context to achieve cross-user and cross-session computing power reuse.

[0095] For example, in step S11 above, when encapsulating the initial context, the target knowledge fragment that matches the initial intent semantic vector and the initial task parameters can be determined from the global knowledge base, and the initial intent semantic vector, the initial task parameters and the target knowledge fragment can be uniformly encapsulated into the initial context.

[0096] The above scheme transforms effective knowledge from historical interactions into background knowledge for subsequent reasoning, which can create a compound interest effect on computing power investment. Under long-term operation, the overall reasoning efficiency of the system shows a continuous optimization trend as knowledge distillation accumulates.

[0097] As an optional implementation, in order to facilitate the management of the mind graph and optimize the allocation of computing resources, version snapshots and snapshot identifiers of the mind graph can be generated periodically. The snapshot identifier includes at least one of the following information: version number, timestamp, number of nodes, and active branch identifier.

[0098] Optionally, if the number of nodes in the mind flow graph exceeds the fifth preset threshold (e.g., 1000), the least recently accessed suspended nodes can be compressed and archived to the target storage area based on the Least Recently Used (LRU) strategy, retaining only the metadata of the corresponding nodes to support lazy loading recovery.

[0099] In the embodiments of this application, by introducing a thought flow graph data structure, the reasoning process of multi-agent systems can be upgraded from a linear pipeline to a dynamically growing directed acyclic graph. Each node in the graph represents a reasoning state, and directed edges represent reasoning dependencies. When a user initiates a new interaction, the system does not destroy the old node. By using soft suspension of nodes instead of hard interruption, the intermediate reasoning states in the video memory can be serialized into snapshots and stored in the nodes, achieving atomic-level preservation of the reasoning state. By performing the nearest common ancestor (LCA) location, grafting edges can be created to connect the new thought flow to the existing suspended node. Alternatively, branching nodes can be created in the graph, allowing the new thought flow to branch and grow from the LCA node of the old graph. The entire process maximizes the reuse of completed reasoning and avoids the waste of computing resources caused by a complete restart. Combined with the underlying double-buffered message queue, the reasoning production flow and the front-end output consumption flow can be decoupled, enabling the front-end to complete a seamless hot switch at the sentence end boundary, effectively improving the user experience.

[0100] According to embodiments of this application, a user intent deflection processing apparatus for multi-agent reasoning is also provided for implementing the above-described user intent deflection processing method in multi-agent reasoning, such as... Figure 5 As shown, the user intent deflection processing device in the multi-agent inference includes at least: an acquisition module 51, a node determination module 52, a semantic calculation module 53, a first processing module 54, and a second processing module 55.

[0101] The acquisition module 51 is used to acquire the thought flow graph corresponding to the target task. The target task is parsed into multiple sub-tasks. The thought flow graph includes: nodes that reflect the reasoning state of the sub-tasks and directed edges that reflect the reasoning dependencies between the sub-tasks.

[0102] The node determination module 52 is used to respond to the user's intention deflection command, determine the common ancestor node of the currently active target active node in the thought flow graph and the intention deflection command, and adjust the target active node to a suspended state that retains the intermediate state of reasoning.

[0103] Semantic computation module 53 is used to determine the semantic similarity between the intent deflection instruction and multiple historical suspended nodes in the thought flow graph;

[0104] The first processing module 54 is used to establish a directed edge from the common ancestor node to the target historical suspended node when there is a target historical suspended node with a semantic similarity higher than the first preset threshold, and to continue reasoning based on the target historical suspended node.

[0105] The second processing module 55 is used to create a new branch node at the common ancestor node based on the intent deflection instruction when there is no target historical suspended node with semantic similarity higher than the first preset threshold, and to continue reasoning based on the new branch node.

[0106] The following section describes the functions of each module of the user intent deflection processing device in multi-agent reasoning, based on a specific implementation process.

[0107] Optionally, the acquisition module can acquire the thought graph corresponding to the target task in the following ways: receive the target task, extract the initial intent semantic vector and initial task parameters from the target task, and encapsulate the initial intent semantic vector and initial task parameters into an initial context; split the initial task into multiple sub-tasks based on the initial context, and determine the inference dependencies between each sub-task; create a root node, serialize the initial context into a snapshot and store it in the root node, and mark the state of the root node as running; create sub-task nodes corresponding to each sub-task, and mark the state of each sub-task node as pending execution; construct directed edges between each sub-task node based on the inference dependencies between each sub-task, as well as directed edges from the root node to the highest-level sub-task node, to obtain the initial thought graph; schedule multiple agents to execute each sub-task, and update the state of the corresponding sub-task node during the inference process.

[0108] Optionally, the node determination module can determine the common ancestor node corresponding to the currently active target node and the intent deflection instruction in the mind flow graph in the following way: receive the intent deflection instruction input by the user during the reasoning process, and extract the target intent semantic vector and target task parameters from the intent deflection instruction; starting from the target active node in the mind flow graph, backtrack layer by layer along the directed edge towards the parent node, determine the semantic deviation between the context semantic vector of each node on the backtracking path and the target intent semantic vector, and determine the deepest node among the nodes with a semantic deviation lower than the second preset threshold as the candidate common ancestor node; check whether the task parameters corresponding to the candidate common ancestor node conflict with the target task parameters. If there is no conflict, determine the candidate common ancestor node as the common ancestor node.

[0109] Optionally, the node determination module can adjust the target active node to a suspended state that retains the inference intermediate state in the following ways: adjust the state of the target active node to a suspended state; asynchronously trigger the serialization of the inference intermediate state of the target active node in the video memory of the computing device into a snapshot and store it in the target storage area; retain the pointer of the inference intermediate state in the video memory of the computing device for a preset period of time; and release the pointer of the inference intermediate state in the video memory of the computing device after the preset period of time.

[0110] Optionally, the first processing module can establish a directed edge from the common ancestor node to the target historical suspended node in the following way, and continue reasoning based on the target historical suspended node: establish a grafting edge from the common ancestor node to the target historical suspended node; redirect the system active pointer to the target historical suspended node to reuse the reasoning state of the target historical suspended node.

[0111] Optionally, the second processing module can create a new branch node at the common ancestor node based on the intent deflection instruction, and continue reasoning based on the new branch node in the following manner: create a new branch node based on the intent deflection instruction, wherein the new branch node inherits the context information of the common ancestor node; establish a fork edge from the common ancestor node to the new branch node; and redirect the system active pointer to the new branch node for reasoning.

[0112] Optionally, the first and second processing modules can redirect the system active pointer in the following ways: decoupling the production flow of inference data from the consumption flow of front-end output through a double-buffered message queue, wherein the double-buffered message queue includes a production buffer and a consumption buffer; when switching inference path branches, sending an invalidation signal to the production buffer, wherein the invalidation signal is used to indicate the cessation of inference data production at the target active node; monitoring the output tokens in the consumption buffer, and performing an atomic pointer switch when a sentence end marker is detected, redirecting the system active pointer from the target active node to the target historical suspended node or a new branch node; and writing a preset transition text into the consumption buffer for front-end rendering output.

[0113] Optionally, the user intent deflection processing device in multi-agent reasoning further includes an incremental merging module, used to periodically perform subgraph topological isomorphism detection on each target reasoning branch in the thought flow graph, wherein the type of the target reasoning branch includes at least one of the following: completed reasoning branch, suspended reasoning branch; if there is a topologically isomorphic subgraph, for each pair of isomorphic nodes in the topologically isomorphic subgraph, one node is determined as a retained node and the other node as a redundant node; all incoming edge target pointers pointing to the redundant node are redirected to the retained node; the output buffers of the redundant node and the retained node are merged and deduplication is performed; the computing device memory resources occupied by the redundant node are released, and the merging operation log is recorded.

[0114] Optionally, the incremental merging module can perform subgraph topological isomorphism detection on each target reasoning branch in the mind flow graph in the following way: periodically group all target reasoning branches in the mind flow graph into multiple pairs of reasoning branches; for each target reasoning branch in each pair of reasoning branches, determine the topological feature hash value of each node in the target reasoning branch and form a set of topological feature hash values, wherein the topological feature hash value of each node is recursively generated based on the node's task type, semantic vector, task parameters and the topological feature hash values ​​of the corresponding child nodes; determine the intersection of the two sets of topological feature hash values ​​corresponding to the reasoning branch pair, and determine the two nodes corresponding to each topological feature hash value in the intersection as a pair of candidate isomorphic nodes; for each pair of candidate isomorphic nodes, determine the semantic similarity between the two nodes in the candidate isomorphic node pair; if the semantic similarity is higher than a third preset threshold, recursively compare the number of child nodes, edge type sequence and child node topology of the two nodes; if the recursive comparison results are consistent, determine that the two subgraphs corresponding to the candidate isomorphic node pair are isomorphic, wherein the subgraph includes: the candidate isomorphic node and all its corresponding child nodes.

[0115] Optionally, the second processing module can continue reasoning based on the new branch node in the following manner: determine the suspended reasoning branch to which the target active node belongs, and extract conclusive knowledge fragments from the suspended reasoning branch; perform compatibility evaluation and information gain evaluation on the conclusive knowledge fragments, wherein the compatibility evaluation is used to determine whether there is a conflict between the conclusive knowledge fragments and the context of the new branch node; if the evaluation results meet preset conditions, append the conclusive knowledge fragments to the context snapshot of the new branch node for reasoning, and create distillation edges to record the knowledge source.

[0116] Optionally, the user intent deflection processing device in multi-agent reasoning also includes a knowledge distillation module, which periodically extracts knowledge fragments with information gain higher than a fourth preset threshold from the thought flow graph corresponding to the historical session, and stores all deduplicated knowledge fragments in the global knowledge base; when the acquisition module encapsulates the initial context, it can determine the target knowledge fragment that matches the initial intent semantic vector and the initial task parameters from the global knowledge base, and encapsulate the initial intent semantic vector, the initial task parameters and the target knowledge fragment into the initial context.

[0117] Optionally, the user intent deflection processing device in multi-agent inference also includes a graph management module for periodically generating version snapshots and snapshot identifiers of the thought flow graph. The snapshot identifier includes at least one of the following information: version number, timestamp, number of nodes, and active branch identifier. If the number of nodes in the thought flow graph exceeds a fifth preset threshold, the least recently accessed suspended nodes are compressed and archived to the target storage area based on the least recently used strategy, retaining only the metadata of the corresponding nodes.

[0118] It should be noted that each module in the user intent deflection processing device in the multi-agent reasoning of this application corresponds one-to-one with each implementation step of the user intent deflection processing method in the multi-agent reasoning described above. Since the method steps have been described in detail, some details not shown in this embodiment can be referred to the method steps, and will not be elaborated further here.

[0119] According to an embodiment of this application, a computer program product is also provided, which includes a computer program, wherein when the computer program is executed by a processor, it implements the user intent deflection processing method in multi-agent inference described above.

[0120] According to an embodiment of this application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-described user intent deflection processing method in multi-agent inference by running the computer program.

[0121] According to an embodiment of this application, a processor is also provided for running a computer program, wherein the computer program executes the user intent deflection processing method in the multi-agent inference described above.

[0122] According to an embodiment of this application, an electronic device is also provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the user intent deflection processing method in multi-agent inference described above through the computer program.

[0123] Specifically, the computer program executes the following steps during runtime: It acquires the thought graph corresponding to the target task, where the target task is parsed into multiple subtasks. The thought graph includes nodes reflecting the reasoning state of the subtasks and directed edges reflecting the reasoning dependencies between subtasks; in response to the user's intent deflection command, it determines the common ancestor node between the currently active target node in the thought graph and the intent deflection command, and adjusts the target active node to a suspended state that retains the intermediate reasoning state; it determines the semantic similarity between the intent deflection command and multiple historical suspended nodes in the thought graph; if there is a target historical suspended node with a semantic similarity higher than a first preset threshold, it establishes a directed edge from the common ancestor node to the target historical suspended node, and continues reasoning based on the target historical suspended node; if there is no target historical suspended node with a semantic similarity higher than the first preset threshold, it creates a new branch node at the common ancestor node based on the intent deflection command, and continues reasoning based on the new branch node.

[0124] As an alternative implementation, the above-mentioned electronic device may exist in the form of a mobile terminal, a computer terminal, or a similar computing device. Figure 6 A hardware block diagram of an electronic device for implementing a user intent deflection processing method in multi-agent reasoning is shown. Figure 6 As shown, the electronic device 60 may include one or more (shown as 602a, 602b, ..., 602n in the figure) processors 602 (processors 602 may include, but are not limited to, processing devices such as microprocessors or programmable logic devices), a memory 604 for storing data, and a transmission device 606 for communication functions.

[0125] In addition, it may include: a display, input / output interfaces, a universal serial bus port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 6 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, electronic device 60 may also include... Figure 6 The more or fewer components shown, or having the same Figure 6 The different configurations shown.

[0126] It should be noted that the aforementioned one or more processors 602 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element of the electronic device 60. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0127] The memory 604 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the user intent deflection processing method in the multi-agent inference of this application embodiment. The processor 602 executes various functional applications and data processing by running the software programs and modules stored in the memory 604, thereby realizing the aforementioned user intent deflection processing method in multi-agent inference. The memory 604 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 604 may further include memory remotely located relative to the processor 602, and these remote memories can be connected to the electronic device 60 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0128] The transmission device 606 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 60. In one example, the transmission device 606 includes a network adapter that can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 606 may be a radio frequency module used for data interaction with external networks or devices via wired and / or wireless network connections.

[0129] The display may be, for example, a touchscreen LCD display, which allows the user to interact with the user interface of the electronic device 60.

[0130] In addition, the electronic device 60 can also connect to a cursor control device and a keyboard via an input / output interface. The cursor control device (such as a mouse, trackball, or touchpad) is mainly used to transmit directional information and command selection to the terminal and control the movement of the cursor on the display; the keyboard is mainly used to receive letters, numbers, and other control commands input by the user, thereby enabling interaction between the user and the electronic device 60.

[0131] It should be noted here that, in some optional embodiments, the above... Figure 6 The illustrated electronic device may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 6 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0132] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0133] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0134] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0135] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0136] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory, random access memory, portable hard drive, magnetic disk, or optical disk.

[0137] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for handling user intent deflection in multi-agent reasoning, characterized in that, include: Obtain the thought flow graph corresponding to the target task, wherein the target task is parsed into multiple subtasks, and the thought flow graph includes: nodes for reflecting the reasoning state of the subtasks, and directed edges for reflecting the reasoning dependencies between the subtasks. In response to the user's intention deflection command, the common ancestor node of the currently active target active node in the thought flow graph and the intention deflection command is determined, and the target active node is adjusted to a suspended state that retains the intermediate state of reasoning; Determine the semantic similarity between the intent deflection instruction and multiple historical suspended nodes in the thought flow graph; If there is a target historical suspended node with a semantic similarity higher than the first preset threshold, a directed edge is established from the common ancestor node to the target historical suspended node, and reasoning continues based on the target historical suspended node; If there is no target historical suspended node with a semantic similarity higher than the first preset threshold, a new branch node is created at the common ancestor node based on the intent deflection instruction, and reasoning continues based on the new branch node.

2. The method according to claim 1, characterized in that, Obtain the mind flow map corresponding to the target task, including: Receive a target task, extract an initial intent semantic vector and initial task parameters from the target task, and encapsulate the initial intent semantic vector and the initial task parameters into an initial context; Based on the initial context, the target task is divided into multiple sub-tasks, and the inference dependencies between each sub-task are determined. Create a root node, serialize the initial context into a snapshot and store it in the root node, and mark the root node's state as running; Create a subtask node corresponding to each subtask, and mark the status of each subtask node as pending execution; Based on the reasoning dependencies between subtasks, directed edges are constructed between subtask nodes, as well as directed edges from the root node to the highest-level subtask node, to obtain an initial thought flow graph. Multiple agents are scheduled to execute various subtasks, and the state of the corresponding subtask nodes is updated during the inference process.

3. The method according to claim 1, characterized in that, In response to a user's intent deflection command, the common ancestor node of the currently active target node in the thought graph and the intent deflection command is determined, including: Receive intent deflection instructions input by the user during the inference process, and extract the target intent semantic vector and target task parameters from the intent deflection instructions; Starting from the target active node in the thought flow graph, backtrack layer by layer along the directed edge towards the parent node, determine the semantic deviation between the context semantic vector of each node on the backtracking path and the target intention semantic vector, and determine the deepest node among the nodes with a semantic deviation lower than the second preset threshold as the candidate common ancestor node. Check whether the task parameters corresponding to the candidate common ancestor node conflict with the target task parameters. If there is no conflict, determine the candidate common ancestor node as the common ancestor node.

4. The method according to claim 1, characterized in that, Adjusting the target active node to a suspended state that retains the inference intermediate state includes: Adjust the state of the target active node to a suspended state; Asynchronous triggering serializes the inference intermediate state of the target active node in the video memory of the computing device into a snapshot and stores it in the target storage area; Within a preset time period, the pointer to the inference intermediate state is retained in the video memory of the computing device; After a preset time period, the pointer of the inference intermediate state in the video memory of the computing device is released.

5. The method according to claim 1, characterized in that, Establish a directed edge from the common ancestor node to the target suspended history node, and continue reasoning based on the target suspended history node, including: Establish a grafting edge from the common ancestor node to the target historical suspended node; Redirect the system active pointer to the target historical suspended node to reuse the inference state of the target historical suspended node.

6. The method according to claim 1, characterized in that, Based on the intent deflection instruction, a new branch node is created at the common ancestor node, and reasoning continues based on the new branch node, including: A new branch node is created based on the intent deflection instruction, wherein the new branch node inherits the context information of the common ancestor node; Establish the fork edge from the common ancestor node to the new branch node; The system active pointer is redirected to the new branch node for inference.

7. The method according to claim 5 or 6, characterized in that, Redirecting the system active pointer includes: The production flow of inference data is decoupled from the consumption flow of front-end output by using a double-buffered message queue, wherein the double-buffered message queue includes a production buffer and a consumption buffer. When switching inference path branches, an invalidation signal is sent to the production buffer, wherein the invalidation signal is used to indicate the cessation of inference data production of the target active node; Monitor the output tokens in the consumption buffer, and when a sentence end marker is detected, perform an atomic pointer switch to redirect the system active pointer from the target active node to the target historical suspended node or the new branch node; The preset transition text is written into the consumption buffer for front-end rendering output.

8. The method according to claim 1, characterized in that, The method further includes: Periodically perform subgraph topological isomorphism detection on each target reasoning branch in the thought flow graph, wherein the type of the target reasoning branch includes at least one of the following: completed reasoning branch, suspended reasoning branch; If there is a topologically isomorphic subgraph, for each pair of isomorphic nodes in the topologically isomorphic subgraph, one node is determined as a reserved node and the other node is a redundant node. Redirect all incoming edge target pointers pointing to the redundant node to the reserved node; Merge the output buffers of the redundant nodes and the reserved nodes, and perform deduplication. Release the computing device memory resources occupied by the redundant nodes and record the merge operation log.

9. The method according to claim 8, characterized in that, Periodically perform subgraph topological isomorphism detection on each target reasoning branch in the thought flow graph, including: Periodically group all target reasoning branches in the aforementioned thought flow graph into pairs to obtain multiple groups of reasoning branch pairs; For each target inference branch in each pair of inference branches, the topological feature hash value of each node in the target inference branch is determined and a set of topological feature hash values ​​is formed. The topological feature hash value of each node is recursively generated based on the task type, semantic vector, task parameters and the topological feature hash values ​​of the corresponding child nodes of the node. Determine the intersection of the two sets of topological feature hash values ​​corresponding to the inference branch pair, and determine the two nodes corresponding to each topological feature hash value in the intersection as a set of candidate isomorphic node pairs; For each pair of candidate isomorphic nodes, the semantic similarity between the two nodes in the pair is determined. If the semantic similarity is higher than a third preset threshold, the number of child nodes, edge type sequence, and child node topology of the two nodes are recursively compared. If the recursive comparison results are consistent, the two subgraphs corresponding to the candidate isomorphic node pair are determined to be isomorphic. The subgraphs include the candidate isomorphic node and all its corresponding child nodes.

10. The method according to claim 1, characterized in that, The reasoning continues based on the new branch node, including: Determine the suspended inference branch to which the target active node belongs, and extract conclusive knowledge fragments from the suspended inference branch; The conclusive knowledge fragment is subjected to compatibility evaluation and information gain evaluation, wherein the compatibility evaluation is used to determine whether there is a conflict between the conclusive knowledge fragment and the context of the new branch node; If the evaluation results meet the preset conditions, the conclusive knowledge fragments are appended to the context snapshot of the new branch node for reasoning, and distillation edges are created to record the knowledge source.

11. The method according to claim 2, characterized in that, The method further includes: Periodically extract knowledge fragments with information gain higher than the fourth preset threshold from the mind flow graph corresponding to the historical conversation, and store all deduplicated knowledge fragments in the global knowledge base; When encapsulating the initial context, a target knowledge fragment matching the initial intent semantic vector and the initial task parameters is determined from the global knowledge base, and the initial intent semantic vector, the initial task parameters, and the target knowledge fragment are encapsulated into the initial context.

12. The method according to claim 1, characterized in that, The method further includes: Periodically generate version snapshots and snapshot identifiers of the mind flow graph, wherein the snapshot identifier includes at least one of the following information: version number, timestamp, number of nodes, and active branch identifier; If the number of nodes in the thought graph exceeds the fifth preset threshold, the least recently accessed suspended nodes are compressed and archived to the target storage area based on the least recently used strategy, and only the metadata of the corresponding nodes is retained.

13. A user intent deflection processing device for multi-agent reasoning, characterized in that, include: The acquisition module is used to acquire the thought flow graph corresponding to the target task, wherein the target task is parsed into multiple subtasks, and the thought flow graph includes: nodes for reflecting the reasoning state of the subtasks, and directed edges for reflecting the reasoning dependencies between the subtasks. The node determination module is used to respond to the user's intention deflection command, determine the common ancestor node of the currently active target active node in the thought flow graph and the intention deflection command, and adjust the target active node to a suspended state that retains the intermediate state of reasoning; The semantic computing module is used to determine the semantic similarity between the intent deflection instruction and multiple historical suspended nodes in the thought flow graph; The first processing module is used to establish a directed edge from the common ancestor node to the target historical suspended node when there is a target historical suspended node with a semantic similarity higher than a first preset threshold, and to continue reasoning based on the target historical suspended node. The second processing module is used to create a new branch node at the common ancestor node based on the intent deflection instruction when there is no target historical suspended node with semantic similarity higher than the first preset threshold, and to continue reasoning based on the new branch node.

14. A computer program product, characterized in that, include: A computer program, wherein when executed by a processor, the computer program implements the user intent deflection processing method in multi-agent inference as described in any one of claims 1 to 12.

15. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute, via the computer program, the user intent deflection processing method in multi-agent reasoning according to any one of claims 1 to 12.