Intelligent question and answer method and system, intelligent equipment and storage medium
By introducing intelligent question-and-answer methods into the CRM system, and using the collaborative work between the main control agent and the professional agent, the problem of inefficient information retrieval and user interaction in traditional CRM systems is solved, faster and more accurate question-and-answer services are achieved, and the operation costs of enterprises are reduced.
Patent Information
- Application Number
- CN202411994021.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-23
AI Technical Summary
Traditional CRM systems have problems such as inefficiency, fragmentation of information and delayed answers in terms of information retrieval and user interaction, resulting in reduced user satisfaction and trust and increased enterprise operation costs.
By establishing a communication connection between the main control agent and multiple professional agents, using intent recognition, knowledge graph query and dialogue status management methods, users' intents are quickly identified and diverted to the corresponding professional agent for processing, and accurate question-and-answer results are generated.
It improves the response speed and accuracy of user query questions and answers, improves the satisfaction of user Q&A interaction, and reduces the cost of corporate communication management.
Smart Images

Figure CN120031125A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an intelligent question-answering method, system, intelligent device and storage medium. Background Art
[0002] In today's business environment, with the continuous expansion of enterprise scale and the sharp increase in business complexity, traditional CRM (customer relationship management) systems have exposed many serious problems. Enterprises have accumulated massive amounts of data in the long-term operation process, covering customer information, contract information, financial details and other aspects, but these data are scattered and stored in different modules or databases, and the information fragmentation phenomenon is extremely serious. As a result, when users search for information, they often need to spend a lot of time and energy to shuttle between various system corners to piece together complete information, which greatly hinders work efficiency. Moreover, traditional CRM systems mostly use a simple human-computer interaction mode. After the user enters the query requirements, the system can only respond based on the preset limited rules, and the interaction efficiency is very low.
[0003] Due to the accumulation of various problems, users frequently encounter problems such as fruitless queries, delayed responses, and inaccurate answers when using the CRM system, resulting in a continuous decline in employees' satisfaction and trust in the system, indirectly increasing internal communication costs and management difficulties within the company, and further raising the company's operating costs.
[0004] In view of this, how to improve the response speed and accuracy of user query questions and answers, improve user satisfaction with question and answer interactions, and reduce corporate communication management costs are issues that need to be addressed urgently. Summary of the invention
[0005] The embodiments of the present application provide an intelligent question-and-answer method, system, intelligent device, and storage medium, which can improve the response speed and accuracy of user query questions and answers, enhance user satisfaction with question-and-answer interactions, and reduce enterprise communication management costs.
[0006] In a first aspect, an embodiment of the present application provides an intelligent question-answering method, which is applied to a master intelligent agent, wherein the master intelligent agent is communicatively connected with a plurality of professional intelligent agents, and the method comprises:
[0007] Get user input;
[0008] Performing intent recognition on the user input;
[0009] Based on the result of the intention recognition and the preset intention agent mapping table, determine the target agent for processing the query of the user input;
[0010] The target question and answer result input by the user is generated according to the knowledge graph and the query result of the target intelligent agent.
[0011] In a possible implementation of the first aspect, the step of determining, based on the result of the intention recognition and a preset intention agent mapping table, a target agent for querying the user input includes:
[0012] If the identified user intention includes a professional business in a specific field, query the professional agent corresponding to the professional business in the specific field in the preset intention agent mapping table;
[0013] Determine the queried professional agent as the target agent;
[0014] If the identified user intention does not include professional business in a specific field, the master agent is determined as the target agent.
[0015] In a possible implementation manner of the first aspect, the step of performing intent recognition on the user input includes:
[0016] Parsing the user input to extract user intent and entities;
[0017] A long short-term memory network combined with an attention mechanism is used to determine the global context corresponding to the user intent of the query;
[0018] According to the global context, a target entity corresponding to the user intention is determined.
[0019] In a possible implementation manner of the first aspect, the result of the intent recognition includes a target entity and a user intent; and the step of generating a target question-and-answer result input by the user according to the query result of the knowledge graph and the target agent includes:
[0020] If the target intelligent agent is the master intelligent agent, query processing is performed on the target entity and user intention based on the knowledge graph, and a target question and answer result is generated.
[0021] In a possible implementation manner of the first aspect, the result of the intent recognition includes a target entity and a user intent; and the step of generating a target question-and-answer result input by the user according to the query result of the knowledge graph and the target agent includes:
[0022] If the target agent is a professional agent, the process switches to the professional agent, and the professional agent performs query processing on the target entity and the user's intention;
[0023] Obtaining the query result of the professional agent;
[0024] The query results are integrated and reasoned based on the knowledge graph to generate the target question and answer results input by the user.
[0025] In a possible implementation manner of the first aspect, the method further includes:
[0026] Construct a dialogue state graph using dialogue states as nodes and transitions between different dialogue states as edges;
[0027] Based on the dialogue state diagram, the switching between the master agent and the professional agents is managed.
[0028] In a possible implementation manner of the first aspect, the method further includes:
[0029] Record the interaction process between the user and the target agent;
[0030] Obtaining user evaluation feedback on the target question and answer result;
[0031] The question-answering strategy of the target intelligent agent is optimized according to the evaluation feedback.
[0032] In a second aspect, an embodiment of the present application provides an intelligent question-answering system, which is applied to a master intelligent agent, wherein the master intelligent agent is communicatively connected with a plurality of professional intelligent agents, including:
[0033] An input acquisition unit, used for acquiring user input;
[0034] An intention recognition unit, used to recognize the intention of the user input;
[0035] An agent determination unit, configured to determine a target agent for querying the user input based on a result of the intention recognition and a preset intention agent mapping table;
[0036] A result generation unit is used to generate the target question and answer result input by the user based on the knowledge graph and the query result of the target intelligent agent.
[0037] In a third aspect, an embodiment of the present application provides an intelligent device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the intelligent question-and-answer method as described in the first aspect above is implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the intelligent question-answering method as described in the first aspect above is implemented.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a smart device, enables the smart device to execute the intelligent question-answering method as described in the first aspect above.
[0040] In the embodiment of the present application, the main control agent is connected to multiple professional agents in communication to form an overall framework of organic collaboration. The main control agent obtains user input, captures user needs, performs intent recognition on the user input, accurately identifies user intentions, and then accurately determines the target agent for processing the query of the user input based on the result of the intent recognition and the preset intent agent mapping table, thereby avoiding the blindness of problem processing, ensuring that complex and diverse user needs can be quickly and accurately diverted to the corresponding professional agent for processing, ensuring the accuracy of the question and answer results, and then quickly generating the target question and answer results of the user input based on the knowledge graph and the query results of the target agent. The present application scheme can improve the response speed and accuracy of user query questions and answers, improve user satisfaction with question and answer interactions, and thus reduce the cost of enterprise communication management. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0042] Figure 1 is a flowchart for implementing the intelligent question-answering method provided in an embodiment of the present application;
[0043] Figure 2 This is a specific implementation flow chart of step S102 in the intelligent question-answering method provided in an embodiment of the present application;
[0044] Figure 3 This is a specific implementation flowchart of step S103 in the intelligent question-answering method provided in an embodiment of the present application;
[0045] Figure 4 This is a specific implementation flow chart of step S104 in the intelligent question-answering method provided in an embodiment of the present application;
[0046] Figure 5 This is a specific implementation flow chart of optimizing the question-answering strategy in the intelligent question-answering method provided in the embodiment of the present application;
[0047] Figure 6 is a structural block diagram of the intelligent question-answering system provided in an embodiment of the present application;
[0048] Figure 7 It is a schematic diagram of a smart device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0050] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0051] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0052] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0053] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0054] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0055] As an example but not a limitation, the intelligent question-answering method provided in the embodiment of the present application can be applied to various types of intelligent devices that can run an agent, specifically including mobile phones, tablet computers, laptop computers, ultra-mobile personal computers (UMPCs), desktop computers, etc. The embodiment of the present application does not impose any restrictions on the specific types of intelligent devices.
[0056] An agent is a computer system that can act autonomously, perceive the environment, make decisions, and interact with the environment. In the embodiment of the present application, the intelligent device is equipped with a master agent, which is connected to multiple professional agents. Professional agents are the application forms of agents in specific professional fields. They refer to systems that can perceive the environment, make decisions, and take actions to achieve specific professional goals.
[0057] Professional agents rely on the main control agent and are responsible for handling professional business issues in specific fields. With deep professional knowledge reserves and precise problem-solving capabilities, professional agents work together with the main control agent to provide users with high-quality question-and-answer services.
[0058] In the enterprise CRM scenario, the master agent communicates with the professional agent cluster, which contains multiple professional agents. Common professional agents include but are not limited to contract agents, financial agents, customer agents, marketing agents, and task management agents. Contract agents are proficient in various contract terms and templates, and are familiar with the full-process business knowledge of contract signing, modification, performance, and renewal. Financial agents are familiar with financial knowledge such as financial accounting, receipts and payments, cost-benefit analysis, and interpretation of financial statements. Customer agents are good at tasks such as customer information management, customer demand analysis, customer classification, and portrait construction. Marketing agents master key points in the marketing field such as market promotion strategies, marketing activity planning, and product sales channel analysis. Task management agents play a crucial role as "dispatching commanders" and are responsible for task allocation, coordination, and overall planning.
[0059] In the embodiments of the present application, the master agent and various professional agents are intelligent assistants based on large language models (LLM). The master agent uses advanced LLM models, such as GPT-4 or models with similar performance, to achieve complex natural language understanding (NLU) and natural language generation (NLG). The master agent is responsible for global dialogue management, including intent recognition, context understanding, and task allocation.
[0060] In different industries and business scenarios, the types of professional agents will be flexibly customized and expanded according to needs. For example, in the medical field, there may be diagnosis and treatment agents and medical record agents; in the e-commerce field, there are order agents and after-sales agents, etc., aiming to accurately match professional businesses and improve the professionalism and practicality of the question-answering system.
[0061] Figure 1 The implementation process of the intelligent question-answering method provided in the embodiment of the present application is shown. The method flow is applied to the master intelligent agent, including steps S101 to S104. The specific implementation principle of each step is as follows:
[0062] Step S101: Obtain user input.
[0063] The master agent obtains user input from multiple channels, that is, it can receive user input from multiple types of devices such as mobile applications, web-based interactive interfaces, intelligent voice interactive devices, wearable smart terminals, etc. The types of user input include text, voice or video.
[0064] The master control agent can adapt the format according to the characteristics of different devices, follow the text input specifications of the operating system, limit the length of a single input text to no more than the preset number of characters, support common input method shortcut input commands, be compatible with voice-to-text input and the conversion accuracy is not lower than the preset conversion rate; the master control agent supports accurate conversion of user input voice into text format based on acoustic models and speech recognition algorithms, and has the ability to adapt to different accents and speaking speeds.
[0065] In some possible implementations, in order to improve the accuracy of intelligent question and answer, the obtained user input is preprocessed, and the preprocessing includes error correction, completion, format specification, etc. Common typos and grammatical errors are corrected based on natural language processing tools, and incomplete sentences are reasonably completed based on pre-trained language models, and then format normalization is performed. If the user input includes voice, the preprocessing also includes noise filtering, and the noise filtering algorithm is used to remove invalid data caused by environmental noise, electromagnetic interference, etc.
[0066] Step S102: performing intent recognition on the user input.
[0067] The intention recognition intelligent question-answering system (hereinafter referred to as the system) is a key link in understanding user needs and providing accurate services.
[0068] As a possible implementation of this application, Figure 2 A specific implementation process of step S102 in the intelligent question-answering method provided in an embodiment of the present application is shown, and is described in detail as follows:
[0069] A1: Parse the user input and extract the user intent and entities.
[0070] In an embodiment of the present application, the master intelligent agent can identify the intent of user input based on the NLU model (Natural Language Understanding, natural language understanding model).
[0071] In some possible implementations, after the main control agent receives the user input, it parses the text input by the user by calling the natural language processing tool, and the parsing includes word segmentation and part-of-speech tagging. The word segmentation operation is to divide the continuous text stream into individual words according to semantic units. "For example, for the sentence "I want to query the company's contract renewal policy for important customers", it will be divided into "I", "want", "query", "company", "target", "important customers", "of", "contract renewal policy" and other words. Part-of-speech tagging is to clarify the part of speech of each word, such as "query" is marked as a verb, indicating the user's action tendency, and "contract renewal policy" and "important customers" are marked as noun phrases as preliminary identification of entities. Then, based on the results of word segmentation and part-of-speech tagging, combined with the business domain dictionary and semantic understanding model, user intent and entities are accurately extracted to effectively capture user needs.
[0072] A2: Use a long short-term memory network combined with an attention mechanism to determine the global context corresponding to the user intent of the query.
[0073] The Long Short-Term Memory (LSTM) network can effectively process long sequence data and deeply capture the semantic dependencies in user input texts with its unique memory unit and gating structure. The attention mechanism can highlight the key parts in complex text information.
[0074] A3: According to the global context, determine the target entity corresponding to the user's intent. The target entity refers to a specific object, thing or concept that has key significance and carries specific information in the user's input content. It is the core focus of the user's intent and plays a vital role in the system's accurate understanding of needs and effective allocation of resources. In the above examples, "important customers" and "contract renewal policy" are target entities.
[0075] In an embodiment of the present application, the system integrates short-term memory and long-term memory information, and combines the attention mechanism to build a global context. Short-term memory stores recent conversation content, such as the last five rounds of conversation, to ensure the continuity of the current topic; long-term memory covers the user's historical transaction records, business preferences, historical query records over a long period of time, and other information. If a user has previously consulted a specific customer about a contract, the system will add the customer information to short-term memory; if the user's historical records show that he often pays attention to certain specific types of customers, the system will store this information in long-term memory and use it when processing the current query. The attention mechanism can lock in the "important customers" and "contract renewal policies" mentioned above rather than others.
[0076] By combining long short-term memory networks and attention mechanisms, the global context can be accurately located and the target entity can be effectively determined, thereby understanding user needs more accurately.
[0077] Step S103: Based on the result of the intention recognition and the preset intention agent mapping table, determine the target agent for querying the user input.
[0078] The results of intent recognition include the target entity and user intent. The preset intent agent mapping table is constructed based on business process analysis and historical data statistics, which includes the correspondence between each business and professional agent capabilities. When the system completes intent recognition and accurately extracts user intent and related entities, it enters the target agent determination process. Different user intents may result in different agents processing queries.
[0079] As a possible implementation of this application, Figure 3 A specific implementation process of step S103 in the intelligent question-answering method provided in an embodiment of the present application is shown, and is described in detail as follows:
[0080] B1: If the identified user intent includes professional business in a specific field, the professional agent corresponding to the professional business in the specific field is queried on the preset intent agent mapping table. Professional business in a specific field refers to the scope of tasks that require deep professional knowledge and follow specific industry standards or processes to be properly handled. For example, in the scenario of corporate operations, detailed interpretation of contracts, complex financial accounting, and tax compliance reporting all fall into this category. If the user enters "query contract renewal policy", it is obvious that this involves deep knowledge needs in the professional field of contracts, which falls within the scope of professional business in a specific field.
[0081] B2: Determine the queried professional agent as the target agent. The professional agent can use its built-in professional contract knowledge graph and professional terminology parsing model to dig deep into the answer to ensure the professionalism and accuracy of the answer. In some implementations, there may be more than one professional agent determined as the target agent at the same time, and multiple professional agents work together. For example, when the user's intention involves contract and financial issues, the contract agent and the financial agent are simultaneously determined as target agents, and the contract agent and the financial agent work together.
[0082] B3: If the identified user intent does not include professional business in a specific field, the master agent is determined as the target agent. The master agent can rely on its integrated general knowledge module and basic interaction capabilities to quickly retrieve information from the built-in common problem knowledge base and basic information database, and give clear guidance in a concise and clear manner, effectively meet user needs, avoid unnecessary complex processing procedures, and optimize the overall question-answering efficiency.
[0083] In the embodiment of the present application, it is determined whether the identified user intent includes professional business in a specific field. Once it is determined that the user intent is associated with professional business in a specific field, the system immediately starts a query on the preset intent agent mapping table. After the query is completed, the professional agent corresponding to the professional business in the specific field associated with the user intent is determined as the target agent. For example, for the above-mentioned contract renewal policy query requirement, the system will lock the contract agent, and all subsequent task execution and information retrieval related to the query will be led by this professional agent.
[0084] If the identified user intentions only include general basic inquiries and do not include professional business in specific fields, such as the user simply asking general and basic questions such as "the current operating guide of the system" and "what is today's date", which can be responded to without professional knowledge reserves, the system will identify the main control agent as the target agent.
[0085] The embodiment of the present application determines through the target intelligent agent that the intelligent question and answer system can reasonably allocate resources according to the user's intention, ensuring that each question can receive the most appropriate processing, laying a solid foundation for the subsequent generation of high-quality question and answer results.
[0086] Step S104: Generate the target question and answer result input by the user based on the knowledge graph and the query result of the target agent.
[0087] The target agent may be a master agent or a professional agent. In the embodiment of the present application, whether the target agent is a master agent or a professional agent, the final target question-answering result is generated based on the knowledge graph and the query result of the target agent on the user's intention.
[0088] As a possible implementation of the present application, if the target intelligent agent is the master intelligent agent, query processing is performed on the target entity and user intention based on the knowledge graph, and a target question and answer result is generated.
[0089] The master agent gives full play to its comprehensive coordination ability when performing query processing on the target entity and user intention based on the knowledge graph. The node information related to the target entity and user intention is accurately located in the knowledge graph. The knowledge graph is built based on massive business knowledge, covering knowledge in multiple fields such as customers, contracts, and finance. It is continuously updated and expanded through technologies such as knowledge extraction and knowledge fusion to ensure the timeliness and comprehensiveness of knowledge. For example, when a user asks "what are the company's recent preferential policies for small and medium-sized customers", the master agent quickly retrieves the small and medium-sized customer classification nodes, preferential policy classification nodes, and the associated paths between the two in the knowledge graph, integrates relevant information, and uses natural language generation technology to follow a simple, concise and clear style of speech to generate target question and answer results, and promptly feedback to users to meet their information needs.
[0090] As a possible implementation of this application, Figure 4 A specific implementation process of step S104 in the intelligent question-answering method provided in an embodiment of the present application is shown, and is described in detail as follows:
[0091] C1: If the target agent is a professional agent, switch to the professional agent, and let the professional agent perform query processing on the target entity and user intention.
[0092] In an embodiment of the present application, once the system determines that the target agent is a professional agent based on the intent recognition result and the preset intent agent mapping table, for example, in an enterprise CRM scenario, it recognizes that the user's intention is to "query the contract renewal policy" and the target entity is "contract renewal policy". At this time, the system quickly and seamlessly switches from the master agent to the corresponding contract professional agent.
[0093] The professional agent is then activated. With its built-in module for accurate understanding of deep knowledge in a specific field, it accesses the domain-specific knowledge graph that is closely related to it and uses the reasoning model that is carefully designed for the contract business logic. The professional agent combines the multi-dimensional related information in the domain-specific knowledge graph and starts deep mining. It accurately locates the target entity and the user's intention and generates subsequent answers as query results.
[0094] In some possible implementations, to ensure the reliability of the answer, the professional intelligent agent also applies uncertainty quantification technology, such as using the Bayesian method to calculate the confidence of the answer, or using an integrated learning method to combine the prediction results of multiple models and give a confidence interval for the final answer, so as to accurately evaluate the credibility of the answer and ensure the quality of the output information.
[0095] Exemplarily, when the user inputs questions related to the professional field of contracts, such as "Query the change details of an important contract" or "Understand the legal interpretation of specific contract terms", the contract intelligent agent responds quickly, accesses the exclusive knowledge graph focusing on contract knowledge, uses a highly targeted reasoning model to deeply analyze contract-related information, and gives accurate answers. Facing the user's questions about finance, such as "Details of the cost composition of a certain project" or "The company's accounts receivable situation this month", the finance intelligent agent quickly executes query processing based on professional knowledge and related financial data, and uses algorithms and models unique to the financial field to provide accurate financial information feedback to assist the enterprise in financial control and decision-making support. If the user consults "How to accurately classify customers based on their consumption behavior" or "Query the preferences and historical purchase records of an important customer", the customer intelligent agent combines the stored massive customer data and consumption behavior models to mine customer characteristics, providing a strong basis for the enterprise's marketing and customer personalized services. When encountering questions such as "The best promotion plan for the company's new product" or "Which marketing channel is the most effective under the current market trend", the marketing intelligent agent, relying on its understanding of industry dynamics and marketing skills, combines market data and case libraries to give practical marketing suggestions to assist the enterprise in product promotion and brand building.
[0096] C2: Obtain the query result of the professional intelligent agent. After the professional intelligent agent executes the query processing, it feeds back the generated query result to the master intelligent agent, and the master intelligent agent receives the query result fed back by the professional intelligent agent based on the communication connection with the professional intelligent agent.
[0097] C3: Based on the knowledge graph, integrate and reason about the query result to generate the target Q&A result of the user input.
[0098] The master intelligent agent can use the structured knowledge in the knowledge graph to sort out and integrate the unstructured text information output by the professional intelligent agent. For example, it organizes the scattered risk interpretations of contract terms into an organized risk list, sorts them according to dimensions such as risk severity and occurrence probability, so that users can have a clear view. The master intelligent agent uses natural language generation technology to transform the knowledge after in-depth integration and reasoning into logically clear and easy-to-understand text statements to generate the final target Q&A result. Following the user's reading habits, avoiding excessive use of professional terms, and presenting it to the user in a concise and clear manner to effectively meet the user's need for professional and accurate answers.
[0099] In some possible implementation manners, based on a specified weight factor, different weights are assigned to the unstructured text information from the professional intelligent agent and the structured knowledge determined by the master intelligent agent based on the knowledge graph and then fused. Among them, the weight assignment is dynamically adjusted according to factors such as the credibility, relevance, and timeliness of the knowledge to ensure that key information stands out and improve the quality of the answer. For example, higher weights are given to content with high credibility and close relevance to the user's query.
[0100] In an embodiment of the present application, the main control agent obtains the query results of the professional agent and can perform multi-hop reasoning based on the knowledge graph to supplement relevant information. For example, in response to a user's query about "the contract renewal policy of a certain important customer", in addition to returning the general renewal policy, it will also supplement special terms or preferential policies exclusive to the important customer based on the customer hierarchical relationship in the knowledge graph, past cooperation records, etc.
[0101] In some possible implementations, graph convolutional networks (GCN) can be used for knowledge completion. If some contract information of an important customer is missing in the knowledge graph, it can be inferred and completed based on the contract signing and performance of other similar customers. The structured knowledge (from the knowledge graph) and unstructured text information (from the user's query and other contextual information) are integrated to form a comprehensive basic answer. Finally, the advanced NLG model (Natural Language Generation) is used to generate the initial response. It is worth noting that the main control agent itself is based on the advanced LLM model, which includes the functions of NLG. There is no need to call other NLG models separately to generate smooth target question and answer results that conform to the user's reading habits.
[0102] As a possible implementation of the present application, in the embodiment of the present application, a dialogue state graph is constructed with dialogue states as nodes and transitions between different dialogue states as edges; based on the dialogue state graph, the switching between the master agent and the professional agent is managed. The dialogue state graph is a directed graph.
[0103] Nodes represent the state of the conversation, while edges represent the conversion relationship between states. For example, starting from the node "Master Agent Intent Parsing", if the user's intention is related to the contract business, there is an edge pointing to "Contract Agent Processing". The attributes of the edge include data transfer labels such as user intention details and user key information to ensure that the background information is complete when the professional agent receives the query task; if it involves multi-agent collaboration, such as the issue of contract and financial relationship, there are two-way communication and synchronization progress edges to ensure smooth information exchange.
[0104] In the embodiment of the present application, constructing a dialogue state diagram can optimize the question-answering process and improve the flexibility of the system. Various key states in the dialogue process are abstracted into nodes, such as "waiting for user input" as the starting node, and the system is in this state whenever it is ready to receive new user queries; "master control agent intention analysis" represents that the master control agent is using the above-mentioned intention recognition technology to analyze user input; "contract agent processing" and "financial agent processing" correspond to the states of each professional agent performing tasks; it also includes important intermediate link states such as "knowledge graph retrieval" and "result integration optimization", which fully covers all stages of the question-answering process.
[0105] In some possible implementations, after the user input is subjected to intent recognition, based on the result of the intent recognition, combined with the graph structure logic of the preset intent agent mapping table and the dialogue state diagram, the next one or more node paths that best fit the user intent are found starting from the current node (the master agent processing node), and the optimal state transition path is calculated using a reinforcement learning algorithm (such as Q-learning, DQN, etc.), and according to historical dialogue data and a predefined reward function (for example, a high reward for successfully solving a user's problem, a low reward for a long dialogue time, and indicators such as answer accuracy and user satisfaction can also be included), the system learns to select the next state in different situations (for example, should the contract renewal issue or the payment deadline issue be handled first). Assuming that the system learns that the best path is to consult the contract agent first and then the financial agent, the conversion edge to the contract agent will be activated first, and the possible conversion paths include: master agent->contract agent->financial agent, or master agent->financial agent->contract agent.
[0106] In some possible implementations, during the question-and-answer process, if the user adds new input, changes intentions, or agent feedback requires secondary processing, the master agent controls the dialogue state graph to respond in real time, quickly traces back the graph structure of the dialogue state graph, replans the path from the current node, activates the corresponding associated nodes to participate in the collaboration, and dynamically adjusts the direction of the dialogue to ensure that the answers are comprehensive and accurate.
[0107] As a possible implementation of this application, Figure 5 A specific implementation process of optimizing the question-answering strategy in the intelligent question-answering method provided in an embodiment of the present application is shown, and is described in detail as follows:
[0108] D1: Record the interaction process between the user and the target agent.
[0109] In the embodiment of the present application, from the moment when the user input is obtained to start the question-and-answer interaction, the information capture of the whole process is started. The original text content of the user input is recorded in detail so as to trace the order and scene of the subsequent dialogue. The extracted user intention, the locked target entity, and the global context details analyzed by the long-term and short-term memory network combined with the attention mechanism in this process are recorded, including the key information references of the recent rounds of dialogue in the short-term memory, the user's historical transaction records and business preferences associated in the long-term memory, etc., how to assist in judging the intention, and form an intention analysis log. After determining the target intelligent agent, if the target intelligent agent is a professional intelligent agent, the system continuously records the node trajectory of the professional intelligent agent accessing the exclusive domain knowledge map and records the running steps of its reasoning model. If the target intelligent agent is the main intelligent agent, record its query path based on the knowledge map, the logical process of integrating information, until the target question and answer result is finally generated, record the content of the target question and answer result, the presentation form (text typesetting, chart insertion, etc.), the output time, and the state transition path in the whole process, such as a series of state transitions from "waiting for user input" to "master agent processing" to "contract agent processing", etc., all-round and accurate archiving, and build a complete interactive process data set.
[0110] D2: Obtain user evaluation feedback on the target question and answer result.
[0111] The target question-and-answer results will only be generated and fed back to the user, and evaluation feedback can be sought from the user in an intuitive and convenient way in the interactive interface. For example, a simple evaluation pop-up window will pop up at the bottom of the mobile screen, providing three major options: "very satisfied", "basically satisfied", and "unsatisfied". Users can quickly express their overall feelings with one click; at the same time, in order to encourage users to participate in depth, a text input box is attached next to the pop-up window, inviting users to enter detailed opinions, such as "The legal explanation of the contract risk points in the answer is too professional and difficult to understand" or "I hope there will be more comparative data in the same industry in the cost-benefit analysis" and other constructive feedback.
[0112] D3: Optimize the question-answering strategy of the target agent based on the evaluation feedback.
[0113] After collecting user feedback, the system quickly starts the optimization process and uses online learning algorithms (such as online gradient descent, Thompson sampling, etc.) to adjust the question-answering strategy in real time. If users frequently give "very satisfied" evaluations, especially for a certain type of specific business problem, such as the interpretation of contract terms, the system will deeply analyze the processing flow of such problems, from the accuracy of intent recognition, the rationality of target agent selection, to the effectiveness of knowledge graph application, summarize successful experiences, and when encountering similar problems in the future, give priority to reusing these efficient strategies to strengthen the advantage path. On the contrary, if "unsatisfactory" feedback is received, the system will conduct an in-depth analysis of the specific opinions. If the answer is too professional and difficult to understand, like the above-mentioned contract legal interpretation case, the system will adjust the parameters of the natural language generation model. When answering similar legal questions in the future, the target agent will actively replace professional terms with easy-to-understand explanations, or add case analogies to improve the readability of the answer; if it involves missing knowledge graph information, such as the lack of comparative data in the same industry mentioned by the user, the system will immediately trigger the knowledge graph update process, collect relevant information from external data sources such as authoritative industry databases and market research reports, supplement and improve the knowledge graph structure, and optimize the query strategy to ensure that the data required by the user can be accurately provided next time. By continuously optimizing the loop based on user feedback, the question-and-answer strategy of the target agent keeps pace with the times, continues to meet user needs, and improves the quality of question-and-answer services.
[0114] The embodiments of the present application obtain user evaluation feedback, gain insight into user needs, and optimize the question-answering strategy of the target intelligent agent to achieve dynamic optimization and upgrading, which can not only improve user experience satisfaction, but also enhance the adaptability and versatility of the intelligent question-answering system.
[0115] As can be seen from the above, in the embodiment of the present application, the main control agent is connected to multiple professional agents in communication to form an overall framework of organic collaboration. The main control agent obtains user input, captures user needs, performs intent recognition on the user input, accurately identifies user intentions, and then accurately determines the target agent for processing the query of the user input based on the result of the intent recognition and the preset intention agent mapping table, thereby avoiding the blindness of problem processing and ensuring that complex and diverse user needs can be quickly and accurately diverted to the corresponding professional agents for processing, ensuring the accuracy of the question and answer results, and then quickly generating the target question and answer results of the user input based on the knowledge graph and the query results of the target agent. The present application scheme can improve the response speed and accuracy of user queries and questions, improve user satisfaction with question and answer interactions, and thus reduce the cost of enterprise communication management.
[0116] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0117] Corresponding to the intelligent question-answering method described in the above embodiment, Figure 6 A structural block diagram of the intelligent question-answering system provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0118] Reference Figure 6 The intelligent question-answering system is applied to a master agent, which is connected to multiple professional agents in communication, and includes: an input acquisition unit 61, an intention recognition unit 62, an agent determination unit 63, and a result generation unit 64, wherein:
[0119] An input acquisition unit 61, used to acquire user input;
[0120] An intention recognition unit 62, configured to perform intention recognition on the user input;
[0121] An agent determination unit 63, configured to determine a target agent for querying the user input based on the result of the intention recognition and a preset intention agent mapping table;
[0122] The result generating unit 64 is used to generate the target question and answer result input by the user according to the query result of the knowledge graph and the target intelligent agent.
[0123] As a possible implementation of the present application, the intention recognition unit 62 includes:
[0124] A parsing and extraction module, used to parse the user input and extract user intent and entities;
[0125] A context determination module, for determining a global context corresponding to the user intent of the query by using a long short-term memory network combined with an attention mechanism;
[0126] The target entity determination module is used to determine the target entity corresponding to the user intention based on the global context.
[0127] As a possible implementation of the present application, the agent determination unit 63 includes:
[0128] A first agent determination module is used to query the professional agent corresponding to the professional business in a specific field on the preset intention agent mapping table if the recognized user intention includes the professional business in a specific field; and determine the queried professional agent as the target agent;
[0129] The second agent determination module is used to determine the main control agent as the target agent if the recognized user intention does not include professional business in a specific field.
[0130] As a possible implementation of the present application, the result of the intention recognition includes the target entity and the user intention; the result generation unit 64 includes:
[0131] The first result generation module is used to perform query processing on the target entity and user intention based on the knowledge graph if the target intelligent agent is the master intelligent agent, and generate a target question and answer result.
[0132] As a possible implementation of the present application, the result of the intention recognition includes the target entity and the user intention; the result generation unit 64 also includes:
[0133] An agent switching module, for switching to the professional agent if the target agent is a professional agent, and having the professional agent perform query processing on the target entity and the user intention;
[0134] The result generation module is used to obtain the query results of the professional intelligent agent; integrate and reason the query results based on the knowledge graph to generate the target question and answer results input by the user.
[0135] As a possible implementation of the present application, the intelligent question-answering system further includes:
[0136] A state graph construction unit, used to construct a dialogue state graph using dialogue states as nodes and transitions between different dialogue states as edges;
[0137] The agent management unit is used to manage the switching between the master agent and the professional agents based on the dialogue state diagram.
[0138] As a possible implementation of the present application, the intelligent question-answering system further includes:
[0139] An interaction recording unit, used to record the interaction process between the user and the target intelligent agent;
[0140] A user feedback unit, used to obtain user evaluation feedback on the target question and answer result;
[0141] A strategy optimization unit is used to optimize the question-answering strategy of the target intelligent agent according to the evaluation feedback.
[0142] As can be seen from the above, in the embodiment of the present application, the main control agent is connected to multiple professional agents in communication to form an overall framework of organic collaboration. The main control agent obtains user input, captures user needs, performs intent recognition on the user input, accurately identifies user intentions, and then accurately determines the target agent for processing the query of the user input based on the result of the intent recognition and the preset intention agent mapping table, thereby avoiding the blindness of problem processing and ensuring that complex and diverse user needs can be quickly and accurately diverted to the corresponding professional agents for processing, ensuring the accuracy of the question and answer results, and then quickly generating the target question and answer results of the user input based on the knowledge graph and the query results of the target agent. The present application scheme can improve the response speed and accuracy of user queries and questions, improve user satisfaction with question and answer interactions, and thus reduce the cost of enterprise communication management.
[0143] It should be noted that the information interaction, execution process, etc. between the above-mentioned systems / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0144] The present application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, Figures 1 to 5 The steps of any intelligent question answering method are represented.
[0145] The embodiment of the present application also provides an intelligent device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, Figures 1 to 5 The steps of any intelligent question answering method are represented.
[0146] The embodiment of the present application also provides a computer program product, when the computer program product is run on a smart device, the smart device executes the following Figures 1 to 5 The steps of any intelligent question answering method are represented.
[0147] Figure 7 Schematic diagram of a smart device provided by an embodiment of the present application. Figure 7 As shown, the smart device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer program 72, the steps in the above-mentioned smart question-answering method embodiments are implemented, for example Figure 1 Alternatively, when the processor 70 executes the computer program 72, the functions of each module / unit in the above-mentioned system embodiments are realized, for example Figure 6The functions of units 61 to 64 are shown.
[0148] Exemplarily, the computer program 72 may be divided into one or more modules / units, which are stored in the memory 71 and executed by the processor 70 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 72 in the smart device 7.
[0149] The smart device 7 may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 It is only an example of the smart device 7 and does not constitute a limitation of the smart device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the smart device 7 may also include input and output devices, network access devices, buses, etc.
[0150] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0151] The memory 71 may be an internal storage unit of the smart device 7, such as a hard disk or memory of the smart device 7. The memory 71 may also be an external storage device of the smart device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the smart device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the smart device 7. The memory 71 is used to store the computer program and other programs and data required by the smart device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
[0152] It should be noted that the information interaction, execution process, etc. between the above-mentioned systems / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0153] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0154] If the integrated unit is implemented 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 present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or system that can carry the computer program code to the system / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0155] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0156] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An intelligent question-answering method, characterized in that: Applied to a master control agent, the master control agent is communicatively connected with a plurality of professional agents, the method comprising: Get user input; Performing intent recognition on the user input; Based on the result of the intention recognition and the preset intention agent mapping table, determine the target agent for processing the query of the user input; The target question and answer result input by the user is generated according to the knowledge graph and the query result of the target intelligent agent.
2. The method according to claim 1, characterized in that The step of determining and processing a target agent for querying the user input based on the result of the intention recognition and a preset intention agent mapping table comprises: If the identified user intention includes a professional business in a specific field, query the professional agent corresponding to the professional business in the specific field in the preset intention agent mapping table; Determine the queried professional agent as the target agent; If the identified user intention does not include professional business in a specific field, the master agent is determined as the target agent.
3. The method according to claim 1, characterized in that The step of performing intent recognition on the user input comprises: Parsing the user input to extract user intent and entities; A long short-term memory network combined with an attention mechanism is used to determine the global context corresponding to the user intent of the query; According to the global context, a target entity corresponding to the user intention is determined.
4. The method according to claim 1, characterized in that: The result of the intention recognition includes the target entity and the user intention; The step of generating the target question-answer result input by the user according to the knowledge graph and the query result of the target intelligent agent comprises: If the target intelligent agent is the master intelligent agent, query processing is performed on the target entity and user intention based on the knowledge graph, and a target question and answer result is generated.
5. The method according to claim 1, characterized in that The result of the intention recognition includes the target entity and the user intention; The step of generating the target question-answer result input by the user according to the knowledge graph and the query result of the target intelligent agent comprises: If the target agent is a professional agent, the process switches to the professional agent, and the professional agent performs query processing on the target entity and the user's intention; Obtaining query results of the professional agent; The query results are integrated and reasoned based on the knowledge graph to generate the target question and answer results input by the user.
6. The method according to claim 1, characterized in that The method further comprises: Construct a dialogue state graph using dialogue states as nodes and transitions between different dialogue states as edges; Based on the dialogue state diagram, the switching between the master agent and the professional agents is managed.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Record the interaction process between the user and the target agent; Obtaining user evaluation feedback on the target question and answer result; The question-answering strategy of the target intelligent agent is optimized according to the evaluation feedback.
8. An intelligent question-answering system, characterized in that: Applied to a master intelligent agent, the master intelligent agent is connected to multiple professional intelligent agents in communication, including: An input acquisition unit, used for acquiring user input; An intention recognition unit, used to recognize the intention of the user input; An agent determination unit, configured to determine a target agent for querying the user input based on a result of the intention recognition and a preset intention agent mapping table; A result generation unit is used to generate the target question and answer result input by the user based on the knowledge graph and the query result of the target intelligent agent.
9. An intelligent device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the intelligent question-answering method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the intelligent question-answering method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Structured query language generation method and device, equipment and storage medium
CN120371854A
Automatic contract auditing system and method based on multi-agent collaboration
CN120493908A
A contract automation review system and method based on multi-agent collaboration
CN120493908B
Intelligent agent-based medical health question and answer method, equipment and medium
CN120804272A
A medical and health question-answering method, device and medium based on intelligent agents
CN120804272B