Multi-agent-based tax affair question-answering system implementation method and device and storage medium

By using the LangGraph framework to implement a multi-agent tax question-and-answer system, dynamic routing and conditional branching control the meeting process, and expert agents are activated on demand, the system solves the problems of high resource consumption and fixed processes of the AutoGen framework, and realizes a flexible tax question-and-answer system.

CN121037147APending Publication Date: 2025-11-28SHENZHEN WEIZHONG TAXATION INFORMATION SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511182666.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-22
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

The existing AutoGen framework consumes high resources and has a fixed process in multi-agent collaboration, making it difficult to flexibly orchestrate complex task processes. In particular, it cannot flexibly insert new agents to handle user authorization and information acquisition in tax question-and-answer systems.

Method used

A multi-agent tax question-and-answer system based on the LangGraph framework is adopted. Through dynamic routing and conditional branching edges of the host control node, participant nodes, meeting control node and meeting summary node, flexible meeting flow control is achieved. Expert agents are only activated when selected, reducing resource consumption.

Benefits of technology

It enables flexible control of agent workflows in a tax Q&A system, reduces resource consumption, simulates human meeting discussions, and improves the flexibility and efficiency of multi-agent collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121037147A_ABST
    Figure CN121037147A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-agent-based tax question and answer system implementation method and device and a storage medium, and the method comprises the steps: setting a host field control node, a conference participant node, a conference control node and a conference summary node in a tax question and answer system based on a first framework, the host field control node, the conference participant node, the conference control node and the conference summary node are used for controlling the conference process of the tax question-answering system; executing the conference process based on the host field control node, indicating the participant node to activate the expert agent therein to execute the conference process, and writing the execution result of the conference process into the public state which can be accessed by each node; and the conference control node detects a termination condition in real time, if the termination condition is not detected to be triggered, the conference control node is routed to the host field control node and the conference process is repeatedly executed, and otherwise, the conference control node is routed to the conference summary node to end the conference process. Therefore, the intelligent agent can realize the conference process of the tax question-answering system through the loop structure.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, in particular to a tax question and answer system implementation method based on multiple agents, equipment and a storage medium. BACKGROUND

[0002] At present, the agent workflow constructed based on the AutoGen framework supports dynamic group chat communication, which is realized by dynamically selecting a speaker, collecting the responses of the speaker and broadcasting the message. Specifically, a core agent is responsible for the entire process, and other agents are responsible for accepting information and returning the results to the main agent, so that the participating agents share the same context and have a dynamic conversation.

[0003] However, the group chat mode of the AutoGen framework broadcasts the speech of each agent to other agents, which increases the resource consumption of communication; at the same time, the AutoGen framework completes the task through a pre-set code generation logic, the process is relatively fixed and the arrangement ability is limited, and it is difficult to expand the process to realize more complex functions.

[0004] Therefore, how to flexibly arrange multiple agents to solve complex problems and reduce resource consumption when agents cooperate has become a problem to be solved. SUMMARY

[0005] The present application provides a tax question and answer system implementation method based on multiple agents, equipment and a storage medium, which completes complex work by setting an agent workflow simulating a human conference process. The technical solution is as follows:

[0006] In a first aspect, a tax question and answer system implementation method based on multiple agents is provided, which includes: setting a host control node, a participant node, a conference control node and a conference summary node in a tax question and answer system based on a first framework, wherein the host control node and the participant node are provided with a first conditional branch edge, the conference control node to the host control node is provided with a second conditional branch edge, and the conference control node to the conference summary node is provided with a third conditional branch edge. The host control node, the participant node, the conference control node and the conference summary node are used to control the conference process of the tax question and answer system; based on the host control node, the conference process is executed, the participant node is determined as a node for subsequent routing, the participant node activates the expert agent therein to execute the conference process, and the execution result of the conference process is written into a public state accessible by each node; based on the conference control node, a termination condition is detected in real time, if the termination condition is not triggered, the host control node is routed to, and the conference process is repeatedly executed, otherwise, the conference control node is routed to the conference summary node to generate a conference conclusion, and the conference process is ended.

[0007] In combination with the first aspect, the participant node comprises the expert agent and a tool, wherein the expert agent is bound to a preset model, and is provided with an interface, a name and a prompt word comprising the model; and the tool is bound to a preset functional component, and the functional component comprises a network search tool, a calculator and a two-dimensional code generator.

[0008] In combination with the first aspect, in some embodiments of the first aspect, the participant node activates the expert agent therein to execute the conference process, comprising: the expert agent remains in a dormant state and does not participate in processing the public state when not activated; and the expert agent reads the public state and calls the model or the tool to execute the conference process when activated.

[0009] In combination with the first aspect, the termination condition comprises: a number of rounds of the conference process exceeding a preset maximum round threshold; a cumulative number of context tokens of the conference process exceeding a model limit; a duration of the conference process exceeding a set maximum time length; or the participant node returning a predefined end instruction text.

[0010] In combination with the first aspect, the moderator control node is further provided with a fourth conditional branch edge routed to the conference summary node, and after the moderator control node executes the conference process, the method further comprises: the moderator control node analyzes the effectiveness of historical speeches of the participant node in the public state through a feedback mechanism to generate an analysis result; evaluates the rationality of the speaking order through a self-reflection strategy to generate an evaluation result; and determines a subsequent routed node based on the analysis result and the evaluation result.

[0011] In combination with the first aspect, after the conference process is executed based on the moderator control node, the method further comprises: pushing the speaking content of each node to a user interface in real time, and the user interface displays the role avatar, name, model type and speaking content corresponding to each node in a dialogue form.

[0012] In combination with the first aspect, the method further comprises an extended workflow step, and the workflow step comprises: setting a pre-conference work node before the moderator control node executes the conference process, and the pre-conference work node sets information comprising network search information and conference opening information in the public state; and setting a post-conference work node after the conference summary node ends the conference process, and the post-conference work node generates a long-term record of a conference minutes.

[0013] It should be noted that the features in the various embodiments of the first aspect can be combined with each other without conflict, and any combination of features in different embodiments is also within the protection scope of the present application, that is, the above-described multiple embodiments can also be combined as needed.

[0014] In a second aspect, a multi-agent tax question and answer system is provided, comprising:

[0015] a public state module configured to store a public state comprising meeting information;

[0016] a node setting module configured to set a meeting summary node, a participant node, a host control node, and a meeting control node via a first framework, wherein

[0017] the meeting summary node is configured to indicate a meeting end, summarize meeting content, and generate a meeting conclusion;

[0018] the participant node is composed of an expert agent and a tool, and is configured to execute a meeting process of the tax question and answer system to generate speech content, wherein the expert agent executes the meeting process according to the public state of the current meeting after being selected;

[0019] the host control node is configured to dynamically determine a node for subsequent routing according to the public state and characteristics of the participant node, including selecting the participant node to continue the meeting process, or selecting the meeting summary node to terminate the meeting process;

[0020] the meeting control node is configured to detect a termination condition in real time, if the termination condition is not met, the meeting control node is routed to the host control node to continue the meeting process, if the termination condition is met, the meeting control node is routed to the meeting summary node to end the meeting process;

[0021] a conditional branch edge setting module configured to set a first conditional branch edge from the host control node to the participant node based on the first framework, set a second conditional branch edge from the meeting control node to the host control node, set a third conditional branch edge from the meeting control node to the meeting summary node, and set a fourth conditional branch edge from the host control node to the meeting summary node, the host control node, the participant node, the meeting control node, and the meeting summary node are configured to control the meeting process;

[0022] a user interface module configured to display speech content and information of each node in real time;

[0023] an extended workflow module configured to set a pre-meeting work node before the host control node executes the meeting process, the pre-meeting work node is configured to set networking search information and meeting opening speech information in the public state module, and set a post-meeting work node after the meeting summary node ends the meeting process, the post-meeting work node is configured to generate a long-term record of a meeting minutes.

[0024] In a third aspect, a computer is provided, comprising one or more memories, one or more processors; the memory is coupled to the one or more processors, the memory is configured to store computer program codes, the computer program codes comprise computer instructions, the one or more processors invoke the computer instructions, so that the computer implements the method according to the first aspect or any one of the implementation forms of the first aspect.

[0025] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer instructions, and the computer instructions are executed by a processor to implement the method according to the first aspect or any one of the implementation forms of the first aspect.

[0026] In a fifth aspect, a chip is provided, and the chip is applied to a computer, and the chip comprises one or more processors, and the processor is configured to invoke computer instructions to make the computer execute the method according to the first aspect or any one of the implementation forms of the first aspect.

[0027] In the embodiments of the present application, the expert agent provided by the present application can simulate human conference discussion through a circulation process, and determine whether the conference process continues after the agent speaks, so that the work flow of the agent can be flexibly controlled; at the same time, the agent only activates the acquisition of the historical speech information of other agents when called, so as to reduce the resources consumed when multiple agents discuss. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0029] Figure 1 is a working flow schematic diagram of a multi-agent tax question and answer system provided by the embodiments of the present application;

[0030] Figure 2 is a method flowchart of a multi-agent tax question and answer system provided by the embodiments of the present application;

[0031] Figure 3 is a schematic diagram of a user interface of a multi-agent tax question and answer system provided by the embodiments of the present application;

[0032] Figure 4 is a method flowchart of another multi-agent tax question and answer system provided by the embodiments of the present application;

[0033] Figure 5 is a module schematic diagram of a multi-agent tax question and answer system provided by the embodiments of the present application;

[0034] Figure 6 Fig. 1 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present application;

[0035] Figure 7 Fig. 2 is a schematic diagram of a computer readable storage medium according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0037] It should be understood that the "multiple" mentioned in the present application refers to two or more. In the description of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; "and / or" in the present application only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. In addition, in order to clearly describe the technical solutions of the present application, the same items or similar items with basically the same functions and roles are distinguished by using "first", "second", etc. The skilled in the art can understand that "first", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. also do not necessarily mean different.

[0038] The phrases "one embodiment" or "some embodiments" appearing in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Therefore, the phrases "in one embodiment", "in some embodiments", "in other some embodiments", "in other embodiments" appearing in the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. In addition, the terms "include", "contain", "have" and their variants mean "include but not limited to", unless otherwise specifically emphasized.

[0039] The current intelligent agent workflow cannot meet the cooperation of multiple intelligent agents in complex scenarios. For example: in the scenario of multiple intelligent agents analyzing personal income tax, it may be found during the discussion that user authorization is needed to obtain personal income information to continue the analysis, but in the case of intelligent agent speaking process determination, a new intelligent agent cannot be inserted to obtain user authorization and user income information in the middle, and only the corresponding arrangement of tax for different situations of personal income can be made. In this way, the arrangement and cooperation of multiple intelligent agents consume more resources, and the arrangement mode of multiple intelligent agents is fixed, lacking sufficient flexibility.

[0040] To solve the technical problems above, the embodiments of the present application provide a multi-agent-based tax question-answering system implementation method, device and storage medium, which comprises: setting a host control field node, a participant node, a conference control node and a conference summary node in a tax question-answering system based on a first framework, wherein the host control field node and the participant node are provided with a first conditional branch edge, the conference control node and the host control field node are provided with a second conditional branch edge, the conference control node and the conference summary node are provided with a third conditional branch edge, and the host control field node, the participant node, the conference control node and the conference summary node are used to control the conference process of the tax question-answering system; executing the conference process based on the host control field node, determining the participant node as a node for subsequent routing, activating an expert agent in the participant node to execute the conference process, and writing the execution result of the conference process into a public state accessible by each node; detecting a termination condition in real time based on the conference control node, if the termination condition is not detected, routing to the host control field node to repeat the execution of the conference process, otherwise, the conference control node routes to the conference summary node to generate a conference conclusion and ends the conference process; and displaying the speech content and information of each node in real time through a user interface.

[0041] In this way, the expert agents participating in the discussion in the tax question-answering system can simulate human conference discussions through a cycle process, and can determine whether to continue the conference process after the agents speak, so that the workflow of the agents can be flexibly controlled; the agents only activate the historical speech information of other agents when called, which reduces the resources (such as the number of tokens for data transmission) consumed when multiple agents discuss.

[0042] The multi-agent-based tax question-answering system implementation method, device and storage medium provided by the present application are described below through three embodiments, embodiment one describes the workflow of the multi-agent tax question-answering system, embodiment two describes the method flow of the conference implementation of the multi-agent-based tax question-answering system, and embodiment three describes the module structure, computer device hardware structure and computer storage medium for executing the multi-agent tax question-answering system.

[0043] Embodiment one

[0044] Figure 1 is a workflow schematic diagram of a multi-agent tax question-answering system provided by the embodiments of the present application. As shown in the figure, the workflow of the multi-agent tax question-answering system comprises the following steps: Figure 1As shown, a workflow of the multi-agent tax question and answer system is built based on the first framework, including a pre-meeting workflow 140, a host control field node 100, a meeting control node 110, a meeting summary node 120, a participant node 130 and a post-meeting workflow 150. Among them, the first conditional branch edge is arranged between the host control field node 100 and the participant node 130, the second conditional branch edge is arranged between the meeting control node 110 and the host control field node 100, the third conditional branch edge is arranged between the meeting control node 110 and the meeting summary node 120, the fourth conditional branch edge is arranged between the host control field node 100 and the meeting summary node 120, and the first conditional branch edge, the second conditional branch edge, the third conditional branch edge and the fourth conditional branch edge are used for routing the information of the connected nodes; the pre-meeting workflow 140, the host control field node 100, the participant node 130, the meeting summary node 120 and the post-meeting workflow 150 can display their own information (such as dialogue information, node identity information, corresponding model name, etc.) to the user through streaming output (such as displaying the output information to the user through the display interface).

[0045] In the embodiment of the present application, the first framework includes a LangGraph framework, and the first framework can be designed based on a directed acyclic graph (DAG) concept, and the data transmission (including the transmission of data, programs, models, etc. corresponding to each node) in the meeting process can be controlled by setting nodes (nodes) and edges (edges), and can support scenarios that require flexible arrangement of multi-agent applications.

[0046] In the embodiment of the present application, a cycle structure including the host control field node 100, the participant node 130 and the meeting control node 110 is built based on the first framework, wherein the participant node 130 is used to process the meeting process, and the meeting control node 110 is used to judge whether to return to the host control field node 100. Specifically, the host control field node 100 can receive the information of the meeting control node 110, and send information to the participant node 130 or the meeting summary node 120; the meeting control node 110 can receive the pre-meeting workflow 140, detect the state of the participant node 130 in real time, and detect whether the termination condition of the meeting is obtained: if the termination condition is not obtained, the meeting discussion continues to the host control field node 100; if the termination condition is obtained, the meeting discussion ends at the meeting summary node 120; the participant node 130 includes an expert agent 131 and a tool 132, which can receive the conference process indicated by the host control field node 100, activate the corresponding expert agent 131 and tool 132 to speak, and stream the speech content to the user.

[0047] In the embodiments of the present application, the moderator control field node 100 can serve as the moderator of the multi-agent discussion conference. According to the current public state of the conference and the characteristics of the participants (i.e., multi-agents), the next speaker (i.e., participant) is selected. If the moderator control field node 100 determines to start or continue the conference process, it is routed to the participant node 130. If the moderator control field node 100 determines to end the conference process, it is routed to the conference summary node 120.

[0048] It should be noted that the moderator can be composed of one or more different agents, which dynamically determine who the next speaker is according to the current conference situation and the characteristics of the participants. For example, the moderator obtains the data collected by the first participant, determines to route to the second participant for analysis of the data, and generates an analysis report. The moderator can receive a user operation to end the conference or receive information from the reception conference control node 110 indicating that the conference is over, and determine to route to the conference summary node 120 to end the conference. In some embodiments, the moderator can also perform the opening remarks and conference summary.

[0049] In the embodiments of the present application, the participant node 130 is composed of all possible participating expert agents 131 (such as agent 1, agent 2, etc.) and tools 132 (such as network search tools, calculators, two-dimensional code generators, etc.). Among them, the expert agent 131 is only activated by the moderator (i.e., activated by the participant node) to obtain the public state of the conference to complete the corresponding task in the conference process. It is not necessary for each agent in the expert agent 131 to be aware of the conversation in real time, which saves resource consumption when multiple agents collaborate. For example, agent 1 in the expert agent 131 is activated, and agent 2 is not activated. The agent 1 can obtain the public state of the conference, and the agent 2 will not obtain the public state of the conference.

[0050] In the embodiments of the present application, the conference control node 110 is used to control whether the conference process is over. If the end condition is not met, the conference control node 110 is routed to the moderator control field node 100. If the end condition is met, the conference control node 110 is routed to the conference summary node 120 to end the conference process, thereby preventing the conference from going on indefinitely. The end conditions of the conference include the maximum number of dialogue rounds, the maximum number of context tokens, the maximum conference time, and the custom end condition.

[0051] In the embodiments of the present application, the conference summary node 120 is used to summarize the conference content after the conference ends and generate a conference conclusion.

[0052] In the embodiment of the present application, all nodes can access and modify the unified public state, and the meeting information in the public state is shared data information of all nodes. The meeting information includes information such as the profiles of all personnel of the meeting (i.e., all participating nodes, agents, etc.), the theme of the meeting, the historical record of the meeting, and the round of the meeting.

[0053] In the embodiment of the present application, the pre-meeting workflow 140 can supplement necessary information for the meeting discussion, such as using a network search to obtain background information, generating opening remarks prompt information, etc.; and the post-meeting workflow 150 can generate a long-term saved meeting minutes for the discussed meeting, etc. Among them, the pre-meeting workflow 140 and the post-meeting workflow 150 are optional workflows, and the user can make corresponding settings according to the problems discussed in the meeting.

[0054] It should be noted that the workflow of the multi-agent tax question and answer system in the embodiment of the present application is only taken as an example of the pre-meeting workflow 140, the host control field node 100, the participant node 130, the meeting control node 110, the meeting summary node 120, and the post-meeting workflow 150. The specific multi-agent tax question and answer system can have more or fewer agents or nodes. For example, the pre-meeting workflow 140 and the post-meeting workflow 150 are optional nodes, and the host control field node 100, the participant node 130, the meeting control node 110, and the meeting summary node 120 can constitute the workflow of the above multi-agent tax question and answer system. The specific implementation of the multi-agent tax question and answer system in the embodiment of the present application is not limited.

[0055] Embodiment two

[0056] Figure 2 is a method flowchart of a multi-agent tax question and answer system provided by the embodiment of the present application, applied to the multi-agent tax question and answer system as shown in Figure 1 and specifically includes the following steps:

[0057] S101. Design a public state.

[0058] In the embodiment of the present application, the meeting information of the multi-agent tax question and answer system is stored in the public state, and the meeting information includes but is not limited to the following contents: the profiles of all personnel of the meeting (i.e., all nodes, agents, etc. in the multi-agent tax question and answer system), the theme of the meeting, the historical record of the meeting, and the round of the meeting.

[0059] In the embodiment of the present application, each node in the multi-agent tax question and answer system can access and modify the public state. The public state can be used as a basis for the agent to speak in the meeting process, and can be used as an end condition for judging whether the meeting process is ended.

[0060] S102. Set up each node, agent, and tool.

[0061] In the embodiments of the present application, nodes, agents and tools in the multi-agent tax question and answer system are set, for example, moderator control field nodes, meeting control nodes, meeting summary nodes and participant nodes. Multiple agents and multiple tools can be set in the participant nodes. The multi-agent tax question and answer system can provide preset intelligent agents based on large models to the user, and the user can select corresponding large models as nodes, agents and tools. The nodes, agents and tools can also call corresponding large models by filling in the information of the application programming interface (API) of the large model.

[0062] S103. Input the required parameters before the meeting starts.

[0063] In the embodiments of the present application, the multi-agent tax question and answer system needs to set corresponding parameters before the meeting discussion, including: moderator basic configuration (such as avatar and name) in the multi-agent tax question and answer system, large model configuration (such as model calling interface address (base_url), model calling API key (api_key), model name, prompt word, etc.) corresponding to the moderator control field node, large model configuration corresponding to the meeting summary node, large model configuration (such as avatar, name, base_url, api_key, model name, prompt word, etc.) corresponding to the agent in the participant node, tools required to be called by the agent, conference theme, conference description and conference control node configuration (such as maximum dialogue round number, maximum context token number, maximum conference time or custom end condition, the custom end condition includes returning specified specific content by the participant agent, etc.), etc.

[0064] In some embodiments, the multi-agent tax question and answer system can also set pre-meeting workflows (such as network search, meeting opening speech) and post-meeting workflows (such as generating meeting minutes and persisting), and the specific parameters set by the multi-agent tax question and answer system in the embodiments of the present application are not limited.

[0065] S104. Dynamically build a workflow based on the first framework.

[0066] In the embodiments of the present application, the workflow is dynamically built based on the first framework, which can include the LangGraph framework. The workflow dynamically built by the LangGraph framework specifically includes the following steps:

[0067] 1. Based on the public state set in S101 step, input the parameters obtained in S103 step.

[0068] 2. Based on the setting of each node, agent and tool in S102 step, the parameters obtained in S103 step are input to generate the agents and tools in the participant node.

[0069] 3. Based on the add_node function in the LangGraph framework (which can be referred to as add_node), each node of the workflow in the multi-agent tax question answering system is set, including the moderator control field node, the meeting control node, the meeting summary node and the participant node.

[0070] 4. In the multi-agent based tax question answering system, the edges between each node in the workflow are set, i.e. the communication mode between each node is determined. When the communication between two nodes is direct, it can be realized by adding an ordinary edge (which can be referred to as add_edge) function, and the connection between the two nodes is an ordinary edge; when the communication between two nodes is based on a judgment condition, it can be realized by adding a conditional branch edge (which can be referred to as add_conditional_edges) function, and the connection between the two nodes is a conditional branch edge. Specifically, the communication relationship between each node can refer to the multi-agent tax question answering system in the foregoing Figure 1 , which will not be repeated here.

[0071] For example, the meeting control node determines whether the meeting continues or ends, which can be set by the add_conditional_edges function, and the moderator control field node selects the next speaker agent or summary node, which can also be set by the add_conditional_edges function. Among them, the large model in the moderator control field node can output the name of the next node based on the public state in the current meeting, and the moderator control field node is configured to route to the node corresponding to the name.

[0072] 5. By setting the interface (which can be referred to as set_entry_point) function, the entry (such as the entry node) of the multi-agent tax question answering system is set.

[0073] 6. By compiling (which can be referred to as compile) function, the dynamic workflow based on LangGraph framework is generated.

[0074] S105. Execute the workflow and display the information output by each node in the user interface in real time.

[0075] In the embodiments of the present application, the user inputs the demand, and the workflow is executed as in S104 step. Among them, the multi-agent tax question answering system can analyze the user demand through the meeting process form and output the information required by the user. At the same time, the multi-agent tax question answering system can detect the data information returned by each node in the meeting process, and output through streaming Figure 3The user interface of the front end shown.

[0076] Specifically, the user interface can display the head portrait, name, model name and speech content of the role corresponding to each node (or each agent) in turn, simulating the effect of multi-person dialogue.

[0077] It should be understood that, although the above Figure 2 The steps in the flowchart involved are displayed in turn according to the direction of the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise stated herein, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, as described above Figure 2 At least part of the steps involved in the flowchart can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.

[0078] Figure 3 is a schematic diagram of a multi-agent tax question and answer system user interface provided by an embodiment of the present application, as Figure 3 Based on the method shown in steps S101-S105 in the foregoing Figure 2 In the scenario of analyzing personal income tax, the multi-agent tax question and answer system can construct a conference process through multiple agents. Among them, the conference host (such as a large language model (LLM)) is the host control node, and the members are expert agents in the participant node, such as tax calculation personnel (such as a data calculation model) and tax analysts (such as a language model). The user interface displays the conference dialogue content of the user, the conference host and the members in turn according to the conference process. The specific process of analyzing personal income tax can be implemented through the following steps:

[0079] 1. The user initiates a tax question, for example, the user indicates the question "analyze my personal income tax this year", the conference host receives and discusses the tax question, and can first instruct the tax analyst to obtain various information data related to analyzing personal income tax, including taxpayer identity information, personal income information, the latest provisions of tax deduction items, tax rate information, tax preference information, etc.

[0080] 2. The tax analyst can call the networking search tool to obtain the latest policy information, such as the latest provisions of tax deduction items, tax preference information, etc. Under the condition of user authorization (i.e. obtaining authorization to access user information), the taxpayer's personal income information will be collected and classified according to the tax law, such as wages and salaries, labor remuneration, royalties, franchise fees, business income, etc.

[0081] 3. The meeting host obtains the personal income tax information collected by the tax analyst in the meeting (i.e. from the public state), determines the next step to calculate the amount of deduction items, and then instructs the tax calculator to calculate the personal tax payable. The personal tax payable includes the amount of deduction items, and the deduction amount needs to meet the deduction standards, such as the interest deduction limit of housing loans and the rent deduction standard.

[0082] 4. The tax calculator is activated after receiving the information sent by the meeting host, obtains the personal income tax information, and determines the calculation formula of the taxable income. For example, based on wages and salaries, labor remuneration, royalties, and franchise fees, the annual total income is calculated, and the annual comprehensive income calculation formula is determined as: annual comprehensive income = annual total income - basic deduction - special deduction - special additional deduction - other deduction - approved deduction donation; for example, the tax calculator obtains the tax rate information, determines the personal progressive tax rate table, and determines the calculation formula of the taxable income as: taxable income * applicable tax rate. Through the above calculation formula, the tax calculator can call the calculation tool (such as a calculator) to calculate the personal tax payable.

[0083] 5. The meeting host obtains the personal tax payable in the meeting, determines the next step to check and calculate the tax paid, instructs the tax calculator to obtain the annual tax calculation and payment amount of the tax payable (or refundable), and then instructs the tax analyst to determine whether annual tax calculation and payment is needed.

[0084] 6. The tax calculator receives the information sent by the meeting host, calculates the annual tax calculation and payment amount of the tax payable (or refundable), and the tax analyst determines whether annual tax calculation and payment is needed based on the annual tax calculation and payment amount of the tax payable (or refundable).

[0085] 7. Optionally, the meeting host can also instruct the tax analyst to conduct planning and optimization analysis on the personal income tax data in the meeting, and reduce the overall tax burden of personal income tax under the premise of being legal and compliant. For example: the tax analyst can review the income structure to determine whether the tax burden can be optimized by reasonably arranging the type and time (across years) of income; the tax analyst can review the deduction items to determine whether all eligible special additional deductions and other deductions are fully enjoyed, and whether the deduction certificates are complete; the tax analyst can review the tax preferences to determine whether all applicable tax preference policies are fully utilized, etc.

[0086] Optionally, the person in charge can also instruct the tax analyst to conduct risk identification and compliance check on the personal income tax data in the meeting, for example: judging whether the income is all reported, judging whether the deduction items are real, legal, and complete in vouchers, judging whether the conditions of tax preferential policies are met, judging whether the prepayment tax calculation is correct, etc.

[0087] Among them, the user can obtain all the information of the conference chairman and the members in the conference discussion through the display interface. The conference chairman and the members can discuss the problem through multiple cycles, and the conference chairman can dynamically plan the next execution task after obtaining the information returned by the members each time, and determine the members who execute the corresponding functions.

[0088] In some embodiments, the user can set the workflow before the meeting starts and / or after the meeting ends, for example, set the workflow node of obtaining user authorization before the meeting discussion, and set the workflow node of providing personal income tax optimization suggestions after the meeting discussion, which is not limited in the embodiments of the present application.

[0089] In the embodiments of the present application, the user can also discuss other tax-related issues in the tax question answering system, for example: comparing the new tax rules and the old tax rules, judging the changes of personal income tax; analyzing corporate tax; contacting experts to analyze the specific content of the new tax rules, etc. The specific scenarios of the user analyzing the tax are not limited in the embodiments of the present application.

[0090] Figure 4 is another method flowchart of a multi-agent tax question answering system provided by the embodiments of the present application, applied to a multi-agent tax question answering system as shown in Figure 1 , specifically comprising:

[0091] S201. Set nodes and dynamically create workflows.

[0092] In the embodiments of the present application, the tax question answering system sets a chairman control field node, a participant node, a meeting control node and a meeting summary node based on a first framework, the chairman control field node and the participant node are provided with a first conditional branch edge, the meeting control node to the chairman control field node is provided with a second conditional branch edge, and the meeting control node to the meeting summary node is provided with a third conditional branch edge. The first framework controls the conference process of the tax question answering system through the set chairman control field node, participant node, meeting control node and meeting summary node (which can be collectively referred to as node (node)) and first conditional branch edge, second conditional edge and third conditional edge (which can be collectively referred to as edge (edge)). Among them, the first framework includes LangGraph framework.

[0093] In the embodiments of the present application, the participant node includes an expert intelligent agent and a tool, wherein the expert intelligent agent is bound to a preset model (such as an existing commercial LLM model on the market), and is provided with an interface, a name and a prompt word including the model; the tool is bound to a functional component, which includes a network search tool, a calculator and a two-dimensional code generator.

[0094] In the embodiments of the present application, the tax question and answer system can create a public state for storing conference information, which allows each node to be set to access, and the conference information can include conference topics, participant configurations, historical records and round information.

[0095] In some embodiments, the tax question and answer system further includes an extended workflow step, including: setting a pre-conference work node before executing the conference process, the pre-conference work node sets the network search information and the conference opening information in the public state; setting a post-conference work node after ending the conference process, the post-conference work node generates a long-term record of the conference minutes. In this way, the tax question and answer system can flexibly add custom nodes before and after the conference, and support multi-agent conference to process user needs in complex scenarios.

[0096] In the embodiments of the present application, the tax question and answer system uses a loop structure in the created workflow, which supports the exchange between intelligent agents through the loop to realize the conference process.

[0097] S202. Set the condition branch edge of each node.

[0098] In the embodiments of the present application, the tax question and answer system is provided with a first condition branch edge from the host control node to the participant node, a second condition branch edge from the conference control node to the host control node, and a third condition branch edge from the conference control node to the conference summary node. The conference control node determines the node of the subsequent route based on the detection result of the termination condition.

[0099] In the embodiments of the present application, the host control node can also be provided with a fourth condition branch edge routed to the conference summary node. After setting the host control node to execute the conference process, the host control node analyzes the effectiveness of the historical speech of the participant node in the public state through a feedback mechanism, generates an analysis result; evaluates the rationality of the speaking order through a self-reflection strategy, generates an evaluation result; determines the node of the subsequent route based on the analysis result and the evaluation result. The feedback mechanism includes adjusting the preset speech node of the host control node based on the historical speech of the participant node; the self-reflection strategy includes the host control node evaluating the rationality of the scheme after confirming the next node, and adjusting the speaking order of the node based on the rationality score.

[0100] In the embodiments of the present application, the feedback mechanism and self-reflection strategy used by the moderator control field node can make the moderator control field node reconfirm the next node after each speech, avoid fixed processes, and improve the flexibility of the multi-agent tax question and answer system.

[0101] S203. Perform the workflow and start the conference process.

[0102] In the embodiments of the present application, the tax question and answer system executes the conference process based on the moderator control field node, determines the participant node as the node for subsequent routing, activates the expert agent in the participant node to execute the conference process, and writes the execution result of the conference process into the public state.

[0103] In some embodiments, if the moderator control field node selects the participant node as the node for subsequent routing, the conference process is continued; if the moderator control field node selects the conference summary node as the node for subsequent routing, the conference process is ended.

[0104] In the embodiments of the present application, the participant node activates the expert agent therein to execute the conference process on demand, and writes the execution result of the conference process into the public state. Specifically, the expert agent remains in a dormant state and does not participate in processing the conference information in the public state when not selected; the expert agent reads the conference information and calls a model or a tool to execute the conference process when selected. In this way, resource consumption using a single agent can be reduced, so that more agents can be added to the workflow under the condition that the resources of the tax question and answer system remain unchanged, and the discussion result of the conference process can be more in line with user needs.

[0105] S204. Trigger the termination condition and end the conference process.

[0106] In the embodiments of the present application, the tax question and answer system detects the termination condition in real time based on the conference control node, routes to the moderator control field node to repeat the conference process if the termination condition is not triggered, otherwise, routes to the conference summary node to generate a conference conclusion and ends the conference process. The termination condition includes: the number of rounds of the conference process exceeds a preset maximum round threshold; the cumulative context token number of the conference process exceeds the model limit; the duration of the conference process exceeds the set maximum time; the participant node returns a predefined end instruction text, etc.

[0107] In this way, the tax question and answer system adds a node for exiting the loop in the loop structure of the workflow, which can prevent the occurrence of a dead loop in the conference process.

[0108] In this embodiment of the application, the tax Q&A system can display the speech content and information of each node in real time through the user interface. Specifically, this includes: pushing the speech content of each node to the user interface; and displaying the corresponding character avatar, name, model type, and speech content of each node in the user interface in a dialogue format.

[0109] In this way, the data generated by each node can be streamed out in real time, reducing user waiting time.

[0110] It should be understood that, as mentioned above Figure 4 The steps in the flowcharts are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated herein, there is no strict order in which these steps are performed; they can be executed in other orders. Furthermore, as mentioned above... Figure 4 The flowchart may include at least some steps or stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0111] Example 3

[0112] Figure 5 This is a schematic diagram of a multi-agent tax question-and-answer system 500 provided in an embodiment of this application. Figure 5 As shown, the multi-agent tax question-and-answer system 500 specifically includes the following modules:

[0113] The public state module 510 is used to store public state information including meeting information such as meeting topic, participant configuration, history and round information.

[0114] The node setting module 520 is used to set the meeting summary node 521, the participant node 522, the host control node 523, and the meeting control node 524, among which:

[0115] The meeting summary node 521 is used to indicate the end of the meeting, summarize the meeting content, and generate the meeting conclusions.

[0116] The participant node 522 consists of an expert agent and tools, which are used to execute the meeting process and generate speaking content. The expert agent will only execute the meeting process based on the current public state of the meeting after it is selected.

[0117] The host control field node 523 is used for dynamically determining a node for subsequent routing according to the public state and characteristics of the participant node 522, including selecting the participant node 522 to continue the conference process, or selecting the conference summary node 521 to terminate the conference process;

[0118] The conference control node 524 is used for detecting a termination condition in real time, if the termination condition is not met, routing to the host control field node 523 to continue the conference process, if the termination condition is met, routing to the conference summary node 521 to end the conference process.

[0119] The conditional branch edge setting module 530 is used for setting a first conditional branch edge from the host control field node 523 to the participant node 522 based on the first framework, and is also used for setting a second conditional branch edge from the conference control node 524 to the host control field node 523, and is also used for setting a third conditional branch edge from the conference control node 524 to the conference summary node 521, and is also used for setting a fourth conditional branch edge from the host control field node 523 to the conference summary node 521, the conference summary node 521, the participant node 522, the host control field node 523 and the conference control node 524 are used for controlling the conference process;

[0120] The user interface module 540 is used for displaying speech content and information of each node in real time.

[0121] The extended workflow module 550 is used for setting a pre-conference work node before the host control field node executes the conference process, the pre-conference work node is used for setting information including networking search information and conference opening speech information in the public state module, and is also used for setting a post-conference work node after the conference summary node ends the conference process, the post-conference work node is used for generating a long-term record of conference minutes.

[0122] It can be understood that the function division between the modules in the embodiments of the present application is only illustrative, and does not constitute a function limitation of the multi-agent tax question and answer system 500. In other embodiments of the present application, the multi-agent tax question and answer system 500 can also be implemented in a manner of different modules or combination of multiple modules to realize the function of the multi-agent tax question and answer system 500.

[0123] Figure 6 is a hardware structure schematic diagram of a computer device 600 provided by the embodiments of the present application. As shown in Figure 6 the computer device 600 can include the foregoing Figure 1The multi-agent tax question and answer system is shown. The computer device 600 includes a processor 601, a memory 602, a communication module 604, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the multi-agent tax question and answer system is implemented. Figure 2 The S101-S105 steps are shown. For example, the computer program 603 can be divided into one or more units / modules, which are stored in the memory 602 and executed by the processor 601 to complete the present application.

[0124] The one or more units / modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 603 in the computer device 600. For example, the computer program 603 can be used to implement the multi-agent tax question and answer system, and perform the method shown in the S101-S105 steps. The specific functions or mechanisms have been described in the embodiments, and will not be described here. Figure 2 The one or more units / modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 603 in the computer device 600. For example, the computer program 603 can be used to implement the multi-agent tax question and answer system, and perform the method shown in the S101-S105 steps. The specific functions or mechanisms have been described in the embodiments, and will not be described here.

[0125] Those skilled in the art can understand that Figure 6 The computer device 600 is only an example and does not limit the computer device 600, which can include more or fewer components than shown, or combine certain components, or different components, for example, the computer device 600 can also include an input / output device, a network access device, a bus, etc.

[0126] The processor 601 can be a CPU, and can also be other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0127] In some embodiments, the processor 601 can include one or more interfaces. The interfaces can include an I2C interface, an I2S interface, a PCM interface, a URAT interface, an MIPI interface, a GPIO interface, an OBD interface, and / or a USB interface, etc. It can be understood that the interface connection relationship between the modules shown in the embodiments is only illustrative, and does not limit the structure of the computer device 600. In other embodiments of the present application, the computer device 600 can also use different interface connection modes or combinations of multiple interface connection modes in the above embodiments.

[0128] In some embodiments, the computer device 600 can connect the internal devices and modules through one or more interfaces. The above-mentioned memory 602 can be an internal storage unit of the computer device 600, for example, a hard disk or a memory of the computer device 600. The above-mentioned memory 602 can also include both the internal storage unit of the above-mentioned computer device 600 and the external storage device. The above-mentioned memory 602 is used to store the above-mentioned computer program and other programs and data required by the above-mentioned computer device 600. The above-mentioned memory 602 can also be used to temporarily store data that has been output or will be output.

[0129] The communication module 604 can provide a solution for wireless communication including WLAN, BT, GNSS, FM, NFC, IR, etc. applied on the computer device 600. The communication module 604 can be one or more device communication modules integrated with at least one communication processing module, receive electromagnetic waves via an antenna, demodulate and filter the electromagnetic wave signals, and send the processed signals to the processor 601. The communication module 604 can also receive signals to be sent from the processor 601, frequency modulate them, amplify them, and radiate them as electromagnetic waves via an antenna.

[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units or modules according to needs, that is, the internal structure of the above-mentioned device is divided into different functional units or modules to complete all or part of the above-mentioned functions.

[0131] The functional units and modules in the embodiments can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit, and the integrated unit can be realized in the form of hardware or software functional unit.

[0132] In the embodiments of the present application, the specific names of the functional units and modules are only for the convenience of mutual distinction, and do not limit the protection scope of the present application. It should be understood that each step in the above-mentioned method embodiments provided by the present application can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as hardware processor execution completion, or executed by hardware and software modules in the processor.

[0133] The present application also provides a computer program product, which comprises a computer program (also referred to as code or instructions), which, when executed, causes a computer to execute the method performed by the multi-agent tax question and answer system in the above-mentioned embodiments.

[0134] The embodiments of the present application can be combined in any manner to achieve different technical effects.

[0135] In the foregoing embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product.

[0136] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0137] The present application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions). When the computer program is executed, it causes the computer to perform the method performed by the computer device in any of the foregoing embodiments.

[0138] Figure 7 is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present application. As shown in Figure 7 The computer instructions can be stored in the computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode.

[0139] The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc.

[0140] A person of ordinary skill in the art can understand that all or part of the processes in the foregoing embodiments can be implemented by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the foregoing method embodiments. The foregoing storage medium includes read-only memory (ROM) or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.

[0141] In conclusion, the above description is only an embodiment of the technical scheme of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.

Claims

1. A multi-agent based tax question answering system implementation method, characterized in that, The method comprises: Based on the first framework, a host control node, a participant node, a meeting control node and a meeting summary node are set in a tax question and answer system, wherein the host control node and the participant node are provided with a first conditional branch edge, the meeting control node is provided with a second conditional branch edge to the host control node, and the meeting control node is provided with a third conditional branch edge to the meeting summary node, and the host control node, the participant node, the meeting control node and the meeting summary node are used to control the conference process of the tax question and answer system; Based on the host control node, the participant node is determined as the node for subsequent routing, the participant node activates the expert agent therein to execute the conference process, and the execution result of the conference process is written into a public state accessible by each node; The meeting control node detects the termination condition in real time, if the termination condition is not detected, it is routed to the host control node, and the conference process is repeatedly executed, otherwise, the meeting control node is routed to the meeting summary node to generate a meeting conclusion, and the conference process is ended.

2. The method of claim 1, wherein, The participant node comprises the expert agent and a tool, wherein The expert agent is bound to a preset model, and is provided with an interface, a name and a prompt word comprising the model; The tool is bound to a preset functional component, and the functional component comprises a network search tool, a calculator and a two-dimensional code generator.

3. The method of claim 2, wherein, The participant node activates the expert agent therein to execute the conference process, comprising: The expert agent remains in a dormant state when it is not activated and does not participate in processing the public state; The expert agent reads the public state when it is activated, and calls the model or the tool to execute the conference process.

4. The method of claim 1, wherein, The termination condition comprises: The number of rounds of the conference process exceeds a preset maximum round threshold; The cumulative context token number of the conference process exceeds the model limit; The duration of the conference process exceeds the set maximum time length; The participant node returns a predefined end instruction text.

5. The method of claim 1, wherein, The host control node is also provided with a fourth conditional branch edge to the meeting summary node, and after setting the host control node to execute the conference process, the method further comprises: The host control node analyzes the effectiveness of the historical speech of the participant node in the public state through a feedback mechanism to generate an analysis result; Through a self-reflection strategy, the rationality of the speaking order is evaluated to generate an evaluation result; Based on the analysis result and the evaluation result, the node for subsequent routing is determined.

6. The method of claim 1, wherein, After executing the conference process based on the host control node, the method further comprises: The speech content of each node is pushed to a user interface in real time, and the user interface displays the role avatar, name, model type and speech content corresponding to each node in the form of a dialogue.

7. The method of claim 1, wherein, The method further comprises an extended workflow step, and the workflow step comprises: Before the moderator control node executes the conference process, a pre-conference work node is set, which sets networking search information and conference opening information in the public state; After the conference summary node ends the conference process, a post-conference work node is set, which generates a long-term record of the conference minutes.

8. A multi-agent tax question answering system, characterized in that, Comprise: a public state module for storing a public state comprising conference information; a node setting module for setting a conference summary node, a participant node, a moderator control node and a conference control node through a first framework, wherein: the conference summary node is used to indicate the end of the conference, summarize the conference content and generate a conference conclusion; the participant node is composed of an expert agent and a tool, and is used to generate speech content by executing the conference process of the tax question and answer system, wherein the expert agent executes the conference process according to the current public state of the conference only after being selected; the moderator control node is used to dynamically determine the node of the subsequent route according to the characteristics of the public state and the participant node, including selecting the participant node to continue the conference process, or selecting the conference summary node to terminate the conference process; the conference control node is used to detect the termination condition in real time, if the termination condition is not met, route to the moderator control node to continue the conference process, if the termination condition is met, route to the conference summary node to end the conference process; a conditional branch edge setting module is used to set a first conditional branch edge from the moderator control node to the participant node based on the first framework, and is also used to set a second conditional branch edge from the conference control node to the moderator control node, and is also used to set a third conditional branch edge from the conference control node to the conference summary node, and is also used to set a fourth conditional branch edge from the moderator control node to the conference summary node, the moderator control node, the participant node, the conference control node and the conference summary node are used to control the conference process; a user interface module for displaying the speech content and information of each node in real time; an extended workflow module for setting a pre-conference work node before the moderator control node executes the conference process, the pre-conference work node is used to set networking search information and conference opening information in the public state module, and is also used to set a post-conference work node after the conference summary node ends the conference process, the post-conference work node is used to generate a long-term record of the conference minutes.

9. A computer device, comprising: comprise one or more memories, one or more processors; the memory is coupled with the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, the one or more processors call the computer instructions, so that the computer equipment realizes the method as claimed in any one of claims 1 to 7.

10. A computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are executed by the processor to realize the method of any one of claims 1 to 7.