Intelligent question answering method and device, computer device and storage medium
By using multi-skill nesting logic and task stack recursive calling technology, the problem of inaccurate connection in complex calling relationships of intelligent question answering systems has been solved, achieving a more efficient intelligent question answering effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2022-08-22
- Publication Date
- 2026-04-28
AI Technical Summary
Existing intelligent question-answering systems struggle to accurately connect to the appropriate skill modules amidst complex calling relationships, thus affecting the question-answering effect.
The system employs multi-skill nested logic to process entities and intents in interactive text, recursively calls multiple skills through a task stack to ensure accurate matching of appropriate skill modules, and monitors skill status in real time to dynamically allocate session resources.
It improves the effectiveness of intelligent question answering, enabling precise matching of appropriate skill modules in complex call relationships, thereby enhancing user experience and question answering efficiency.
Smart Images

Figure CN115344671B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to intelligent question-answering methods, devices, computer equipment, and storage media. Background Technology
[0002] With the explosive growth of the internet in the medical field, mobile internet healthcare has brought significant changes to people's lives, including daily life, work, and the booming e-commerce sector. Mobile internet healthcare is evolving from online consultations to offline clinics and then to internet hospitals. Patients can share the latest medical information and their offline medical experiences through internet platforms, thereby improving medical development and comprehensively enhancing the national health level.
[0003] In mobile internet healthcare products, intelligent question-answering systems have become standard. Intelligent question-answering robots are gradually replacing traditional human customer service or doctor assistants, answering user questions and simultaneously categorizing and maintaining user information. These robots can handle some users with disease symptoms or routine medical knowledge inquiries, assisting doctor assistants in achieving a higher daily workload with lower costs, thus increasing conversion rates. In summary, intelligent robots can solve a large number of repetitive, automatable tasks for businesses. The widespread automation of intelligent question answering will become a major direction for future enterprise AI transformation, and an effective means to improve operational efficiency and promote social and economic development.
[0004] Currently, intelligent question-answering systems in medical settings can provide corresponding access skill modules based on contextual information. However, as the demands in medical settings continue to increase, the number of skill modules is also growing, and the calling relationships between these modules are becoming more complex. This makes it difficult for intelligent question-answering systems to accurately connect to the appropriate skill module from these complex relationships, thus affecting the effectiveness of intelligent question answering. Summary of the Invention
[0005] In view of this, the present invention provides an intelligent question-answering method, apparatus, computer device and storage medium, the main purpose of which is to solve the problem that in the prior art, intelligent question-answering systems have difficulty accurately connecting to the appropriate skill modules from complex calling relationships, which affects the effectiveness of intelligent question answering.
[0006] According to one aspect of the present invention, an intelligent question-answering method is provided, the method comprising:
[0007] In response to a user’s session request, the system acquires the interactive text generated during the session and identifies the entities and intentions involved in the session from the interactive text.
[0008] The entities and intents involved in the session are processed using pre-configured multi-skill nesting logic to determine the multiple skills enabled in the session;
[0009] The multiple skills are stored in the task stack in the order of their activation, and the multiple skills activated in the session in the task stack are recursively called.
[0010] When the target skill is invoked, the session resource corresponding to the target skill is loaded and the session resource is output to the front end for display.
[0011] According to another aspect of the present invention, an intelligent question-answering device is provided, the device comprising:
[0012] The acquisition module is used to respond to a user's session request, acquire the interactive text generated during the session, and identify the entities and intentions involved in the session from the interactive text;
[0013] The determination module is used to process the entities and intentions involved in the session using pre-configured multi-skill nesting logic to determine multiple skills enabled in the session;
[0014] The calling module is used to store the multiple skills in the order of their activation into the task stack, and to recursively call the multiple skills activated in the session in the task stack;
[0015] The output module is used to encapsulate the session resources corresponding to the target skill when the target skill is invoked, and output the session resources to the front end for display.
[0016] According to another aspect of the present invention, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of an intelligent question-answering method.
[0017] According to another aspect of the present invention, a computer storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of an intelligent question-answering method.
[0018] By employing the above technical solutions, this invention provides an intelligent question-answering method, apparatus, computer device, and storage medium. Responding to a user's session request, it acquires the interactive text generated during the session, identifies entities and intents involved in the session from the interactive text, processes the entities and intents involved in the session using pre-configured multi-skill nesting logic, determines multiple skills activated in the session, and stores these skills in a task stack according to their activation order. It then recursively calls the multiple skills activated in the session within the task stack. When a target skill is called, the corresponding session resource is loaded and output to the front end for display. Compared to existing technologies that provide corresponding access skill modules based on context information for intelligent question answering, this application uses multi-skill nesting logic to recursively call skills according to their order in the task stack. This allows for precise connection to the appropriate skill module from complex call relationships. Simultaneously, it monitors the skills in the task stack in real time, dynamically dispatching the calls of entities and intents in the hierarchical skill chain, and outputting corresponding session resources for the called target skill, thus improving the effectiveness of intelligent question answering. Attached Figure Description
[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0020] Figure 1 This is a schematic diagram of an application environment for the intelligent question-answering method in one embodiment of the present invention;
[0021] Figure 2 This is a flowchart illustrating an intelligent question-answering method according to an embodiment of the present invention;
[0022] Figure 3 yes Figure 2 A schematic diagram of a specific implementation method for step S20;
[0023] Figure 4 yes Figure 3 A flowchart illustrating a specific implementation of step S21;
[0024] Figure 5 yes Figure 2 A flowchart illustrating another specific implementation of step S20;
[0025] Figure 6 yes Figure 5 A flowchart illustrating a specific implementation of step S24;
[0026] Figure 7 yes Figure 2 A schematic diagram of a specific implementation method for step S30;
[0027] Figure 8 yes Figure 2 A schematic diagram of a specific implementation of step S40;
[0028] Figure 9 This is another flowchart of the intelligent question-answering method in this embodiment of the invention;
[0029] Figure 10 This is a skill call chain diagram in the intelligent question-answering method of this invention embodiment;
[0030] Figure 11 This is a schematic diagram of the structure of an intelligent question-and-answer device according to an embodiment of the present invention;
[0031] Figure 12 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;
[0032] Figure 13 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0033] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0034] The intelligent question-answering method provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The server responds to user-sent session requests, retrieves the interactive text generated during the session, identifies the entities and intents involved in the session from the interactive text, processes the entities and intents involved in the session using pre-configured multi-skill nesting logic, determines the multiple skills activated in the session, stores these skills in a task stack according to their activation order, recursively calls the multiple skills activated in the task stack, and when a target skill is called, loads the corresponding session resources and outputs the session resources to the client for display. In this invention, the use of multi-skill nesting logic for recursive calls in skill calls according to the order in the task stack enables precise matching to the appropriate skill module from complex call relationships. Simultaneously, it monitors the skills in the task stack in real time, dynamically dispatching the calls of entities and intents in the hierarchical skill chain, and outputting and displaying the corresponding session resources for the called target skill, thus improving the effectiveness of intelligent question answering. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster composed of multiple servers. The present invention will now be described in detail through specific embodiments.
[0035] Please see Figure 2 As shown, Figure 2 A flowchart illustrating the intelligent question-answering method provided in this embodiment of the invention includes the following steps:
[0036] S10. In response to a session request sent by the user, obtain the interactive text generated during the session, and identify the entities and intentions involved in the session from the interactive text.
[0037] The intelligent question-answering method and system provided by this invention can be applied to intelligent customer service or intelligent assistant engines in various scenarios, such as medical consultation and medical diagnosis. The intelligent question-answering engine is typically implemented through a server-side component. This server can receive user-initiated conversation requests in real time and push corresponding skills based on the interactive text generated during the conversation. For example, in a medical consultation scenario, a user can initiate a conversation request about a certain disease through online chat. In this case, an intelligent question-answering engine is needed to answer the user's questions about the disease. Here, the intelligent question-answering engine needs to perform natural language understanding on the interactive text generated during the conversation, such as intent recognition and slot extraction, to identify the entities and intents involved in the conversation, determine the skills to be activated based on the entities and intents, and push relevant conversation resources.
[0038] For example, if the interactive text generated in the conversation is "What to do about diabetes", the intelligent question answering engine needs to perform natural language understanding on the interactive text after receiving it, identify the entity in the conversation as diabetes, and the intent as to find out about disease treatment. The intelligent question answering engine will then determine the skill that needs to be activated in the conversation based on the entity and intent, which is encyclopedia query, and call the encyclopedia query skill about diabetes to push encyclopedia knowledge related to the treatment of diabetes.
[0039] Understandably, the skills that need to be enabled in this session are equivalent to different pre-configured response function modules, such as disease encyclopedia, drug encyclopedia, health assessment, health Q&A, etc. Each response function module has embedded response scripts provided for the corresponding function. The response script provided for the disease encyclopedia function can be "The following are the relevant solutions for diabetes", and include relevant resource links or resource cards, etc.
[0040] The entities involved in the conversation can be extracted using entity dictionaries, rules, and joint entity extraction models. These entities mainly include disease, medicine, goods, doctor, hospital, and location. The intents can be identified using rules and intent classification models. These intents mainly include disease inquiry, medicine inquiry, goods purchase, and medicine purchase.
[0041] Specifically, both entity and intent recognition can be handled using deep learning models. In entity recognition, BERT pre-trained character encoding features, word features, and word segmentation length features are concatenated as model input features. These are then processed through a Bi-LSTM model. The results of the fully connected layers of the Bi-LSTM yield the probability of occurrence, and a CRF is used to calculate the transition probability of the labels. The entity label type with the highest probability is then identified as the entity. Similarly, in intent recognition, BERT pre-trained character encoding features, label features, and word segmentation length features are used as model input for training, and a TextCNN deep learning model is employed to recognize the user's intent.
[0042] S20. Process the entities and intents involved in the session using pre-configured multi-skill nesting logic to determine the multiple skills enabled in the session.
[0043] In this embodiment of the invention, the conversation process typically involves multiple interactive texts. The activation of a skill depends on a set of entities and intents identified in the interactive texts, and also switches as the entities and intents identified in the interactive texts change. Here, a skill can be a single-round skill or a multi-round skill. A single-round skill can usually solve the user's problem with one round of interactive texts. For example, in the conversation, the user's question is "How to treat hypertension?" The entity identified from the interactive text is "hypertension", and the intent is "disease treatment". A multi-round skill usually requires multiple interactive texts to solve the user's problem. This may be multiple in-depth inquiries initiated by the user regarding a question, or the system may initiate multiple entity supplements to the user regarding the question. For example, in the conversation, the user's question is "Can I take xx medicine for diabetes?" In order to push a more suitable solution to the user, the system may initiate entity supplements related to attributes such as age and symptoms to the user.
[0044] It's important to understand that the multi-skill nesting logic includes a skill relationship mapping table. This table records entity and intent combinations and their corresponding logical relationships for activating skills. An interactive text will identify one entity and intent combination. In the skill relationship mapping table, one entity and intent combination corresponds to one skill. Different entity and intent combinations may correspond to the same skill, but the protocol parameters that need to be configured in the skill may differ. For example, for a disease encyclopedia query skill, different disease types require corresponding disease-type protocol parameters. Specifically, such as... Figure 3 As shown, in step S20, which involves using pre-configured multi-skill nesting logic to process the entities and intents involved in the session and determine the multiple skills enabled in the session, the following steps are included:
[0045] S21. The entities and intents involved in the session are standardized according to the intent hierarchy recorded in the entity graph using pre-configured multi-skill nesting logic.
[0046] S22. Using the logical relationship between entities and intent combinations and their corresponding enabled skills in the skill relationship mapping table, perform a skill access query on the annotated entities and intent combinations to determine multiple skills enabled in the session.
[0047] It's understandable that during a conversation, the interaction text in each round might identify multiple entities or none at all. In such cases, the conversation may not involve any entities or may involve multiple entities. Similarly, the intents identified in the interaction text in each round of the conversation may also fall into this category. Considering the user's conversation experience, it's necessary to standardize the entities and intents involved in the conversation. For cases where no entities or intents are involved, the conversation can be prompted to supplement the user with the entities or intents. Alternatively, entities or intents can be automatically supplemented based on the conversation context, ensuring that each round of interaction text in the conversation corresponds to a set of entities and intents. Furthermore, based on the set of entities and intents corresponding to each round of interaction text, the multiple skills activated in the conversation can be determined.
[0048] When initiating a conversation to supplement entities or intents to a user, the multi-skill nesting logic is set with conversation supplementary dialogue for entities or intents. The pre-configured multi-skill nesting logic can be used to determine the conversation supplementary dialogue for entities or intents, and push the conversation supplementary dialogue to the user. Then, the entities or intents involved in the interaction text are filled in according to the supplementary interaction text submitted by the user.
[0049] When entities or intents are automatically supplemented based on the conversation context, the multi-skill nesting logic has an inheritance relationship corresponding to the context entities or intents. Based on the inheritance relationship corresponding to the context entities or intents, the entities or intents in the previous round of interaction text are filled into the entities or intents involved in the current interaction text.
[0050] The entity graph here records the relationships between different entity types at different intent levels. Entities and intents are described with different granularities. Considering the complexity of the matching relationships in the skill mapping table, and that the entities or intents identified in the interactive text may be fine-grained, and there may be many parallel entities or intents, no logical relationship for enabling skills is set for fine-grained entities and intents. Therefore, the entities and intents identified in the interactive text need to be standardized according to the intent hierarchy recorded in the entity graph, and then processed into standard entities and intents that can be matched with skill activation in the skill mapping table. For example, the intent to query a disease can be specifically located as secondary intents such as querying disease overview or querying disease precautions.
[0051] It's important to understand that due to the high randomness of entity and intent combinations, in order to accurately define the logical relationship between entity and intent combinations and skill activation, the entity graph defines skill activation criteria for entity and intent combinations. Only entity and intent combinations that meet the skill activation criteria will activate the corresponding skill; otherwise, the intent hierarchy recorded in the entity graph needs to be used for processing. Specifically, for example... Figure 4As shown, in step S21, the entities and intents involved in the session are standardized according to the intent hierarchy recorded in the entity graph using pre-configured multi-skill nesting logic, including the following steps:
[0052] S211. Use pre-configured multi-skill nesting logic to determine whether the entities and intents involved in the session process conform to the skill activation criteria defined in the entity graph.
[0053] S212. If yes, the entities and intentions involved in the real-time session are treated as a standardized combination of entities and intentions; otherwise, the entities and intentions involved in the real-time session are processed into a combination of entities and intentions that meet the skill activation standards according to the hierarchical relationship of intentions recorded in the entity graph.
[0054] Considering the limitations of skill processing capabilities, to ensure more accurate skill resource delivery to users, the processing capability limits of each skill can be registered and loaded. This means that the entities and intents involved in the conversation are judged using skill registration information to determine whether to activate the corresponding skill. In other words, activating a skill requires identifying a specific combination of entities and intents from the interactive text. Taking the skill of querying diseases as an example, this skill can handle multiple intents such as querying a disease overview or querying the cause of a disease. To activate this skill, the entity representing the disease and the intent to query a disease overview, or the entity representing the disease and the intent to query the cause of a disease, must be identified from the interactive text.
[0055] It's important to understand that the multi-skill nesting logic also includes an inheritance relationship mapping table. This table records the logical relationships between entities or intentions that inherit activated skills. Specifically, for example... Figure 5 As shown, step S20, which involves using pre-configured multi-skill nesting logic to process entities and intents involved in the session and determine the multiple skills enabled in the session, also includes the following steps:
[0056] S23. Use pre-configured multi-skill nested logic to determine whether the session process is missing an entity or intent.
[0057] S24. If so, the logical relationship of entity or intention inheriting activated skills recorded in the inheritance relationship mapping table is used to verify whether there is a skill inheritance relationship for the missing entity or intention.
[0058] S25a. When there is an inheritance relationship between the missing entity or intent, the inherited entity or intent is used to fill in the missing entity or intent in the session.
[0059] S25b: When there is no inheritance relationship between the missing entity or intent, the interaction skill is triggered to push an interaction session to the user, and the missing entity or intent in the session is filled in according to the interaction text replied by the user.
[0060] Since interactive text may contain missing entities or intents, this method can be used to unlock corresponding skills by inheriting the entities or intents from the previous round if the conditions for inheritance are met. Specifically, for example... Figure 6 As shown, step S24, which involves verifying whether a missing entity or intent has a skill inheritance relationship by using the logical relationship of entity or intent inheriting activated skills recorded in the inheritance relationship mapping table, includes the following steps:
[0061] S241. Using the logical relationship of entity or intention to inherit activated skills recorded in the inheritance relationship mapping table, establish the skill transfer matrix corresponding to the entity and the skill transfer matrix corresponding to the intention respectively.
[0062] S242. Use the skill transfer matrix corresponding to the entity and the skill transfer matrix corresponding to the intention to traverse and query the logical value of whether the missing entity or the entity corresponding to the intention in the previous round of the session has performed skill transfer and whether the intention has performed skill transfer.
[0063] S243. Entities or intentions whose logical value for performing skill transfer is a preset value are identified as entities or intentions with a skill inheritance relationship.
[0064] The skill transfer matrix for each entity records the logical value indicating whether the entity performs a skill transfer, and the skill transfer matrix for each intent records the logical value indicating whether the intent performs a skill transfer. Specifically, in the implementation, skill transfer matrices can be constructed for multiple entity types and multiple intent types. For each entity type, the X-axis represents the "from" skill and the Y-axis represents the "to" skill. If the entity type satisfies an inheritance relationship, the logical value in [xi, yi] of the skill transfer matrix is 1; otherwise, the logical value is 0. Similarly, for each intent type, the X-axis represents the "from" skill and the Y-axis represents the "to" skill. If the intent type satisfies an inheritance relationship, the logical value in [xi, yi] of the skill transfer matrix is 1; otherwise, the logical value is 0.
[0065] For example, if a user asks "What to do about diabetes" in the previous session, the entity "diabetes" is identified as a disease type in the entity graph, and the intent "self-diagnosis method" is identified. At this point, the entity and intent combine to activate the "self-diagnosis" skill related to the diabetes entity. If the entity is missing, and the user asks "What about hypertension?" in the current session, no intent is identified, but the entity "hypertension" is identified. This entity is determined to be of the same type as the entity from the previous session. Here, the intent can inherit from the previous session, filling in the complete entity and intent, further activating the "self-diagnosis" skill related to the hypertension entity. If the intent is missing, and the user asks "How to treat it?" in the current session, no entity is identified, but the intent "treatment method" is identified. This intent is determined to be of the same type as the intent from the previous session. Here, the entity can inherit from the previous session, filling in the complete entity and intent, further activating the "disease encyclopedia" skill.
[0066] S30. Store the multiple skills in the task stack according to their activation order, and recursively call the multiple skills activated in the session in the task stack.
[0067] In practical applications, the interactive text sequence during a session is [msg1, msg2, ..., msgn]. For each interactive text, a corresponding skill is activated, resulting in the skill sequence [task1, task2, ..., taskmm] in the task stack. The task stack maintains skill states, each with three states: suspended, active, and terminated. The suspended state occurs when the currently activated skill is switched to another skill, but the current skill is not terminated. The active state indicates the current skill is currently active. The terminated state indicates the current skill has finished using. The skill terminates when the task termination condition is met. The task termination condition may be that the user actively terminates the current skill by triggering an interactive button, or the current skill is passively terminated by the system after being suspended for a predetermined time. If all activated skills in the session terminate, the session ends. If the current skill terminates, the previously activated skill is reactivated. For example, if the completion or unexpected termination of the i-th skill satisfies the task termination condition, the session will continue to reactivate the suspended i-1 skills until all activated skills in the session are terminated.
[0068] It's important to understand that changes in the interactive text during a conversation affect the entities and intents identified by the interactive text recognition, causing the skills activated in the conversation to be enabled, disabled, or switched, thus altering the skill's state. Specifically, for example... Figure 7As shown, in step S30, multiple skills are stored in the task stack according to their activation order, and the multiple skills activated in the session in the task stack are recursively called, including the following steps:
[0069] S31. Store the multiple skills in the task stack according to their activation order, and update the task status of the corresponding skill in the task stack according to the execution result of each skill during the session.
[0070] S32. Using the task status of each skill in the updated task stack, recursively call multiple skills enabled in the session in the task stack.
[0071] Understandably, for a skill that has been activated, if the skill has been completed or unexpectedly terminated, fulfilling the task end conditions, the session will end the skill, updating its task status in the task stack to "completed." After the skill ends, the session will restart and activate other skills activated in the previous round of interaction text in the task stack. If an unexpected termination does not meet the task end conditions, the skill's task status in the task stack will be updated to "suspended," and then another skill will be switched to. If the skill has been activated and the session is currently in progress, the skill's status in the task stack will be updated to "activated."
[0072] S40. When the target skill is invoked, the session resource corresponding to the target skill is loaded and the session resource is output to the front end for display.
[0073] For the activation process of each skill in the task stack, the corresponding skill needs to be invoked, and based on the entity parameters passed in by the skill, the resource search for the corresponding entity type needs to be obtained, and the content to reply to the user and the status of the skill need to be sent out.
[0074] Furthermore, for the functions of hot-updating and hot-plugging skills, when a new skill is added, the configuration of the entity in the skill information needs to be updated. This is achieved by adding the skill to the skill management resource pool, thereby enabling resource discovery.
[0075] Specifically, such as Figure 8 As shown, in step S40, that is, when the target skill is invoked, the session resource corresponding to the target skill is loaded and the session resource is output to the front end for display, including the following steps:
[0076] S41. When the target skill is invoked, the necessary protocol information that the target skill needs to transmit is obtained based on the registration information and status information associated with the target skill.
[0077] S42. Provide the necessary protocol information that the target skill needs to transmit to the skill interface to return the session resource corresponding to the target skill, encapsulate the session resource corresponding to the target skill, and output the session resource to the front end for display.
[0078] Specifically, different skills acquire different entities and intentions. Even for the same skill, the conversational resources will output according to the entity and intention. For example, the skill of querying diseases outputs disease encyclopedia-like instructions, the skill of purchasing goods outputs the corresponding product list, and the skill of self-diagnosis, psychological assessment and other multi-turn task-oriented dialogue outputs access to self-diagnosis or assessment resources. The system will engage in multi-turn dialogue interaction with the user and then output the self-diagnosis or assessment results based on the interaction content.
[0079] To further illustrate the interaction process between the various modules in intelligent question answering, combined with Figure 9 and Figure 10 As shown, Figure 9 This is another flowchart of the intelligent question-answering method, including a user interaction module, a user information analysis module, a task stack, an entity graph, a skill cluster, and a response generation module. Figure 10 This is a skill call chain diagram in the intelligent question answering method. Specifically, in the intelligent question answering process, firstly, the user interaction module receives the input from the system user and passes the user input interaction text to the user information analysis module for intent recognition and entity recognition in sequence. Here, rules, models, and strategies can be used to calculate entities and intents. If no entity or intent is recognized from the interaction text, the entity inheritance management in the entity graph can be used to determine whether the entity or intent has a skill inheritance relationship. If so, the entity or intent from the previous round is inherited into the current round of the session, and the final entity and intent are returned. The task stack further activates different skill modules based on the identified entities and intentions. This task stack is connected to a skill cluster, and the skill stack in the skill cluster can simultaneously meet the functions of skill module invocation and suspension, breakpoint, and resumption of multiple skill modules. Each status bit carries the skill inheritance relationship of the entity or intention in the previous round. Here, the skill task module corresponding to the entity and intention can be found based on the registration information synchronized in the background and the current status information, and the necessary protocol parameters required by the skill task module are passed through. Then, the session resources corresponding to the corresponding skill module are obtained, the session resources are encapsulated, and output to the client through the response generation module to reply to the user.
[0080] In one embodiment, an intelligent question-answering device is provided, which corresponds one-to-one with the intelligent question-answering methods described in the above embodiments. For example... Figure 11 As shown, the intelligent question-and-answer device includes an acquisition module 101, a determination module 102, a calling module 103, and an output module 104. Detailed descriptions of each functional module are as follows:
[0081] The acquisition module 101 is used to acquire interactive text generated during the session in response to a session request sent by the user, and to identify entities and intentions involved in the session from the interactive text.
[0082] The determination module 102 is used to process the entities and intentions involved in the session using pre-configured multi-skill nesting logic, and determine multiple skills enabled in the session;
[0083] The module 103 is used to store the multiple skills in the order of their activation into the task stack, and to recursively call the multiple skills activated in the session in the task stack.
[0084] The output module 104 is used to encapsulate the session resources corresponding to the target skill when the target skill is invoked, and output the session resources to the front end for display.
[0085] In one embodiment, the multi-skill nesting logic includes a skill relationship mapping table, which records the logical relationships between entity and intent combinations and their corresponding enabled skills. The determining module is specifically used for:
[0086] The entities and intents involved in the session are standardized according to the intent hierarchy recorded in the entity graph using pre-configured multi-skill nesting logic.
[0087] By utilizing the logical relationship between entities and intent combinations and their corresponding enabled skills in the skill relationship mapping table, a skill access query is performed on the annotated entities and intent combinations to determine the multiple skills enabled in the session.
[0088] In one embodiment, the determining module is further configured to:
[0089] The pre-configured multi-skill nesting logic is used to determine whether the entities and intents involved in the session process meet the skill activation criteria defined in the entity graph;
[0090] If so, the entities and intents involved in the real-time conversation process will be treated as a standardized combination of entities and intents; otherwise, the entities and intents involved in the real-time conversation process will be processed into a combination of entities and intents that meet the skill activation standards according to the intent hierarchy recorded in the entity graph.
[0091] In one embodiment, the multi-skill nesting logic further includes an inheritance relationship mapping table, which records the logical relationships between entities or intentions that inherit enabled skills. The determining module is further configured to:
[0092] Use pre-configured multi-skill nested logic to determine whether the session process is missing an entity or intent;
[0093] If so, the logical relationship of entity or intent inheriting activated skills recorded in the inheritance relationship mapping table is used to verify whether there is a skill inheritance relationship for the missing entity or intent;
[0094] When there is an inheritance relationship between missing entities or intents, the inherited entities or intents are used to fill in the missing entities or intents in the session.
[0095] When an entity or intent is missing and there is no inheritance relationship, the interaction skill is triggered to push an interaction session to the user, and the missing entity or intent in the session is filled in according to the interaction text replied by the user.
[0096] In one embodiment, the determining module is further configured to:
[0097] Using the logical relationship of entity or intention to inherit activated skills recorded in the inheritance relationship mapping table, a skill transfer matrix corresponding to the entity and a skill transfer matrix corresponding to the intention are established respectively. The skill transfer matrix corresponding to the entity records the logical value of whether the entity performs skill transfer, and the skill transfer matrix corresponding to the intention records the logical value of whether the intention performs skill transfer.
[0098] The skill transfer matrix corresponding to the entity and the skill transfer matrix corresponding to the intent are used to traverse and query whether the missing entity or the entity corresponding to the intent in the previous round of the session has performed skill transfer and whether the intent has performed skill transfer.
[0099] Entities or intentions that perform skill transfer with a preset value are identified as entities or intentions with a skill inheritance relationship.
[0100] In one embodiment, the calling module is specifically used for:
[0101] The multiple skills are stored in the task stack in the order of their activation, and the task status of the corresponding skill in the task stack is updated according to the execution result of each skill during the session.
[0102] By utilizing the task status of each skill in the updated task stack, multiple skills enabled in the session of the task stack are recursively invoked.
[0103] In one embodiment, the output module is specifically used for:
[0104] When the target skill is invoked, the necessary protocol information that the target skill needs to transmit is obtained based on the registration information and status information associated with the target skill.
[0105] The necessary protocol information that the target skill needs to transmit is provided to the skill interface to return the session resource corresponding to the target skill. The session resource corresponding to the target skill is encapsulated and output to the front end for display.
[0106] This embodiment provides an intelligent question-answering device. By using multi-skill nesting logic to recursively call skills according to the order in the task stack, it can accurately connect to the appropriate skill module from complex calling relationships. At the same time, it monitors the skills in the task stack in real time, and then dynamically dispatches the calling of entities and intentions in the hierarchical skill chain. It also outputs and displays the corresponding conversation resources for the target skill being called, thereby improving the effect of intelligent question answering.
[0107] For specific limitations regarding the intelligent question-answering device, please refer to the limitations of the intelligent question-answering method above, which will not be repeated here. Each module in the aforementioned intelligent question-answering device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0108] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a smart question-answering method on the server side.
[0109] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a client-side intelligent question-answering method.
[0110] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0111] In response to a user’s session request, the system acquires the interactive text generated during the session and identifies the entities and intentions involved in the session from the interactive text.
[0112] The entities and intents involved in the session are processed using pre-configured multi-skill nesting logic to determine the multiple skills enabled in the session;
[0113] The multiple skills are stored in the task stack in the order of their activation, and the multiple skills activated in the session in the task stack are recursively called.
[0114] When the target skill is invoked, the session resource corresponding to the target skill is loaded and the session resource is output to the front end for display.
[0115] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0116] In response to a user’s session request, the system acquires the interactive text generated during the session and identifies the entities and intentions involved in the session from the interactive text.
[0117] The entities and intents involved in the session are processed using pre-configured multi-skill nesting logic to determine the multiple skills enabled in the session;
[0118] The multiple skills are stored in the task stack in the order of their activation, and the multiple skills activated in the session in the task stack are recursively called.
[0119] When the target skill is invoked, the session resource corresponding to the target skill is loaded and the session resource is output to the front end for display.
[0120] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0121] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0122] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0123] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. An intelligent question-answering method, characterized in that, The method includes: In response to a user’s session request, the system acquires the interactive text generated during the session and identifies the entities and intentions involved in the session from the interactive text. The pre-configured multi-skill nesting logic processes the entities and intents involved in the session to determine multiple skills enabled in the session. The multi-skill nesting logic includes an inheritance relationship mapping table, which records the logical relationships between entities or intents inheriting enabled skills. If the pre-configured multi-skill nesting logic determines that an entity or intent is missing in the session, the logical relationships between the entity or intent and enabled skills recorded in the inheritance relationship mapping table are used to establish a skill transfer matrix for the entity and a skill transfer matrix for the intent. The skill transfer matrix for the entity records the logical value indicating whether the entity or intent has performed a skill transfer, and the skill transfer matrix for the intent records the logical value indicating whether the intent has performed a skill transfer. The skill transfer matrices for the entity and the intent are then used to iterate and query the logical values indicating whether the missing entity or intent performed a skill transfer in the previous session. Entities or intents with a preset value indicating a skill transfer are identified as having a skill inheritance relationship. The multiple skills are stored in the task stack in the order of their activation, and the multiple skills activated in the session in the task stack are recursively called. When the target skill is invoked, the session resource corresponding to the target skill is loaded and the session resource is output to the front end for display.
2. The method according to claim 1, characterized in that, The process of using pre-configured multi-skill nesting logic to process entities and intents involved in the session and determine multiple skills enabled in the session specifically includes: The entities and intents involved in the session are standardized according to the intent hierarchy recorded in the entity graph using pre-configured multi-skill nesting logic. By utilizing the logical relationships between entities and intent combinations and their corresponding enabled skills in the skill relationship mapping table, a skill admission query is performed on the annotated entities and intent combinations to determine the multiple skills enabled in the session.
3. The method according to claim 2, characterized in that, The standardization process, which uses pre-configured multi-skill nesting logic to standardize the entities and intents involved in the session according to the intent hierarchy recorded in the entity graph, specifically includes: The pre-configured multi-skill nesting logic is used to determine whether the entities and intents involved in the session process meet the skill activation criteria defined in the entity graph; If so, the entities and intents involved in the real-time conversation process will be treated as a standardized combination of entities and intents; otherwise, the entities and intents involved in the real-time conversation process will be processed into a combination of entities and intents that meet the skill activation standards according to the intent hierarchy recorded in the entity graph.
4. The method according to claim 2, characterized in that, The method further includes: Use pre-configured multi-skill nested logic to determine whether the session process is missing an entity or intent; If so, the logical relationship of entity or intent inheriting activated skills recorded in the inheritance relationship mapping table is used to verify whether there is a skill inheritance relationship for the missing entity or intent; When there is an inheritance relationship between missing entities or intents, the inherited entities or intents are used to fill in the missing entities or intents in the session. When an entity or intent is missing and there is no inheritance relationship, the interaction skill is triggered to push an interaction session to the user, and the missing entity or intent in the session is filled in according to the interaction text replied by the user.
5. The method according to any one of claims 1-4, characterized in that, The step of storing the multiple skills in the task stack according to their activation order, and recursively calling the multiple skills activated in the session in the task stack, specifically includes: The multiple skills are stored in the task stack in the order of their activation, and the task status of the corresponding skill in the task stack is updated according to the execution result of each skill during the session. By utilizing the task status of each skill in the updated task stack, multiple skills enabled in the session of the task stack are recursively invoked.
6. The method according to any one of claims 1-4, characterized in that, When a target skill is invoked, the corresponding session resource is encapsulated, and the session resource is output to the front end for display. Specifically, this includes: When the target skill is invoked, the necessary protocol information that the target skill needs to transmit is obtained based on the registration information and status information associated with the target skill. The necessary protocol information that the target skill needs to transmit is provided to the skill interface to return the session resource corresponding to the target skill. The session resource corresponding to the target skill is encapsulated and output to the front end for display.
7. An intelligent question-and-answer device, characterized in that, The device includes: The acquisition module is used to respond to a user's session request, acquire the interactive text generated during the session, and identify the entities and intentions involved in the session from the interactive text; The determination module is used to process entities and intents involved in the session using pre-configured multi-skill nesting logic, determine multiple skills enabled in the session, and establish an inheritance relationship mapping table in the multi-skill nesting logic. This table records the logical relationships between entities or intents inheriting enabled skills. If the pre-configured multi-skill nesting logic determines that an entity or intent is missing in the session, the module utilizes the logical relationships between entities or intents inheriting enabled skills recorded in the inheritance relationship mapping table to establish a skill transfer matrix corresponding to the entity and a skill transfer matrix corresponding to the intent. The skill transfer matrix corresponding to the entity records the logical value indicating whether the entity performs a skill transfer, and the skill transfer matrix corresponding to the intent records the logical value indicating whether the intent performs a skill transfer. The module iterates through the skill transfer matrices corresponding to the entity and intent, respectively, to query the logical values indicating whether the missing entity or intent performed a skill transfer in the previous session. Entities or intents with a preset value indicating skill transfer are identified as having a skill inheritance relationship. The calling module is used to store the multiple skills in the order of their activation into the task stack, and to recursively call the multiple skills activated in the session in the task stack; The output module is used to encapsulate the session resources corresponding to the target skill when the target skill is invoked, and output the session resources to the front end for display.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Semantic logic-based pseudo-natural language human-computer dialogue device
CN102236645A
Man-machine conversation method and device, computer equipment and storage medium
CN111241249A