Query processing method and device, computer equipment and storage medium

By planning task nodes and displaying execution details and result information in the intelligent dialogue system, the problems of low generation quality and efficiency are solved, and more efficient query processing is achieved.

CN121786064APending Publication Date: 2026-04-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing intelligent dialogue systems lack effective information display when generating query responses, affecting the quality and efficiency of answer generation.

Method used

By acquiring query content, planning task nodes, and displaying execution details in the task node display style to represent the task execution process, and finally displaying execution result information when the task is completed, the task can be broken down and displayed in detail.

Benefits of technology

It improves the quality and efficiency of response generation, enabling users to track task progress in real time, reducing the number of follow-up queries, and ensuring the accuracy and efficiency of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786064A_ABST
    Figure CN121786064A_ABST
Patent Text Reader

Abstract

The invention relates to a query processing method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: obtaining query content; displaying at least one task node planned for the query content; under the condition that the display style of the task node represents that the task is in execution, displaying execution detail information of the task represented by the task node; under the condition that the display style of the task node represents that task execution is completed, displaying execution result information of the task represented by the task node; the execution result information is used for obtaining a query result of the query content. By adopting the method, the generation quality and the generation efficiency of the query result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a query processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the rapid development of computer technology, intelligent dialogue systems based on artificial intelligence agents (AI agents) have emerged. These agents are built upon large language models (LLMs) and possess the ability to autonomously understand, perceive, plan, remember, and use tools. In terms of technical architecture, AI agents have shifted from a process-oriented architecture to a goal-oriented architecture, aiming to complete complex tasks through a close integration of perception, thinking, and action.

[0003] In related technologies, users input query content into the display interface, and an artificial intelligence agent generates an answer to the query content and displays the answer on the display interface. The above end-to-end display process lacks effective information display, thus affecting the quality and efficiency of answer generation. Summary of the Invention

[0004] Therefore, it is necessary to provide a query processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the quality and efficiency of response content generation in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a query processing method. The method includes:

[0006] Retrieve query results;

[0007] Display at least one task node planned for the query content;

[0008] When the display style of the task node indicates that a task is being executed, the execution details of the task represented by the task node are displayed;

[0009] When the display style of the task node indicates that the task has been completed, the execution result information of the task represented by the task node is displayed; the execution result information is used to obtain the query result of the query content.

[0010] Secondly, this application also provides another query processing method. The method includes:

[0011] Receive query content sent by the application;

[0012] Based on the query content, task planning is performed to obtain at least one task;

[0013] During the execution of the task, the execution details of the task are pushed to the application.

[0014] Upon completion of the task, the execution result information of the task is pushed to the application; the execution result information is used to obtain the query result of the query content.

[0015] Thirdly, this application also provides a query processing apparatus. The apparatus includes:

[0016] The content retrieval module is used to retrieve the query content;

[0017] The task node display module is used to display at least one task node planned for the query content;

[0018] The execution details display module is used to display the execution details information of the task represented by the task node when the display style of the task node indicates that the task is being executed;

[0019] The execution result display module is used to display the execution result information of the task represented by the task node when the display style of the task node indicates that the task execution is completed; the execution result information is used to obtain the query result of the query content.

[0020] Fourthly, this application also provides another query processing apparatus. The apparatus includes:

[0021] The content receiving module is used to receive query content sent by the application client;

[0022] The task planning module is used to plan tasks based on the query content to obtain at least one task.

[0023] The execution details push module is used to push the execution details information of the task to the application during the execution of the task;

[0024] The execution result push module is used to push the execution result information of the task to the application terminal when the task is completed; the execution result information is used to obtain the query result of the query content.

[0025] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described query processing method.

[0026] Sixthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described query processing method.

[0027] Seventhly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described query processing method.

[0028] The aforementioned query processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire query content and display at least one task node planned for the query content. Through task planning, complex tasks can be broken down to improve the quality and efficiency of generated response content. Furthermore, when the display style of the task planning node indicates that the task is in progress, the execution details of the task represented by the task node are displayed; when the display style of the task node indicates that the task has been completed, the execution result information of the task represented by the task node is displayed. By presenting the execution details and results, users can perceive and understand the entire execution process and implementation logic of the task. This facilitates real-time tracking of the task execution progress of each task node, early detection of unexpected situations, and accurate location of error causes, facilitating subsequent modifications. It also reduces the number of follow-up queries and improves the quality and efficiency of query result generation. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a diagram illustrating the application environment of the query processing method in some embodiments;

[0031] Figure 2 This is a schematic diagram of the query processing procedure in some embodiments;

[0032] Figure 3 This is a flowchart illustrating the query processing method in some embodiments;

[0033] Figure 4 This is a schematic diagram of the display page during the thinking phase in some embodiments;

[0034] Figure 5 This is a schematic diagram of the display page during the action phase in some embodiments;

[0035] Figure 6 This is a schematic diagram of the initialization information display page in some embodiments;

[0036] Figure 7 This is a schematic diagram of the display page during the action phase in some other embodiments;

[0037] Figure 8 This is a schematic diagram of the display page during the observation phase in some embodiments;

[0038] Figure 9 This is a schematic diagram of the display page for execution result information in some embodiments;

[0039] Figure 10 This is a flowchart illustrating the query processing method in some other embodiments;

[0040] Figure 11 This is a flowchart illustrating the query processing method in some other embodiments;

[0041] Figure 12 This is a schematic diagram illustrating the division of the display area for detailed information in some embodiments;

[0042] Figure 13 This is a schematic diagram of the query processing system architecture in some embodiments;

[0043] Figure 14 This is a schematic diagram of the complete workflow of query processing in some embodiments;

[0044] Figure 15 This is a structural block diagram of the query processing device in some embodiments;

[0045] Figure 16 This is a structural block diagram of the query processing apparatus in some other embodiments;

[0046] Figure 17 These are internal structural diagrams of the computer device in some embodiments;

[0047] Figure 18 This is an internal structural diagram of a computer device in some other embodiments. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0049] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0050] First, the key terms and definitions used in this application will be introduced:

[0051] Large language models: Large-scale AI models with natural language understanding and generation capabilities, such as GPT-4 and LLaMA, are the core engines that drive agents to perform task planning and decision-making.

[0052] An agent is an autonomous software entity capable of perceiving its environment, planning, invoking tools (or its own capabilities), and executing actions to achieve its goals. An agent can encapsulate complex logic and capabilities for solving specific types of problems.

[0053] Task Node: Represents an atomic task that can be assigned to a specific Agent for execution.

[0054] Real-time State Synchronization Channel: A two-way communication mechanism (such as WebSocket-based) connecting the backend scheduling engine and the frontend visualization interface, used to push changes in node state to the frontend in real time with low latency.

[0055] ReACT model: An agent working paradigm that completes the task objective through iterative cycles of "Thought-Action-Observation" combined with tool calls to supplement information.

[0056] An instance (item) refers to an independent entity in memory that is concretely created and running based on an abstract definition or class. Each instance runs in an independent process or thread, has its own independent state, memory space, and execution context, and consumes computing resources (such as CPU and memory). In other words, an agent is an abstract definition, while an agent instance is the concrete running entity of an instantiated agent within an independent process or thread. Multiple agent instances can be deployed for the same agent, and different agent instances can consume different amounts of resources.

[0057] A ReAct instance (ReActItem) is a structured data unit that encapsulates the entire ReACT process of a single task. It includes the task title, description, list of available tools, sequence of ReAct steps, streaming address (SSEUrl), and final answer (FinalAnswer). A ReAct instance runs within a specific agent instance. In essence, an active agent instance can manage and run multiple ReAct instances simultaneously or sequentially to handle multiple concurrent tasks.

[0058] ReAct Step: A single execution unit in the ReACT loop, containing three core fields: Thought, Action, and Observation, as well as the execution status (Thinking / Action in progress / Observation completed / Execution failed / Retrying).

[0059] ToolCall (Tool Invocation Structure): A standardized data structure that encapsulates tool invocation information, including the tool name (Name), input parameters (Inputs), and associated search IDs (SearchIds), ensuring consistency between the Agent and the tool.

[0060] Real-time status synchronization channel: A bidirectional communication mechanism built on WebSocket, used to push dynamic changes of the ReAct step to the front end with low latency.

[0061] JSON Patch Incremental Update Protocol: A lightweight data update specification that only pushes fields that have changed during the ReAct step (such as status and content), reducing transmission bandwidth and front-end rendering pressure.

[0062] SSE (Server-Sent Events) streaming: A streaming communication technology used to push long text observations (such as search summaries) and final answers in real time.

[0063] McpChain: A dedicated processing chain that guides LLM to generate standardized ReACT outputs. It ensures structured decision generation by constraining the output format through preset Prompt templates.

[0064] ReACT Output Parser: A module that extracts structured ReACT output from LLM-generated text, filters out illusory data such as "Observation", and validates the legality of JSON format.

[0065] Tool call retry mechanism: When a tool call fails, a retry is automatically triggered, and the number of retries and the reason for failure are recorded to ensure the continuity of the ReACT loop.

[0066] The query processing method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, the application environment may include application terminal 102 and server terminal 104. Application terminal 102 and server terminal 104 can communicate via a communication network. This communication network can be a wired network or a wireless network. Therefore, application terminal 102 and server terminal 104 can be directly or indirectly connected via wired or wireless communication. For example, application terminal 102 can be indirectly connected to server terminal 104 via a wireless access point, or application terminal 102 can be directly connected to server terminal 104 via the Internet; this application does not impose any limitations on this.

[0067] The application terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Optionally, the application terminal 102 can have a client related to content query installed; this client can be an application, webpage, or mini-program. The server terminal 104 is the backend server corresponding to the client, or a server specifically designed to provide content query services. Furthermore, the server terminal 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The data storage system can store the data that the application terminal 104 needs to process. The data storage system can be set up separately, integrated into the server terminal 104, or placed in the cloud or on other computer devices.

[0068] In the embodiments of this application, such as Figure 2 As shown, a user can interact with the application client 102 and input query content 201. For example, the query content could be, "Compare product A and product B, how much do they cost recently, and are they worth buying?" This query content can be further sent to the server 104 to request the corresponding query results. The server 104 can obtain the query content and perform task planning based on the query content to generate at least one task, and then the application client 102 can display the task node 202 corresponding to the task. The number of task nodes 202 can be one or more. For example, as... Figure 2As shown, the application terminal 102 can display task nodes corresponding to multiple tasks, such as product price query and product parameter and performance comparison. Then, the server terminal 104 can execute each task according to the execution order constraints between different tasks. Optionally, the server terminal 104 can execute each task sequentially or concurrently. For each task node 202, the server terminal 104 can push the execution details information of the task to the application terminal 102 during the execution of the task represented by that task node 202, and push the execution result information of the task to the application terminal 102 when the task execution style of the task node 202 indicates that the task is in progress, and display the execution result information 204 of the task represented by the task node 202 when the task execution style of the task node 202 indicates that the task execution is complete. The task execution result information is used to obtain the query results of the query content. For example, as shown... Figure 2 As shown, icon 205 indicates that the task is in progress, and the displayed execution details information 203 may include thought information and action information; icon 206 indicates that the task has been completed. Figure 1 The query result can be fed back to the application terminal 102.

[0069] In some embodiments, such as Figure 3 As shown, a query processing method is provided, which is executed by a computer device. In this embodiment, the method is applied to... Figure 1 Taking application terminal 102 as an example, the explanation includes the following steps:

[0070] Step S302: Obtain the query content.

[0071] The query content refers to the combination of information used to query and retrieve specific content. Optionally, the query content may include one or more elements from the following: explicit instructions, question statements, contextual background, and output format requirements, to provide sufficient and structured semantic constraints and task guidance, aiming to obtain accurate, relevant, and user-expected query results. Instructions or question statements can be used to describe the purpose of the content query. For example, the query content may include "I need to buy a tent, any purchasing advice?" or "Compare product A and product B, how much do they cost recently, and are they worth buying?", describing the query purpose in the form of a question. Similarly, the query content may include "Compare the horsepower, safety, and smart cockpit configuration of car models A, B, and C," describing the query purpose in the form of an instruction. Contextual background describes the current situation and needs. For example, the query content "I like hiking and now want to go out and live in the mountains, I need to buy a tent, any purchasing advice?" includes the contextual background "I like hiking and now want to go out and live in the mountains." Output format requirements specify the output requirements of the query results, such as "Please provide the results in list form."

[0072] Optionally, the search terms may not be limited to a single field and may include at least one of the following: healthcare, education, office work, and shopping.

[0073] Optionally, the query content can be entered in various ways, such as text or voice. In an exemplary embodiment, the application can display a query content input page, which includes a query content input box, allowing the user to enter their query content. Optionally, the application can also obtain the query content by collecting the user's voice.

[0074] Specifically, users can input their query content through the application, and the server can then obtain the corresponding query content by interacting with the application.

[0075] Step S304: Display at least one task node planned for the query content.

[0076] Among them, the task node is used to represent the task planned according to the task planning idea; the execution result of the task is used to obtain the query result of the query content.

[0077] In the specific implementation, after obtaining the query content, the server can perform task planning based on that query content to obtain at least one task. Then, the application can display the at least one task node planned based on the query content. Optionally, such as... Figure 2As shown, the application can display content cards for task nodes, showing information such as the task title, description, and execution status of the task identified by the task node. The task title could be, for example, "Product Parameters and Performance Comparison," and the task description could be, for example, "Comparison of product A and product B in suction power, battery life, navigation technology, obstacle avoidance, dust collection method, cleaning...". Optionally, the content card can also display the task type represented by the task planning node. Alternatively, different task types can be represented by corresponding type icons, for example, such as... Figure 2 As shown, icon 207 is used to represent comparison tasks. Optionally, the display style of the task node is used to characterize the task status of the task represented by that task node. Optionally, the task status can include waiting for the previous task to complete, pending, running, succeeded, and failed.

[0078] Optionally, the server can also determine the execution order constraints between tasks based on the data flow dependencies between them. These execution order constraints can be represented by directed edges between task nodes.

[0079] In an exemplary embodiment, for the query "Compare product A and product B, how much do they cost recently, and are they worth buying?", three tasks can be planned: product price query, product parameter and cost-effectiveness comparison, and generating a final purchase suggestion. Therefore, as Figure 2 As shown, the application can display the task nodes corresponding to the three tasks mentioned above, and the execution results of these tasks are used to obtain the query results for the query content.

[0080] In an alternative embodiment, the server can identify the user's core intent by parsing the query content and matching keywords. Then, the server can decompose the complex request into a series of ordered tasks according to its internal predefined business process or decision tree.

[0081] In an optional embodiment, task execution can be achieved through an intelligent agent. Specifically, the planning task for the query content can be assigned to a planning agent, which parses the query content and performs global planning on the parsed content to obtain multiple tasks.

[0082] In this context, an intelligent agent can refer to an autonomous software entity capable of perceiving its environment, planning, invoking tools (or its own capabilities), and executing actions to achieve a goal. An intelligent agent typically encapsulates complex logic for solving a specific type of problem and possesses the ability to autonomously understand, perceive, plan, remember, and use tools. In an exemplary embodiment, the intelligent agent can employ a "thinking + action" reasoning pattern when determining the task of the query content. Thinking refers to the intelligent agent analyzing the current situation and considering what to do next; action refers to the actions performed by the intelligent agent, usually by invoking tools. Optionally, an intelligent agent can be implemented using a single process or through the collaborative efforts of multiple processes. For example, an intelligent agent can correspond to two processes, specifically a process responsible for decision-making and a process responsible for controlling the hardware. The deployment method of intelligent agents on physical machines is not unique. Optionally, the server can adopt a single-machine multi-agent mode, a multi-machine multi-agent mode, or a hybrid deployment mode.

[0083] Step S306: If the display style of the task node indicates that the task is being executed, display the execution details information of the task represented by the task node.

[0084] Optionally, each task typically undergoes several state transitions during its lifecycle. When a task is waiting for its preceding tasks to complete, its state is "waiting"; when the preceding tasks are empty or have all executed successfully but are temporarily awaiting allocation due to system resources, its state is "pending"; when the task is being executed, its state is "running"; when the task completes, its state is "succeeded"; and when the task fails, its state is "failed".

[0085] Task execution details refer to the data and feedback generated in real time during task execution, reflecting the current progress status and intermediate processes. This execution details information may include at least one of the following: the task's current execution stage, progress status, resource usage, and exception notifications. In an optional embodiment, the server may adopt the ReACT pattern, completing the task execution process through an iterative "Thought-Action-Observation" cycle; that is, the task execution stages may include a thinking stage, an action stage, and an observation stage.

[0086] In practical implementation, the display style of a node can be associated with the task status of the task it represents to achieve state-driven visualization mapping. The display style can include at least one of the following: color, shape, status identifier, etc. Optionally, different colored task nodes can be displayed to represent different task states. For example, a gray task node indicates that it is waiting for resources; a yellow task node indicates that it is waiting for a preceding task to complete; a blue task node indicates that the task is executing; a green task node indicates that the task has been successfully executed; and an orange-red task node indicates that the task has failed.

[0087] When the display style of a task node indicates that a task is in progress, the application can display the execution details of the task represented by that task node. Optionally, this execution details can be displayed dynamically through a floating layer, or through a pop-up window or a floating window. Optionally, the floating layer can be displayed directly, or it can be a top-down pop-up window. Those skilled in the art may make other changes based on the essence of the technology in this application, but as long as the functions and effects achieved are the same as or similar to those in this application, they should all be covered within the scope of protection of this application.

[0088] In an optional embodiment, the application can display at least one task node in the first display area of ​​the content display page, and if the display style of the task node indicates that the task is in progress, the execution details of the task represented by the task node can be displayed in the second display area of ​​the content display page. Optionally, the first display area and the second display area can be distinguished by a dividing line. Optionally, the first display area and the second display area can be on different layers. For example, the second display area can be displayed as a floating layer on the first display area; for example, the second display area can be a pop-up window floating on the first display area.

[0089] In one exemplary embodiment, the details can be dynamically updated, and related operations can be performed on the second display area. For example, clicking a drop-down menu or scrolling the mouse can display the execution details for the next page. Another example is clicking the details directory to display the corresponding details.

[0090] Optionally, users can trigger a task node that is in execution, so that the application can query the background for detailed execution logs, LLM inference process and other execution details of the task based on the node identifier of the triggered node. Then, the application can display a summary of the details in the sidebar or pop-up window to achieve a closed loop from visualization to in-depth analysis.

[0091] Step S308: If the display style of the task node indicates that the task has been completed, display the execution result information of the task represented by the task node.

[0092] The task execution result information is used to obtain the query results for the queried content. Task execution result information refers to the deterministic output generated after the task node completes execution, which can be directly used for subsequent processing or as part of the final answer. It is a direct reflection of the task objective, focusing on the completeness and usability of the final deliverable.

[0093] In practical applications, when the display style of a task node indicates that the task has been completed, the execution result information of the task represented by the task node is displayed. Optionally, the execution result information can be displayed after the execution details information. This execution result information can be displayed dynamically through a floating layer, or through a pop-up window or floating window. Optionally, the floating layer can be displayed directly, or it can be a top-down pop-up window; there is no limitation here.

[0094] In an optional embodiment, the application can display at least one task node in the first display area of ​​the content display page, and when the display style of the task node indicates that the task has been completed, display the execution result information of the task represented by the task node in the second display area of ​​the content display page.

[0095] The above query processing method retrieves the query content and displays at least one task node planned for the query content. Through task planning, it enables the breakdown of complex tasks, thereby improving the quality and efficiency of the generated response content. Furthermore, when the display style of the task planning node indicates that the task is in progress, it displays the execution details of the task represented by the task node. When the display style of the task node indicates that the task has been completed, it displays the execution result information of the task represented by the task node. The presentation of execution details and results allows users to perceive and understand the entire execution process and implementation logic of the task. This facilitates real-time tracking of the task execution progress of each task node, early detection of unexpected situations, and accurate identification of the cause of errors, facilitating subsequent modifications. It also reduces the number of follow-up queries, thus improving the quality and efficiency of query result generation.

[0096] In one embodiment, when the display style of a task node indicates that a task is being executed, displaying the execution details of the task represented by the task node includes: in response to the task node's display style changing to a first display style indicating that a task is being executed, displaying a task-following content card for the task node; and displaying the execution details of the task represented by the task node in the task-following content card.

[0097] The task follow-up content card displays detailed information about the task. This detailed information may include execution details and execution results. Optionally, each task node can correspond to a different task follow-up content card, or multiple task nodes can share a single task follow-up content card.

[0098] In specific implementation, such as Figure 4 As shown, the application can respond to the change of the display style of the task node to the first display style representing the task execution, display the task follow-up content card 401 for the task node, and display the execution details information 402 of the task represented by the task node in the task follow-up content card 401.

[0099] Optionally, the task-following content card 401 can be displayed directly, or it can pop up from the bottom up or from the top down. Optionally, the task-following content card can also display task description information, which may include at least one of the following: task name, task summary, etc. For example, such as... Figure 4 As shown, execution details information 402 and task description information 403 can be displayed in different content sections.

[0100] In an optional embodiment, the server can implement task scheduling through a scheduling engine. Specifically, the scheduling engine can find target tasks whose prerequisite tasks have been completed or have no prerequisite tasks, add these target tasks to the ready task queue, and then check the available idle agent resources and the ready task queue. It then assigns the tasks in the queue to idle agents for execution, triggering an execution start event for the assigned task and driving the application to display the task node assigned to the task in a first display style indicating execution in progress. Optionally, when there are multiple target tasks with completed prerequisite tasks or no prerequisite tasks, the server can simultaneously assign at least two target tasks to these task agents based on currently available agent resources to achieve concurrent execution of at least two tasks. Concurrent execution of at least two tasks means having the ability to process at least two tasks within a certain period of time. These tasks can run simultaneously at the same time or alternately through rapid switching.

[0101] When multiple tasks are executed concurrently, different tasks can share a single task-following content card. Optionally, the execution details of each task can be displayed simultaneously in this task-following content card. For example, such as... Figure 5As shown, both the "Product Comparison Analysis" and "Product Price Inquiry" tasks are in the execution state. The application can display the execution details 502 of "Product Comparison Analysis" and the execution details 503 of "Product Price Inquiry" in the task follow content card 501 shared by these two tasks. The execution details of different tasks can be distinguished by their corresponding task names.

[0102] Optionally, the application can also respond to a trigger event for any running task by displaying the execution details of the triggered task in the task-following content card. For example, a user can trigger the task represented by a task node by clicking or touching it.

[0103] In the above embodiments, in response to the change of the display style of the task node to the first display style representing the task execution, a task-following content card for the task node is displayed, and the execution details of the task represented by the task node are displayed in the task-following content card. The execution details of the task can be presented in real time through dynamic content cards, which can improve the information display effect.

[0104] In one embodiment, the execution details information includes initialization prompt information. In this embodiment, when the display style of the task node indicates that a task is being executed, displaying the execution details information of the task represented by the task node includes: in response to the task node's display style changing to a first display style indicating that a task is being executed, displaying task description information of the task represented by the task node; and corresponding to the task description information, displaying initialization prompt information of the task.

[0105] The task description information may include at least one of the following: task title, task summary, etc. The task initialization prompt information indicates that the task is in the initialization phase. This initialization prompt information may include basic ReAct instance information, prompts, etc. The basic ReAct instance information may include at least one of the following: the tools required to execute the task, the instance name corresponding to the task, etc.

[0106] In practical applications, for each planned task, the server can first initialize the task before officially executing it. That is, the initialization phase is the first stage after a task is scheduled. The application can then respond by changing the display style of the task node to the first display style representing task execution, displaying the task description information represented by the task node, and correspondingly displaying the task initialization prompt information. Optionally, the initialization prompt information can be displayed in the same content section as the task description information, or they can be displayed in different content sections. For example, the initialization prompt information can be displayed below the task description information, or the initialization prompt information and the task description information can be linked by icons such as lines, or the initialization prompt information and the task description information can have the same color.

[0107] For example, such as Figure 6 As shown, when the status icon for the "Product Comparison Analysis" task changes from icon 601, indicating waiting for scheduling, to icon 602, indicating execution, it means the task has been scheduled. At this time, the application can display the task description information 603 and initialization prompt information 604. The initialization prompt information 604 can include the tools and prompts required by the task. For example... Figure 6 In the "product comparison analysis" task, the tool required is a web search tool, and the corresponding prompt information may be, for example, "Initialize the ReACT loop to generate structured decisions".

[0108] In the above embodiments, in response to the change of the display style of the task node to the first display style representing the task execution, the task description information of the task represented by the task node is displayed, and the initialization prompt information of the task is displayed corresponding to the task description information. This can present the initialization information of the task in a timely manner when the task is scheduled, so as to inform the user that the task is about to be officially executed, and can further enrich the information content displayed.

[0109] In one embodiment, displaying the execution details of the task represented by the task node includes: displaying a stage identifier that characterizes the execution stage of the task represented by the task node; and displaying the execution details of the task at that execution stage corresponding to the stage identifier.

[0110] The execution phase of a task refers to the complete decision-making loop process of an intelligent agent, from perceiving environmental information to outputting action results and updating its internal state. This execution phase can specifically include a thinking phase, an action phase, and an observation phase. Phase identifiers are used to represent specific execution phases and can include at least one of icons or text. For example, such as... Figure 5 As shown, the stage identifier for the thinking stage may include icon 504 and the text "Thinking"; the stage identifier for the action stage may include icon 505 and the text "Action".

[0111] In practical implementation, the application can display corresponding execution details based on the execution stage of the task, achieving fine-grained display of execution details. Optionally, the application can display a stage identifier representing the execution stage of the task, and correspondingly display the execution details of the task at that stage. Optionally, the application can display only the stage identifier and execution details of the current execution stage, or it can dynamically display the stage identifier and execution details of the current execution stage while also displaying the stage identifier and execution details of historical execution stages. Optionally, the execution details of each execution stage are dynamically updated to ensure that the current window always displays the latest execution details.

[0112] Optionally, the stage identifier and execution details information for the same execution phase can be displayed in the same content section, or they can be displayed correspondingly in different content sections. For example, the execution details information can be displayed below the stage identifier, or the execution details information for the same execution phase can be linked to the stage identifier by a line or other icon, or the execution details information for the same execution phase can have the same color as the stage identifier. In an exemplary embodiment, information related to the thinking phase is displayed in blue, information related to the action phase is displayed in purple, and information related to the observation phase is displayed in green. In an exemplary embodiment, the execution details information for different execution phases is displayed in different content sections. Figure 2 As shown, the execution details of the thinking phase are displayed in content section 506, and the execution details of the action phase are displayed in content section 507. Each content section has a boundary line to delineate the corresponding area for information display.

[0113] In the above embodiments, the execution details of the task at the execution stage are displayed according to the stage identifier used to characterize the execution stage of the task represented by the task node. This allows for the display of the corresponding execution details according to the execution stage of the task, thereby achieving a fine-grained display of the execution details. This is beneficial for further enriching the displayed information content, facilitating subsequent information location and modification, and further improving the quality and efficiency of query result generation.

[0114] In one embodiment, displaying a stage identifier for characterizing the execution phase of the task represented by the task node includes: displaying the stage identifier of the execution phase according to a display style that matches the execution phase of the task represented by the task node.

[0115] In practice, the display style of the stage identifier can be associated with the execution stage it represents to achieve a visual mapping based on the execution stage. The display style can include at least one of the following: color, shape, status indicator, etc. Optionally, different task stages can be represented by displaying stage identifiers of different colors. For example, the stage identifier for the thinking stage is displayed in blue, the stage identifier for the action stage is displayed in purple, and the stage identifier for the observation stage is displayed in green.

[0116] In an optional embodiment, the application can also display execution details of the execution stage according to a display style matching the execution stage of the task represented by the task node. For example, when the stage identifier for the thinking stage is displayed in dark blue, the execution details of the thinking stage can be displayed in a content section with a light blue background (i.e., Figure 5 In the middle, content sections 506 and 508 are filled with light blue; when the stage marker for the action stage is displayed in dark purple, the execution details of the action stage can be displayed in the content section with a light purple background (i.e., Figure 5 In the middle, the fill color of content section 507 is light blue); when the stage identifier of the observation stage is displayed in dark green, the execution details of the observation stage can be displayed in the content section with a light green background.

[0117] In the above embodiments, the stage identifier of the execution stage is displayed according to the display style that matches the execution stage of the task represented by the task node, which can intuitively display the different execution stages of the task and realize a more detailed display of the execution process.

[0118] In practice, different execution details can be displayed at different execution stages.

[0119] In one embodiment, the execution phase includes a thinking phase. In this embodiment, corresponding to the phase identifier, the execution details of the task in the execution phase are displayed, including: dynamically displaying the thinking content corresponding to the phase identifier representing the thinking phase.

[0120] The thinking content refers to the mental activities generated during task execution, including analyzing the current state, judging information needs, and planning the next steps. For example, such as... Figure 5 As shown, the thought content could be, for example, "Without searching any information, directly query the original names of each product." In an optional embodiment, the thought content could be used to represent the query information expected to be obtained by performing a task, such as "directly query the product price by product name."

[0121] Specifically, the execution details displayed during the thinking phase may include the thinking content. Optionally, the application can dynamically display the thinking content corresponding to the task during the thinking phase. Dynamic effects include, but are not limited to, flashing displays, scrolling displays, and color gradients. In an exemplary embodiment, a pulse animation can be displayed in the content section of the thinking phase to simulate thinking activities. This pulse animation may include a flashing light, a series of undulating lines, or a pulsating dot, etc.

[0122] In an optional embodiment, the task execution process is implemented based on McpChain. The server can obtain the field information of the "Tought" field from McpChain, obtain the thought content, and push it to the application for visualization. Here, MCP (Model Context Protocol) is a general protocol in the field of intelligent agents, used to standardize the connection method between large language models and external tools and data sources (collectively referred to as "context"). McpChain is a dedicated processing chain that uses the MCP protocol as the underlying standard, and guides the LLM to generate standardized ReACT output to ensure the generation of structured decisions.

[0123] In the above embodiments, the dynamic display of the thinking content corresponding to the thinking stage, corresponding to the stage identifier representing the thinking stage, can make the background calculation process externalized, allowing users to intuitively perceive the background reasoning process, which is conducive to enhancing the transparency of interaction, and thus can discover unexpected situations before taking action, which is conducive to further improving the quality and efficiency of query result generation.

[0124] In one embodiment, the execution phase includes an action phase. In this embodiment, corresponding to the phase identifier, the execution details of the task in the execution phase are displayed, including: displaying tool description information that the task needs to call tools; and displaying the calling parameters for the tools corresponding to the phase identifier that characterizes the action phase.

[0125] The action phase of a task involves executing specific actions to achieve the task objective, a process typically achieved by invoking tools. These tools can include, for example, web search tools, database query tools, computational execution tools, and specialized APIs for retrieving domain-specific data. Optionally, tool invocation can be implemented using a toolcall structure. Tool description information may include at least one of the following: tool name, number of tools, etc.

[0126] During the application process, the execution details displayed during the action phase may include tool description information and tool invocation parameters. The server can determine the tool required for the task based on at least one of the task description or thought process, and then the application can display the tool description information and invocation parameters.

[0127] In an optional embodiment, the application can also display tool descriptions for the tools required to perform the task in the tool library content section. This tool library content section can be independent of the execution phase content section. For example, such as... Figure 4 As shown, the tool library content section 404 can be an independent content section between the content section containing the task description information 403 and the content section containing the execution phase. Optionally, the tool library content section can display the number of tools that need to be called, for example... Figure 4 The "①" in the code indicates that the current task requires the invocation of a tool. Optionally, the application can respond to a trigger event indicating the number of tools to be invoked by displaying a detailed description of the required tools. For example, such as... Figure 4 As shown, when a user clicks on the tool library content section and gets a 404 error, a detailed description of the tool will be displayed below the tool library icon. The displayed content may include the tool name "Web Search Tool" and the corresponding description information.

[0128] In an optional embodiment, the tool description information and invocation parameters can be displayed corresponding to the stage identifiers of the action phases. For example, such as... Figure 5 As shown, below icon 505, which represents the action phase, the name of the tool to be invoked, “Network Invocation Tool”, and the invocation parameters of the tool (“Product a” and “Product b”) are displayed in sequence.

[0129] In an optional embodiment, editing of the tool and its invocation parameters can also be supported.

[0130] Optionally, users can edit the tool description information to modify the tools required for the task. The application can then respond to the edit event for the tool description information, displaying the updated description and synchronizing it with the server. This allows the server to call the corresponding tool according to the updated description, ensuring that the called tool meets the user's expectations.

[0131] Optionally, the application can respond to edit events for the call parameters, display the updated call parameters, and synchronize them with the server so that the server can complete the tool call according to the updated call parameters, thus ensuring that the tool call method meets the user's expectations.

[0132] In the above embodiments, displaying the description information and calling parameters of the tools required for the task during the action phase can transform the agent's internal decision-making "black box" into understandable execution steps, allowing users to confirm in real time whether the task direction is correct and whether the parameters are reasonable, thereby correcting deviations in a timely manner or providing additional input, which is conducive to further improving the quality and efficiency of query result generation.

[0133] In one embodiment, the query processing method further includes: if the tool is successfully invoked according to the invocation parameters, displaying the number of information entries obtained by invoking the tool according to the invocation parameters; if the tool invocation fails, displaying that the tool is in a retry invocation state.

[0134] In practical applications, when the server successfully invokes the tool according to the invoke parameters, the application displays the number of information entries obtained by invoking the tool according to those parameters. For example, such as... Figure 7 As shown in 701, if the server successfully calls the "Network Search Tool" according to the call parameter "Product a", it can display the number of search results "23" to the right of the call parameter "Product a".

[0135] In the event of a tool call failure, the application can display that the tool is in a retry state. Optionally, the application can display a status indicator representing the retry state in the tool library content section to indicate that the corresponding tool is in a retry state. Optionally, the application can display a status indicator representing the retry state in the display area of ​​the call parameters to indicate that the corresponding tool is in a retry state. The status indicator representing the retry state can include at least one of an icon, text, or number. The text can be, for example, "Retry" or "Second Retry," and the number indicates the number of retries.

[0136] In an exemplary embodiment, the server can also push the reason for the call failure to the application, and the application can then display the failure reason for troubleshooting. Optionally, the failure reason can be displayed in correspondence with a status identifier. For example, the failure reason can correspond to the status identifier by displaying at least one of the following: position, color, shape, or associated identifier. The associated identifier can include at least one of the following: icon, letter label, dynamic connection line, etc. Optionally, the dynamic connection line can refer to the connection line displayed when the failure reason or status identifier is triggered, or when the mouse hovers over the failure reason or status identifier.

[0137] In one exemplary embodiment, for the same tool, there may be situations where different calling parameters result in different calling states. For example, such as... Figure 7 As shown in 701, if the server successfully calls the "Network Search Tool" according to the call parameter "Product a", it can display the number of search results "23" to the right of the call parameter "Product a"; if the server fails to call the "Network Search Tool" according to the call parameter "Product b", it can display the status indicator "Retry" indicating the retry call status to the right of the call parameter "Product b".

[0138] In the above embodiments, different content is displayed depending on whether the tool is successfully invoked, which can intuitively present the tool invocation result and realize a more granular display of the task execution process.

[0139] In an optional embodiment, the query processing method further includes: in response to a trigger event for the number of information entries, displaying information obtained by calling the tool according to the calling parameters.

[0140] Specifically, users can request to view specific information content by triggering a certain number of information entries. The application can then display information obtained by calling a tool according to the parameters when the user triggers the number of information entries. Optionally, this information can be displayed in a pop-up window, a floating window, or a floating layer. Optionally, the application can display the specific information content when the number of information entries is triggered, and cancel the display of the specific information content when the trigger is canceled. For example, the application can display the information obtained by calling a tool according to the parameters when the number of information entries is long-pressed or the mouse hovers over the number of information entries, and cancel the display of the specific information content when the number of information entries is canceled or the mouse moves out of the display area of ​​the number of information entries.

[0141] In the above embodiments, in response to the trigger event for the number of information items, the information obtained by calling the tool according to the calling parameters is displayed. This makes it easier for users to view information details and obtain richer process information. At the same time, it avoids the long-term display of information details from affecting the display of the task execution process and ensures the complete presentation of the task execution process.

[0142] In an optional embodiment, the query processing method further includes: displaying an error flag indicating that the tool has encountered a call error when the number of retry calls for the tool reaches a set number; and changing the display style of the task node from a first display style indicating that the task is in progress to a third display style indicating that the task has failed.

[0143] In practical applications, a maximum number of retry calls can be set to prevent the system from entering an infinite retry loop and consuming resources when calls fail repeatedly. This maximum number of retry calls can be represented by a set number, such as 3 or 4. Optionally, when the tool's retry count reaches the set number, the application can display an error message indicating a call error, and change the task node's display style from the first style indicating task execution is in progress to a third style indicating task failure. Optionally, the error message can include at least one of an icon or text. For example, the error message can include the icon "×" or the text "Error".

[0144] Optionally, in the event of a tool call failure, the application can change the display style of the task node corresponding to the task that called the tool. Specifically, the application can change the display style of the task node from the first display style indicating that the task is executing to the third display style indicating that the task has failed. For example, if blue indicates that the task is executing and orange-red indicates that the task has failed, the application can change the display style of the task node that called the tool from blue to orange-red when a tool call error occurs.

[0145] In the above embodiments, when the number of retry calls of the tool reaches a set number, an error indicator indicating that the tool has encountered a call error is displayed, and the display style of the task node is changed accordingly. This can intuitively present the tool call situation during task execution, and linking the tool call situation with the display style of the task node can ensure the consistency between the visualization presentation and the backend processing status, which is conducive to improving the information display effect.

[0146] In one embodiment, the execution phase includes an observation phase. In this embodiment, corresponding to the phase identifier, the execution details of the task in the execution phase are displayed, including: displaying the phase execution results obtained by calling the tool, corresponding to the phase identifier representing the observation phase; displaying the phase identifier representing the next round of thinking phase, and dynamically displaying the thinking content corresponding to the next round of thinking phase.

[0147] In practical applications, each task execution process can undergo at least one round of "thinking-action-observation" iteration. This "thinking-action-observation" process is called an iteration round, and the execution result obtained by calling the tool in one iteration round is called the stage execution result of that iteration round. The thinking content corresponding to the next thinking stage is determined based on the stage execution result of the previous round. This thinking content can be used to represent the thought activities generated in response to the stage execution result of the previous round, including analysis of the previous stage execution result, judgment of information needs, and planning of the next action. Optionally, when the thinking content represents an incomplete stage execution result from the previous round, it can include supplementary information expected to be obtained through the next iteration, allowing the server to execute corresponding actions according to the thinking content.

[0148] Specifically, for each iteration, if the tool is successfully invoked during the action phase, the task can enter the observation phase of that iteration. At this point, the application can display the phased execution results obtained by invoking the tool, corresponding to the phase identifier representing the observation phase. For example, as shown... Figure 8As shown, the stage markers for the observation phase may include icon 801 and the text "Results"; for the "Product Comparison Analysis" task, the stage execution results 802 obtained in the first iteration may include content such as "Product Positioning and Release Time" and "Main Functions and Technical Highlights". Optionally, a large language model can be used to reflect on the currently obtained stage execution results to obtain new reflection content. The application can then display the stage marker representing the next round of reflection and dynamically display the reflection content corresponding to that next round of reflection. For example, as... Figure 8 As shown, the first iteration is represented by the icon "①", as... Figure 9 As shown, the second iteration round is represented by the icon "②", and the corresponding thinking content for each round is displayed after the corresponding icon.

[0149] Optionally, the content of the next round of reflection may include a summary and analysis of the results of the previous round of execution to determine the supplementary information expected to be obtained in the next round. For example, the content of this reflection may be "The existing information includes the main functions and technical highlights of the product, but lacks hardware parameters such as water tank capacity and dust box capacity, which need to be supplemented by searching to improve the comparison," or "This supplementary report has compared the hardware parameter information of product a and product b in detail. There is no obvious missing information at present, and no further search is required."

[0150] In an optional embodiment, the phased execution results can be displayed in real time via SSE stream to avoid page lag caused by long text transmission.

[0151] In the above embodiments, the observation phase presents the phased execution results and enters the next round of thinking phase. The execution results of the task can be continuously corrected through multiple rounds of iteration, allowing users to perceive the iterative logic in the task execution process in real time. This can improve trust, reduce the number of follow-up questions on the query content, and help to further improve the quality and efficiency of query result generation.

[0152] In one embodiment, when the display style of the task node indicates that the task has been completed, the execution result information of the task represented by the task node is displayed, including: when the thought content indicates that the task meets the execution completion conditions, the display style of the task node is changed from the first display style to the second display style indicating that the execution has been completed; and the execution result information of the task is displayed.

[0153] The task execution result information is determined based on the phased execution results obtained in each iteration round. Specifically, the final execution result of the task can be obtained by integrating the execution results of each phase. In practical applications, if the thought content indicates that the task meets the execution completion conditions, the application can change the task node display style from the first display style to the second display style indicating execution completion, and display the corresponding task execution result information. For example, as shown... Figure 9 As shown, the thought content 901 for the execution result information of the second iteration round includes the text "No further retrieval required", which means that the "product comparison analysis" task meets the execution completion conditions. At this time, the application can change the icon 902 representing the task execution in the corresponding task node display area to the icon 903 representing the completion of execution, so as to represent that the task represented by the node has been completed, and at the same time display the corresponding execution result information 904.

[0154] It is understandable that, for each iteration except the last one, each iteration can include a complete iterative process of "thinking-action-observation," while the last iteration may only include the "thinking" phase. That is, when the thinking content corresponding to the next thinking phase indicates that the task meets the execution termination condition, the current task can be terminated.

[0155] In an optional embodiment, the execution result information can be displayed in real time via an SSE stream to avoid page lag caused by long text transmission.

[0156] In the above embodiments, when the thought content indicates that the task meets the execution completion conditions, the task node is displayed in a different style from the first display style to the second display style that indicates the completion of the execution, and the execution result information of the task is displayed. This can achieve consistency between the task node status and the displayed details, enriching the information display content while ensuring the accuracy of the displayed information.

[0157] In an optional embodiment, the query processing method further includes: displaying a round number identifier to represent the number of iteration rounds of the task corresponding to the task description information represented by the task node; and displaying the execution details information of the task in each iteration round in response to a triggering event for the round number identifier.

[0158] In practical applications, the execution details of each iteration round can be fully retained for traceability. Optionally, the application can display a round number identifier corresponding to the task description information represented by the task node, indicating the number of task iteration rounds. Users can then trigger this round number identifier to request detailed execution information for each round, and the application can respond to the trigger event for the round number identifier to display the execution details of the task in each iteration round.

[0159] Optionally, the round number identifier can change in real time as the number of task iteration rounds increases. For example, such as... Figure 8 As shown, in the first round of task iteration, the round number identifier 803 indicates that a total of one round of iterations has been performed; as Figure 9 As shown, during the second round of task iteration, the round number identifier 905 indicates that a total of two rounds of iteration have been carried out. When entering the third round of thinking stage, the round number identifier 905 is changed to the round number identifier 906, which indicates three rounds of iteration.

[0160] Optionally, the detailed execution information for each iteration can be fully preserved through the corresponding field content. The application can then display the content of each field sequentially to achieve a complete presentation of the execution details. For example, the thought content can correspond to the "Thought" field; the execution details for the action phase can correspond to the "Action" field; and the execution details for the observation phase can correspond to the "Observation" field.

[0161] In the above embodiments, by displaying and triggering the iteration round identifier, the traceability of task execution details can be supported, allowing users or developers to view the corresponding information as needed, which is conducive to timely discovery of problems and convenient for subsequent modifications.

[0162] In an optional embodiment, the execution phase may include a thinking phase, an action phase, and an observation phase. In terms of architectural implementation, two optional paths are possible: task-oriented vertically integrated agents and capability-oriented horizontally decomposed agents. Task-oriented vertically integrated agents refer to a single agent instance responsible for managing the complete execution loop of a specific type of task (such as a comparison task). For example, a "comparison agent" will autonomously complete the entire process of thinking, tool invocation (action), and result analysis (observation) for a comparison task. Capability-oriented horizontally decomposed agents abstract general execution phase capabilities into independent specialized agents, which are scheduled on demand during task execution. For example, the system can deploy a "thinking agent" specializing in complex planning and reasoning, an "action agent" specializing in tool execution, and an "analysis agent" adept at analysis and verification. The task flow of each iteration can be completed by coordinating and invoking these specialized agents.

[0163] In an optional embodiment, the execution phase includes a reflection phase. In this embodiment, corresponding to the phase identifier, the execution details of the task in the execution phase are displayed, including: corresponding to the phase identifier representing the reflection phase, displaying the phase execution result obtained by calling the tool, and the reflection content for the phase execution result; if the reflection content indicates that the task does not meet the execution completion conditions, the next action phase is entered.

[0164] The reflection section involves reflecting on or observing the phased execution results of the current iteration after the actions of the current iteration have been completed. In other words, once the current iteration produces corresponding phased execution results, a "thinking phase" is initiated to determine whether the results obtained in the current iteration meet the task requirements. If not, it indicates that the task currently does not meet the conditions for completion, and further planning for the next round of actions is needed.

[0165] In practical applications, during the reflection phase, the application can display the interim execution results obtained by calling the tool in the current iteration, along with the reflection content for those results. If the reflection content indicates that the task does not meet the completion conditions, the server can further plan the next round of actions, and the task can enter the next action phase. Optionally, if the reflection content indicates that the task meets the completion conditions, the application can change the task node display style from the first style to the second style representing completion, and display the task's execution result information.

[0166] Optionally, this solution can be applied to some task execution agents (such as comparison agents) to reflect on and adjust them during the execution of a certain task.

[0167] Optionally, a dedicated reflection agent can be deployed to reflect on and supplement the results of a given iteration after the actions in that iteration are completed. Alternatively, in this case, the application can introduce a reflection task node after the task node representing the task.

[0168] In the above embodiments, upon obtaining the phased execution results, the reflection phase is initiated. This allows for the correction of the task execution strategy through reflection, enabling users to perceive the iterative logic during task execution in real time. This can enhance trust, reduce the number of follow-up queries, and further improve the quality and efficiency of query result generation.

[0169] In a specific embodiment, such as Figure 10 As shown, an information display method is provided, which can be executed by a computer device, wherein the computer device is Figure 1 Taking the application side as an example, in this embodiment, the method includes the following steps:

[0170] Step S1001: Obtain the query content;

[0171] Step S1002: Display at least one task node planned for the query content;

[0172] Step S1003: In response to the change of the display style of the task node to the first display style representing the task execution, the task description information of the task represented by the task node is displayed.

[0173] Step S1004: Corresponding to the task description information, display the task initialization prompt information;

[0174] Step S1005: Display the stage identifier used to represent the thinking stage in the task follow content card of the task node.

[0175] Step S1006: Corresponding to the stage identifier of the thinking stage, dynamically display the thinking content of the task in the thinking stage.

[0176] Step S1007: If the thought content indicates that the task does not meet the conditions for completion, display the stage identifier used to represent the action stage.

[0177] Step S1008, corresponding to the stage identifier of the action stage, displays the tool description information and calling parameters of the tool that needs to be called to perform the task;

[0178] Step S1009: If the tool is successfully invoked according to the invocation parameters, the number of information entries obtained by invoking the tool according to the invocation parameters is displayed.

[0179] Optionally, if the tool call fails, the tool retry status is displayed; if the tool call is successfully completed through retry, the process returns to step S1009.

[0180] Optionally, if the number of retry calls for the tool reaches a set number, an error flag indicating that the tool has encountered a call error will be displayed, and the display style of the task node will be changed from the first display style indicating that the task is executing to the third display style indicating that the task has failed.

[0181] Step S1010: If all calling parameters have successfully invoked the corresponding tools, display the stage identifier representing the observation stage.

[0182] Step S1011, corresponding to the stage identifier of the observation stage, displays the stage execution results obtained by calling the tool;

[0183] The results of each stage of execution are determined based on the information obtained by calling the tool according to the calling parameters;

[0184] Step S1012: Display the stage identifier representing the next round of thinking, and dynamically display the thinking content corresponding to the next round of thinking.

[0185] The thinking content corresponding to the next round of thinking is used to represent the thinking activities generated in response to the phased execution results of the previous round, which may include the analysis of the phased execution results of the previous round, the judgment of information needs, and the planning of the next action.

[0186] If the thought process indicates that the task does not meet the conditions for completion, return to step S1007;

[0187] Step S1013: When the thought content indicates that the task meets the execution completion conditions, the task node is changed from the first display style to the second display style representing the completion of execution, and the execution result information of the task is displayed accordingly.

[0188] The execution result information is determined based on the phased execution results obtained in each iteration round; the execution result information of each task is used to obtain the query results of the query content.

[0189] The above query processing method retrieves the query content and displays at least one task node planned for the query content. Through task planning, it enables the breakdown of complex tasks, thereby improving the quality and efficiency of the generated response content. Furthermore, when the display style of the task planning node indicates that the task is in progress, it displays the execution details of the task represented by the task node. When the display style of the task node indicates that the task has been completed, it displays the execution result information of the task represented by the task node. The presentation of execution details and results allows users to perceive and understand the entire execution process and implementation logic of the task. This facilitates real-time tracking of the task execution progress of each task node, early detection of unexpected situations, and accurate identification of the cause of errors, facilitating subsequent modifications. It also reduces the number of follow-up queries, thus improving the quality and efficiency of query result generation.

[0190] In some embodiments, such as Figure 11 As shown, a query processing method is provided, which is executed by a computer device. In this embodiment, the method is applied to... Figure 1 Taking server-side error 104 as an example, the following steps are included:

[0191] Step S1102: Receive the query content sent by the application.

[0192] Step S1104: Perform task planning based on the query content to obtain at least one task.

[0193] Step S1106: During the execution of the task, push the task execution details to the application.

[0194] Step S1108: If the task is completed, push the task execution result information to the application.

[0195] The task execution result information is used to obtain the query results for the queried content.

[0196] Optionally, the server can identify the user's core intent by parsing the query content and matching keywords. Then, the server can decompose the complex request into a series of ordered tasks based on its internal predefined business processes or decision trees. For example, for the query "Compare product A and product B, how much do they cost recently, and is it worth buying?", three tasks can be planned: product price query, product parameter and cost-effectiveness comparison, and generating final purchase suggestions. Therefore, the application can display the task nodes corresponding to the above three tasks, and the execution results of these tasks are used to obtain the query results for the query content.

[0197] Optionally, the planning task for the query content can be assigned to a planning agent, which parses the query content and performs global planning on the parsed content to obtain multiple tasks.

[0198] Optionally, the server can use an intelligent agent to determine at least one initial task for the query content and encapsulate each initial task in a standard data structure to obtain the corresponding task. Alternatively, the server can use an intelligent agent to extract task information from each initial task; and based on key-value storage, encapsulate the task information of the initial task in a corresponding standard data structure to obtain the corresponding task. The task information includes at least one of the following: task name, task description, invoked tools, and dependent tasks.

[0199] Optionally, the task can be further broken down into subtasks, thereby enabling the breakdown of complex tasks and completing the task by executing each subtask.

[0200] Optionally, the execution details and results of each task or subtask can be pushed to the application in real time, so that the application can update the display status and details of the corresponding task node in real time.

[0201] In the above embodiments, for at least one task node planned from the query content, task planning can be used to break down complex tasks, thereby improving the quality and efficiency of the generated response content. Furthermore, during task execution, execution details are pushed to the application, and upon task completion, execution result details are pushed to the application. This allows the application to promptly present execution details and results, enabling users to perceive and understand the entire execution process and implementation logic. It facilitates real-time tracking of the task execution progress at each node, early detection of unexpected situations, and accurate identification of error causes, facilitating subsequent modifications. This reduces the number of follow-up queries and improves the quality and efficiency of query result generation.

[0202] In one embodiment, the query processing method further includes: for each task, constructing a task iteration instance for that task.

[0203] The task iteration instance includes execution phase information and a streaming address. The streaming address is used to stream the task's phased execution results to the application when the execution phase information indicates the task is in the observation phase, and to stream the task's execution result information to the application when the task is completed. A task iteration instance, also known as a ReAct instance (ReActItem), is a structured data unit encapsulating the entire ReACT process of a single task, including a task title, description, a list of available tools, a sequence of ReAct steps, a streaming address (SSEUrl), and a final answer (FinalAnswer). Execution phase information refers to the sequence of ReAct steps in the task iteration instance, indicating the current execution phase of the task.

[0204] Specifically, for each task, the server can construct a task iteration instance for that task to store relevant data information during task execution. For example, for the task "Comparative Analysis of Product A and Product B", the server can initialize a ReActItem structure, set the Title to "Comparative Analysis of Product A and Product B" and the Description to "Detailed comparison of parameters, features, and prices of Product A and Product B", create a ToolList (such as "Network Search Tool, Description: Batch network search tool, can perform batch searches based on input query and return results"), and create an empty Steps sequence, which is stored in Redis through a socket.Resource structure (associated with task_id and root_task_id) and pushed to the front-end initialization interface.

[0205] In the above embodiments, by encapsulating data information during task execution in a structured manner through task iteration instances that include execution phase information, the data of the entire process can be encapsulated in a standardized way, which facilitates the presentation and traceability of the completed data.

[0206] In an optional embodiment, during the execution of a task, the execution details of the task are pushed to the application, including: determining the execution stage of the task in the traceable logical chain during the execution of the task; determining the target field matching the execution stage from the execution stage information; and extracting and pushing the execution details of the task in that execution stage to the application through the target field.

[0207] The execution of a task can form a traceable logical chain of "thinking-action-observation". During task execution, the server can determine the execution stage of the task within this chain and identify target fields matching that stage from the execution stage information. For example, the "Thought" field matches the thinking stage, the "Action" field matches the action stage, and the "Observation" field matches the observation stage. Finally, the server can extract and push the execution details of the task at that stage to the application based on the target fields. For example, the server can extract the thinking content generated during the thinking stage from the "Thought" field, the tool descriptions and parameters of the tools called during the action stage from the "Action" field, and the stage-specific execution results of the current iteration from the "Observation" field. All the extracted execution details can be pushed to the application so that it can display the corresponding information in real time based on the current execution stage.

[0208] In the above embodiments, by extracting and pushing the execution details of the task in the execution stage to the application by matching the target field with the execution stage, it is possible to ensure that the application can display the corresponding information according to the real-time execution status of the task, and to achieve fine-grained presentation of the execution process.

[0209] In one embodiment, the query processing method further includes: determining the changed fields whose content has changed from the execution phase information; and pushing the changed field information to the application so that the application can perform incremental rendering of the currently displayed content based on the changed field information.

[0210] In practical applications, the server can push only the changed fields (such as status and content) in the execution phase information (ReAct step) to the application, reducing transmission bandwidth and front-end rendering pressure. Optionally, the server can communicate with the application based on WebSocket and JSON Patch incremental update protocols to transmit changed field data. Specifically, the server can compare the execution phase information at the current moment and the previous moment to determine the changed fields whose content has changed, and push the changed field information to the application so that the application can incrementally render the currently displayed content based on the changed field information.

[0211] In the above embodiments, pushing the changed field information of the changed fields to the application terminal allows the application terminal to perform incremental rendering of the currently displayed content based on the changed field information. This can reduce transmission bandwidth and front-end rendering pressure while ensuring that the front-end view and the back-end state are consistent in real time.

[0212] In one embodiment, the query processing method further includes: inputting task information of the task into a large language model, so that the large language model outputs structured execution information corresponding to a traceable logical chain of the task under the guidance of prompt information; and obtaining execution details information and execution result information of the task by parsing the structured execution information.

[0213] Specifically, task execution can be based on a large language model, which can drive the agent to execute the corresponding task. The server can input the task information into the large language model, which, guided by prompts, outputs structured execution information corresponding to a traceable logical chain. By parsing the structured execution information, the server can obtain the task's execution details and results.

[0214] Optionally, the server can use a Prompt template to guide the LLM to output JSON data in the format of "Thought-Action-Input-FinalAnswer". Then, by parsing the model's output, the required execution details and results can be obtained. Alternatively, the information extracted from the JSON data can be encapsulated into a ReAct instance to achieve standardized encapsulation of the entire data flow.

[0215] In the above embodiments, by guiding the large language model to generate structured execution information, it is easier to extract information in the future. At the same time, the data structure standardization can ensure the compliance of parameters in the task execution process, reduce the execution failure rate, and further improve the efficiency of query processing.

[0216] In an exemplary embodiment, the query processing method provided in this application can be applied to Agent query processing scenarios based on the LLMReACT pattern. In traditional technologies, the ReAct native framework only defines the backend execution logic of "Think-Action-Observation," lacking any frontend visualization capabilities. Furthermore, the LLM output is unstructured text, requiring manual extraction of tool call information, making the execution process completely black-box and exhibiting significant drawbacks. The query processing method provided in this application uses ReActItem and ReActStep for structured modeling, providing a frontend visual representation of the entire loop. Simultaneously, ReActStep associates fields such as "Thought," "Action," and "Observation" to form a complete logical chain. It employs real-time incremental synchronization combining WebSocket and JSON Patch, resulting in low latency for status updates. Furthermore, it uses SSE streaming to transmit observation results and the final answer, achieving streaming rendering. It also automatically retryes after tool call failures and supports real-time display of retry status and failure reasons.

[0217] like Figure 12 As shown, the detailed information display area can include a task information bar, execution details for each iteration in the multi-round iteration process, and execution result information. The task information bar displays the task title, task description, and other information. For example, the task title could be "Comparison Analysis of Parameters A and B". The execution details for each iteration can be displayed... Figure 12 The multi-round iteration process display area allows each round to include stages such as thinking, action, and observation. For example, the thinking stage of the first iteration could display the thought content "Need to supplement details of parameter A," the action stage could display "Network search tool" and its corresponding tool call parameters, and the observation stage could display the stage execution results, such as "Parameter A is XXX." Optionally, during the multi-round iteration process, real-time status synchronization can be achieved through color and icon mapping, enabling full-link association of "thinking-action-result" to support multi-round step traceability and interaction. Task execution result information can be displayed... Figure 12 The final answer section can display content such as a "parameter comparison report of A and B" rendered through streaming rendering.

[0218] Taking the user task "Compare the functional parameters and latest prices of product A and product B" as an example, the user will see the following visual process on the front end: In the initialization phase, the interface displays the task title "Comparison and Price of Product A and Product B" and basic information about the ReAct instance (tool used: web search tool). The step list is empty, and the prompt "Initialize the ReACT loop to generate structured decisions..." appears. The first round of the ReACT loop includes stages such as thinking, action, and observation. In the thinking stage, for example... Figure 4As shown, the first ReActStep appears, and a blue "Thinking" icon appears in the right-hand workspace. The Thought field refreshes in real time, displaying "No information has been searched yet; directly query the original names of each product." After the thinking is complete, as shown... Figure 5 As shown, the step icon turns purple "Action," and the Action field displays: "Tool: Web Search Tool, Parameters: search_queries:['Product a', 'Product b']." Once the tool is successfully invoked, the icon turns green "Result," indicating the start of the observation phase. The Observation field is displayed in real-time via the SSE stream: "Summary report of product information for Product a and Product b, covering core comparison information such as product positioning, functional highlights, and price range."

[0219] Following this, the second ReACT loop will begin. During the thinking phase, a new ReActStep is generated, and the Thought message displays: "Existing information lacks hardware parameters such as water tank capacity and dustbin capacity; further searching is needed to complete the comparison." The action phase invokes a web search tool to query keywords such as "product a water tank capacity, dustbin capacity parameters." If the tool call is successful, a new observation phase begins, with the Observation stream pushing: "Product a base station is equipped with a 5L clean water tank and a 4.2L wastewater tank, with a 2.5L dustbin capacity; product b base station has a 4.5L water tank capacity and a 2.5L dustbin capacity..." If the observation results determine that the task meets the execution completion conditions, the final comparison result, i.e., the task execution result information, can be displayed via the SSE stream. Optionally, a loop identifier representing the loop iteration can also be displayed to ensure that the state, Thought, Action, and Observation generated in each iteration are completely preserved and traceable.

[0220] In an optional embodiment, the query processing system provided in this application consists of a backend "data modeling-decision generation-state synchronization" module and a frontend "data parsing-visualization rendering" module, with the core architecture as follows: Figure 13 As shown in the diagram. The backend data modeling module includes an instance builder and a loop iteration manager; the decision generation module includes a dedicated processing chain and an output parser; and the state synchronization module includes a real-time channel manager, an incremental update processor, and a streaming server. The frontend data parsing module includes a data parser and a state consistency checker; and the visualization rendering module includes a state visual mapper and a content renderer.

[0221] Optionally, for the task "Comparative Analysis of Product A and Product B", after receiving the above task, the instance builder can initialize the ReActItem structure, set the Title to "Comparative Analysis of Product A and Product B" and the Description to "Detailed comparison of parameters, features and prices of Product A and Product B", create a ToolList (such as "Network Search Tool, Description: Batch network search tool, can perform batch searches based on input query and return results"), and create an empty Steps sequence, store it in Redis through the socket.Resource structure (associated with task_id and root_task_id), and push it to the front-end initialization interface.

[0222] Optionally, the loop iteration manager is used to generate a corresponding ReActStep for each round of the ReACT loop, obtain Thought from McpChain (such as "No information has been searched yet, directly query the original name of each product"), extract Observation from the tool call results (such as "Supplementary summary report of product information for product a and product b"), encapsulate ToolCall (Name="Network Search Tool", Inputs={"search_queries":["product a", "product b"]}) into the Action field; maintain the execution status (thinking / running / success), retry_count (number of retries), and failure_reason (failure reason), and synchronize them to the front end.

[0223] Optionally, the dedicated processing chain McpChain is responsible for loading the McpPlanningPrompt template, taking into account mcp_task="compare the functional parameters and latest prices of product a and product b", available_tools="web search tools (parameter: search_queries, type: string array)", and scratchpad="none", and calling LLM to generate JSON format output; the template constraint output must include Thought (such as "no information has been searched yet, directly query the original name of each product"), Action ("web search tools"), Input ({"search_queries":["product a", "product b"]}), and FinalAnswer (empty).

[0224] Optionally, the output parser can extract JSON text from the LLM output using regular expressions, trim code block markers such as "``json", and filter phantom data such as "Observation". It can also perform JSON deserialization validation on the extracted text, and if the format is invalid, it can trigger McpChain to call the LLM again.

[0225] Optionally, the real-time channel manager assigns a unique session_id to the task, builds a WebSocket channel, binds the task_id to the user session, and automatically reconnects when the channel is abnormally disconnected.

[0226] Optionally, the incremental update processor detects changes in the ReActStep field (such as the status changing from thinking to running, or the addition of a "tank capacity parameter" to the Observation), generates a JSONPatch (such as {"op":"replace","path":" / data / steps / 1 / status","value":"success"}), and pushes it to the front end via WebSocket.

[0227] Optionally, a streaming server is used to create SSE streams (associated with step IDs or task IDs) for long text observations (such as "Supplementary Summary Report on Product Information") and the final answer ("Comprehensive Comparative Analysis Report"), which the front end subscribes to and renders segment by segment via SSEURl.

[0228] Optionally, the data parser is used to receive the full data of ReActItem (task title, tool list, etc.) during initialization, receive JSON Patch (such as step status changes, new Observations) during dynamic updates, and apply the Patch to modify the local ReAct model (such as adding steps, updating the search query of the "Action" stage).

[0229] Optionally, a state consistency checker is used to periodically compare the key fields (number of steps, latest state) of ReActItem stored in the local model with those in the backend Redis storage, and to request full data synchronization when there are differences.

[0230] Optionally, a state visual mapper is used to define fixed mapping rules (thinking: blue "thinking" icon + pulse animation; acting: purple "acting" icon + static display; result completed: green "result" icon + static display), which are fully aligned with the UI states in the screenshot.

[0231] Optionally, the content renderer is used to display Thought (e.g., "No information has been searched yet, just query the original names of each product"), Action (tool name + search query list), and Observation (long text report streaming rendering) in Markdown format.

[0232] In an optional embodiment, the workflow of the entire system is as follows: Figure 14As shown, after a user submits a task, the instance builder first creates an instance and pushes it to the front end, allowing the front end to render and display the corresponding task information. After the task node is assigned to the corresponding agent, the task execution process begins, which can include multiple loops. Next, the output parser performs format validation and filters the illusion data. If it conforms to the specified JSON format, the loop iteration manager creates the corresponding ReActStep, populates fields such as Thought and Action, and pushes the "thinking" status and Thought field information via JSON Patch. The front end renders a blue thinking icon and displays the specific thinking content. Then, the tool call is executed according to the thinking content. If the tool call is successful, the back end pushes an ObservationJSON Patch via SSE stream and pushes the "success" status, allowing the front end to render a green result icon and enter the observation phase. McpChain determines whether the information is sufficient to generate a FinalAnswer. If so, the task execution result information is pushed via SSE stream for the front end to display; otherwise, the next loop begins.

[0233] Optionally, if the tool call fails, a retry process will be initiated. During each retry, the backend can push a "retrying" status and the reason for failure, while incrementing the retry count by 1. If the retry count reaches 3 times and still fails, the backend will push a "failed" status and the reason for failure via a JSON patch, and the frontend will display a red error icon.

[0234] The above query processing method can produce at least the following beneficial effects: Transparent execution process: The entire ReACT loop is displayed in a structured manner, allowing users to perceive the Agent's iterative logic of "thinking-action-result" in real time, breaking the black box and significantly improving trust; Structured and reliable data: McpChain and the parser ensure standardized JSON output from the LLM, compliant tool call parameters, and reduced execution failure rate; Real-time synchronization and efficient rendering: WebSocket + JSON Patch enables incremental state updates, and SSE streams long text reports, saving transmission bandwidth and ensuring smooth front-end rendering; Strong traceability: ReAct steps are fully preserved, and the decision logic, tool parameters, and result sources of each stage are traceable, facilitating troubleshooting; Alignment of experience with business: The UI state is fully mapped to the ReACT loop stages (blue for thinking, purple for action, green for results), allowing users to intuitively understand the Agent's workflow and lowering the barrier to entry.

[0235] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0236] Based on the same inventive concept, this application also provides a query processing apparatus for implementing the query processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more query processing apparatus embodiments provided below can be found in the limitations of the query processing method described above, and will not be repeated here.

[0237] In some embodiments, such as Figure 15 As shown, a query processing apparatus is provided, comprising:

[0238] Content retrieval module 1501 is used to retrieve query content;

[0239] The task node display module 1502 is used to display at least one task node planned for the query content;

[0240] The execution details display module 1503 is used to display the execution details information of the task represented by the task node when the display style of the task node indicates that the task is being executed;

[0241] The execution result display module 1504 is used to display the execution result information of the task represented by the task node when the display style of the task node indicates that the task execution is completed; the execution result information is used to obtain the query result of the query content.

[0242] In one embodiment, the execution details display module 1503 includes: a stage identifier display unit for displaying a stage identifier that characterizes the execution stage of the task represented by the task node; and an execution details display unit for displaying execution details information of the task in the execution stage, corresponding to the stage identifier.

[0243] In one embodiment, the stage identifier display unit is specifically used to: display the stage identifier of the execution stage according to a display style that matches the execution stage of the task represented by the task node.

[0244] In one embodiment, the execution phase includes a thinking phase. In this embodiment, the execution details display unit is specifically used to dynamically display the thinking content corresponding to the task in the thinking phase, corresponding to the phase identifier representing the thinking phase.

[0245] In one embodiment, the execution phase includes an action phase. In this embodiment, the execution details display unit is specifically used to: display tool description information for tools that need to be invoked to execute the task; and display the invocation parameters for the tool corresponding to the phase identifier representing the action phase.

[0246] In one embodiment, the query processing device further includes a call status display module, configured to: display the number of information entries obtained by calling the tool according to the call parameters when the tool is successfully called according to the call parameters; and display that the tool is in a retry call state when the tool call fails.

[0247] In one embodiment, the query processing apparatus further includes a call information display module, configured to: in response to a trigger event for the number of information entries, display information obtained by calling the tool according to the call parameters.

[0248] In one embodiment, the query processing device further includes a call error presentation module, configured to: display an error flag indicating that the tool has encountered a call error when the number of retries for the tool reaches a set number; and change the display style of the task node from a first display style indicating that the task is in progress to a third display style indicating that the task has failed.

[0249] In one embodiment, the execution phase includes an observation phase; in this embodiment, the execution details display unit is specifically used to: display the phased execution results obtained by calling the tool, corresponding to the phase identifier representing the observation phase; display the phase identifier representing the next round of thinking phase, and dynamically display the thinking content corresponding to the next round of thinking phase; the thinking content corresponding to the next round of thinking phase is determined based on the phased execution results of the previous round.

[0250] In one embodiment, the query processing device further includes an information tracing module, configured to: display a round number identifier for characterizing the number of task iterations corresponding to the task description information represented by the task node; and display execution details information corresponding to each iteration round of the task in response to a trigger event for the round number identifier.

[0251] In one embodiment, the execution result display module 1504 is specifically used to: change the display of the task node from the first display style to the second display style representing the completion of execution when the thought content indicates that the task meets the execution completion conditions; display the execution result information of the task; the execution result information is determined based on the stage execution results obtained in each iteration round.

[0252] In one embodiment, the execution details display module 1503 is specifically used to: in response to a change in the display style of a task node to a first display style representing task execution, display a task follow-up content card for the task node; and display execution details information of the task represented by the task node in the task follow-up content card.

[0253] In one embodiment, the execution details information includes initialization prompt information. In this embodiment, the execution details display module 1503 is specifically used to: display task description information of the task represented by the task node in response to a change in the display style of the task node to a first display style representing task execution; and display initialization prompt information of the task corresponding to the task description information.

[0254] In some embodiments, such as Figure 16 As shown, another query processing apparatus is provided, including:

[0255] The content receiving module 1601 is used to receive query content sent by the application client;

[0256] The task planning module 1602 is used to plan tasks based on the query content to obtain at least one task.

[0257] The execution details push module 1603 is used to push task execution details information to the application during the execution of the task;

[0258] The execution result push module 1604 is used to push the execution result information of the task to the application when the task is completed; the execution result information is used to obtain the query results of the query content.

[0259] In one embodiment, the query processing apparatus further includes: an instance construction module, configured to construct a task iteration instance for each task; the task iteration instance includes execution phase information and a streaming address; the streaming address is configured to stream the phased execution results of the task to the application when the execution phase information indicates that the task is in the observation phase, and to stream the execution result information of the task to the application when the task execution is completed.

[0260] In one embodiment, the execution details push module 1603 is specifically used to: determine the execution stage of the task in the traceable logical chain during the execution of the task; determine the target field matching the execution stage from the execution stage information; and extract and push the execution details information of the task in the execution stage to the application through the target field.

[0261] In one embodiment, the query processing device further includes an incremental push module, used to: determine the changed fields whose content has changed from the execution phase information; and push the changed field information of the changed fields to the application terminal so that the application terminal can perform incremental rendering of the currently displayed content based on the changed field information.

[0262] In one embodiment, the query processing device further includes an information parsing module, configured to: input task information of the task into a large language model, so that the large language model outputs structured execution information corresponding to a traceable logical chain of the task under the guidance of prompt information; and obtain execution details information and execution result information of the task by parsing the structured execution information.

[0263] Each module in the aforementioned query processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0264] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 17 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data involved in task processing, specifically including resource conversion request information, quota information for different objects, and the amount of resources held. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a task processing method.

[0265] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 18 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a task processing method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0266] Those skilled in the art will understand that Figure 17 or Figure 18 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0267] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the query processing method described above.

[0268] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the query processing method described above.

[0269] In some embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the query processing method described above.

[0270] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0271] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logic devices, etc., and are not limited to these.

[0272] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0273] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A query processing method, characterized in that, The method includes: Retrieve query results; Display at least one task node planned for the query content; When the display style of the task node indicates that a task is being executed, the execution details of the task represented by the task node are displayed; When the display style of the task node indicates that the task has been completed, the execution result information of the task represented by the task node is displayed; the execution result information is used to obtain the query result of the query content.

2. The method according to claim 1, characterized in that, The display of execution details information for the task represented by the task node includes: Displays a stage identifier that characterizes the execution stage of the task represented by the task node; Corresponding to the stage identifier, the execution details of the task in that execution stage are displayed.

3. The method according to claim 2, characterized in that, The display of stage identifiers used to characterize the execution stage of the task represented by the task node includes: Display the stage identifier of the execution stage according to the display style that matches the execution stage of the task represented by the task node.

4. The method according to claim 2, characterized in that, The execution phase includes a thinking phase; the information corresponding to the phase identifier, which displays the execution details of the task in the execution phase, includes: Corresponding to the stage identifier representing the thinking stage, the thinking content corresponding to the task in the thinking stage is dynamically displayed.

5. The method according to claim 2, characterized in that, The execution phase includes an action phase; the information corresponding to the phase identifier, which displays the execution details of the task in the execution phase, includes: Displays tool descriptions for the tools required to perform the task. The stage identifier corresponding to the action stage displays the invocation parameters for the tool.

6. The method according to claim 5, characterized in that, The method further includes: If the tool is successfully invoked according to the invocation parameters, the number of information entries obtained by invoking the tool according to the invocation parameters is displayed, corresponding to the invocation parameters; If the tool call fails, the system will display that the tool is in a retry state.

7. The method according to claim 6, characterized in that, The method further includes: In response to a trigger event for the number of information entries, display the information obtained by calling the tool according to the calling parameters.

8. The method according to claim 6, characterized in that, The method further includes: If the number of retries for the tool reaches a set number, an error flag indicating that the tool has encountered a call error will be displayed. The display style of the task node is changed from a first display style representing task execution to a third display style representing task execution failure.

9. The method according to claim 2, characterized in that, The execution phase includes an observation phase; the information corresponding to the phase identifier, which displays the execution details of the task during the execution phase, includes: Corresponding to the stage identifier representing the observation stage, it displays the stage execution results obtained by calling the tool; Display the stage identifier representing the next round of thinking, and dynamically display the thinking content corresponding to the next round of thinking; the thinking content corresponding to the next round of thinking is determined based on the stage execution results of the previous round.

10. The method according to claim 9, characterized in that, The method further includes: Corresponding to the task description information of the task represented by the task node, a round number identifier used to represent the number of task iteration rounds is displayed; In response to a trigger event for the round number identifier, the execution details of the task in each iteration round are displayed.

11. The method according to claim 9, characterized in that, When the display style of the task node indicates that the task execution is complete, the execution result information of the task represented by the task node is displayed, including: When the thought content indicates that the task meets the execution completion conditions, the task node is displayed in a different display style from the first display style to a second display style that indicates execution completion. The execution result information of the task is displayed; the execution result information is determined based on the stage execution results obtained in each iteration round.

12. The method according to claim 2, characterized in that, The execution phase includes a reflection phase; the information corresponding to the phase identifier, which displays the execution details of the task in the execution phase, includes: Corresponding to the stage identifier representing the reflection stage, the system displays the stage execution results obtained by calling the tool, as well as the reflection content on the stage execution results; If the reflection indicates that the task does not meet the conditions for completion, the next action phase begins.

13. The method according to any one of claims 1 to 12, characterized in that, When the display style of the task node indicates that a task is being executed, the execution details information of the task represented by the task node is displayed, including: In response to the task node's display style changing to a first display style representing task execution, a task follow-up content card for the task node is displayed; The task follow-up content card displays the execution details of the task represented by the task node.

14. The method according to any one of claims 1 to 12, characterized in that, The execution details information includes initialization prompt information; when the display style of the task node indicates that the task is being executed, displaying the execution details information of the task represented by the task node includes: In response to the change of the display style of the task node to the first display style representing task execution, the task description information of the task represented by the task node is displayed; The initialization prompt information for the task is displayed in accordance with the task description information.

15. A query processing method, characterized in that, The method includes: Receive query content sent by the application; Based on the query content, task planning is performed to obtain at least one task; During the execution of the task, the execution details of the task are pushed to the application. Upon completion of the task, the execution result information of the task is pushed to the application; the execution result information is used to obtain the query result of the query content.

16. The method according to claim 15, characterized in that, The method further includes: For each of the aforementioned tasks, a task iteration instance is constructed for that task; the task iteration instance includes execution phase information and a streaming address; The streaming address is used to stream the phased execution results of the task to the application when the execution phase information indicates that the task is in the observation phase, and to stream the execution result information of the task to the application when the task is completed.

17. The method according to claim 16, characterized in that, During the execution of the task, pushing the task execution details to the application includes: During the execution of the task, the execution stage of the task in the traceable logical chain is determined; From the execution phase information, determine the target field that matches the execution phase; The execution details of the task during the execution phase are extracted using the target field and pushed to the application.

18. The method according to claim 16, characterized in that, The method further includes: From the execution phase information, identify the fields whose content has changed; The modified field information of the modified field is pushed to the application so that the application can perform incremental rendering of the currently displayed content based on the modified field information.

19. The method according to claim 15, characterized in that, The method further includes: By inputting the task information of the task into a large language model, the large language model outputs structured execution information corresponding to the traceable logical chain of the task under the guidance of prompt information; By parsing the structured execution information, the execution details and execution results of the task can be obtained.

20. A query processing device, characterized in that, The device includes: The content retrieval module is used to retrieve the query content; The task node display module is used to display at least one task node planned for the query content; The execution details display module is used to display the execution details information of the task represented by the task node when the display style of the task node indicates that the task is being executed; The execution result display module is used to display the execution result information of the task represented by the task node when the display style of the task node indicates that the task execution is completed; the execution result information is used to obtain the query result of the query content.

21. A query processing device, characterized in that, The device includes: The content receiving module is used to receive query content sent by the application client; The task planning module is used to plan tasks based on the query content to obtain at least one task. The execution details push module is used to push the execution details information of the task to the application during the execution of the task; The execution result push module is used to push the execution result information of the task to the application terminal when the task is completed; the execution result information is used to obtain the query result of the query content.

22. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 19.

23. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 19.

24. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 19.