Query processing method and device, computer equipment and storage medium
By displaying the task execution tree and differentiating related nodes, the problem of low query efficiency during task execution is solved, enabling quick location of related nodes and improving search efficiency and transparency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-01-07
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, the query efficiency of the task execution process is low. Users need to manually browse through a large number of log records or unfold the static flowchart layer by layer to locate a specific node, resulting in low search efficiency.
A query processing method is provided that displays a task execution tree, responds to input operations to display a second question about the query status, and differentiates related nodes to quickly locate nodes related to the question during task execution.
It improves the search efficiency and readability of nodes in the task execution tree, enhances the transparency and interpretability of the task execution process, and enables users to quickly locate nodes related to the content they are interested in, avoiding the need to manually browse through log records or search layer by layer.
Smart Images

Figure CN121958385A_ABST
Abstract
Description
Query processing methods, apparatus, computer equipment and storage media Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a query processing method, apparatus, computer device, and storage medium. Background Technology
[0002] With the development of large language models and multi-agent technology, more and more complex tasks are being executed automatically through agent collaboration. Such systems typically generate a large amount of step information during task execution, such as task planning nodes, tool invocation nodes, intermediate result nodes, and final output nodes.
[0003] In traditional technologies, task execution processes are typically presented as linear logs or static flowcharts. Users can only view completed task execution processes. When users need to find specific nodes in the task execution process based on their own problems, they need to manually browse through a large number of log records or search layer by layer in the static flowchart to locate the specific node related to their problem, resulting in low node search efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide a query processing method, apparatus, computer equipment, and storage medium that can improve query processing efficiency in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a query processing method. The method includes:
[0006] Displays the task execution tree of the query task; the task execution tree includes multiple nodes; the query task is a task related to the first question that has already been executed;
[0007] In response to the input operation, a second question entered regarding the query results for the query task is displayed;
[0008] In response to the query operation, the reply result is displayed, and related nodes are displayed in a differentiated manner; the related nodes are the nodes in the task execution tree that are related to the second question.
[0009] Secondly, this application also provides a query processing apparatus. The apparatus includes:
[0010] The task execution tree display module is used to display the task execution tree of the queried task; the task execution tree includes multiple nodes; the queried task is a task related to the first question that has been completed.
[0011] The question display module is used to display a second question entered in response to an input operation, indicating the query status of the query task.
[0012] The response result display module is used to respond to the query operation, display the response result, and differentiate the display of related nodes; the related nodes are the nodes in the task execution tree that are related to the second question.
[0013] Thirdly, 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 method described above.
[0014] Fourthly, 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 method.
[0015] Fifthly, 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 method.
[0016] The aforementioned query processing method, apparatus, computer equipment, storage medium, and computer program product, after displaying the task execution tree of the query task, wherein the task execution tree includes multiple nodes, the query task is a completed task targeting the first question, and in response to input operations, displays the second question entered in response to the query task, and in response to query operations, displays the response results and differentiates the display of related nodes; the related nodes are nodes in the task execution tree related to the second question, thereby enabling users to quickly locate nodes related to their interests during task execution based on natural language questions, avoiding manual searching through large amounts of log records or unfolding static flowcharts layer by layer for searching, improving the search efficiency and readability of nodes in the task execution tree, and enhancing the transparency and explainability of the task execution process.
[0017] Sixthly, this application provides a query processing method. The method includes:
[0018] A task execution tree for the query task targeting the first question is constructed, and the task execution tree is sent to the terminal so that the terminal displays the task execution tree for the query task; the task execution tree includes multiple nodes;
[0019] Upon receiving a query request triggered by the second question, the response result is determined based on the semantics of the second question;
[0020] The response result is sent to the terminal so that the terminal displays the response result and displays related nodes in a differentiated manner. The related nodes are the nodes in the task execution tree that are related to the second question.
[0021] Seventhly, this application also provides a query processing apparatus. The apparatus includes:
[0022] The task execution tree construction module is used to construct a task execution tree for the query task of the first question; the task execution tree includes multiple nodes.
[0023] The sending module is used to send the task execution tree to the terminal so that the terminal displays the task execution tree of the query task;
[0024] The response result determination module is used to determine the response result based on the semantics of the second question when a query request triggered by the second question is received.
[0025] The sending module is further configured to send the reply result to the terminal so that the terminal displays the reply result and displays related nodes in a differentiated manner, wherein the related nodes are nodes in the task execution tree that are related to the second question.
[0026] Eighthly, 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 method described above.
[0027] Ninthly, 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 method.
[0028] In a tenth aspect, 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 method described above.
[0029] The aforementioned query processing method, apparatus, computer equipment, storage medium, and computer program product construct a task execution tree for the query task targeting the first question and send the task execution tree to the terminal so that the terminal can display the task execution tree of the query task. The task execution tree includes multiple nodes. When a query request triggered based on the second question is received, the response result is determined based on the semantics of the second question and sent to the terminal so that the terminal can display the response result and differentiate the display of related nodes. The related nodes are the nodes in the task execution tree that are related to the second question. This allows users to quickly and accurately locate key nodes in the execution process of the executed query task based on natural language questions, avoiding manual sifting through a large number of log records or searching layer by layer in a static flowchart. This improves the search efficiency and interaction efficiency of nodes in the task execution tree, while enhancing the transparency and understandability of the task execution process. Attached Figure Description
[0030] Figure 1 is an application environment diagram of a query processing method in one embodiment;
[0031] Figure 2 is a flowchart illustrating a query processing method in one embodiment;
[0032] Figure 3 is a schematic diagram of the task execution tree in one embodiment;
[0033] Figure 4 is a schematic diagram of the display interface in one embodiment;
[0034] Figure 5 is a flowchart illustrating the query processing method in another embodiment;
[0035] Figure 6 is a schematic diagram of the query processing system in one embodiment;
[0036] Figure 7 is a flowchart illustrating the query processing method in another embodiment;
[0037] Figure 8 is a structural block diagram of a query processing device in one embodiment;
[0038] Figure 9 is a structural block diagram of the query processing device in another embodiment;
[0039] Figure 10 is a structural block diagram of the query processing device in another embodiment;
[0040] Figure 11 is a structural block diagram of the query processing device in another embodiment;
[0041] Figure 12 is an internal structure diagram of a computer device in one embodiment. Detailed Implementation
[0042] 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.
[0043] The query processing method provided in this application embodiment can be applied to the application environment shown in Figure 1. The terminal 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed in the cloud or on another server. The above query processing method can be executed independently by the terminal 102 or the server 104, or it can be executed interactively by the terminal 102 and the server 104. In one embodiment, the terminal 102 displays a task execution tree for the query task. The task execution tree includes multiple nodes. The query task is a task related to the first question that has been completed. In response to an input operation, the terminal displays the second question entered in response to the query task. In response to a query operation, the terminal displays the response result and differentiates the related nodes; the related nodes are nodes in the task execution tree related to the second question.
[0044] In one embodiment, after completing the query task for the first question, the server 104 constructs a task execution tree for the query task and sends the task execution tree to the terminal so that the terminal can display the task execution tree for the query task. The task execution tree includes multiple nodes. When a query request triggered by the second question is received, the server determines the response result based on the semantics of the second question. The response result includes node information of the associated nodes related to the second question. The server sends the response result to the terminal so that the terminal can differentiate the associated nodes related to the second question in the task execution tree based on the node information.
[0045] The 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 systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0046] In one embodiment, as shown in Figure 2, a query processing method is provided. Taking the application of this method to terminal 102 in Figure 1 as an example, the method includes the following steps:
[0047] S202 displays the task execution tree of the query task; the task execution tree includes multiple nodes; the query task is the task that is related to the first question and has been completed.
[0048] Among them, the query task refers to the task used to obtain query results related to the first question. The execution process of the query task may include task planning, subtask generation, subtask execution, subtask execution result generation, query result generation, and reflection or correction process based on the execution results.
[0049] The first question refers to a natural language question entered to obtain the target information, used to trigger the execution of the query task. The first question can cover user needs of any category or field, such as product comparison, knowledge-based Q&A, service consultation, process guidance, etc. For example, users can enter queries such as "Comparison between model A and model B mobile phones", "How to improve image clarity", "What to do if a certain software cannot be launched", etc.
[0050] A task execution tree is a structured representation of the execution process of a query task. Through multiple nodes and the relationships between nodes, the task execution tree describes the execution order, dependencies, or causal relationships of each processing step in the execution of the query task.
[0051] A node in the task execution tree is an execution unit in the process of querying a task. It is used to represent the processing action or result of the query task at a certain stage. Nodes may include, but are not limited to, task planning nodes, subtask nodes, tool call nodes, execution result nodes, reflection nodes, or correction nodes.
[0052] In one embodiment, after receiving an indication that the query task has been completed, the terminal obtains task execution tree data from the server to characterize the execution process of the query task, and generates and displays the task execution tree of the query task in the display interface based on the task execution tree data.
[0053] In one embodiment, during the execution of the query task corresponding to the first question, as the execution progress of the query task advances, the terminal gradually receives and displays each task execution node generated during the execution of the query task, and updates the displayed nodes according to the relationship between each node, until the query task is completed, at which point the terminal displays a complete task execution tree that represents the execution process of the query task.
[0054] Figure 3 shows a schematic diagram of a task execution tree in one embodiment. The task execution tree is used to represent the entire process of a complete query task from triggering, execution to finally reaching a conclusion. The query task in this example is:
[0055] The task "Research and compare cloud databases" is now complete and is classified as a comprehensive task.
[0056] (a) Root task node.
[0057] The root node of the task execution tree is "Root Task: Investigate and Compare Cloud Databases". This node is used to represent the overall goal and execution entry point of the entire query task, record the overall status of the task (completed) and the task type (comprehensive task).
[0058] (ii) Task planning nodes.
[0059] Under the root task node, the "Planning Steps / Generate Execution Plan" node is generated first. This node represents the process by which the system breaks down and plans the task before executing the query task. For example, it determines that price and performance information from different cloud databases needs to be obtained separately, and plans the execution order and parallel mode of subsequent subtasks.
[0060] (iii) Parallel search task nodes.
[0061] After completing the task planning, two parallel search task nodes are generated in the task execution tree: searching database A (parallel search task) and searching database B (parallel search task). These nodes indicate that the system performs information acquisition tasks in parallel for different target objects (database A and database B) to improve the overall query efficiency.
[0062] (iv) Subtask execution node - Obtain database information.
[0063] Each parallel search task node is further subdivided into specific subtask execution nodes. Specifically, the "Search Database A" node includes the following subtask execution nodes:
[0064] The "Retrieve Price A" node (Web Search Execution) is used to retrieve price information from database A via a web search. A corresponding execution result node is then generated under this node to record the execution result of the subtask. The content of this execution result node is: Price A ($0.5 / GB), and its execution status is "Successful," indicating that the price data from database A was successfully retrieved.
[0065] Get A Performance Node (Web Search Execution): This node is used to obtain performance information of database A, such as IOPS and other performance metrics, through web search. A corresponding execution result node is also generated under this node to record the results of obtaining performance data of database A.
[0066] Under the "Search Database B" node, there are also corresponding subtask execution nodes:
[0067] Get B Price Node (Web Search Execution): This node is used to retrieve price information from the B database and generates an execution result node under it to record the retrieval results of the price data from the B database.
[0068] Get B Performance Node (Web Search Execution): This node is used to obtain the performance information of the B database and generate corresponding execution result nodes under it to record data related to the performance of the B database.
[0069] Through the aforementioned subtask execution nodes, the system completes the acquisition of information on databases A and B in terms of price and performance, and the acquisition results are structurally mounted in the task execution tree in the form of execution result nodes.
[0070] (v) Analyze and compare nodes
[0071] After obtaining pricing and performance information for databases A and B, a "Analysis and Comparison Steps / Compare Performance and Price" node is generated in the task execution tree. This node is used to comprehensively analyze the results of the preceding subtasks, comparing databases A and B in terms of performance metrics (such as IOPS) and price costs to form a comparative analysis conclusion.
[0072] (vi) Conclusion node
[0073] After the analysis and comparison steps are completed, a conclusion node is generated at the end of the task execution tree. The conclusion is: "Database A has higher IOPS, and database B is cheaper". The execution status is successful.
[0074] As can be seen from the above examples, the task execution tree clearly displays the complete execution process from task planning, parallel search, subtask execution, result acquisition, analysis and comparison, to the generation of the final conclusion in a hierarchical structure, making the execution logic and data source of the query task have good traceability and understandability.
[0075] S204, in response to the input operation, display the second question entered for the query task.
[0076] Input operations refer to interactive behaviors initiated by users on the terminal to input information. Input operations can include, but are not limited to, text input, voice input, click operations, gesture operations, or other human-computer interaction methods, which are used to trigger the terminal to obtain the content input by the user.
[0077] The second question refers to the natural language question input based on the execution process or query results of the query task after the query task is completed. This question is used to generate nodes or execution process information in the query task execution tree that are semantically related to the second question.
[0078] Specifically, the terminal displays the task execution tree of the query task in the execution process display area of the query page. In addition, the query page also displays an information input area, in which an input box for entering a second question is displayed. In response to the input operation, the query question entered by the user is displayed in the input box. This query question can be a second question about the query status of the query task, or it can be other query questions used to trigger a new query task.
[0079] Understandably, the query questions entered by the user can be identified and processed to determine the type of query question. For example, when the user enters the question "Why is database A said to have the highest IOPS when comparing performance?", the terminal identifies the question as a second question related to the execution process of the already executed query task, and triggers query operations on relevant nodes in the task execution tree based on this second question. When the user enters the question "Research and compare the prices and performance of several non-mainstream cloud databases", the terminal identifies the question as another query question used to trigger a new query task, and triggers the execution of a new query task based on this other query question.
[0080] S206, in response to the query operation, display the reply result and differentiate the related nodes; the related nodes are the nodes in the task execution tree that are related to the second question.
[0081] The query operation refers to the interactive operation used to retrieve the query task execution process based on the second question. The query operation is used to trigger the terminal or server to process the second question. Specifically, the interactive operation can be clicking the search control, triggering a confirmation command, voice confirmation operation, or other human-computer interaction methods used to trigger the retrieval behavior.
[0082] The response result refers to the response content generated based on the semantic analysis result of the second question. The related nodes related to the second question refer to the nodes in the task execution tree whose corresponding execution content, execution result or context information is semantically related to the second question. The relationship can be a direct semantic matching relationship between the second question and the node content, or an indirect relationship determined based on the dependency relationship, predecessor relationship or successor relationship between nodes.
[0083] Differentiated display refers to presenting related nodes in a different way relative to other nodes in the task execution tree that are not related to the second question, so as to distinguish the related nodes from other nodes in terms of display effect, thereby highlighting the relationship between the related nodes and the second question. Different display methods may include, but are not limited to, differences in one or more aspects such as display color, brightness, transparency, border style, icon, display level, animation effect or display position.
[0084] For example, the terminal can highlight or thicken the borders of related nodes that are directly related to the second question, while weakening the display of other nodes that are not related to the second question. Alternatively, the terminal can make related nodes more prominent in the task execution tree by changing the display level of related nodes or adding animation effects, so that users can quickly identify the position of related nodes in the task execution tree.
[0085] Specifically, while displaying the second question entered for the query task, the terminal can also display a search control. In response to the triggering operation of the search control, the terminal processes the second question and triggers a query operation for the second question to obtain a response result that is semantically related to the second question. After obtaining the response result, the terminal can differentiate the display of related nodes in the task execution tree that are related to the second question based on the node information in the response result.
[0086] Among them, node information refers to the set of information used to characterize associated nodes. Node information includes at least a node identifier used to uniquely identify associated nodes in the task execution tree, and may also include node type, node content description information, node execution status, association information between nodes, or other relevant information used for node display and interaction on the terminal side.
[0087] In one embodiment, in response to a triggering operation of the search control, the terminal sends the second question to the server or processes the second question locally to trigger a query operation for the second question, thereby obtaining node information of associated nodes related to the semantics of the second question.
[0088] In one embodiment, after receiving the response from the server containing node information of the associated node, the terminal locates the associated node related to the second question in the displayed task execution tree based on the node identifier in the node information, and adjusts the display style of the associated node so that the associated node is distinguished from other nodes in the task execution tree in terms of display effect.
[0089] The above query processing method displays the task execution tree of the query task, which includes multiple nodes. The query task is a completed task related to the first question. In response to the input operation, the second question entered in response to the query task is displayed. In response to the query operation, the reply result is displayed, and related nodes are displayed in a differentiated manner. The related nodes are the nodes in the task execution tree that are related to the second question. This allows users to quickly locate the nodes related to their interests during the task execution process based on natural language questions, avoiding the need to manually browse through a large number of log records or expand static flowcharts layer by layer to search. This improves the search efficiency and readability of nodes in the task execution tree and enhances the transparency and explainability of the task execution process.
[0090] In one embodiment, the response result includes node information, which includes node identifiers. The process by which the terminal differentiates the display of related nodes in the task execution tree that are related to the second question based on the node information includes the following steps: determining related nodes in the task execution tree that are related to the second question based on the node identifiers; and adjusting the display style of the related nodes so that the related nodes are distinguished from other nodes in the task execution tree in terms of display effect.
[0091] Among them, node identifier refers to the identification information used to uniquely identify task execution nodes in the task execution tree. Node identifier can be node number, node name, node index, node identifier, or other identification information that can uniquely indicate the node, which is used to support the terminal to locate and identify target nodes in the task execution tree.
[0092] Display style refers to the way a node is presented in the terminal display interface. It describes the visual attributes or presentation effect of a node in the display interface. Display style may include, but is not limited to, attributes such as the node's display color, brightness, transparency, border style, icon, display size, display hierarchy, animation effects, or display position.
[0093] Specifically, after obtaining the node information of the associated node, the terminal locates the associated node related to the second question in the task execution tree according to the node identifier in the node information. After determining the associated node, the terminal re-renders the associated node in the display interface. By adjusting the display style of the associated node, the display style of the associated node is made different from that of other nodes in the task execution tree, thereby making the associated node distinguishable from other nodes in terms of display effect.
[0094] In the above embodiments, the terminal determines the associated nodes related to the second question in the task execution tree based on node identifiers, and adjusts the display style of the associated nodes to make the associated nodes different from other nodes in the task execution tree in terms of display effect. This enables users to quickly identify key nodes that are semantically related to the second question in the complex task execution tree, avoiding the need to manually browse through a large number of log records or search for nodes layer by layer, improving the efficiency of node location and understanding, and enhancing the visualization and interpretability of the task execution process.
[0095] In one embodiment, the associated nodes include a first node and a second node, where the first node is a node directly related to the second question, and the second node is a preceding node of the first node. The process of adjusting the display style of the associated nodes by the terminal includes the following steps: displaying the first node according to a first display style; displaying the second node according to a second display style. The above query processing method also includes the following steps: displaying a data flow object between the second node and the first node; the data flow object is used to represent the data transmitted from the second node to the first node.
[0096] The first node refers to the node in the task execution tree whose execution content, execution result, or context information is semantically directly related to the second question. This node is used to represent the processing step or execution result that best matches the content of interest in the second question during the execution of the query task.
[0097] The second node refers to the node that precedes the first node in the task execution tree, and whose execution result provides input data or execution conditions for the execution of the first node. This node is used to characterize the source node or causal node of the execution process of the first node.
[0098] The first display style refers to the display method used to display the first node. The first display style is used to highlight the display effect of the first node in the task execution tree, so as to emphasize the direct relationship between the first node and the second problem.
[0099] The second display style refers to a display method different from the first display style, used to display the second node to indicate the preceding relationship or data dependency between the second node and the first node.
[0100] A data flow object is a visual representation of the data transfer relationships between different nodes in a task execution tree, displayed on a terminal screen. Data flow objects indicate the execution results, input parameters, or intermediate data passed from preceding nodes to subsequent nodes, thus reflecting the execution dependencies or causal relationships between nodes. It is understood that data flow objects can be presented graphically, and their forms may include, but are not limited to, data flow lines with directional indicators, arrowed lines, dashed or highlighted paths, and animated lines with dynamic gradient effects or moving trajectory points.
[0101] Specifically, after receiving the response to the second question, the terminal determines the first node directly related to the second question in the task execution tree based on the node information in the response, and further determines the predecessor node of the first node as the second node. After the node determination is completed, the first node is rendered and displayed according to the first display style, and the second node is rendered and displayed according to the second display style. At the same time, a display data flow object is generated between the first node and the second node, which is presented in the form of a connection, arrow, or a flow line with animation effects, to represent the execution result, input parameters, or intermediate data passed from the second node to the first node, thereby intuitively reflecting the data dependency relationship between the execution result of the first node and the second node.
[0102] In the above embodiments, the terminal displays the first node according to a first display style and the second node according to a second display style, displaying a data flow object between the second node and the first node. The data flow object is used to represent the data transmitted from the second node to the first node, so that the user can intuitively understand the source of the execution result of the first node and its data dependency relationship with the preceding node, avoiding the problem that it is difficult to judge the causal relationship between nodes based solely on the node order or text description, improving the readability and interpretability of the task execution tree, and enhancing the user's understanding efficiency of the query task execution process.
[0103] In one embodiment, the node information also includes node details information, and the above query processing method further includes the following steps: obtaining the node details information corresponding to the associated node based on the node identifier; the process of the terminal displaying the reply result includes the following steps: displaying the node details information of the associated node according to a preset display style.
[0104] Among them, node details information refers to detailed information used to describe the specific execution status of nodes in the task execution tree. Node details information may include at least one of the following: node type information, node execution content information, node execution result information, node context association information, and node reference information.
[0105] The preset display style refers to the display method used to present node details in the terminal display interface. The preset display style is used to display node details in a structured way so that users can view and understand the execution status of related nodes. The preset display style can include, but is not limited to, pop-up display, sidebar display, card display, collapsed / expanded display or partitioned list display, and can be combined with font style, color code, layout order or icon code to distinguish different types of node details.
[0106] Specifically, after identifying the associated node, the terminal extracts the node details corresponding to the node identifier from the obtained node information based on the node identifier of the associated node. After extracting the node details, the terminal displays the node details of the associated node in a structured manner according to a preset display style in the details display area of the display interface, so that users can intuitively understand the specific execution status of the associated node in the query task execution process.
[0107] In the above embodiments, the terminal obtains the node details information corresponding to the associated node based on the node identifier; and displays the node details information of the associated node according to the preset display style, so that the user can intuitively understand the specific execution content, execution result and contextual relationship of the node related to the second question without leaving the overall view of the task execution tree, avoiding repeated searching in a large number of logs or scattered information, improving the efficiency of node information acquisition, and enhancing the understandability and explainability of the task execution process.
[0108] In one embodiment, the query processing method further includes the following steps: displaying alternative solutions for associated nodes; and in response to a solution application operation, displaying the update execution result of the subtask corresponding to the associated node; wherein the update execution result is the execution result obtained by re-executing the subtask based on the target alternative solution, and the target alternative solution is the alternative solution specified by the solution application operation.
[0109] Among them, alternative solutions refer to one or more alternative execution solutions generated by the system based on the execution goal, execution method or execution resources of the subtask corresponding to the associated node. Alternative solutions are used to provide different execution paths, execution strategies or execution parameters while keeping the execution goal of the subtask consistent.
[0110] Solution application operation refers to the interactive operation initiated by the user on the terminal for the displayed alternative solutions. It is used to instruct the terminal to select and apply one of the alternative solutions to replace the original subtask execution method. Solution application operation can include click operation, confirmation command, voice confirmation operation or other human-computer interaction methods.
[0111] The target alternative refers to the alternative that is specified and selected by the user among the alternatives. The target alternative is used as the basis for re-executing the corresponding subtask of the associated node to generate updated execution results.
[0112] Specifically, after detecting a user's application operation for alternative solutions of an associated node, the terminal determines the alternative solution specified by the application operation as the target alternative solution, and triggers the re-execution of the corresponding sub-task of the associated node based on the target alternative solution; after obtaining the updated execution result of the re-execution of the sub-task, the terminal displays the updated execution result of the corresponding sub-task of the associated node in the display interface.
[0113] For example, a subtask of a certain associated node may have two alternative solutions: Solution A and Solution B. Solution A executes the subtask using a first execution method, while Solution B executes the subtask using a second execution method different from the first. After displaying Solution A and Solution B, the terminal can respond to a user's application operation for one of the alternative solutions, determine the alternative solution specified by the application operation as the target alternative solution, and re-execute the subtask based on the target alternative solution to obtain the updated execution result for the associated node.
[0114] In one embodiment, after the terminal re-executes the subtask based on the target alternative, it obtains the updated execution result corresponding to the associated node and presents the updated execution result in the display interface in the form of replacement display or comparison display, so that the user can view the execution effect after the alternative is applied.
[0115] For example, when the original execution result of the subtask corresponding to the associated node is the result obtained based on scheme C, after the user selects scheme B and re-executes the subtask, the terminal can replace the original execution result with the updated execution result obtained based on scheme B by using a replacement display method; or, the terminal can also use a comparison display method to simultaneously display the original execution result and the updated execution result in the display interface, and distinguish the two by different display areas, icons or styles, so that users can intuitively compare the differences in execution effects corresponding to different alternative schemes.
[0116] In the above embodiments, the terminal displays the updated execution results of the subtasks corresponding to the associated nodes in response to the scheme application operation. This allows users to flexibly adjust and re-execute specific subtasks in the task execution process without re-initiating the overall query task, and to intuitively view the execution effects of different alternative schemes. This improves the interactivity and controllability of the task execution process, and provides effective support for users to analyze, optimize and make decisions on the query task execution results.
[0117] In one embodiment, the query processing method further includes the following steps: if the update execution result changes, update the execution result of the successor node of the associated node; if the execution result of the successor node changes, update and display the query result corresponding to the first question.
[0118] In this context, a successor node refers to a node in the task execution tree that is located after an associated node and whose corresponding subtask execution depends on the execution result of the associated node. Successor nodes are used to represent subsequent processing steps that continue to be executed based on the execution result of the associated node. When the execution result of the associated node changes, the execution result of the successor node may change accordingly.
[0119] Specifically, when the terminal detects that the updated execution result of the subtask corresponding to the associated node has changed relative to the original execution result, it determines at least one successor node with the associated node as the predecessor based on the dependency relationship between nodes in the task execution tree, and triggers the re-execution of the subtask corresponding to the successor node to update the execution result of the successor node. After obtaining the updated execution result of the successor node, if the execution result of the successor node changes, the query result corresponding to the first question is re-determined based on the updated execution result of the successor node, and if the query result corresponding to the first question changes, the query result corresponding to the first question is updated and displayed.
[0120] In the above embodiments, the terminal updates the execution results of the successor nodes of the associated nodes when the execution result of the update changes, and updates and displays the query results corresponding to the first question when the execution result of the successor nodes changes. This achieves local cascading updates of the affected execution path without re-executing the entire query task, ensuring that the query results are consistent with the latest subtask execution results, improving the efficiency and accuracy of query task result updates, and enhancing the controllability and maintainability of the task execution process.
[0121] In one embodiment, the process of the terminal displaying alternative solutions for associated nodes includes the following steps: in response to an alternative solution query operation, obtaining the alternative solutions corresponding to the associated nodes; displaying the obtained alternative solutions and solution application controls; the process of the terminal displaying the update execution results of the subtasks corresponding to the associated nodes in response to a solution application operation includes the following steps: in response to a trigger operation on the solution application control corresponding to the target alternative solution, displaying the update execution results of the subtasks corresponding to the associated nodes.
[0122] The solution application control refers to the interactive control set in the terminal display interface, used to receive confirmation or application instructions initiated by the user for the alternative solutions. The solution application control is used to trigger the terminal to determine the selected alternative solution as the target alternative solution and execute the corresponding sub-task to re-execute the operation. The solution application control can include, but is not limited to, button controls, option controls, confirmation controls, or other human-computer interaction controls used to trigger solution application. It can be understood that each alternative solution can have a corresponding solution application control, so that the user can initiate solution application operations for different alternative solutions.
[0123] The subtask corresponding to the associated node refers to the specific processing task or execution step corresponding to the associated node in the process of query task execution. The subtask is used to complete the processing action represented by the associated node, and its execution result constitutes the execution result of the associated node or serves as the input data for the execution of subsequent nodes.
[0124] Specifically, after obtaining the alternative solutions corresponding to the associated node, the terminal displays the alternative solutions in the display interface in the form of a list, card or other interactive form, and displays the solution application control for each alternative solution; after displaying the alternative solutions and the corresponding solution application controls, the terminal responds to the user's trigger operation on the solution application control corresponding to the target alternative solution, switches the execution mode of the subtask corresponding to the associated node, and after the subtask is re-executed, updates the execution result and displays it in the result display area corresponding to the associated node.
[0125] For example, when an associated node is used to obtain performance metrics for a target object, the terminal can display multiple alternative solutions for that associated node on the display interface. One alternative solution is the execution method that obtains performance metrics through a first data source, and another alternative solution is the execution method that obtains performance metrics through a second data source different from the first data source. After the user selects one of the alternative solutions and triggers the corresponding solution application control, the terminal switches the execution method of the subtask corresponding to the associated node and re-executes the subtask based on the selected alternative solution. After the subtask is re-executed, the terminal displays the updated execution result obtained based on the selected alternative solution in the result display area corresponding to the associated node, so that the user can view the execution effect after the alternative solution is applied.
[0126] In the above embodiments, the terminal displays the obtained alternative solutions and solution application controls. In response to the trigger operation of the solution application control corresponding to the target alternative solution, the terminal displays the updated execution results of the subtasks corresponding to the associated nodes. This allows users to flexibly switch the execution methods of key nodes during the execution of the query task and to perceive the impact of different execution methods on the execution results in real time. This improves the interactivity and controllability of the task execution process, avoids re-initiating the complete query task, and improves the system's execution efficiency and user experience.
[0127] In one embodiment, the process of displaying the task execution tree of a query task on the terminal includes the following steps: executing the corresponding query task based on the first question; after the query task is executed, obtaining the task execution tree generated based on the execution process information of the query task; and displaying the task execution tree that represents the task execution process of the query task.
[0128] The execution process information of the query task refers to the set of information generated during the execution of the query task, which characterizes the execution flow and status of the query task. The execution process information includes the task execution nodes involved in the execution of the query task and the relationships between the task execution nodes. Specifically, the execution process information includes at least one or more of the following: task execution node information used to characterize the query task at different execution stages, and relationship information used to characterize the execution order, dependency, or causal relationship between task execution nodes. Among them, the task execution nodes are used to represent the specific processing actions or processing results in the execution process of the query task, and the relationships are used to represent the logical connections between each task execution node in the execution process of the query task.
[0129] In one embodiment, after receiving the first question input by the user, the terminal uses the first question as input to trigger the execution of the corresponding query task, and continuously acquires the execution process information generated by the query task during the execution process. After the query task is completed, the terminal generates a task execution tree to represent the execution process of the query task based on the acquired execution process information, and displays the task execution tree in the execution process display area of the display interface to present the overall execution process of the query task to the user.
[0130] In one embodiment, during the execution of a query task, the terminal gradually constructs a task execution tree based on real-time acquired execution process information, and displays the complete task execution tree after the query task is completed, so that users can intuitively understand the execution path of the query task and the relationship between each execution node.
[0131] In the above embodiments, the terminal executes a corresponding query task based on the first question. After the query task is completed, it obtains a task execution tree generated based on the execution process information of the query task and displays the task execution tree that represents the task execution process of the query task. This transforms the originally implicit query task execution process into a visual and structured task execution tree, enabling users to intuitively understand the execution path of the query task, the processing content of each execution node, and the relationships between them. This improves the transparency and understandability of the query task execution process and provides a foundation for subsequent node search, interaction, and optimization based on the task execution tree.
[0132] The above embodiments will be described with reference to the display interface shown in Figure 4, as shown in Figure 4:
[0133] I. Example of displaying node details.
[0134] In this example, the current task is: "Research and compare the prices and performance of several mainstream cloud databases," with task ID task_20XX0918_001 and task status completed. The user enters the second question in the input box at the top of the query page: "When comparing performance, why was database A said to have the highest IOPS?" and triggers the query operation.
[0135] (a) Location of associated nodes
[0136] Based on the semantic analysis results of the second question, the server locates the execution node in the task execution tree that is most relevant to the semantics of "performance comparison" and "IOPS", and returns the corresponding node information to the terminal.
[0137] In the task execution tree area on the left, the terminal highlights the analysis and comparison step node, the obtain A performance node (execution result), and the obtain B performance node (execution result). Furthermore, the analysis and comparison node can also be designated as the first node and given a higher highlighting style, while the obtain A performance and obtain B performance nodes can be designated as preceding nodes and given a secondary highlighting style. The data stream indicates their dependencies on the analysis node.
[0138] (II) Display of Node Details
[0139] In the "Response Results and Details" area on the right, the terminal displays the corresponding node details based on the node identifier, including: query result summary, analysis and comparison node details, A database performance node details, and B database performance node details.
[0140] Through the above node details, users can clearly see "why database A's IOPS is judged to be the highest" and trace the specific data source and analysis logic.
[0141] II. Demonstration of alternative solutions and application examples.
[0142] (a) Presentation of alternative solutions
[0143] Below the node details area, the terminal detected that the user's query question contained an intention to explain "why" and further identified that the question might involve execution strategy optimization, so it automatically displayed interactive replanning suggestions.
[0144] The interface displays a prompt message ("Your query contains optimization intent. Do you need to generate alternative solutions for the relevant steps and re-execute them?") and the target node ("Get A performance, using Web search"). The terminal displays multiple alternative solutions (such as Solution 1 and Solution 2) corresponding to the associated node, and each solution is equipped with an independent solution application control.
[0145] (II) Application of Alternative Solutions and Update of Results
[0146] When the user clicks the "Re-execute using this solution" button corresponding to "Solution 1 (Recommended)", the terminal performs the following process: the selected solution is determined as the target alternative solution; based on the target alternative solution, the subtask corresponding to "Get A performance" is re-executed; after the subtask is completed, the new updated execution result is obtained; in the details area on the right, the original A database performance result is replaced or compared and displayed with the latest performance data obtained based on the official API; if the updated execution result changes, the terminal further triggers the recalculation of subsequent nodes (such as analysis comparison nodes, conclusion nodes) and synchronously updates the final query conclusion.
[0147] Through the above-mentioned node detail information display, alternative solution display and application mechanism, users can not only quickly locate and understand the basis of the query results, but also flexibly switch execution plans around key nodes and view the changes in execution results in real time; and achieve fine-grained intervention and verification of the task execution process without having to re-execute the complete query task.
[0148] In one embodiment, as shown in Figure 5, a query processing method is also provided. Taking the application of this method to server 104 in Figure 1 as an example, the method includes the following steps:
[0149] S502, construct the task execution tree for the query task of the first question, and send the task execution tree to the terminal so that the terminal can display the task execution tree of the query task; the task execution tree includes multiple nodes.
[0150] Among them, the query task refers to the task used to obtain query results related to the first question. The execution process of the query task may include task planning, subtask generation, subtask execution, subtask execution result generation, query result generation, and reflection or correction process based on the execution results.
[0151] The first question refers to a natural language question entered to obtain the target information, used to trigger the execution of the query task. The first question can cover user needs of any category or field, such as product comparison, knowledge-based Q&A, service consultation, process guidance, etc. For example, users can enter queries such as "Comparison between model A and model B mobile phones", "How to improve image clarity", "What to do if a certain software cannot be launched", etc.
[0152] A task execution tree is a structured representation of the execution process of a query task. Through multiple nodes and the relationships between nodes, the task execution tree describes the execution order, dependencies, or causal relationships of each processing step in the execution of the query task.
[0153] A node in the task execution tree is an execution unit in the process of querying a task. It is used to represent the processing action or result of the query task at a certain stage. Nodes may include, but are not limited to, task planning nodes, subtask nodes, tool call nodes, execution result nodes, reflection nodes, or correction nodes.
[0154] In one embodiment, after receiving the first question input by the user, the terminal can send the first question to the server. The server uses an intelligent agent to parse and process the first query question to generate a corresponding query task, and schedules the intelligent agent to collaboratively execute the query task. During the execution of the query task, the server records the execution process information of the query task, including task planning information, subtask generation information, subtask execution information, and subtask execution result information. After the query task is completed, the server constructs a task execution tree to represent the execution process of the query task based on the execution process information, and finally sends the task execution tree to the terminal so that the terminal can display the task execution tree of the query task.
[0155] In one embodiment, during the execution of the query task corresponding to the first question, the server continuously updates the execution process information of the query task as the execution progresses, and gradually builds a task execution tree based on the completed sub-tasks. When a sub-task is completed, the server adds the corresponding sub-task node and its execution result to the task execution tree, and records the association between the sub-task node and the existing nodes, so that the task execution tree can dynamically reflect the execution status of the query task. After the query task is completed, the server sends the completed task execution tree to the terminal for display.
[0156] In one embodiment, during the execution of the query task corresponding to the first question, the server continuously updates the execution process information of the query task as the execution progress of the query task advances, and sends the continuously updated execution process information to the terminal, so that the terminal can gradually build and dynamically display the task execution tree of the query task based on the execution process information, thereby reflecting the execution progress of the query task, the completed execution nodes, and the relationship between each execution node in real time.
[0157] S504, Upon receiving a query request triggered by the second question, determine the response result based on the semantics of the second question.
[0158] The query request is a request operation initiated on the terminal based on the second question, used to retrieve the task execution tree of the query task. The query request can be initiated by the user by triggering the search control, submitting input content, voice confirmation, or other human-computer interaction methods.
[0159] The second question refers to the natural language question input based on the execution process or query results of the query task after the query task is completed. This question is used to generate nodes or execution process information in the query task execution tree that are semantically related to the second question.
[0160] The response result refers to the response content generated based on the semantic analysis result of the second question. The related nodes related to the second question refer to the nodes in the task execution tree whose corresponding execution content, execution result or context information is semantically related to the second question. The relationship can be a direct semantic matching relationship between the second question and the node content, or an indirect relationship determined based on the dependency relationship, predecessor relationship or successor relationship between nodes.
[0161] Specifically, the terminal displays the task execution tree of the query task in the execution process display area of the query page. In addition, the query page also displays an information input area with an input box for entering a second question. In response to the input operation, the user-entered query question is displayed in the input box. This query question can be a second question related to the query status of the query task, or it can be another query question used to trigger a new query task. While displaying the query question entered for the query status of the query task, the terminal can also display a search control. In response to triggering the search control, the terminal generates a query request for the query question and sends the query request to the server. After receiving the query request, the server identifies and processes the query question corresponding to the query request to determine the type of query question. When the query question is determined to be a second question related to the query status of the query task, the server, based on the semantics of the second question, determines the related nodes in the task execution tree corresponding to the query task and generates a response result including the node information of the related nodes.
[0162] In one embodiment, the server can input a query question into a query intent classifier, and the query intent classifier can perform intent recognition and classification processing on the query question to determine the query intent type corresponding to the query question; wherein, the query intent type includes at least a first intent type for triggering a new query task, and a second intent type for querying the execution process or query results of an executed query task.
[0163] The query intent classifier is a processing module used to perform semantic analysis and intent determination on the user's input query. The query intent classifier can be implemented based on a lightweight text classification model, such as a text classification model based on a pre-trained language model and fine-tuned. The model input of the query intent classifier can include the query text currently input by the user and contextual information associated with the query. The contextual information, such as the task identifier or session identifier of the most recently completed query task, is used to assist the query intent classifier in determining intent by combining historical task context. The output of the query intent classifier is a classification label used to characterize the intent type of the query.
[0164] It should be noted that the query intent classifier in this embodiment is a pre-trained model. Before being deployed to the server, the query intent classifier is trained based on a manually labeled query statement dataset to learn the query intent features corresponding to different query questions. The training dataset includes positive sample statements representing the execution process of a query task or the query result, and negative sample statements representing triggering a new query task, enabling the query intent classifier to distinguish between different types of query intents. After the model training is complete, the query intent classifier is deployed to the server side. During operation, it directly identifies and classifies the received query questions without requiring online training or parameter updates during the task execution phase, thus ensuring the real-time performance and stability of query intent recognition.
[0165] Specifically, when the query intent classifier determines that the query question belongs to the second intent type used to query the execution process or query results of an executed query task, the server identifies the query question as the second question and performs a node query operation in the task execution tree corresponding to the query task based on the second question to obtain the associated nodes semantically related to the second question; when the query intent classifier determines that the query question belongs to the first intent type used to trigger a new query task, the server treats the query question as a new first question and generates and executes a new query task based on the query question.
[0166] In the above embodiments, the server inputs the query question into a query intent classifier, which then performs intent recognition and classification on the query question to determine the corresponding query intent type. This allows the server to accurately distinguish whether the user wants to trigger a new query task or wants to query the execution process or results of an already executed query task, avoiding the mixing of different types of query questions. This improves the accuracy of query task processing and the rationality of system response, while also providing clear processing branches for subsequent execution node searches or new task generation, thus enhancing the overall interaction efficiency and stability of the system.
[0167] In one embodiment, after constructing the task execution tree for the query task, the server stores the task execution tree in the task execution tree storage module, which adopts a dual storage structure combining a vector database and a graph database.
[0168] Specifically, the server treats each task execution node in the task execution tree as an independent storage unit, processes the node content corresponding to each task execution node, and converts the node content into semantic vectors using a text embedding model. The node content can include task planning text, subtask description information, search query statements, execution result summaries, or reflection information, etc. The server associates the generated semantic vectors with the corresponding node identifiers and stores them in a vector database for subsequent node query operations based on semantic similarity. Simultaneously, the server stores the node attribute information and the relationships between nodes in the task execution tree in a graph database, where each task execution node serves as a vertex in the graph database. The parent-child relationships, execution order relationships, and dependencies between nodes are stored as directed edges, thereby constructing a directed graph structure in the graph database to represent the complete execution process of the query task. In this way, the server uses a vector database to store and index the semantic information of the task execution nodes, and uses a graph database to store and manage the structural relationships between the task execution nodes. This allows the server to quickly locate nodes semantically related to the second question based on the vector database when processing subsequent query requests triggered by the second question, and then perform relationship expansion and link analysis on the nodes based on the graph database to obtain a set of associated nodes related to the second question.
[0169] In the above embodiments, the server employs a dual-storage structure combining a vector database and a graph database to store and manage the semantic information and structural relationships of nodes in the task execution tree separately. This ensures the efficiency of node semantic search while preserving the complete structural information during task execution. The server can quickly locate candidate nodes related to the second question based on semantic similarity and further perform link expansion and association analysis based on the dependencies between nodes. This avoids the problem of insufficient semantic retrieval or structural analysis capabilities under a single storage method, improves the accuracy and response efficiency of task execution tree node search, and provides effective support for interpretable queries and interactive analysis of the task execution process.
[0170] S506, the reply result is sent to the terminal so that the terminal displays the reply result and displays the associated nodes in a differentiated manner.
[0171] Differentiated display refers to presenting related nodes in a different way relative to other nodes in the task execution tree that are not related to the second question, so as to distinguish the related nodes from other nodes in terms of display effect, thereby highlighting the relationship between the related nodes and the second question. Different display methods may include, but are not limited to, differences in one or more aspects such as display color, brightness, transparency, border style, icon identification, display level, animation effect or display position.
[0172] For example, the terminal can highlight or thicken the borders of related nodes that are directly related to the second question, while weakening the display of other nodes that are not related to the second question. Alternatively, the terminal can make related nodes more prominent in the task execution tree by changing the display level of related nodes or adding animation effects, so that users can quickly identify the position of related nodes in the task execution tree.
[0173] Specifically, after the server completes the node query operation based on the second question, it encapsulates the node information corresponding to the searched related nodes into a response result. This response result may include the node information of the related nodes, and the response result is sent to the terminal. After receiving the response result containing the node information of the related nodes returned by the server, the terminal locates the related nodes related to the second question in the displayed task execution tree based on the node identifier in the node information, and adjusts the display style of the related nodes so that the related nodes are distinguished from other nodes in the task execution tree in terms of display effect.
[0174] Among them, node information refers to the set of information used to characterize associated nodes. Node information includes at least a node identifier used to uniquely identify associated nodes in the task execution tree, and may also include node type, node content description information, node execution status, association information between nodes, or other relevant information used for node display and interaction on the terminal side.
[0175] In addition, when the server sends the response result to the terminal, it can mark the association type between the associated node and the second question in the response result. For example, it can be used to represent the first association type of direct semantic matching, or to represent the indirect association type determined based on node dependency relationship, so that the terminal can use different differentiated display methods for the associated nodes based on different association types.
[0176] In the above embodiments, a task execution tree for the query task targeting the first question is constructed and sent to the terminal so that the terminal can display the task execution tree for the query task. The task execution tree includes multiple nodes. When a query request triggered by the second question is received, the response result is determined based on the semantics of the second question and sent to the terminal so that the terminal can display the response result and differentiate the display of related nodes. The related nodes are the nodes in the task execution tree that are related to the second question. This allows the user to quickly and accurately locate the key nodes in the execution process of the executed query task based on natural language questions, avoiding the need to manually browse through a large number of log records or search layer by layer in a static flowchart. This improves the search efficiency and interaction efficiency of nodes in the task execution tree, while enhancing the transparency and understandability of the task execution process.
[0177] In one embodiment, the process of the server constructing a task execution tree for a query task targeting the first question includes the following steps: during the execution of the query task targeting the first question, obtaining the execution process information of the query task; based on the execution process information, generating a task execution tree to characterize the execution process of the query task; wherein, the task execution node is a node of the task execution tree, and the association relationship is a connection relationship between the nodes.
[0178] The execution process information of the query task refers to the set of information generated during the execution of the query task, which characterizes the execution flow and status of the query task. The execution process information includes the task execution nodes involved in the execution of the query task and the relationships between the task execution nodes. Specifically, the execution process information includes at least one or more of the following: task execution node information used to characterize the query task at different execution stages, and relationship information used to characterize the execution order, dependency, or causal relationship between task execution nodes. Among them, the task execution nodes are used to represent the specific processing actions or processing results in the execution process of the query task, and the relationships are used to represent the logical connections between each task execution node in the execution process of the query task.
[0179] Specifically, during the execution of a query task, the server continuously acquires and records the execution process information of the query task as each processing step is executed. This execution process information includes the task execution nodes generated during the execution of the query task and the relationships between these nodes. After acquiring the execution process information, the server uses the task execution nodes as node elements and the relationships between the task execution nodes as connection relationships between nodes to gradually construct a task execution tree that represents the execution process of the query task. After the query task is completed, the server obtains the complete task execution tree to reflect the overall execution process of the query task from triggering to completion.
[0180] In one embodiment, during the execution of the query task corresponding to the first question, the server continuously updates the execution process information of the query task as the execution progresses, and sends the continuously updated execution process information to the terminal. After obtaining the execution process information, the terminal uses the task execution nodes as node elements and the association between the task execution nodes as the connection relationship between the nodes to gradually construct a task execution tree to represent the execution process of the query task. After the query task is completed, the terminal generates and displays the complete task execution tree based on the received complete execution process information to present the user with the overall execution process of the query task from triggering to completion.
[0181] In the above embodiments, the server obtains the execution process information of the query task during the execution of the query task, and generates a task execution tree to represent the execution process of the query task based on the execution process information. The task execution node is the node of the task execution tree, and the association relationship is the connection relationship between the nodes. In this way, the execution flow of the query task is expressed in a structured tree form, making each execution step of the query task and its logical relationship clear and traceable. This provides a basic support for subsequent node search, differentiated display, execution result analysis and interactive optimization of the task execution process based on the task execution tree, and improves the interpretability and manageability of the complex query task execution process.
[0182] In one embodiment, the process by which the server determines the response result based on the semantics of the second question includes the following steps: performing semantic parsing on the second question to obtain the query vector corresponding to the second question; determining the associated node matching the query vector in the node set corresponding to the task execution tree based on the query vector; obtaining the node information of the associated node to obtain the response result of the second question.
[0183] Semantic parsing refers to the natural language processing of the second problem to extract its semantic features and generate a representation that can be used for semantic matching. Semantic parsing may include one or more steps such as word segmentation, semantic encoding, contextual understanding, or feature mapping.
[0184] A query vector is a vectorized semantic representation obtained by semantic parsing the second question. The query vector is used to represent the semantic features of the second question in the vector space.
[0185] A node set refers to a set of nodes that correspond to the task execution tree and are used to represent the execution nodes of each task during the execution of the query task. The node set includes all nodes in the task execution tree. Each node in the node set corresponds to a task execution node during the execution of the query task and is associated with a corresponding node identifier and node semantic vector.
[0186] Specifically, after receiving a query request triggered by the second question, the server first performs semantic parsing on the second question, converting it into a corresponding query vector using a semantic parsing module or text embedding model. Subsequently, based on the query vector, the server performs vector matching processing in the node set corresponding to the task execution tree, calculating the similarity between the query vector and the semantic vectors corresponding to each task execution node, and determining at least one associated node from the node set whose similarity to the query vector meets preset matching conditions. After determining the associated node, the server obtains the node information corresponding to the associated node and returns the node information as the response result for the second question.
[0187] In the above embodiments, the server performs semantic parsing on the second question to obtain the query vector corresponding to the second question. Based on the query vector, it determines the associated nodes that match the query vector in the node set corresponding to the task execution tree, obtains the node information of the associated nodes, and obtains the response result of the second question. This realizes task execution tree node search based on semantic understanding, enabling the system to break through the limitation of keyword matching, accurately locate task execution nodes related to the user's query intent, improve the accuracy and robustness of node search, and provide a reliable data foundation for subsequent differentiated display and interactive analysis based on the response results.
[0188] In one embodiment, the associated nodes include a first node and a second node. The first node is a node directly related to the second problem, and the second node is a predecessor node of the first node. The process by which the server determines the associated node matching the query vector in the node set corresponding to the task execution tree based on the query vector includes the following steps: determining the similarity between the query vector and the semantic vectors of each node in the node set corresponding to the task execution tree; selecting the first node whose similarity meets the similarity condition from the node set; and selecting the second node that meets the preset association condition with the first node from the node set based on the association relationship between nodes in the task execution tree.
[0189] The first node refers to the node in the task execution tree whose execution content, execution result, or context information is semantically directly related to the second question. This node is used to represent the processing step or execution result that best matches the content of interest in the second question during the execution of the query task.
[0190] The second node refers to the node that precedes the first node in the task execution tree, and whose execution result provides input data or execution conditions for the execution of the first node. This node is used to characterize the source node or causal node of the execution process of the first node.
[0191] Similarity conditions refer to the criteria used to determine the degree of semantic relevance between the query vector and the semantic vectors corresponding to each node in the task execution tree. Similarity conditions can be set based on preset similarity thresholds, similarity ranking rules, or candidate quantity limits. When the similarity between the query vector and the semantic vector corresponding to a certain node meets the similarity conditions, the node is determined to be the first node that is semantically directly related to the second question.
[0192] Preset association conditions refer to the judgment conditions used to determine the logical association relationship between nodes in the task execution tree. Preset association conditions are used to determine whether a node is a predecessor node or causal node of another node. Preset association conditions may include one or more of the following: whether there is a direct connection relationship between nodes, whether there is a sequential relationship in the execution order, whether there is a data dependency relationship, or whether they are located in the same execution path. When a node and the first node meet the preset association conditions, the node is determined to be the second node corresponding to the first node.
[0193] Specifically, after obtaining the query vector corresponding to the second question, the server calculates the similarity between the query vector and the semantic vectors associated with each node in the node set corresponding to the task execution tree to obtain the similarity value between the query vector and the semantic vectors of each node. Based on the similarity value, the server selects at least one node from the node set whose similarity meets the preset similarity conditions, and determines the selected node as the first node that is directly related to the second question semantically. After determining the first node, the server further filters the nodes in the node set that meet the preset association conditions with the first node based on the association relationship between nodes in the task execution tree, and determines the filtered nodes as the second node corresponding to the first node.
[0194] In one embodiment, the process of the server selecting the first node whose similarity meets the similarity condition from the node set specifically includes the following steps: selecting the target semantic vector whose similarity meets the similarity condition from the semantic vector set corresponding to the node set; and selecting the node corresponding to the target semantic vector in the node set as the first node.
[0195] The node set refers to the set of all nodes in the task execution tree, including all processing steps, execution results and associated context information of each node in the execution of the query task; the semantic vector library corresponding to the node set refers to the database or data structure that stores the semantic vector corresponding to each node. This semantic vector library converts the node content into high-dimensional semantic vectors through a text embedding model (such as the BGE model) to represent the position of the node in the semantic space and to be used for subsequent semantic similarity calculation and node search operations.
[0196] Specifically, after obtaining the query vector corresponding to the second question, the server calculates the similarity value between the query vector and each semantic vector in the semantic vector library, and filters out the target semantic vector that meets the conditions according to the preset similarity conditions (such as similarity threshold). Based on the node identifier corresponding to the target semantic vector, the server selects the node from the node set as the first node directly related to the second question.
[0197] In one embodiment, after receiving a query question that is determined by the query intent classifier to be for querying the execution process or query results of an executed query task, the server inputs the query question as a TASK_INQUIRY query into the node search engine for processing.
[0198] Specifically, the server uses a node search engine and the same text embedding model as in the task execution tree construction phase to semantically encode the query question, obtaining the corresponding query vector. Based on the query vector, the server performs an approximate nearest neighbor search in the vector database to find the Top-N task execution nodes with the highest semantic similarity to the query vector, and obtains the node identifiers corresponding to the Top-N task execution nodes, thus obtaining a preliminary list of relevant node identifiers. After obtaining the preliminary list of relevant node identifiers, the server inputs the node identifier list into the link analyzer for processing. The link analyzer performs a traversal query in the graph database for each node identifier in the node identifier list to find the preceding nodes, subsequent nodes, and key sibling nodes in the same execution path that are directly related to the corresponding node. Based on the parent-child relationships, execution order relationships, or dependencies between nodes, it constructs a subgraph of related nodes with the initially related nodes as the core and generates an expanded list of related node identifiers. After obtaining the expanded list of related node identifiers, the server uses a result assembler to query the graph database for detailed information of the corresponding nodes based on the list of related node identifiers. It then integrates and processes the detailed information of the nodes to generate response result data to be returned to the terminal. The response result data may include node identifier, node type, node execution content, node execution result summary, external information referenced by the node, and identification of the relationships between nodes. The server sends the response result data to the terminal, enabling the terminal to differentiate the related nodes in the task execution tree related to the query question based on the response result data, and supporting users to further view, analyze, or interact with the related nodes.
[0199] In the above embodiments, the server determines the similarity between the query vector and the semantic vectors of each node in the node set corresponding to the task execution tree. It then selects a first node from the node set whose similarity satisfies the similarity condition. Based on the association between nodes in the task execution tree, it selects a second node from the node set that satisfies a preset association condition with the first node. This not only accurately locates the core execution node that is semantically directly related to the second question, but also further obtains upstream and downstream nodes that have a causal or dependent relationship with the core execution node in the execution process. This avoids the problem of information bias caused by isolated retrieval based on a single node. By simultaneously returning the first node and its corresponding second node, the server can construct a set of associated nodes surrounding the second question. This allows the terminal to highlight key processing steps directly related to the second question when displaying the task execution tree, while also fully presenting the source and context of these processing steps. This improves the completeness and interpretability of the node response results, enhances the user's understanding of the query task execution process, and reduces the user's operational cost of manually locating and analyzing related nodes in complex task execution trees.
[0200] In one embodiment, the query processing method further includes the following steps: obtaining alternative solutions corresponding to the associated node; sending the alternative solutions to the terminal so that the terminal can display the alternative solutions; when a solution application request for the target alternative solution is received, re-executing the sub-task corresponding to the associated node based on the target alternative solution to obtain the update execution result of the associated node; and sending the update execution result to the terminal so that the terminal can display the update execution result.
[0201] Among them, alternative solutions refer to one or more alternative execution solutions generated by the system based on the execution goal, execution method or execution resources of the subtask corresponding to the associated node. Alternative solutions are used to provide different execution paths, execution strategies or execution parameters while keeping the execution goal of the subtask consistent.
[0202] A solution application request refers to a confirmation or application instruction initiated by a user on the terminal side for the displayed alternative solutions. It is used to instruct the system to select a certain alternative solution and use the alternative solution as the basis for subsequent execution. Solution application requests can be triggered by interactive operations on the terminal, including but not limited to click operations, touch operations, voice commands, gesture commands, or other human-computer interaction methods.
[0203] The target alternative scheme refers to the alternative scheme that the user explicitly specifies and selects through the scheme application request. The target alternative scheme is used as the basis for re-executing the sub-tasks corresponding to the associated nodes, so as to replace the original execution scheme to reschedule or execute the sub-tasks, thereby generating an updated execution result corresponding to the original execution result.
[0204] Specifically, after determining the associated node, the server retrieves the subtask information corresponding to the associated node from the task execution tree storage module based on the node identifier of the associated node. Then, based on the execution goal, execution method, or execution parameters of the subtask, it generates at least one alternative solution for the subtask. After generating the alternative solution, the server associates and encapsulates the alternative solution with the node identifier of the associated node and sends the alternative solution to the terminal so that the terminal can display the alternative solution. After obtaining the alternative solution corresponding to the associated node, the terminal displays the alternative solution in a list, card, or other interactive format on the display interface, and displays a corresponding solution application control for each alternative solution. After displaying the alternative solution and its corresponding solution application control, the terminal, in response to the user's trigger operation on the solution application control corresponding to the target alternative solution, generates a solution for the target alternative solution. The terminal sends a solution application request for the target alternative solution to the server. Upon receiving the solution application request from the terminal, the server determines the target alternative solution selected by the user based on the associated node identifier and the target alternative solution identifier carried in the solution application request. The server then uses the target alternative solution as the new execution basis, reschedules and executes the subtasks corresponding to the associated nodes. After the subtasks are re-executed, the server obtains the updated execution results generated based on the target alternative solution and associates the updated execution results with the associated nodes. The server then sends the updated execution results corresponding to the associated nodes to the terminal so that the terminal can display the updated execution results, thereby allowing the user to intuitively view the changes in execution effects after the target alternative solution is applied on the terminal.
[0205] In the above embodiments, the server obtains alternative solutions corresponding to the associated nodes and sends them to the terminal so that the terminal can display the alternative solutions. When a solution application request for the target alternative solution is received, the server re-executes the sub-tasks corresponding to the associated nodes based on the target alternative solution to obtain the updated execution results of the associated nodes. The updated execution results are then sent to the terminal so that the terminal can display the updated execution results. This allows the server to provide flexible and controllable execution adjustment capabilities for the associated nodes that users are concerned about while maintaining the overall structure of the original query task. It enables on-demand switching of sub-task execution paths and execution strategies. By promptly feeding back the updated execution results to the terminal, the server supports users in intuitively perceiving the impact of different alternative solutions on the node execution results and subsequent task execution. This further enhances the interactivity, verifiability, and optimizability of the query task execution process and improves the responsiveness and user decision support capabilities of the complex task execution system in practical application scenarios.
[0206] In one embodiment, the query processing method further includes the following steps: determining the successor node in the task execution tree that is preceded by the associated node based on the dependency relationship between nodes in the task execution tree; re-executing the subtask corresponding to the successor node based on the updated execution result to obtain the updated execution result of the successor node; and sending the updated execution result of the successor node to the terminal so that the terminal updates and displays the execution result of the successor node.
[0207] In the task execution tree, the dependency relationship between nodes refers to the constraint relationship between different task execution nodes in terms of execution order, data transfer or execution conditions. This dependency relationship describes whether the execution of a subtask of a certain node requires the execution result of the preceding node as input data, execution parameters or triggering conditions.
[0208] A successor node is a node in the task execution tree that follows an associated node and whose execution of its corresponding subtask depends on the execution result of the associated node. Successor nodes are used to represent subsequent processing steps that continue to be executed based on the execution result of the associated node. When the execution result of the associated node changes, the execution result of the successor node may change accordingly.
[0209] Specifically, after obtaining the update execution result corresponding to the associated node, the server performs dependency resolution on the task execution tree based on the pre-established and stored node dependency relationships to determine at least one successor node that uses the associated node as its predecessor. The server can determine the successor node by traversing the directed edges in the task execution tree that originate from the associated node, or by querying the set of nodes in the graph database that use the associated node's identifier as the starting point of the incoming edge. After determining the successor node, the server, based on the update execution result of the associated node, determines whether the execution input or execution conditions of the subtask corresponding to the successor node have changed. When the execution input or execution conditions of the subtask corresponding to the successor node have changed, the server determines whether the execution input or execution conditions of the subtask corresponding to the successor node have changed. When relying on the update execution results of associated nodes, the server uses the update execution results as new input data or execution basis to reschedule and execute the subtasks corresponding to the successor nodes to generate the update execution results of the successor nodes. After the subtasks corresponding to the successor nodes are re-executed, the server obtains the update execution results of the successor nodes and associates and encapsulates the update execution results with the corresponding successor node identifier. Subsequently, the server sends the update execution results of the successor nodes to the terminal, so that the terminal updates and displays the execution results of the corresponding successor nodes in the task execution tree based on the update execution results. This allows the task execution tree displayed on the terminal to reflect in real time the impact of changes in the execution results of associated nodes on subsequent execution steps.
[0210] In the above embodiments, the server determines the successor node in the task execution tree based on the dependency relationship between nodes in the task execution tree. Based on the updated execution result, it re-executes the subtask corresponding to the successor node to obtain the updated execution result of the successor node. The updated execution result of the successor node is then sent to the terminal so that the terminal can update and display the execution result of the successor node. This allows the execution optimization result of a single node to propagate backward along the task execution chain, automatically triggering the synchronous update of related subsequent processing steps. This avoids the problem of inconsistent overall execution results due to local adjustments, ensures the logical consistency and data correctness between the execution results of each node in the task execution tree, and improves the maintainability, debuggability, and interaction efficiency of the task execution process. It also allows users to intuitively perceive the impact of node-level optimization on the overall query task results.
[0211] In one embodiment, the above query processing method further includes the following steps: when the execution result of the successor node changes, determining the updated query result corresponding to the first question based on the updated execution result of the associated node and the updated execution result of the successor node; and sending the updated query result to the terminal so that the terminal can display the updated query result.
[0212] Specifically, after obtaining the update execution result of the successor node, the server determines whether the update execution result of the successor node has changed relative to the original execution result. When it is determined that the execution result of the successor node has changed, the server, based on the result aggregation relationship or result generation rules between nodes in the task execution tree, and combining the update execution results of the associated nodes and the successor node, recalculates or regenerates the query result corresponding to the first question. The server can use the update execution results of the associated nodes and the successor node as new input data, and generate the updated query result corresponding to the first question according to the original result generation logic of the query task or the preset result fusion rules. After generating the updated query result, the server associates the updated query result with the first question and sends the updated query result to the terminal, so that the terminal can replace or compare the original query result corresponding to the first question, allowing the user to intuitively view the changes in the overall query result caused by the re-execution of the nodes.
[0213] In the above embodiments, when the execution results of successor nodes change, the server determines the updated query result corresponding to the first question based on the updated execution results of associated nodes and successor nodes, and sends the updated query result to the terminal so that the terminal can display the updated query result. This allows the server to automatically perceive the impact of changes in the execution results of local nodes on the overall query task results, and dynamically update and maintain the consistency of the query result corresponding to the first question based on the dependencies and result aggregation relationships between nodes in the task execution tree, avoiding the problem of distortion or inconsistency of the overall result due to local adjustments. At the same time, by promptly feeding back the updated query result to the terminal, users can intuitively understand the impact of node-level optimization or re-execution on the final query conclusion, further improving the interpretability, traceability, and interactive tuning capabilities of the complex query task execution process, and enhancing the reliability and user trust of the multi-agent task execution system in complex scenarios.
[0214] In one embodiment, a query processing system is also provided for executing the above-described query processing method. Referring to Figure 6, the query processing system includes, but is not limited to, the following functional modules: a user query input module, a query intent classifier, a routine task processing module, a node search engine, a task execution tree storage module, a link analyzer, a result assembler, a UI display and interaction module, and a solution generation and re-execution module. These modules communicate with each other through interfaces or message mechanisms to jointly complete the entire process from user query input to result display and subsequent optimization interaction. Wherein:
[0215] 1. The user query input module is used to receive user input queries. A query can be a first question that triggers a new query task, or a second question that follows up on an already executed task, such as a query about the execution process, node results, or analysis conclusions.
[0216] 2. The query intent classifier is used to identify and classify the intent of the user-input query. Specifically, based on a text semantic analysis model, the classifier processes the query and outputs the query intent type. The query intent type includes at least: New Task, indicating that the user intends to trigger a new query task; and TaskInquiry, indicating that the user intends to query the execution process, node results, or analysis basis of an already executed task.
[0217] 3. The routine task processing module is used to execute routine query task processing flows, including task planning, subtask decomposition, task execution, and result generation, and builds the corresponding task execution tree during the execution process. When the query intent classifier determines that the Query is a New Task, the system routes the Query to the routine task processing module.
[0218] 4. The main functions of the node search engine include: semantically vectorizing the query to generate a query vector; performing a similarity search in the vector database of the task execution tree storage module based on the query vector; and obtaining a set of node identifiers most semantically relevant to the query to form a list of related node IDs. When the query intent classifier determines that the query is a Task Inquiry, the system sends the query to the node search engine.
[0219] 5. The task execution tree storage module is used to store and manage the task execution tree data corresponding to the query task. This module adopts a dual storage structure, including a vector database and a graph database. The vector database is used to store the semantic vectors corresponding to each node in the task execution tree and supports fast node retrieval based on vector similarity. The graph database is used to store the attribute information of the nodes in the task execution tree and the relationships between the nodes. Nodes are stored as vertices, and parent-child relationships, dependencies, or execution order are stored as directed edges.
[0220] 6. The link analyzer is used to perform relationship expansion analysis on the list of related node IDs returned by the node search engine. Specifically, the link analyzer performs traversal operations in the graph database, such as breadth-first search (BFS), to obtain the predecessor node of the target node, the successor node of the target node, and the key sibling nodes on the same execution path as the target node. Through the above analysis, the link analyzer constructs a subgraph of related nodes with the target node as the core.
[0221] 7. The result assembler is used to encapsulate and structure the results of the associated node subgraph output by the link analyzer. Specifically, based on the node ID, the result assembler retrieves detailed information about the nodes from the graph database and other storage, and generates result data in a unified format, such as a JSON array. The result data includes at least the node identifier (task_id), node type, node execution content or result summary (such as web_info), and association information between nodes.
[0222] 8. The UI display and interaction module is used to visualize the data output by the result assembler. Specifically, it includes: highlighting related nodes in the task execution tree, displaying the execution content, results, and reference information of nodes in the details area, and distinguishing directly related nodes from their predecessors or successors through different display styles.
[0223] 9. The scheme generation and re-execution module is used to: generate one or more alternative execution schemes for the target associated nodes, display alternative schemes to the user and receive scheme selections, re-execute the corresponding sub-tasks based on the scheme selected by the user, and, when necessary, cascade update subsequent nodes and the final query results.
[0224] After the UI highlights the information, the system further determines whether the user has requested optimization. If the user has not requested optimization, the process ends; if the user has requested optimization, the solution generation and re-execution module is triggered.
[0225] Through the above query processing system: users can accurately locate key nodes in the task execution tree through natural language queries; the system can combine vector retrieval and graph relationship analysis to accurately restore the contextual dependencies of nodes; users can intuitively understand the source of the conclusions in the UI and further interactively optimize and re-execute key nodes; and local adjustments and result updates can be achieved without re-executing the entire query task.
[0226] In one embodiment, an application scenario is also provided, in which the above-described query processing method is applied. The overall process of this application scenario can be divided into four stages: query intent determination, node search and link analysis, result assembly and presentation, and interactive optimization. For details, please refer to Figure 7.
[0227] Phase 1: Determining the query intent.
[0228] In this application scenario, the user first enters a query in the terminal. The query can be a question used to trigger a new task, or a follow-up question about the execution process, results, or analysis conclusions of a completed task.
[0229] The terminal or server sends the user-input query to the query intent classifier, which identifies and judges the intent of the query to determine the query intent type. Query intent types include at least TASK_INQUIRY (follow-up query on an executed task) and TASK_PROCESSING (new task processing). TASK_INQUIRY indicates that the user intends to query or rewind the execution process of a completed task, while TASK_PROCESSING indicates that the user intends to trigger a new query task.
[0230] When the query intent classifier determines that the query is TASK_PROCESSING, the system will transfer the query to the regular new task processing flow and re-execute the complete query task; when the query intent classifier determines that the query is TASK_INQUIRY, the system will enter the query-based processing flow.
[0231] Phase Two: Node Search and Link Analysis.
[0232] In the TASK_INQUIRY scenario, the system performs node search and link analysis based on the user query.
[0233] (a) Node search:
[0234] The system first embeds the Query into the model, encodes the Query, and generates a corresponding semantic vector. Then, the system performs an approximate nearest neighbor search in the vector database based on the semantic vector to find the task execution node that is most similar to the Query in semantics, and obtains a preliminary list of related node IDs.
[0235] (II) Link Analysis:
[0236] After obtaining the preliminary list of relevant node IDs, the system sends the list of node IDs to the link analyzer. The link analyzer performs traversal analysis on the nodes in the graph database to identify: the predecessor nodes related to the target node, the successor nodes related to the target node, and the parallel or sibling nodes that are on the same execution path as the target node.
[0237] Through the above analysis, the system obtains a subgraph of associated nodes containing the core node and its upstream and downstream relationships, which is used to reflect the execution dependencies and causal relationships between nodes.
[0238] Phase 3: Results Assembly and Presentation.
[0239] After completing node search and link analysis, the system enters the result assembly and presentation stage.
[0240] (a) Assembly of Results:
[0241] The system extracts detailed information about each node from a graph database and related storage based on a subgraph of associated nodes, and encapsulates this node information in a structured manner to generate result data in a unified format. The result data can be represented in JSON format and includes at least the node identifier (task_id), node type, summary of the node's execution content or result (such as web_info), and information on the relationships between nodes.
[0242] (ii) UI highlighting display:
[0243] After receiving the result data, the terminal updates and displays the task execution tree in the UI interface, including: highlighting nodes directly related to the query, distinguishing between predecessor and successor nodes with different display styles, and highlighting the connection links between nodes on the execution path.
[0244] Using the above method, users can intuitively view the key nodes related to the Query and their contextual relationships in the task execution tree.
[0245] Phase 4: Interactive Optimization.
[0246] After highlighting node information and links, the system further determines whether the user's query contains an optimization intent.
[0247] (a) No optimization intent:
[0248] When the system determines that the user's query does not contain optimization intent, or the user has not made any further adjustment requests to the system, the system terminates the current process.
[0249] (ii) Contains optimization intent:
[0250] When the system determines that a user's query contains an optimization intent, the system performs the following steps: Based on the query content and response results, it identifies the target node that needs to be optimized or re-executed; it generates one or more alternative execution plans for the target node and displays them to the user in the UI; the user can choose to confirm a certain alternative plan or cancel the optimization operation; if the user confirms, the system re-executes the subtask corresponding to the target node based on the selected plan and synchronously updates the context node structure of the task execution tree; the system then re-presents the updated node execution results and task execution tree structure in the UI.
[0251] Through the above application scenarios, the following can be achieved: users can quickly query key nodes in the task execution process using natural language; the system can accurately locate nodes and their execution context based on vector retrieval and graph relationship analysis; users can intuitively understand the source of the conclusions in the task execution tree visualization interface; and key nodes can be interactively optimized and re-executed without re-executing the complete task.
[0252] 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 of other steps.
[0253] 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.
[0254] In one embodiment, as shown in FIG8, a query processing device is provided, including: a task execution tree display module 802, a question display module 804, and a display module 806, wherein:
[0255] The task execution tree display module 802 is used to display the task execution tree of the queried task; the task execution tree includes multiple nodes; the queried task is the task that is related to the first question and has been completed.
[0256] The question display module 804 is used to respond to input operations and display the second question entered in response to the query task.
[0257] Display module 806 is used to respond to query operations, display reply results, and differentiate the display of related nodes; the related nodes are nodes in the task execution tree that are related to the second question.
[0258] In the above embodiments, after displaying the task execution tree of the query task, which includes multiple nodes, the query task is a completed task related to the first question. In response to the input operation, the second question entered in response to the query task is displayed. In response to the query operation, the reply result is displayed, and related nodes are displayed in a differentiated manner. The related nodes are nodes in the task execution tree that are related to the second question. This allows users to quickly locate nodes related to their interests during the task execution process based on natural language questions, avoiding the need to manually browse through a large number of log records or expand static flowcharts layer by layer to search. This improves the search efficiency and readability of nodes in the task execution tree and enhances the transparency and explainability of the task execution process.
[0259] In one embodiment, the node information includes a node identifier. The display module 806 is further configured to: determine the associated node related to the second problem in the task execution tree based on the node identifier; and adjust the display style of the associated node so that the associated node is distinguished from other nodes in the task execution tree in terms of display effect.
[0260] In one embodiment, the associated nodes include a first node and a second node, where the first node is a node directly related to the second problem and the second node is a preceding node of the first node; the display module 806 is further configured to: display the first node according to a first display style; display the second node according to a second display style; display a data flow object between the second node and the first node; the data flow object is used to represent the data transmitted from the second node to the first node.
[0261] In one embodiment, the node information further includes node detail information. The display module 806 is also used to: obtain the node detail information corresponding to the associated node based on the node identifier; and display the node detail information of the associated node according to a preset display style.
[0262] In one embodiment, as shown in FIG9, the device further includes: an alternative solution display module 808, used to: display alternative solutions for associated nodes; and an alternative solution application module 810, used to display the update execution result of the subtask corresponding to the associated node in response to the solution application operation; wherein the update execution result is the execution result obtained by re-executing the subtask based on the target alternative solution, and the target alternative solution is the alternative solution specified by the solution application operation.
[0263] In one embodiment, the alternative application module 810 is further configured to update the execution result of the successor node of the associated node when the execution result of the update changes; and to update and display the query result corresponding to the first question when the execution result of the successor node changes.
[0264] In one embodiment, the alternative solution display module 808 is further configured to: in response to an alternative solution query operation, obtain the alternative solution corresponding to the associated node; and display the obtained alternative solution and solution application control; the alternative solution application module 810 is further configured to: in response to a trigger operation on the solution application control corresponding to the target alternative solution, display the update execution result of the subtask corresponding to the associated node.
[0265] In one embodiment, the task execution tree display module 802 is further configured to: execute a corresponding query task based on the first question; after the query task is executed, obtain a task execution tree generated based on the execution process information of the query task; and display the task execution tree representing the task execution process of the query task.
[0266] In one embodiment, as shown in FIG10, a query processing apparatus is provided, including: a task execution tree construction module 1002, a sending module 1004, and a response result determination module 1006, wherein:
[0267] The task execution tree construction module 1002 is used to construct the task execution tree for the query task of the first question; the task execution tree includes multiple nodes.
[0268] The sending module 1004 is used to send the task execution tree to the terminal so that the terminal can display the task execution tree of the queried task;
[0269] The response result determination module 1006 is used to determine the response result based on the semantics of the second question when a query request triggered by the second question is received.
[0270] The sending module 1004 is also used to send the reply result to the terminal so that the terminal can display the reply result and display the associated nodes in a differentiated manner. The associated nodes are the nodes in the task execution tree that are related to the second question.
[0271] In the above embodiments, a task execution tree for the query task targeting the first question is constructed and sent to the terminal so that the terminal can display the task execution tree for the query task. The task execution tree includes multiple nodes. When a query request triggered by the second question is received, the response result is determined based on the semantics of the second question and sent to the terminal so that the terminal can display the response result and differentiate the display of related nodes. The related nodes are the nodes in the task execution tree that are related to the second question. This allows users to quickly and accurately locate key nodes in the execution process of the executed query task based on natural language questions, avoiding the need to manually browse through a large number of log records or search layer by layer in a static flowchart. This improves the search efficiency and interaction efficiency of nodes in the task execution tree, while enhancing the transparency and understandability of the task execution process.
[0272] In one embodiment, the task execution tree construction module 1002 is further configured to: obtain execution process information of the query task during the execution of the query task; the execution process information includes the task execution nodes involved in the execution of the query task and the association relationship between the task execution nodes; and generate a task execution tree to characterize the execution process of the query task based on the execution process information; wherein the task execution nodes are nodes of the task execution tree, and the association relationship is the connection relationship between the nodes.
[0273] In one embodiment, the response result determination module 1006 is further configured to: perform semantic parsing on the second question to obtain the query vector corresponding to the second question; based on the query vector, determine the associated node matching the query vector in the node set corresponding to the task execution tree; obtain the node information of the associated node to obtain the response result of the second question.
[0274] In one embodiment, the associated nodes include a first node and a second node. The first node is a node directly related to the second question, and the second node is a preceding node of the first node. The response result determination module 1006 is further configured to: determine the similarity between the query vector and the semantic vectors of each node in the node set corresponding to the task execution tree; select a first node from the node set whose similarity satisfies the similarity condition; and select a second node from the node set that satisfies the preset association condition with the first node based on the association relationship between nodes in the task execution tree.
[0275] In one embodiment, the response result determination module 1006 is further configured to select a target semantic vector whose similarity satisfies the similarity condition from the set of semantic vectors corresponding to the node set; and select the node corresponding to the target semantic vector in the node set as the first node.
[0276] In one embodiment, as shown in FIG11, the device further includes: a candidate scheme acquisition module 1008, used to acquire candidate schemes corresponding to associated nodes; a sending module 1004, used to send the candidate schemes to a terminal so that the terminal can display the candidate schemes; an execution module 1010, used to re-execute the subtasks corresponding to the associated nodes based on the target candidate scheme when a scheme application request for the target candidate scheme is received, to obtain the updated execution result of the associated nodes; the sending module 1004 is also used to send the updated execution result to the terminal so that the terminal can display the updated execution result.
[0277] In one embodiment, the execution module 1010 is further configured to determine the successor node in the task execution tree that is preceded by the associated node based on the dependency relationship between nodes in the task execution tree; and re-execute the subtask corresponding to the successor node based on the updated execution result to obtain the updated execution result of the successor node; the sending module 1004 is further configured to send the updated execution result of the successor node to the terminal so that the terminal updates and displays the execution result of the successor node.
[0278] In one embodiment, the execution module 1010 is further configured to determine the update query result corresponding to the first question based on the update execution result of the associated node and the update execution result of the successor node when the execution result of the successor node changes; and send the update query result to the terminal so that the terminal can display the update query result.
[0279] 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.
[0280] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram is shown in Figure 12. The computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface 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 interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device 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 query 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.
[0281] Those skilled in the art will understand that the structure shown in Figure 12 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.
[0282] In one embodiment, a computer device is also 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 in the above method embodiments.
[0283] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0284] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0285] 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 the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0286] 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, etc., and are not limited to these.
[0287] 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.
[0288] 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: displaying a task execution tree for a query task; the task execution tree includes multiple nodes; the query task is a task for a first question that has been completed; in response to an input operation, displaying a second question entered in response to the query task; in response to a query operation, displaying a response result and differentially displaying related nodes; the related nodes are nodes in the task execution tree that are related to the second question.
2. The method according to claim 1, characterized in that, The response result includes node information, which includes node identifiers. The differentiated display of related nodes includes: determining related nodes in the task execution tree that are related to the second question based on the node identifiers; and adjusting the display style of the related nodes so that the related nodes are distinguished from other nodes in the task execution tree in terms of display effect.
3. The method according to claim 2, characterized in that, The associated nodes include a first node and a second node, where the first node is a node directly related to the second problem, and the second node is a preceding node of the first node. Adjusting the display style of the associated node includes: displaying the first node according to a first display style; displaying the second node according to a second display style; the method further includes: displaying a data flow object between the second node and the first node; the data flow object is used to represent the data transmitted from the second node to the first node.
4. The method according to claim 2, characterized in that, The node information also includes node details information, and the method further includes: obtaining the node details information corresponding to the associated node based on the node identifier; the display reply result includes: displaying the node details information of the associated node according to a preset display style.
5. The method according to claim 1, characterized in that, The method further includes: displaying alternative schemes for the associated node; and, in response to a scheme application operation, displaying the update execution result of the subtask corresponding to the associated node; wherein the update execution result is the execution result obtained by re-executing the subtask based on the target alternative scheme, and the target alternative scheme is the alternative scheme specified by the scheme application operation.
6. The method according to claim 5, characterized in that, The method further includes: updating the execution result of the successor node of the associated node when the update execution result changes; and updating and displaying the query result corresponding to the first question when the execution result of the successor node changes.
7. The method according to claim 6, characterized in that, The step of displaying alternative solutions for the associated node includes: in response to an alternative solution query operation, obtaining the alternative solution corresponding to the associated node; and displaying the obtained alternative solution and solution application control; the step of displaying the update execution result of the subtask corresponding to the associated node in response to a solution application operation includes: in response to a trigger operation on the solution application control corresponding to the target alternative solution, displaying the update execution result of the subtask corresponding to the associated node.
8. The method according to any one of claims 1 to 7, characterized in that, The task execution tree for displaying the query task includes: executing a query task corresponding to a first question; after the query task is executed, obtaining a task execution tree generated based on the execution process information of the query task; and displaying the task execution tree that represents the task execution process of the query task.
9. A query processing method, characterized in that, The method includes: constructing a task execution tree for a query task targeting a first question, and sending the task execution tree to a terminal so that the terminal displays the task execution tree for the query task; the task execution tree includes multiple nodes; upon receiving a query request triggered by a second question, determining a response result based on the semantics of the second question; sending the response result to the terminal so that the terminal displays the response result and displays related nodes in a differentiated manner, the related nodes being nodes in the task execution tree related to the second question.
10. The method according to claim 9, characterized in that, The step of constructing a task execution tree for a query task targeting the first question includes: during the execution of the query task targeting the first question, obtaining execution process information of the query task; the execution process information includes the task execution nodes involved in the execution of the query task and the association relationships between the task execution nodes; based on the execution process information, generating a task execution tree to characterize the execution process of the query task; wherein, the task execution nodes are nodes of the task execution tree, and the association relationships are connection relationships between nodes.
11. The method according to claim 9, characterized in that, The semantic determination of the response result based on the second question includes: performing semantic parsing on the second question to obtain a query vector corresponding to the second question; determining the associated node matching the query vector in the node set corresponding to the task execution tree based on the query vector; obtaining the node information of the associated node to obtain the response result of the second question.
12. The method according to claim 11, characterized in that, The associated nodes include a first node and a second node. The first node is a node directly related to the second problem, and the second node is a predecessor node of the first node. The step of determining the associated node matching the query vector in the node set corresponding to the task execution tree based on the query vector includes: determining the similarity between the query vector and the semantic vectors of each node in the node set corresponding to the task execution tree; selecting a first node from the node set whose similarity satisfies the similarity condition; and selecting a second node from the node set that satisfies a preset association condition with the first node based on the association relationship between nodes in the task execution tree.
13. The method according to claim 12, characterized in that, Selecting a first node from the node set whose similarity satisfies the similarity condition includes: selecting a target semantic vector whose similarity satisfies the similarity condition from the semantic vector set corresponding to the node set; and selecting the node corresponding to the target semantic vector in the node set as the first node.
14. The method according to claim 9, characterized in that, The method further includes: obtaining alternative solutions corresponding to the associated node; sending the alternative solutions to the terminal so that the terminal displays the alternative solutions; when a solution application request for a target alternative solution is received, re-executing the subtask corresponding to the associated node based on the target alternative solution to obtain the update execution result of the associated node; and sending the update execution result to the terminal so that the terminal displays the update execution result.
15. The method according to claim 14, characterized in that, The method further includes: determining the successor node in the task execution tree that is preceded by the associated node based on the dependency relationship between nodes in the task execution tree; re-executing the subtask corresponding to the successor node based on the updated execution result to obtain the updated execution result of the successor node; and sending the updated execution result of the successor node to the terminal so that the terminal updates and displays the execution result of the successor node.
16. The method according to claim 15, characterized in that, The method further includes: when the execution result of the successor node changes, determining the update query result corresponding to the first problem based on the update execution result of the associated node and the update execution result of the successor node; and sending the update query result to the terminal so that the terminal can display the update query result.
17. A query processing device, characterized in that, The device includes: a task execution tree display module for displaying the task execution tree of a query task; the task execution tree includes multiple nodes; the query task is a task related to a first question that has been completed; a question display module for displaying a second question entered in response to an input operation regarding the query task; a response result display module for obtaining a response result for the second question in response to a query operation; the response result includes node information of associated nodes related to the second question; and a differentiated display module for displaying the response result and differentiatedly displaying associated nodes; the associated nodes are nodes in the task execution tree related to the second question.
18. A query processing apparatus, characterized in that, The device includes: a task execution tree construction module for constructing a task execution tree for a query task targeting a first question; the task execution tree includes multiple nodes; a sending module for sending the task execution tree to a terminal so that the terminal displays the task execution tree of the query task; a response result determination module for determining a response result based on the semantics of the second question when a query request triggered by a second question is received; the sending module is further used to send the response result to the terminal so that the terminal displays the response result and displays related nodes in a differentiated manner, the related nodes being nodes in the task execution tree related to the second question.
19. 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 16.
20. 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 16.
21. 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 16.