Interaction method and apparatus for target model, and electronic device and storage medium
By displaying the inference process data and results of large-scale artificial intelligence models, the problem of model output not meeting expectations due to inaccurate user commands is solved, thereby improving the accuracy and efficiency of model output.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2026-03-26
AI Technical Summary
When user instructions are inaccurate or mismatched, large-scale artificial intelligence models struggle to output expected results. Even after users adjust the instructions, the results remain inaccurate, causing the model to fail to generate the desired content.
By acquiring inference instructions, the system performs data inference using the target model, generates and displays inference process data and results, including multiple branch nodes and conclusion nodes, improving the transparency and interpretability of the model's decision path for users, and allowing users to adjust instructions to improve accuracy.
It enhances the user's understanding of the model's reasoning process, helps the user effectively adjust instructions, improves the accuracy and efficiency of the model's output, and ensures that the results meet expectations.
Smart Images

Figure CN2025093751_26032026_PF_FP_ABST
Abstract
Description
Interaction method and device of target model, electronic device and storage medium
[0001] Cross-reference
[0002] The present application claims priority to the Chinese patent application No. 2024113136272, filed on September 19, 2024, and entitled "Interaction method and device of target model, electronic device and storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0003] The present application relates to the field of model interaction, in particular to an interaction method and device of a target model, an electronic device and a storage medium. BACKGROUND
[0004] An artificial intelligence (AI) large model refers to a machine learning model with a super large scale of parameters and a complex computing structure. It can usually process massive data and complete various complex tasks. Currently, the AI large model can be applied to business fields such as writing, composition, painting, video, etc. for creation assistance and automatic decision-making.
[0005] When the AI large model performs reasoning based on a user's instruction, if there are problems such as inaccurate instruction description by the user or mismatch between the training direction and the user's instruction, the AI large model is likely to generate understanding bias, resulting in the user not obtaining the expected model output result.
[0006] In this case, the user usually adjusts the description of the instruction to try to obtain the expected model output result in the form of re-generation, but the user does not understand the decision path of the AI large model, and the adjusted instruction may still be inaccurate, resulting in the model still being unable to output the expected model content. SUMMARY
[0007] The present application provides an interaction method and device of a target model, an electronic device and a storage medium to reduce the problem that the adjusted user's instruction is still inaccurate, resulting in the model still being unable to output the expected model content.
[0008] The interaction method of the target model provided by the present application comprises: obtaining a reasoning instruction; performing data reasoning based on the reasoning instruction by a target model to obtain reasoning process data and a reasoning result; wherein the reasoning process data comprises a plurality of branch nodes and a plurality of conclusion nodes cascaded in the data reasoning process; and displaying the reasoning process data and the reasoning result.
[0009] The application further provides an interaction device of a target model, comprising an acquisition module, an inference module and a display module; the acquisition module is configured to acquire an inference instruction; the inference module is configured to perform data inference based on the inference instruction through the target model to obtain inference process data and an inference result; wherein the inference process data comprises a plurality of branch nodes and a plurality of conclusion nodes cascaded in the data inference process; and the display module is configured to display the inference process data and the inference result.
[0010] The application further provides an electronic device, comprising a memory and a processor coupled with each other, and the processor is configured to execute program instructions stored in the memory to implement the interaction method of the target model according to the above-mentioned embodiments.
[0011] The application further provides a computer-readable storage medium, which stores program data, and the program data can be executed by a processor to implement the interaction method of the target model according to the above-mentioned embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0012] Fig. 1 is a flow diagram of an embodiment of the interaction method of the target model according to the application;
[0013] Fig. 2 is a flow diagram of another embodiment of the interaction method of the target model according to the application;
[0014] Fig. 3 is a schematic diagram of an embodiment of the inference process data;
[0015] Fig. 4 is a schematic diagram of an embodiment of the inference process data after adjustment of Fig. 3;
[0016] Fig. 5 is a schematic diagram of an embodiment of the inference process data after fusion of Fig. 3;
[0017] Fig. 6 is a schematic diagram of an embodiment of the focused display of the inference process data and the inference result;
[0018] Fig. 7 is a schematic diagram of an embodiment of the interaction device of the target model according to the application;
[0019] Fig. 8 is a schematic diagram of an embodiment of the electronic device according to the application;
[0020] Fig. 9 is a schematic diagram of an embodiment of the computer-readable storage medium according to the application. DETAILED DESCRIPTION
[0021] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts are within the scope of the present application.
[0022] The term "and / or" in the present application is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are in an "or" relationship. In addition, "multiple" in this paper means two or more than two. In addition, the term "at least one" in this paper means any one of multiple or any combination of at least two of multiple, for example, including at least one of A, B and C can mean including any one or more elements selected from the set consisting of A, B and C. In addition, the terms "first", "second", "third" in the present application are only for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.
[0023] In order for those skilled in the art to better understand the technical solutions of the present application, the technical solutions of the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0024] Please refer to FIG. 1, which is a flowchart of an embodiment of the target model interaction method provided by the present application.
[0025] Step S11: Obtain the inference instruction.
[0026] The inference instruction is an instruction issued by a user to a target model, to instruct the target model to output an expected inference result based on the inference instruction.
[0027] The target model can be any artificial intelligence model, and its application direction includes but is not limited to one or more of writing, music production, painting generation, game development, education, editing, video generation, natural language processing, medical diagnosis, etc. in multiple fields, etc., which is set based on actual situation.
[0028] In one specific application scenario, when the application direction of the target model includes painting generation, the inference instruction can be to generate a painting image of a certain scene or a painting image of a certain object. In one specific application scenario, when the application direction of the target model includes natural language processing, the inference instruction can be to generate a summary of a certain book based on the book. Similarly, the specific inference instruction and the application direction of the target model are not limited here.
[0029] Step S12: performing data reasoning based on the inference instruction through the target model to obtain reasoning flow data and an inference result; wherein the reasoning flow data comprises a plurality of branch nodes and a plurality of conclusion nodes cascaded in the data reasoning process.
[0030] In the process of data reasoning of the target model, reasoning differences are generated for various reasoning elements, and a plurality of possible reasoning difference paths are generated. The plurality of reasoning difference paths generated at the reasoning difference are respectively marked as known branch nodes. The selection of different branch nodes by the target model in the reasoning process directly affects the reasoning result finally generated by the target model. The generation of the plurality of reasoning difference paths in the reasoning process of the target model usually depends on the structural design and training of the target model. Factors such as probabilistic selection, user guidance, domain expert knowledge, environmental context, and training data will affect the decision-making of the target model on the plurality of reasoning difference paths. After decision-making, the target model continues to reason based on different branch nodes, and new branch nodes may be generated in the process of continuous reasoning. The reasoning is continued based on each new branch node until the target model obtains a reasoning conclusion that meets the inference instruction. The reasoning conclusion is marked as a conclusion node, and the target model finally selects a target conclusion node from the plurality of conclusion nodes to generate the final reasoning result. That is, the conclusion node is the end node of different reasoning paths obtained by the target model through decision-making under the influence of factors such as probabilistic selection, domain expert knowledge, environmental context, and training data.
[0031] In a specific application scenario, when the inference instruction is to require the target model to walk out of a certain room in a maze to deduce a game, at a certain branch intersection in the maze, the target model will generate four branch nodes: turn left, turn right, go straight, and back up. The target model will continue to reason based on the four branch nodes. If there is still a branch intersection in the reasoning process, corresponding branch nodes will be generated, and reasoning will be continued based on the new branch nodes until the exit of the maze is reached, and a conclusion node is obtained. The maze may have multiple exits or multiple paths, and therefore, the number of conclusion nodes may be multiple. Finally, the target model selects a target conclusion node from the plurality of conclusion nodes to generate the final path.
[0032] In a specific application scenario, when the inference instruction is to require the target model to draw a tree drawing, the target model may generate a plurality of branch nodes when reasoning about the species of the tree. Subsequently, when continuing to reason based on different branch nodes, a plurality of branch nodes are generated again when reasoning about the growth location of the tree, and so on. The reasoning is continued until all elements of the drawing are determined, and a conclusion node is obtained. Due to different selections of branch nodes, the target model may obtain multiple conclusion nodes. Finally, the target model selects a target conclusion node from the plurality of conclusion nodes to generate the final tree drawing.
[0033] The embodiment determines, based on the inference instruction, a plurality of branch nodes and a plurality of conclusion nodes cascaded in the inference process of the target model by the target model performing data inference based on the inference instruction, obtains inference flow data, and generates a final inference result by selecting a target conclusion node from the plurality of conclusion nodes, which is determined based on the training and design structure of the target model.
[0034] Step S13: Display the inference flow data and the inference result.
[0035] In addition to displaying the inference result to the user, the embodiment also displays the inference flow data of the target model, i.e., the plurality of branch nodes and the plurality of conclusion nodes in the inference process, to the user, so that the user knows the inference logic and inference selection of the target model, which helps the user to analyze, understand and evaluate the decision path of the target model, improves the transparency and interpretability, and thus helps the user to effectively adjust the inference instruction content when the model result does not meet the expectation, improves the accuracy and reliability of the inference of the target model again, and speeds up the efficiency of obtaining the model output result of the target model that meets the expectation.
[0036] Through the above steps, the interaction method of the target model of the embodiment obtains the inference instruction, obtains the inference flow data and the inference result by the target model performing data inference based on the inference instruction, wherein the inference flow data includes a plurality of branch nodes and a plurality of conclusion nodes cascaded in the data inference process, and displays the inference flow data and the inference result, so that the user knows the inference logic and inference selection of the target model, which helps the user to analyze, understand and evaluate the decision path of the target model, improves the transparency and interpretability, and thus helps the user to effectively adjust the inference instruction content when the model result does not meet the expectation, improves the accuracy and reliability of the inference of the target model again, and speeds up the efficiency of obtaining the model output result of the target model that meets the expectation.
[0037] In some embodiments, obtaining the inference flow data and the inference result by the target model performing data inference based on the inference instruction includes: generating a plurality of branch nodes by the target model performing data inference based on the inference instruction, and obtaining a plurality of conclusion nodes based on the plurality of branch nodes; marking each branch node and recording the association relationship between each branch node and the association relationship between each conclusion node and the corresponding branch node to obtain the inference flow data; determining a target conclusion node from the plurality of conclusion nodes, and generating the inference result based on the target conclusion node and the plurality of branch nodes corresponding to the target conclusion node.
[0038] In some embodiments, displaying the inference flow data and the inference result includes: displaying the inference flow data and the inference result, and distinguishing and displaying the target conclusion node and the plurality of target branch nodes corresponding to the inference result.
[0039] In some embodiments, the plurality of conclusion nodes comprises a target conclusion node and a plurality of base conclusion nodes, and the plurality of branch nodes comprises a plurality of target branch nodes and a plurality of base branch nodes; after the inference process data and the inference result are displayed, the displaying comprises: in response to receiving an adjustment instruction of a base branch node, determining whether the base branch node has a corresponding base conclusion node; when the base branch node has a corresponding base conclusion node, displaying the base branch node and its corresponding branch nodes and conclusion nodes separately, and generating a new inference result based on the base branch node and its corresponding branch nodes and conclusion nodes; when the base branch node does not have a corresponding base conclusion node, continuing to infer based on the base branch node through the target model until a conclusion node corresponding to the base branch node is obtained, displaying the base branch node and its corresponding branch nodes and conclusion nodes separately, and generating a new inference result based on the base branch node and its corresponding branch nodes and conclusion nodes.
[0040] In some embodiments, after the inference process data and the inference result are displayed, the displaying further comprises: in response to receiving a fusion instruction between at least two branch nodes, fusing the at least two branch nodes through the target model to generate a fusion node, and continuing to infer based on the fusion node until a conclusion node corresponding to the fusion node is obtained, displaying the branch nodes and the conclusion nodes corresponding to the fusion node separately, and generating a new inference result based on the branch nodes and the conclusion nodes corresponding to the fusion node.
[0041] In some embodiments, the displaying of the inference process data and the inference result further comprises: in response to receiving a focusing instruction of at least part of the inference result, determining the branch nodes corresponding to the at least part of the inference result based on the focusing instruction; and displaying the at least part of the inference result and its corresponding branch nodes separately.
[0042] In some embodiments, the data inference based on the inference instruction through the target model generates a plurality of branch nodes, comprising: generating a plurality of initial branch nodes based on the inference instruction through the target model; and selecting a plurality of branch nodes from the plurality of initial branch nodes based on a preset requirement.
[0043] In some embodiments, the inference instruction comprises a quantity requirement of branch nodes in the inference flow data; the preset requirement is to meet the quantity requirement; and the plurality of branch nodes are selected from the plurality of initial branch nodes based on the preset requirement, including: sorting the weights of the initial nodes in descending order, and selecting the plurality of branch nodes that meet the quantity requirement in descending order; or the preset requirement is to meet a weight threshold; and the plurality of branch nodes are selected from the plurality of initial branch nodes based on the preset requirement, including: obtaining the weight threshold of the target model; determining the initial nodes with weights greater than or equal to the weight threshold in the plurality of initial branch nodes as the branch nodes, and hiding the initial nodes with weights less than the weight threshold to obtain the plurality of branch nodes.
[0044] Referring to FIG. 2, FIG. 2 is a flowchart of another embodiment of the interaction method of the target model provided in the present application.
[0045] Step S21: Obtain the inference instruction, perform data inference based on the inference instruction through the target model, generate a plurality of branch nodes, and infer a plurality of conclusion nodes based on the plurality of branch nodes.
[0046] After obtaining the inference instruction of the user, data inference is performed based on the inference instruction through the target model to generate a plurality of initial branch nodes. The plurality of branch nodes are selected from the plurality of initial branch nodes based on a preset requirement, and a plurality of conclusion nodes are inferred based on the plurality of branch nodes.
[0047] In a specific application scenario, when the user issues the inference instruction, the user can add a quantity requirement of branch nodes in the inference flow data in the inference instruction, and the preset requirement of the present application scenario is the quantity requirement. The plurality of branch nodes are selected from the plurality of initial branch nodes based on the preset requirement, and the plurality of branch nodes are selected from the plurality of initial branch nodes based on the preset requirement, including: sorting the weights of the initial nodes in descending order, and selecting the plurality of branch nodes that meet the quantity requirement in descending order. For example, when the target model generates 100 initial branch nodes, and the quantity requirement of the user is only 10, the weights of the 100 initial branch nodes can be sorted in descending order, and the 10 branch nodes with the largest weights are selected. Since the 10 branch nodes have the largest weights, the 10 branch nodes can represent the key divergence information in the inference process to some extent, thereby helping the user quickly understand the inference process of the target model.
[0048] In a specific application scenario, the preset requirement can also be to meet a weight threshold. The step of filtering the plurality of branch nodes based on the preset requirement from the plurality of initial branch nodes specifically includes: obtaining a weight threshold of the target model; determining an initial node with a weight greater than or equal to the weight threshold as a branch node, and hiding an initial node with a weight less than the weight threshold to obtain the plurality of branch nodes. By setting the weight threshold to filter the branch nodes, the obtained branch nodes can represent the key divergence information in the reasoning process to some extent, thereby helping the user quickly know the reasoning process of the target model. The specific filtering preset requirement is not limited here.
[0049] In the actual reasoning process of the target model, there can be a large number of reasoning divergences, thereby generating a large number of initial branch nodes. If all the initial branch nodes are displayed to the user, the user's judgment and information extraction can be adversely affected due to too many nodes. Therefore, after the target model generates the plurality of initial branch nodes, the plurality of initial branch nodes are filtered based on the preset requirement to obtain the plurality of branch nodes, thereby simplifying the nodes, retaining key nodes, and hiding general nodes, so as to improve the efficiency, effectiveness, and pertinence of the user in obtaining key information from the plurality of branch nodes.
[0050] Step S22: Labeling each branch node and recording the association relationship between each branch node and the association relationship between each conclusion node and the corresponding branch node to obtain reasoning process data.
[0051] Each branch node is labeled to determine the label of each branch node. The label is the specific content meaning of the branch node corresponding to the reasoning divergence path. For example, when the target model reasons the pass path of the maze, four branch nodes are generated at a certain fork. The four branch nodes are labeled to obtain four branch nodes with labels of turning left, turning right, going straight, and retreating. Or when the target model creates a certain plot, two branch nodes are generated for the scenario of a student taking an exam. The two branch nodes are labeled to obtain two branch nodes with labels of the student passing the exam and the student failing the exam. The specific label of each branch node is determined based on the reasoning direction of each branch node itself.
[0052] The association relationship between each branch node and the association relationship between each conclusion node and the corresponding branch node are recorded to obtain reasoning process data. The display of the reasoning process data can be displayed to the user in a mesh, tree, mind map, or other type of visualization. The specific selection is based on actual needs.
[0053] Please refer to FIG. 3, which is a schematic diagram of an embodiment of reasoning process data. This schematic diagram is only illustrative and is not limited. This embodiment is described by taking a tree visualization as an example.
[0054] When the target model based on the inference instruction performs inference, four branch nodes A, B, C, and D are first generated. The target model continues to perform inference along the four branch nodes to obtain the inference flow data as shown in the figure. Taking the branch node A as an example, the inference flow of the target model is as follows: inference is performed along the branch node A, and then branch node A1 and branch node A2 are generated at the next inference divergence. The target model performs inference along branch node A1 and branch node A2, respectively. After branch node A1, branch node A1.1 is generated, and divergence branch node A1.1.1 and branch node A1.1.2 are generated after branch node A1.1. Then, inference is continued along branch node A1.1.2 to generate conclusion node 1. After inference to branch node A1.1, the target model can also generate a path detour back to branch node A. After generating branch node A2 and branch node A1.1.1, the target model does not continue to infer downward in this inference due to the limitation of the computing power of the target model or the limitation of the hardware actually relied on by the target model. However, this does not mean that the inference paths corresponding to branch node A2 and branch node A1.1.1 cannot generate corresponding conclusion nodes.
[0055] The specific inference flow of branch nodes B, C, and D can be referred to FIG. 3. The specific inference logic is the same as that of branch node A, and will not be described again.
[0056] The cascade association between the multiple branch nodes is expressed by a connection line, and the association between each conclusion node and the corresponding branch node is also expressed by a connection line to obtain the inference flow data. In order to facilitate the display form of the inference flow data, the label display of each node is omitted in the schematic diagram, but in actual display, the label of each node in the inference flow data will be displayed synchronously with the node.
[0057] The above-mentioned visual display method of multiple nodes converts the linear dialogue form of the target model into a network structure, so that the user can understand the overall inference logic and path of the target model, facilitate the user to analyze, understand and evaluate the decision path of the target model, improve the transparency and interpretability of model inference, thereby facilitating the user to adjust the inference instruction content for subsequent instruction issuing, so that the subsequent instruction is more in line with the user's expectation.
[0058] Step S23: determining a target conclusion node from the multiple conclusion nodes, and generating an inference result based on the target conclusion node and the multiple branch nodes corresponding to the target conclusion node.
[0059] The target model can select the conclusion node corresponding to the reasoning path with the maximum comprehensive weight as the target conclusion node by comparing the comprehensive weights between the multiple branch nodes on the entire reasoning path corresponding to each conclusion node, and generate a reasoning result based on the target conclusion node and the multiple branch nodes corresponding thereto. The target conclusion node is the last end node generated by the target model in a reasoning path, and the reasoning conclusion is the final model output content generated by selecting a certain conclusion node and the specific direction of the multiple branch nodes on the entire reasoning path corresponding thereto after the reasoning of the target model ends. For example, when the target model reasons the pass-through path of a maze, the conclusion node is the exit of the maze, and the reasoning result is the entire pass-through path finally selected by the target model in this reasoning.
[0060] In a specific application scenario, taking FIG. 3 as an example, the embodiment of FIG. 3 generates three conclusion nodes: 1, 2, and 3. The reasoning path composed of the conclusion node 1 and the corresponding multiple branch nodes is: branch node A, branch node A1, branch node A1.1, branch node A1.1.2, and conclusion node 1 in sequence. The reasoning path composed of the conclusion node 2 and the corresponding multiple branch nodes is: branch node B, branch node B1, branch node B1.2, branch node B1.2.2, and conclusion node 2 in sequence. The reasoning path composed of the conclusion node 3 and the corresponding multiple branch nodes is: branch node C, branch node C1, branch node C1.2, branch node D1.1.1, and conclusion node 3 in sequence; or branch node D, branch node D1, branch node D1.1, branch node D1.1.1, and conclusion node 3 in sequence. Although the above two reasoning paths both reach the conclusion node 3, the reasoning results generated by the two reasoning paths are not exactly the same due to the difference in the selection of part of the branch nodes.
[0061] Suppose the weight on the entire reasoning path corresponding to the conclusion node 2 is the maximum, the target model selects the conclusion node 2 as the target conclusion node, and generates a reasoning result based on the target conclusion node and the multiple branch nodes corresponding thereto, that is, generates a reasoning result based on branch node B, branch node B1, branch node B1.2, branch node B1.2.2, and conclusion node 2.
[0062] Step S24: display the reasoning flow data and the reasoning result, and distinguishively display the target conclusion node and the multiple target branch nodes corresponding to the reasoning result.
[0063] After obtaining the reasoning flow data and the reasoning result, the target model displays the reasoning flow data and the reasoning result, and distinguishesively displays the target conclusion node and the multiple target branch nodes corresponding to the reasoning result, so as to emphasize the reasoning path with the maximum weight in this reasoning to the user.
[0064] The distinguishing display manner includes, but is not limited to, visual forms such as bold, highlight, color distinction, flicker, focus, etc. For example, as shown in FIG. 3, the entire reasoning path corresponding to the target conclusion node 2 can be displayed in bold to distinguish.
[0065] Through the display of the reasoning flow data, the user can be presented with multiple reasoning paths, and each key node affecting the reasoning result is comprehensively identified. Meanwhile, the reasoning flow data also presents each unselected branch node and the possible subsequent direction of the branch node. By showing the user the reasoning flow data in a network structure, it is helpful for the user to analyze, understand and evaluate the decision path of the target model, improve the transparency and interpretability, so as to help the user effectively adjust the reasoning instruction content when the model result does not meet the expectation, improve the accuracy and reliability of the target model reasoning again, and speed up the efficiency of obtaining the expected model output result of the target model.
[0066] Step S25: In response to receiving the adjustment instruction of the basic branch node, it is judged whether the basic branch node has a corresponding basic conclusion node.
[0067] After the reasoning flow data and the reasoning result are displayed to the user, the embodiment can also receive the user's modification and adjustment of the reasoning flow data, so that the user can obtain the expected model result by directly controlling the reasoning path, and speed up the reasoning efficiency.
[0068] The multiple conclusion nodes in the reasoning flow data include a target conclusion node and multiple basic conclusion nodes; and the multiple branch nodes include multiple target branch nodes and multiple basic branch nodes. The target conclusion node and the target branch node refer to the nodes on the reasoning path corresponding to the final reasoning result of the target model in this reasoning, and the basic conclusion node and the basic branch node refer to the nodes not corresponding to the final reasoning result. For example, as shown in FIG. 3, when the conclusion node 2 is the target conclusion node, the conclusion node 1 and the conclusion node 3 are basic conclusion nodes. The branch node B, the branch node B1, the branch node B1.2, the branch node B1.2.2 are target branch nodes, and the other branch nodes are basic branch nodes.
[0069] When the adjustment instruction of the basic branch node is received, it indicates that the user thinks that the current reasoning result does not meet his expectation, and thinks that the basic branch node can produce a reasoning result meeting his expectation, so the adjustment instruction is issued for the basic branch node. The user can issue the adjustment instruction by clicking or long-pressing the basic branch node on the displayed reasoning flow data, or by inputting the label of the basic branch node. The specific manner is not limited here.
[0070] The step first judges whether the basic branch node has a corresponding basic conclusion node. Due to the limitation of the computing power of the target model or the limitation of the hardware actually relied on by the target model, there may be a case that part of the basic branch nodes have no subsequent reasoning. Therefore, it is first judged whether the basic branch node has a corresponding final basic conclusion node.
[0071] Step S26: When the basic branch node has a corresponding basic conclusion node, the basic branch node and its corresponding branch node and conclusion node are displayed differently, and a new reasoning result is generated based on the basic branch node and its corresponding branch node and conclusion node.
[0072] In a specific application scenario, as shown in FIG. 3, if the user issues an adjustment instruction for the branch node A1.1.2, and the branch node A1.1.2 has a corresponding conclusion node 1, the branch node A1.1.2 and its corresponding branch node A, branch node A1, branch node A1.1 and conclusion node 1 are displayed differently. The nodes on the original reasoning path corresponding to the target conclusion node can continue to be displayed differently or no longer be displayed differently.
[0073] The display-differentiating manner includes, but is not limited to, visual forms such as bold, highlight, color differentiation, flashing, focusing, etc.
[0074] Step S27: When the basic branch node has no corresponding basic conclusion node, the target model continues to reason based on the basic branch node until a conclusion node corresponding to the basic branch node is obtained, the basic branch node and its corresponding branch node and conclusion node are displayed differently, and a new reasoning result is generated based on the basic branch node and its corresponding branch node and conclusion node.
[0075] In a specific application scenario, as shown in FIG. 3, if the user issues an adjustment instruction for the branch node A2, and the branch node A2 has no corresponding basic conclusion node, the target model continues to reason based on the branch node A2 until a conclusion node corresponding to the branch node A2 is obtained, and the branch node A2 and its corresponding branch node and conclusion node are displayed differently.
[0076] Please further refer to FIG. 4, which is a schematic diagram of an embodiment of the reasoning flow data after adjustment of FIG. 3.
[0077] Assuming that the branch node A2 subsequently generates the branch node A2.1, the branch node A2.1.1 and the conclusion node 4, the branch node A, the branch node A2, the branch node A2.1, the branch node A2.1.1 and the conclusion node 4 are displayed differently.
[0078] The nodes on the original reasoning path corresponding to the conclusion node 2 can be cancelled from being displayed differently.
[0079] The distinguishing display manner includes, but is not limited to, visual forms such as bold, highlight, color distinction, flicker, focus, etc.
[0080] The method, after receiving the adjustment instruction of the basic branch node, selects the whole reasoning path corresponding to the basic branch node for distinguishing display, so that the user can select or reselect different reasoning paths to obtain a new reasoning result. This is beneficial for the user to compare and view the difference between the selected branch nodes and the reasoning result, and the reasoning path of the new reasoning result is adjusted by the user himself, which is more in line with the user's expectation. Therefore, the target model can obtain the user's expected reasoning result more quickly, and the efficiency of the target model reasoning is improved.
[0081] Step S28: In response to receiving a fusion instruction between at least two branch nodes, the at least two branch nodes are fused by the target model to generate a fusion node, and the fusion node is used to continue reasoning until a conclusion node corresponding to the fusion node is obtained. The branch nodes corresponding to the fusion node and the conclusion node are distinguished and displayed, and a new reasoning result is generated based on the branch nodes corresponding to the fusion node and the conclusion node.
[0082] The user can also fuse at least two branch nodes to generate a new reasoning path and a new reasoning result. This fusion can be applied to artistic directions such as writing, painting, and music composition for creative design. In operation, the user can take a certain branch node as a base point and drag other branch nodes that need to be fused to the branch node, thereby issuing a fusion instruction between the branch nodes.
[0083] Wherein, after the fusion of at least two branch nodes, a new fusion node is added, and the target model continues to reason based on the fusion node until a conclusion node corresponding to the fusion node is obtained. The branch nodes corresponding to the fusion node and the conclusion node are distinguished and displayed, and a new reasoning result is generated based on the fusion node and its corresponding branch nodes and conclusion nodes.
[0084] Please refer to FIG. 5, which is a schematic diagram of an embodiment of the reasoning flow data fusion of FIG. 3.
[0085] Assuming that the branch node B1.1 is fused with the branch node A1.1.2 to generate a new fusion node E, the target model continues to reason based on the fusion node E to generate a branch node E1 and a conclusion node 5. The branch nodes A, A1, A1.1, A1.1.2, B, B1, B1.1, E, E1, and 5 corresponding to the fusion node E are distinguished and displayed, and a new reasoning result is generated based on the above nodes.
[0086] And the original conclusion node 2 corresponding to the reasoning path can be distinguished.
[0087] The above method, the user's interaction behavior on the node, not only contains the rollback selection and re-selection of the node, but also contains the re-integration of the linear nodes of different branches, so that the user can select at least two branch nodes, and under the condition that the algorithm logic allows, a new reasoning path and the corresponding fusion node are generated. According to the above path, repeated or cyclic operation can be performed on the reasoning process to explore and deduce the results more widely possible to meet the user's multiple requirements for the reasoning results.
[0088] The display of the reasoning process data not only presents the branch nodes selected or not selected in this reasoning process, but also presents the subsequent direction of these branch nodes, including the direction connected to another unselected branch node after the path detours, the direction re-rounded back to the selected node after the path detours, and the direction of the corresponding conclusion node generated subsequently, and through node fusion, the unknown direction of the current node can also be generated to carry out creative reasoning.
[0089] Step S29: In response to receiving the focusing instruction of at least part of the reasoning result, determining the branch node corresponding to at least part of the reasoning result based on the focusing instruction; synchronously distinguishing and displaying at least part of the reasoning result and the branch node corresponding thereto.
[0090] The embodiment simultaneously displays the reasoning process data and the reasoning result. When the user issues a focusing instruction on at least part of the reasoning result, the embodiment determines the branch node corresponding to at least part of the reasoning result based on the focusing instruction; synchronously distinguishes and displays at least part of the reasoning result and the branch node corresponding thereto. The user can issue a focusing instruction by clicking the end of at least part of the reasoning result.
[0091] Please refer to FIG. 6, which is a schematic diagram of an embodiment of the focusing display of the reasoning process data and the reasoning result.
[0092] When the cursor 61 focuses on the reasoning result 60, the part of the reasoning result based on the position of the cursor 61 is focused, that is, the reasoning result before the position of the cursor 61 is considered as the part of the reasoning result that the user thinks needs to be focused, and the part of the reasoning result is distinguished and displayed, and the branch node B, the branch node B1 and the branch node B1.2 corresponding to the part of the reasoning result in the reasoning process data are synchronously distinguished and displayed, so that the user knows that the reasoning logic of the part of the reasoning result is determined by the above corresponding branch node.
[0093] In a specific application scenario, when the inference instruction is to require the target model to summarize the content of a book, the inference result 60 is a summarized text content, and the user issues a focus instruction for part of the summarized text content. At this time, the part of the summarized text content is displayed differently, and the branch node in the inference process data that infers the part of the summarized text content is also displayed differently, so that the user knows the inference logic of the part of the summarized text content.
[0094] In other application scenarios, when the inference instruction is to require the target model to draw, the inference result 60 is a specific drawing image, and when a focus instruction is issued for a specific drawing image object or background or other drawing area, the part of the area is displayed differently, such as highlighted or flashing, and the branch node in the inference process data that infers the part of the drawing area is also displayed differently, so that the user knows the inference logic of the part of the drawing area. The specific inference scenario is not limited here.
[0095] The above method further improves the transparency and understandability of the target model decision, improves the user's understanding of the current inference logic of the target model, helps the user to analyze, understand and evaluate the decision path of the target model, and thus helps the user to effectively adjust the inference instruction content when the model result does not meet the expectation, improves the accuracy and reliability of the target model inference again, and speeds up the efficiency of the target model to get the expected model output result.
[0096] Through the above method, when the inference instruction is received for data inference, the embodiment records the decision branch node each time a decision scenario that may generate an inference branch is encountered in the inference process, obtains a plurality of branch nodes and subsequent conclusion nodes in cascade, generates inference process data and an inference result. When the target model outputs the inference result to the user, the inference process data is also output synchronously, and the inference process data can be displayed to the user in a visualized manner such as a mesh, a tree, a mind map or other types. The linear dialogue form of the target model is converted into an interactive mesh structure that can be widely explored, so that the user can know the inference logic and inference selection of the target model through the inference process data, which helps the user to analyze, understand and evaluate the decision path of the target model, improves the transparency and interpretability, and thus helps the user to effectively adjust the inference instruction content when the model result does not meet the expectation, improves the accuracy and reliability of the inference of the target model again, and speeds up the efficiency of obtaining the model output result that meets the expectation. After the display, the embodiment also receives the adjustment instruction, the fusion instruction and the focus instruction of the user, so that the user can back up, reselect and re-integrate the key nodes, thereby providing the user with the function of controlling the inference path of the target model, improving the directivity and efficiency of interacting with the target model, and making the inference result of the target model have a wider possible exploration, thereby generating new "creation possibilities" to meet more inference needs of the user. The user can also clearly see the adjusted inference path based on the inference process data and understand how the target model makes decisions. The setting of the mark and the node display help the user to analyze, understand and evaluate the decision path of the target model, improve the transparency and interpretability, and help to track and monitor the decision process of the target model.
[0097] Please refer to FIG. 7, which is a schematic diagram of the framework of an embodiment of the interactive device of the target model. The interactive device of the target model of the embodiment is applied to the target model interactive method of any of the above embodiments.
[0098] The interactive device 70 of the target model comprises an acquisition module 71, an inference module 72 and a display module 73. The acquisition module 71 is used to acquire the inference instruction; the inference module 72 is used to perform data inference based on the inference instruction by the target model, to obtain inference process data and an inference result; wherein the inference process data comprises a plurality of branch nodes and a plurality of conclusion nodes in cascade in the data inference process; and the display module 73 is used to display the inference process data and the inference result.
[0099] The scheme can display the inference process data and the inference result, so that the user knows the inference logic and inference selection of the target model, helps the user to analyze, understand and evaluate the decision path of the target model, improves the transparency and interpretability, and accelerates the efficiency of obtaining the expected model output result of the target model.
[0100] The display module 73 is further configured to display the inference process data and the inference result, and distinguishively display the target conclusion node and the plurality of target branch nodes corresponding to the inference result.
[0101] The acquisition module 71 is further configured to receive an adjustment instruction of the basic branch node, and the inference module 72 is further configured to determine whether the basic branch node has a corresponding basic conclusion node; when the basic branch node has the corresponding basic conclusion node, the display module 73 is configured to distinguishively display the basic branch node and the branch node and the conclusion node corresponding to the basic branch node, and the inference module 72 is configured to generate a new inference result based on the basic branch node and the branch node and the conclusion node corresponding to the basic branch node; when the basic branch node does not have the corresponding basic conclusion node, the inference module 72 is further configured to continue to infer based on the target model and the basic branch node until a conclusion node corresponding to the basic branch node is obtained, the display module 73 is configured to distinguishively display the basic branch node and the branch node and the conclusion node corresponding to the basic branch node, and the inference module 72 is configured to generate a new inference result based on the basic branch node and the branch node and the conclusion node corresponding to the basic branch node.
[0102] The acquisition module 71 is further configured to receive a fusion instruction between at least two branch nodes, the inference module 72 is further configured to fuse the at least two branch nodes to generate a fusion node based on the target model, and continue to infer based on the fusion node until a conclusion node corresponding to the fusion node is obtained, the display module 73 is further configured to distinguishively display the branch node and the conclusion node corresponding to the fusion node, and the inference module 72 is further configured to generate a new inference result based on the branch node and the conclusion node corresponding to the fusion node.
[0103] The acquisition module 71 is further configured to receive a focusing instruction of at least part of the inference result, the inference module 72 is further configured to determine the branch node corresponding to the at least part of the inference result based on the focusing instruction, and the display module 73 is further configured to distinguishively display the at least part of the inference result and the branch node corresponding to the at least part of the inference result.
[0104] The reasoning module 72 is further configured to perform data reasoning based on the reasoning instruction through the target model, generate a plurality of branch nodes, and perform reasoning based on the plurality of branch nodes to obtain a plurality of conclusion nodes; mark each branch node, and record the association relationship between each branch node and the association relationship between each conclusion node and the corresponding branch node to obtain reasoning process data; and determine a target conclusion node from the plurality of conclusion nodes, and generate a reasoning result based on the target conclusion node and the plurality of branch nodes corresponding to the target conclusion node.
[0105] The reasoning module 72 is further configured to perform data reasoning based on the reasoning instruction through the target model, generate a plurality of initial branch nodes; and select a plurality of branch nodes from the plurality of initial branch nodes based on a preset requirement.
[0106] The reasoning module 72 is further configured to sort the weights of each initial node, and select a plurality of branch nodes in descending order that meet the quantity requirement; or obtain a weight threshold of the target model; determine an initial node with a weight greater than or equal to the weight threshold in the plurality of initial branch nodes as a branch node, and hide an initial node with a weight less than the weight threshold to obtain the plurality of branch nodes.
[0107] In some embodiments, the reasoning module 72 includes a processing submodule 721, a storage submodule 723, and a control submodule 722. The processing submodule 721 is connected to the obtaining module 71, the storage submodule 723, and the control submodule 722 respectively, and the control submodule 722 is further connected to the display module 73. The processing submodule 721 is configured to perform data reasoning based on the reasoning instruction, generate a plurality of initial branch nodes, and mark each node until a corresponding conclusion node is obtained to generate a reasoning result. The storage submodule 723 is configured to store each node and the marking information thereof. The control submodule 722 is configured to select the plurality of initial branch nodes, classify and group the marking information to obtain a plurality of branch nodes, generate reasoning process data by comprehensively considering the plurality of branch nodes and the plurality of conclusion nodes, and send the reasoning process data and the reasoning result to the display module 73.
[0108] In a specific application scenario, the obtaining module 71 obtains the reasoning instruction of the user, and reports the reasoning instruction to the processing submodule 721. The processing submodule 721 performs data reasoning based on the reasoning instruction, generates a plurality of initial branch nodes, and marks each node until a corresponding conclusion node is obtained to generate a reasoning result. In this process, the storage submodule 723 stores each node and the marking information thereof. The control submodule 722 selects the plurality of initial branch nodes, classifies and groups the marking information to obtain a plurality of branch nodes, generates reasoning process data by comprehensively considering the plurality of branch nodes and the plurality of conclusion nodes, and sends the reasoning process data and the reasoning result to the display module 73. Finally, the display module 73 displays the reasoning process data and the reasoning result.
[0109] The acquisition module 71 is further configured to acquire the adjustment instruction, the fusion instruction and the focus instruction of the user, and repeat the above execution process to implement the adjustment reasoning process data and the reasoning result according to the specific instruction content of the user.
[0110] The above method provides the user with the function of controlling the reasoning path of the target model, improves the directionality and efficiency of interaction with the target model, and makes the reasoning result of the target model produce more extensive possible exploration to meet more reasoning needs of the user.
[0111] Based on the same inventive concept, the present application further provides an electronic device capable of being executed to implement the target model interaction method of any of the above embodiments. Please refer to FIG. 8, which is a structural schematic diagram of an embodiment of the electronic device provided by the present application. The electronic device comprises a processor 81 and a memory 82.
[0112] The processor 81 is configured to execute the program instructions stored in the memory 82 to implement the steps of the target model interaction method described above. In a specific implementation scenario, the electronic device can include but is not limited to a microcomputer, a server, and in addition, the electronic device can also include a notebook computer, a tablet computer and other mobile devices, which are not limited here.
[0113] Specifically, the processor 81 is configured to control itself and the memory 82 to implement the steps of any of the above embodiments. The processor 81 can also be referred to as a processor (Central Processing Unit, central processing module). The processor 81 can be an integrated circuit chip with signal processing capability. The processor 81 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. In addition, the processor 81 can be implemented by an integrated circuit chip together.
[0114] The above scheme improves the transparency and explainability of the reasoning path of the target model, which is beneficial to improve the efficiency of the target model to generate model output results meeting the user's expectations.
[0115] Based on the same inventive concept, the present application also provides a computer readable storage medium. Please refer to Fig. 9, which is a structural diagram of an embodiment of the computer readable storage medium provided by the present application. The computer readable storage medium 90 stores at least one program data 91, which is used to implement any of the above methods. In one embodiment, the computer readable storage medium 90 includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage media that can store program codes.
[0116] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, another division mode can be adopted. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0117] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0118] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0119] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
[0120] The above merely describes the embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, which is made according to the content of the present application specification and drawings, is also included in the patent protection scope of the present application.
Claims
1. An interactive method of a target model, wherein, The method comprises: obtaining inference instructions; performing data inference based on the inference instructions through a target model to obtain inference process data and inference results, wherein the inference process data comprises a plurality of branch nodes and a plurality of conclusion nodes concatenated in the data inference process; displaying the inference process data and the inference results.
2. The method of claim 1, wherein, The data inference based on the inference instructions through the target model to obtain the inference process data and the inference results comprises: generating a plurality of branch nodes based on the inference instructions through the target model, and obtaining a plurality of conclusion nodes based on the plurality of branch nodes; labeling each branch node and recording the association relationship between each branch node and the association relationship between each conclusion node and the corresponding branch node to obtain the inference process data; determining a target conclusion node from the plurality of conclusion nodes, and generating the inference results based on the target conclusion node and the plurality of branch nodes corresponding to the target conclusion node.
3. The object model interaction method of claim 1 or 2, wherein, The displaying of the inference process data and the inference results comprises: displaying the inference process data and the inference results, and displaying the target conclusion node corresponding to the inference results and a plurality of target branch nodes in a distinguished manner.
4. The method of claim 3, wherein, The plurality of conclusion nodes comprise a target conclusion node and a plurality of basic conclusion nodes; The plurality of branch nodes comprise a plurality of target branch nodes and a plurality of basic branch nodes; After the displaying of the inference process data and the inference results, the method comprises: in response to receiving an adjustment instruction of a basic branch node, determining whether the basic branch node has a corresponding basic conclusion node; when the basic branch node has a corresponding basic conclusion node, displaying the basic branch node and the branch nodes and conclusion nodes corresponding to the basic branch node in a distinguished manner, and generating new inference results based on the basic branch node and the branch nodes and conclusion nodes corresponding to the basic branch node; when the basic branch node does not have a corresponding basic conclusion node, continuing to perform inference based on the target model based on the basic branch node until a conclusion node corresponding to the basic branch node is obtained, displaying the basic branch node and the branch nodes and conclusion nodes corresponding to the basic branch node in a distinguished manner, and generating new inference results based on the basic branch node and the branch nodes and conclusion nodes corresponding to the basic branch node.
5. The object model interaction method of claim 1 or 2, wherein, After the displaying of the inference process data and the inference results, the method further comprises: in response to receiving a fusion instruction between at least two branch nodes, fusing the at least two branch nodes through the target model to generate a fusion node, and continuing to perform inference based on the fusion node until a conclusion node corresponding to the fusion node is obtained, displaying the branch nodes and conclusion nodes corresponding to the fusion node in a distinguished manner, and generating new inference results based on the branch nodes and conclusion nodes corresponding to the fusion node.
6. The object model interaction method of claim 1 or 2, wherein, The displaying of the inference process data and the inference results further comprises: in response to receiving a focusing instruction of at least part of the inference results, determining branch nodes corresponding to the at least part of the inference results based on the focusing instruction; The inference results and corresponding branch nodes are displayed synchronously.
7. The object model interaction method of claim 2, wherein, The target model performs data inference based on the inference instruction to generate a plurality of branch nodes. The target model performs data inference based on the inference instruction to generate a plurality of initial branch nodes. The plurality of branch nodes are selected from the plurality of initial branch nodes based on preset requirements.
8. The method of claim 7, wherein, The inference instruction comprises a quantity requirement of branch nodes in the inference flow data; The preset requirement is to meet the quantity requirement; The plurality of branch nodes are selected from the plurality of initial branch nodes based on the preset requirement, comprising: sorting the weights of the initial nodes in descending order, and selecting a plurality of branch nodes that meet the quantity requirement in descending order; or The preset requirement is to meet a weight threshold; and the plurality of branch nodes are selected from the plurality of initial branch nodes based on the preset requirement, comprising: obtaining the weight threshold of the target model; determining an initial node with a weight greater than or equal to the weight threshold in the plurality of initial branch nodes as the branch node, and hiding an initial node with a weight less than the weight threshold to obtain the plurality of branch nodes.
9. An interactive device for a target model, wherein, comprising: An obtaining module is configured to obtain an inference instruction; An inference module is configured to perform data inference based on the inference instruction by a target model to obtain inference flow data and inference results; wherein the inference flow data comprises a plurality of branch nodes and a plurality of conclusion nodes concatenated in the data inference process; A display module is configured to display the inference flow data and the inference results.
10. An electronic device, comprising: The electronic device comprises a memory and a processor coupled to each other, and the processor is configured to execute program instructions stored in the memory to implement the method of claim 1 to 8.
11. A computer readable storage medium, wherein, The computer readable storage medium stores program data, and the program data can be executed by the processor to implement the method of claim 1 to 8.
Citation Information
Patent Citations
Conversation processing method and device and electronic equipment
CN116127036A
Intelligent customer service language model optimization method and system for instruction enhancement based on Monte Carlo tree search
CN118170884A
Target model interaction method and device, electronic equipment and storage medium
CN119443304A
Interactive visualization of big data sets and models including textual data
US20150019569A1
Interactive decision tree modification
US20220358399A1