Knowledge question answering method and apparatus, and computing device

CN122616699APending Publication Date: 2026-08-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510192520.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0004]然而,在实际应用中,当用户描述问题时,输入的问题文本的内容可能是不够明确的,这使得知识问答系统直接基于用户输入的问题文本去检索和生成,所检索并生成的答复文本可能包括各个方面的笼统性的答复,或者包括与用户实际想描述的问题不符合的答复,且结束交互

Benefits of technology

[0042]本申请实施例第六方面提供一种计算机程序产品,当指令被计算设备集群运行时,使得计算设备集群执行如第一方面描述的任一种实现方式的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122616699A_ABST
    Figure CN122616699A_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to a knowledge question answering method, which comprises the following steps: determining a first node from a plurality of nodes based on a first prompt text input by a user, and the content of the first prompt text is similar to the content of a first reference question text mapped by the first node. If the first node is a non-leaf node, output at least one additional question text, then receive a second prompt text input by the user. Determine a second node from at least one child node of the first node based on the second prompt text, and the content of the second prompt text is similar to the content of a second reference question text mapped by the second node. And the second node is associated with one of the at least one additional question text. If the second node is a leaf node, output an answer text. The prompt text input by the user multiple times and the text mapped by the node are associated through the parent-child relationship between the nodes, so that the output answer text is more targeted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a knowledge question answering method, apparatus and computing device. Background Technology

[0002] With the rapid development of artificial intelligence and natural language processing technologies, knowledge question answering systems based on large-scale language models have been widely used in various fields. These systems possess powerful language processing capabilities, enabling them to provide users with appropriate answers by understanding the questions posed and their contextual information.

[0003] This paper proposes a knowledge question-answering system based on retrieval and generation. This system combines information retrieval with a generative model. Specifically, the user inputs a question text into the system, which then retrieves semantically related text from an external knowledge database. The retrieved text is then used as a prompt and input into the generative model, which directly generates the answer text corresponding to the user's question. This system can only handle a single question; that is, the user inputs one question, the system outputs the corresponding answer, and the interaction ends. When the user inputs a new question, the system initiates a new interaction, outputs the corresponding answer, and so on.

[0004] However, in practical applications, when users describe a problem, the content of the input question text may not be specific enough. This causes the knowledge-based question-answering system to directly retrieve and generate responses based on the user's input question text. The retrieved and generated responses may include general answers covering various aspects, or responses that do not actually match the user's intended question, and then the interaction ends. As a result, the accuracy of the responses output by the aforementioned knowledge-based question-answering system fails to meet user needs, affecting the user experience.

[0005] Therefore, improving the accuracy of the responses output by knowledge-based question-and-answer systems has become an urgent problem to be solved. Summary of the Invention

[0006] This application achieves multi-step reasoning on the input prompt text by matching the prompt text entered by the first user with nodes in a tree-structured node library. Based on the mapping relationship between each node and the reference question text and the appended question text, it gradually clarifies the first user's question intent and improves the accuracy of the output response text.

[0007] It should be noted that the tree structure node library can include a root node and its child nodes. The root node is always the parent node, and child nodes are further divided into leaf nodes and non-leaf nodes. A leaf node can be understood as a node without child nodes, while a non-leaf node can include at least one child node. In other words, a leaf node cannot be a parent node, but a non-leaf node can be either a child node or a parent node.

[0008] The first aspect of this application provides a knowledge question-answering method applicable to electronic devices such as computers, personal computers, and laptops. The method includes: first, receiving a first prompt text input by a first user; then, based on the first prompt text, determining a first node from multiple nodes in a tree-structured node library. The first node has a mapping relationship with a first reference question text, and the similarity between the content of the first prompt text and the content of the first reference question text reaches a first threshold. After determining the first node, if the first node is a non-leaf node, its child nodes can be further matched, and at least one additional question text corresponding to the first reference question text is output. The additional question text can be understood as question text further inferred from the first reference question text, used to guide the first user to continue inputting prompt text.

[0009] After outputting at least one additional question text corresponding to the first reference question text, a second prompt text input by the first user is received. Based on the second prompt text, a second node is determined from at least one child node of the first node. The second node has a mapping relationship with the second reference question text, and the similarity between the content of the second prompt text and the content of the second reference question text reaches a second threshold. Furthermore, since the second node is a child node of the first node, the second node has an association relationship with one of the at least one additional question texts. Finally, if the second node is a leaf node, the response text corresponding to the second prompt text is output to the first user.

[0010] In summary, the technical solution of the knowledge question-answering method provided in the first aspect of this application associates the prompt texts (e.g., the first prompt text and the second prompt text) input multiple times by the first user in this question-answering interaction with the reference question texts mapped to the nodes by establishing a parent-child relationship between a first node determined by the first prompt text and a second node determined by the second prompt text. This allows for hierarchical node matching and multi-step reasoning. Furthermore, by outputting corresponding appended question text each time a non-leaf node is matched, the first user is guided to input more targeted prompt text, thus clarifying the first user's intent. This makes the response text output after multi-step reasoning more targeted and improves the first user's experience during the interaction.

[0011] In one implementation, after determining the second node, if the second node is a non-leaf node, at least one target appended question text corresponding to the second reference question text needs to be output to guide the first user to further input a third prompt text. That is, after outputting at least one target appended question text, the third prompt text input by the first user is received. Based on the third prompt text, a third node is determined from at least one child node of the second node. The third node has a mapping relationship with the third reference question text, and the similarity between the content of the third prompt text and the content of the third reference question text reaches a third threshold. Furthermore, since the third node is a child node of the second node, the third node has an association relationship with one of the at least one target appended question texts. If the third node is a leaf node, the response text corresponding to the third prompt text is output. If the third node is a non-leaf node, similarly, the child nodes of the third node are matched again following the above steps.

[0012] In this implementation, based on the relationships between nodes, each time the first user inputs a prompt text, a node is matched against that prompt text until the prompt text matches a leaf node (meaning the leaf node has no other child nodes). At this point, there's no need to output a new follow-up question to the first user. Finally, the output is the corresponding response text to the prompt text input by the user. This process of progressively reasoning from the user's input prompt text clarifies the user's intent, ultimately providing a more targeted response text to the first user.

[0013] Optionally, the first threshold and the second threshold are the same value, or the first threshold and the second threshold are different values.

[0014] In one possible implementation, the method further includes: if the similarity between the content of the reference question text mapped to each node in at least one child node of the first node and the content of the second reference question text does not reach a second threshold, obtaining a fourth prompt text based on the second prompt text and at least one additional prompt text. Then, based on the fourth prompt text, re-matching is performed with each child node of the first node to determine the second node from at least one child node of the first node.

[0015] In this implementation, during the matching process between the second prompt text and each child node of the first node, if the similarity between the content of the reference question text mapped to each child node and the content of the second reference question text does not reach the second threshold, then a semantic rewriting operation can be performed on the second prompt text. This involves combining the user-inputted second prompt text with at least one appended question text corresponding to the first node to obtain a fourth prompt text. The third question text is then used to match nodes and determine the second node. This approach achieves the goal of incorporating contextual information from the user interaction process, making the semantics of the user-input prompt text more accurate.

[0016] In one possible implementation, the multiple nodes include at least one root node and at least one child node of the root node. When determining the first node from multiple nodes in the tree structure node library, firstly, based on the first prompt text, a target root node is determined from at least one root node. The target root node has a mapping relationship with the target reference question text, and the similarity between the content of the target reference question text and the content of the first prompt text reaches a fourth threshold. Then, based on the first prompt text, the first node is determined from at least one child node of the target root node.

[0017] In this implementation, the tree-structured node library can have at least one root node and at least one child node of the root node. A root node and its at least one child node can be understood as a knowledge tree. By first matching the initial prompt text with different root nodes to obtain the target root node whose similarity reaches the fourth threshold, and then further matching it with at least one child node of the target root node, the first node is finally determined. This makes the process of determining the first node faster and more accurate, eliminating the need for one-by-one similarity matching with all child nodes of all root nodes, thereby improving question-answering efficiency.

[0018] In one possible implementation, if the similarity between the content of the reference question text mapped to each root node of at least one root node and the content of the first prompt text does not reach a fourth threshold, the set response text is output.

[0019] In this implementation, when matching the first prompt text with different root nodes, if the similarity between the content of the reference question text mapped by all root nodes and the content of the first prompt text does not reach the fourth threshold, it means that the prompt text entered by the first user may not match any of the reference question texts mapped by each node. In this case, a set reply text is directly output to the first user.

[0020] In one possible implementation, before determining the first node from multiple nodes in the tree structure node library based on the first prompt text, the method further includes:

[0021] Receive the target document sent by the second user. Parse the target document to obtain at least one text and text information of the at least one text. Based on the at least one text and the text information, determine a tree-structured node library. The tree-structured node library includes multiple nodes, each of which has a mapping relationship with different reference question texts. The reference question texts are determined based on at least one text. The multiple nodes include non-leaf nodes and leaf nodes, and the non-leaf nodes include at least one child node.

[0022] In this implementation, the target document sent by the second user is parsed, for example, key information is extracted and transformed to obtain at least one text and its corresponding text information. A tree-structured node library is then constructed, establishing a mapping relationship between nodes and text, thus structuring the target document's data. Furthermore, parent-child relationships between nodes are built based on the text information of each text; that is, multiple nodes include both non-leaf and leaf nodes, and non-leaf nodes include at least one child node. This knowledge structuring approach allows the first user to more quickly locate the knowledge or information they need after inputting the prompt text, improving the efficiency and experience of user interaction.

[0023] In one possible implementation, the text information includes: at least one relationship between individual texts within a text.

[0024] In this implementation, when determining the tree structure node library based on the relationship between the texts in at least one text, the reference question texts mapped by the determined parent and child nodes can also have a relationship.

[0025] In one possible implementation, the reference question text includes a standard reference question text and at least one similar reference question text. Parsing the target document to obtain at least one text includes: obtaining at least one standard reference question text based on at least one text; obtaining at least one similar reference question text based on the standard reference question text and the guiding text, wherein the content of the similar reference question text matches the description in the guiding text, and the content of the similar reference question text is similar to the content of the standard reference question text.

[0026] In this implementation, after parsing the target document to obtain the standard reference question text, similar reference question text that matches the description in the guidance text can be generated based on the standard reference question text and the guidance text. This makes the similar reference question text more accurate when matching the similarity of the guidance text with the prompt text input by the first user. The guidance text can be a description of the application scenario or context that matches the standard reference question text.

[0027] A second aspect of this application provides a knowledge question-answering device, comprising: a first receiving module for receiving a first prompt text input by a first user; a first processing module for determining a first node from a plurality of nodes in a tree-structured node library based on the first prompt text, wherein the first node has a mapping relationship with a first reference question text, and the similarity between the content of the first prompt text and the content of the first reference question text reaches a first threshold; and an output module for outputting at least one appended question text corresponding to the first reference question text if the first node is a non-leaf node.

[0028] The first receiving module is further configured to receive a second prompt text input by the first user after outputting at least one appended question text corresponding to the first reference question text. The first processing module is further configured to determine a second node from at least one child node of the first node based on the second prompt text. The second node has a mapping relationship with the second reference question text, the similarity between the content of the second prompt text and the content of the second reference question text reaches a second threshold, and the second node has an association relationship with one of the at least one appended question texts. The output module is further configured to output a response text corresponding to the second prompt text if the second node is a leaf node.

[0029] In one possible implementation, the output module is further configured to output at least one target append question text corresponding to the second reference question text, if the second node is a non-leaf node.

[0030] The first receiving module is also configured to receive a third prompt text input by the first user after outputting at least one target append question text corresponding to the second reference question text.

[0031] The first processing module is also used to determine a third node from at least one child node of the second node based on the third prompt text. The third node has a mapping relationship with the third reference question text. The similarity between the content of the third prompt text and the content of the third reference question text reaches a third threshold. The third node has an association relationship with one of the target append question texts.

[0032] The output module is also used to output the response text corresponding to the third prompt text when the third node is a leaf node.

[0033] In one possible implementation, the first processing module is further configured to: if the similarity between the content of the reference question text mapped to each node in at least one child node of the first node and the content of the second reference question text does not reach a second threshold, obtain a fourth prompt text based on the second prompt text and at least one additional prompt text. The first processing module is further configured to determine a second node from at least one child node of the first node based on the fourth prompt text.

[0034] In one possible implementation, the multiple nodes include at least one root node and at least one child node of the root node; the first processing module is further configured to: determine a target root node from at least one root node based on the first prompt text, wherein the target root node has a mapping relationship with the target reference question text, and the similarity between the content of the target reference question text and the content of the first prompt text reaches a fourth threshold. Based on the first prompt text, determine a first node from at least one child node of the target root node.

[0035] In one possible implementation, the output module is further configured to: output a set response text when the similarity between the content of the reference question text mapped to each root node of at least one root node and the content of the first prompt text does not reach a fourth threshold.

[0036] In one possible implementation, the knowledge-answering device further includes: a second receiving module for receiving a target document sent by a second user; and a second processing module for parsing the target document to obtain at least one text and text information of the at least one text. The second processing module is further configured to: determine a tree-structured node library based on the at least one text and the text information of the at least one text. The tree-structured node library includes multiple nodes, each of which has a mapping relationship with different reference question texts. The reference question texts can be determined based on at least one text. The multiple nodes include non-leaf nodes and leaf nodes, and the non-leaf nodes include at least one child node.

[0037] In one possible implementation, the reference question text includes a standard reference question text and at least one similar reference question text. The second processing module is further configured to: parse the target document to obtain at least one standard reference question text; and based on the standard reference question text and the guiding text, obtain at least one similar reference question text, the content of which matches the description in the guiding text, and the content of the similar reference question text is similar to the content of the standard reference question text.

[0038] In one possible implementation, the text information includes: at least one relationship between individual texts within a text.

[0039] A third aspect of this application provides a computing device including a processor and a memory. The processor of the computing device is used to execute instructions stored in the memory of the computing device, so that the computing device performs a method as described in any of the implementations of the first aspect.

[0040] A fourth aspect of this application provides a computing device cluster including at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, causing the computing device cluster to perform a method as described in any of the implementations of the first aspect.

[0041] A fifth aspect of this application provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, perform a method as described in any of the implementations of the first aspect.

[0042] The sixth aspect of this application provides a computer program product that, when an instruction is executed by a computing device cluster, causes the computing device cluster to perform a method as described in any of the implementations in the first aspect.

[0043] The technical effects of the second to sixth aspects mentioned above can be referred to the technical effects of any possible implementation of the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application;

[0045] Figure 2 A flowchart illustrating a knowledge question-answering method provided in an embodiment of this application;

[0046] Figure 3 A schematic diagram of a tree-structured node library provided in an embodiment of this application;

[0047] Figure 4 A schematic diagram of an interactive interface for the construction phase of a tree-structured node library provided in an embodiment of this application;

[0048] Figure 5 A schematic diagram of another interactive interface for the tree structure node library construction stage provided in the embodiments of this application;

[0049] Figure 6 Another flowchart illustrating the knowledge question-answering method provided in this application embodiment;

[0050] Figure 7 A schematic diagram of another interactive interface for the knowledge question-answering method provided in the embodiments of this application;

[0051] Figure 8 A schematic diagram of the structure of the knowledge question-answering device provided in the embodiments of this application;

[0052] Figure 9 A schematic diagram of the structure of a computing device provided in an embodiment of this application;

[0053] Figure 10 This is a schematic diagram of a computing device cluster provided in an embodiment of this application;

[0054] Figure 11 This is a schematic diagram illustrating the connection method between computing device clusters provided in an embodiment of this application. Detailed Implementation

[0055] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such terms are interchangeable where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0056] It should be understood that, in addition, the character " / " in this document generally indicates that the preceding and following objects are in an "or" relationship. The phrase "at least one of the following" or similar expressions in this document are used to indicate any combination of the listed items; for example, at least one of A, B, and / or C can represent the following six situations: A exists alone, B exists alone, C exists alone, A and B exist simultaneously, B and C exist simultaneously, A and C exist simultaneously, and A, B, and C exist simultaneously, where A, B, and C can be single or multiple. In the embodiments of this application, "instruction" can mean control, that is, one object controls another object to perform an action, and the controlled object must perform the action. Furthermore, "instruction" can also mean notification, that is, one object informs another object to perform an action, and the object informed to perform the action can choose to perform the action or not. In addition, "instruction" can be a direct instruction, such as one object directly issuing the instruction to another object; or it can be an indirect instruction, that is, one object issuing the instruction to another object through one or more intermediate objects. Furthermore, the meaning of "instruction" can also be interpreted based on the meaning expressed in the embodiments of this application, and is not limited here. The term "one or more" in the embodiments of this application can be understood as one or more, and vice versa. "One or more" can also mean "at least one".

[0057] This application provides a knowledge question-answering method and a knowledge tree construction method, which are used to structure knowledge information and other data, and match user-input questions based on the structured knowledge, so that the user can obtain clarification of intent, and finally output targeted answers to the user. This application also provides corresponding electronic devices, computer-readable storage media, etc. To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0058] refer to Figure 1 , Figure 1 This is a schematic diagram of a computing device provided in an embodiment of this application. The knowledge-based question-answering method involved in this embodiment can be applied to computing devices such as personal computers, laptops, or smart screens. The computing device can be equipped with a knowledge-based question-answering system, which can interact with the user through the display interface of the computing device. The computing device 100 includes a display unit 101, a processor 102, and a memory 103. The computing device 101 is used to realize the interaction between the user and the computing device. The processor 102 can implement the knowledge-based question-answering method provided in this embodiment by running a computer program stored in the memory 103. For example, the display unit 101 of the computing device 100 displays a first interface, through which a first user can interact and complete the knowledge-based question-answering method. Alternatively, the display unit 101 of the computing device 100 displays a second interface, through which a second user can interact with the knowledge-based question-answering system.

[0059] The above describes the computing device structure used in the embodiments of this application. The following will further detail the specific implementation process of the knowledge question-answering method provided in the embodiments of this application. A first user can construct a tree-structured node library using the computing device, and a second user can perform the interactive knowledge question-answering process using the computing device. In other words, the embodiments of this application can be specifically divided into a tree-structured node library construction stage and a knowledge question-answering stage based on the tree-structured node library:

[0060] I. Tree structure node library construction phase:

[0061] First, a tree structure can be understood as a tree-like structure of related knowledge or information obtained by structuring data such as knowledge or information. A tree structure is a hierarchical data structure composed of multiple nodes. In a tree structure node library, each node can have zero or more child nodes but only one parent node (the root node has no parent node). In other words, each tree includes a root node and at least one child node of the root node, where the root node is always the parent node. Each node is further divided into leaf nodes and non-leaf nodes. A leaf node can be understood as a node without child nodes, while a non-leaf node can have at least one child node. In other words, a leaf node cannot be a parent node, while a non-leaf node can be either a child node or a parent node.

[0062] Based on the above explanation of the tree structure, during the construction phase of the tree structure node library, the nodes in the tree structure node library are associated with knowledge or information from different application domains to construct the corresponding tree structure node library. This is used to match the prompt text input by the first user and output the corresponding appended question text or answer text.

[0063] refer to Figure 2 , Figure 2 This is a flowchart illustrating a knowledge question-answering method provided in an embodiment of this application. For each node in the tree-structured node library, the following steps can be performed to associate the node with knowledge or information (e.g., associate the node with the reference question text) and determine the node attributes (e.g., determine whether the node is a leaf node or a non-leaf node), ultimately completing the construction of the tree-structured node library.

[0064] Step 201: Receive the target document sent by the second user.

[0065] Optionally, the computing device can receive the target document input by the first user in response to the input operation of the second user on the second interface.

[0066] Optionally, the computing device can receive input from a second user on a second interface, and in response to the second user's input, receive reference question text or appended question text for each node. Then, it associates the reference question text or appended question text input by the second user with the corresponding node. Furthermore, it determines each node as a leaf node or a non-leaf node by receiving and responding to the second user's user instructions.

[0067] For example, the second interface of the computing device displays an "Edit Root Node" module. A second user can enter reference question text for the root node in the "Node Name" module of the "Edit Root Node" module, allowing the computing device to receive and respond to this input, obtaining the reference question text or appended question text entered by the second user. As another example, a second user can enter reference question text or appended question text for node A in the "Node Name" module of the "Edit Node A" module, allowing the computing device to receive and respond to this input, obtaining the reference question text or appended question text entered by the second user for node A.

[0068] Understandably, target documents can include documents from different application areas, and there can be more than one target document; no specific limitation is made here.

[0069] Step 202: Parse the target document to obtain at least one text and the text information of at least one text.

[0070] Optionally, at least one text may include multiple different reference question texts used to match the prompt text entered by the first user. Alternatively, at least one text may include multiple different append question texts used to output to the first user.

[0071] Optionally, at least one text includes at least one reference question text, which includes a standard reference question text and at least one similar reference question text. When the computing device parses the target document, it first obtains at least one standard reference question text. Then, based on the standard reference question text and the guiding text, it obtains at least one similar reference question text, the content of which matches the description in the guiding text, and the content of the similar reference question text is similar to the content of the standard reference question text.

[0072] For example, after receiving a target document sent by a second user, the computing device inputs the target document into a large language model, which then parses and processes the target document. First, the target document is split using the large language model to obtain at least one text, which includes at least one standard reference question text. Then, the large language model performs entity recognition (ER) and relation extraction (RE) on the standard reference question text to obtain the relationships between the various texts within the at least one standard reference question text. The textual information of the at least one text can represent the relationships between the entities corresponding to the various texts within that at least one text.

[0073] Then, the computing device inputs at least one standard reference question text and a guiding text into the second large language model to obtain at least one similar reference question text, such that the content of the similar reference question text matches the description of the guiding text, and the content of the similar reference question text is similar to the content of the standard reference question text.

[0074] Optionally, the guiding text may include descriptions of the reference question text in different application scenarios. Alternatively, the guiding text may include descriptions of the interrogative sentences within the reference question text. Or, the guiding text may include descriptions of the extensions of the reference question text. Understandably, the content of the guiding text may also be other descriptions of the reference question text, which are not specifically limited here.

[0075] For example, if the reference question text is "The first user reports that the water purifier display screen is malfunctioning," and the guiding text is described as "modify the reference question text to fit the context of the first user's question," then after inputting the reference question text and the guiding text into the large language model, the large language model can generate similar reference question text, such as "My water purifier display screen is malfunctioning, what should I do?", making the description of the similar reference question text more consistent with the context of the first user's question.

[0076] Understandably, the computing device can also parse the target document using other models. The relationship between the texts in at least one text may include the semantic subordinate relationship between the texts, or the relationship between the texts in at least one text may include the semantic progressive relationship between the texts, which is not limited here.

[0077] Optionally, at least one text may also include at least one additional question text, with different additional question texts having a mapping relationship with each node. There may also be association relationships between different additional question texts and different reference question texts.

[0078] For example, in the field of electrical appliance applications, a second user inputs the appliance's after-sales service instructions as the target document into a computing device. After receiving the target document, the computing device parses it using a large language model, obtaining multiple text entities and entity relationships. These entities include "water purifier," "display screen," "power cord," "remote control," "not lit," "malfunction," "no response," and "inoperable," etc. The relationships between these entities can be: "water purifier" as the main entity, "display screen," "power cord," and "remote control" as components of the "water purifier" main entity, and "not lit," "malfunction," "no response," and "inoperable" as malfunctions of the main entity or components.

[0079] Therefore, based on the relationships between entities obtained from the large language model, multiple different reference question texts can be determined. For example, the reference question texts could be "The water purifier is malfunctioning," "The water purifier's display screen is not lit," "The water purifier's remote control is not responding," or "The water purifier's power cord is faulty," etc. These reference question texts can also be used as additional question texts.

[0080] It's important to note that a large language model (LLM) refers to a deep learning model trained on a large amount of text data, capable of generating natural language text or understanding the meaning of language text. Entity recognition and relation extraction are core skills in natural language processing, enabling the identification and extraction of entity and relational information from text. Entity recognition refers to the process of identifying and labeling entities in a given text. Entities can be people, organizations, places, times, products, etc. Relationship extraction refers to the process of identifying and extracting the relationships between entities in a given text. These relationships can be semantic relationships, logical relationships, subordinate relationships, etc.

[0081] Step 203: Determine the tree structure node library based on at least one text and the text information of at least one text.

[0082] Optionally, a tree-structured node library is determined based on at least one text and the textual information of at least one text. The tree-structured node library includes multiple nodes, each of which has a mapping relationship with different reference question texts. The multiple nodes include non-leaf nodes and leaf nodes, and each non-leaf node includes at least one child node.

[0083] Optionally, based on at least one text, different reference question texts are identified, and a mapping relationship can be established between the different reference question texts and each node. Furthermore, based on the textual information of at least one text (e.g., the relationships between texts within at least one text), the relationships between different reference question texts are determined, that is, the parent-child relationships between each node are determined, or in other words, each node is determined to be a leaf node or a non-leaf node. This completes the construction of the tree-structured node library.

[0084] For example, multiple reference question texts could be "The water purifier is malfunctioning," "The water purifier's display screen is not lit," "The water purifier's remote control is unresponsive," or "The water purifier's power cord is faulty." These different reference question texts have semantic hierarchical or associative relationships; that is, "The water purifier is malfunctioning" includes the three different situations: "The water purifier's display screen is not lit," "The water purifier's remote control is unresponsive," and "The water purifier's power cord is faulty." Therefore, the computing device can establish a mapping relationship between the reference question text "The water purifier is malfunctioning" and node 1, and create three child nodes for node 1. These three child nodes are respectively mapped to the three reference question texts: "The water purifier's display screen is not lit," "The water purifier's remote control is unresponsive," and "The water purifier's power cord is faulty."

[0085] Optionally, after determining at least one reference question text, at least one additional question text can be determined based on the relationships between different reference question texts. Furthermore, a mapping relationship is established between the at least one additional question text corresponding to the reference question text and the node mapped to the reference question text. This completes the construction of the tree-structured node library. That is, in the tree-structured node library, each node has a mapping relationship with both a reference question text and at least one additional question text, wherein there is a semantic relationship between the reference question text mapped to the node and the at least one additional question text. Moreover, there is a relationship between the at least one additional question text mapped to the parent node and the reference question text mapped to the child node.

[0086] For example, at least one reference question text may include "The water purifier is malfunctioning," "The water purifier's display screen is not lit," "The water purifier's remote control is unresponsive," or "The water purifier's power cord is faulty." The computing device establishes a mapping relationship between the reference question text "The water purifier is malfunctioning" and node 1, between the reference question text "The water purifier's display screen is not lit" and child node 1 of node 1, between the reference question text "The water purifier's remote control is unresponsive" and child node 2 of node 1, and between the reference question text "The water purifier's power cord is faulty" and child node 3 of node 1. Furthermore, "The water purifier's display screen is not lit," "The water purifier's remote control is unresponsive," or "The water purifier's power cord is faulty" are treated as at least one additional question text and mapped to node 1.

[0087] The steps described above involve the computing device parsing the target document to obtain the reference question text, appended question text, or answer text. In addition, the reference question text, appended question text, or answer text can also be input into the computing device by a second user. That is, the computing device receives the reference question text, appended question text, or answer text input by the second user and establishes a mapping relationship between them and the corresponding nodes. Specifically:

[0088] For example, refer to Figure 3 , Figure 3 This is a schematic diagram of a tree-structured node library provided in an embodiment of this application. A "Edit Root Node" module is displayed on the second interface of the computing device. A second user can input reference question text, append question text, or answer text for the root node in the "Edit Root Node" module. Clicking the "Save" module triggers a user command, which the computing device receives and responds to, establishing a mapping relationship between the received reference question text, append question text, or answer text and the root node, respectively.

[0089] For example, refer to Figure 4 , Figure 4 This is a schematic diagram of an interactive interface during the construction phase of the tree-structured node library provided in this application embodiment. The second user inputs the reference question text "User feedback: Water purifier display screen is malfunctioning" into the computing device, and the appended question text "Hello, what is the specific malfunction of the display screen? The display screen is not lit; the display screen is distorted" into the computing device. The computing device then establishes a mapping relationship between the reference question text and the appended question text and the root node, respectively. When the second user inputs a user command to generate similar reference question text (e.g., clicking the "Generate User Question" module on the second display interface), the computing device obtains at least one similar reference question text based on the reference question text and the guiding text, namely, "My water purifier display screen is malfunctioning, what should I do?" or "My water purifier display screen is broken, what is the reason?".

[0090] Optionally, user instructions can be input by a second user to the computing device via click operations on a second interface. For example, such as... Figure 3 As shown, the second interface of the computing device displays a "Create Child Node" module and a "Delete Current Node" module. The second user inputs a user command (e.g., clicking the "Create Child Node" module on the root node on the second interface), enabling the computing device to receive and respond to the user command, associating node A and node B with the root node, making nodes A and B child nodes of the root node. Similarly, node A can also be defined as a non-leaf node, meaning that node A's child nodes include nodes a and b.

[0091] For example, a second user inputs the reference question text "User feedback: Water purifier display screen is malfunctioning, specifically, the screen is not lit" into the computing device, and the appended question text "Hello, is it that the display screen does not respond and cannot light up after the water purifier is plugged in?" into the computing device. The computing device then establishes a mapping relationship between the reference question text and the appended question text and node A, respectively. When the second user inputs a user command to generate similar reference question text (e.g., clicking the "Generate User Question" module on the second interface), the computing device obtains at least one similar reference question text based on the reference question text and the guiding text, namely, "My water purifier display screen is not lit, what should I do?" and "My water purifier display screen is not lit during use, what is the reason?". In this case, the reference question text of node A is associated with an appended question text of the root node (i.e., the parent node of node A).

[0092] Understandably, the "Create Child Node" and "Delete Current Node" modules can be displayed using different icons or directly as text, allowing a second user to create or delete child nodes by clicking or touching the displayed icons or text. Besides this, the modules can also be presented to the second user in other ways, which are not limited here.

[0093] In summary, based on steps 201 to 203 above, the mapping between nodes and text and the determination of node attributes can be performed. This process is repeated cyclically to gradually build each node until one or more tree-structured node libraries are constructed, resulting in one or more tree-structured node libraries containing multiple nodes, and the nodes in the tree-structured node libraries contain knowledge information. Understandably, different tree-structured node libraries can include knowledge or information from different application domains, or different tree-structured node libraries can include knowledge or information from different products within the same application domain; specific limitations are not specified here.

[0094] It should be noted that during the construction phase of the tree structure node library, post-processing can be performed after the library is built. For example, nodes can be simplified by removing redundant nodes. Another example is verifying the knowledge or information of nodes to avoid isolated nodes. Specifically, a node is considered redundant when the similarity between the reference question text mapped to a node and the reference question text mapped to one or more other nodes is higher than a first set threshold. Conversely, a node is considered isolated when the similarity between the reference question text mapped to a node and the reference question text mapped to any other node is lower than a second set threshold. Understandably, the first set threshold is greater than the second set threshold, and both thresholds can be customized; specific limitations are not specified here.

[0095] The following example illustrates the construction process of the tree-structured node library described above:

[0096] refer to Figure 3 , Figure 4 and Figure 5 , Figure 3 A schematic diagram of a tree-structured node library provided in an embodiment of this application; Figure 4 A schematic diagram of an interactive interface for the construction phase of a tree-structured node library provided in an embodiment of this application; Figure 5 This is a schematic diagram of another interactive interface for the construction stage of the tree structure node library provided in the embodiments of this application.

[0097] Example 1: In the field of electrical appliance applications, construct a tree-structured node library related to after-sales service for water purifier appliances.

[0098] like Figure 3 As shown, the second user interacts with the computing device through a second interface used to construct the tree-structured node library 1. First, by clicking the "Create" module of the root node on the second interface, the user triggers a command. The computing device receives and responds to this command, creating two new child nodes, "Node A" and "Node B," under the root node. This associates the root node with Node A and Node B; at this point, the root node becomes the parent node of Node A.

[0099] Then, the second user triggers a user command by clicking the "Create" module of node A on the second interface. The computing device receives and responds to the user command, creating two new child nodes "node a" and "node b" under node A. Thus, the construction of the tree structure node library 1 is completed, that is, the tree structure node library 1 includes 5 nodes, where node A is the first-level non-leaf node of the root node, node B is the first-level leaf node of the root node, node A is the parent node of nodes a and b, nodes a and b are the first-level child nodes of node A, and nodes a and b are the second-level child nodes of the root node.

[0100] like Figure 4As shown, based on this, the second user can input reference question text, append question text, or answer text for the root node through the second interface. First, the second user inputs the reference question text "User feedback: Water purifier display screen is malfunctioning" in the "Node Name" section of the "Edit Root Node" module on the second interface. The computing device receives the second user's input and, in response, establishes a mapping relationship between "User feedback: Water purifier display screen is malfunctioning" and the root node. When the second user triggers a user command by clicking "Generate New User Question" in the "User Question" section of the "Edit Root Node" module, the computing device responds to the user command and generates similar reference question text. For example, Question 1: "My water purifier display screen is malfunctioning, what should I do?", Question 2: "My water purifier display screen is broken, what is the reason?".

[0101] The second user enters additional question text in the "Reply Content" section of the "Edit Root Node" module on the second interface: "Hello, what is the specific fault of the display? The display is not lit; the display is distorted." The computing device receives the user's input and, in response, establishes a mapping relationship between the additional question text and the root node.

[0102] Similarly, a second user can construct node A through a second interface, such as... Figure 5 As shown, the reference question text mapped to node A is "User feedback: The water purifier display screen is malfunctioning, specifically, the screen is not lit." Similar reference question texts are: Question 1: "My water purifier display screen is not lit, what should I do?", Question 2: "My water purifier display screen is not lit during use, what could be the reason?". An additional question text is: "Hello, is it that the display screen does not respond and cannot light up after the water purifier is plugged in?".

[0103] Based on the above description of the specific implementation process of the tree structure node library construction method, the construction process of the tree structure node library has been explained. After the tree structure node library is constructed, it can be applied to knowledge question-and-answer interaction with the first user. The following will introduce the specific implementation process of the knowledge question-and-answer method provided in the embodiments of this application.

[0104] II. First User Knowledge Question and Answer Interaction Phase:

[0105] Based on the construction phase of the tree-structured node library, the knowledge question-answering system deployed on the computing device can interact with the user based on this knowledge tree.

[0106] refer to Figure 6 , Figure 6 This is another flowchart illustrating the knowledge question-answering method provided in the embodiments of this application.

[0107] The following explanation uses a user completing a full knowledge Q&A interaction as an example. A full knowledge Q&A interaction can be understood as the process from the first user entering the prompt text to the final computer device outputting the response text.

[0108] Step 601: Receive the first prompt text input by the first user.

[0109] During the knowledge-based question-and-answer interaction, the first user can input initial prompt text on the first interface of the computing device to obtain the corresponding response text. The computing device can obtain the initial prompt text input by the first user based on their input. Understandably, the initial prompt text can be a textual description of the question the first user wants to ask. For example, the initial prompt text input by the user could be, "My water purifier's display screen is not lit, what should I do?", but this is not specifically limited here.

[0110] Step 602: Based on the first prompt text input by the first user, determine the target root node from at least one root node.

[0111] For example, refer to Figures 2 to 5 The specific implementation process of the construction phase of the described tree-structured node library is as follows: the tree-structured node library includes multiple nodes, wherein the multiple nodes may include at least one root node and at least one child node of the root node. Based on the first prompt text, a target root node is determined from at least one root node in the tree-structured node library. The target root node has a mapping relationship with the target reference question text, and the similarity between the content of the first prompt text and the content of the target reference question text reaches a fourth threshold.

[0112] For example, based on the first prompt text input by the first user, the target knowledge tree is first determined from at least one knowledge tree. If, during the construction phase of the tree structure node library, the tree structure node library includes Knowledge Tree 1 and Knowledge Tree 2, and the reference question text of the root node of Knowledge Tree 1 is "User reports water purifier malfunction," and the reference question text of the root node of Knowledge Tree 2 is "User reports robot vacuum cleaner malfunction," and the first prompt text input by the first user is "My water purifier is not working properly, what should I do?", then this first prompt text is matched against the root nodes of Knowledge Tree 1 and Knowledge Tree 2, respectively. Finally, if the similarity between the reference question text mapped to the root node of Knowledge Tree 1 and the first prompt text reaches a fourth threshold, then the root node of Knowledge Tree 1 is determined as the target root node.

[0113] Optionally, if the content of the reference question text mapped to multiple root nodes in at least one root node has a similarity to the content of the first prompt text that reaches a fourth threshold, then the root node with the highest similarity is determined as the target root node. If the content of the reference question text mapped to each root node in at least one root node has a similarity to the content of the first prompt text that is less than the fourth threshold, and no target root node can be matched, then the set reply text is directly output to the first user. Understandably, the set reply text is used to inform the user that the prompt text entered may be incorrect. For example, the set reply text could be "Sorry, the content you entered is not within the scope of this field, please re-enter." Specific details are not limited here.

[0114] Optionally, the similarity between the content of the reference question text mapped to each root node and the content of the first prompt text can be represented by an evaluation score. The evaluation score for the similarity between multiple texts is a quantitative indicator that can be used to measure the degree of similarity between texts in terms of content, structure, expression, etc. For example, the evaluation score can range from 0 to 1; the closer the score is to 1, the higher the similarity between the texts.

[0115] It should be noted that the similarity between two texts can be calculated by mapping the texts to a low-dimensional vector space and evaluating the similarity between the vectors. Alternatively, a deep neural network can be used to model the texts and the similarity between the model outputs can be directly calculated. The specific approach is not limited here. Understandably, the similarity between the reference question text mapped from the root node and the first prompt text input by the first user can be cosine similarity or other metrics that measure the semantic or content-level closeness of the two texts; the specific approach is not limited here.

[0116] Step 603: Based on the first prompt text input by the first user, determine the first node from at least one child node of the target root node.

[0117] For example, after determining the target root node, the first node is determined from at least one of its child nodes. For instance, the target root node is the root node of knowledge tree 1, which also has child nodes A and B. The reference question text for child node A is "Users report that the water purifier's display screen is not lit," and the reference question text for node B is "Users report that the water purifier's display screen is lit but the screen is distorted." Then, if the first prompt text is "My water purifier is not working properly, what should I do?", after calculating the similarity between the first prompt text and the reference question texts of nodes A and B respectively, if the similarity between the reference question text mapped to node A and the first prompt text reaches a first threshold, then node A is determined as the first node.

[0118] Optionally, if the content of the reference question text mapped to multiple nodes in at least one child node of the target root node all have a similarity to the content of the first prompt text that reaches a first threshold, then the node with the highest similarity is determined as the first node. If the content of the reference question text mapped to each node in at least one child node of the target root node does not reach the first threshold and cannot be matched with the first node, then the response text mapped to the target root node is directly output to the first user.

[0119] Understandably, the relevant information regarding the evaluation score and similarity calculation of at least one child node of the target root node can be found in the description of step 602, and will not be repeated here.

[0120] Step 604: If the first node is a leaf node, output the response text corresponding to the first prompt text.

[0121] For example, since leaf nodes have no child nodes, when the first node matched by the first prompt text is a leaf node, the response text matching the content of the first prompt text is output, ending the current knowledge-based question-and-answer interaction. Optionally, the response text can be generated by the computing device through a large language model, or the response text can be input by a second user and the computing device can establish a mapping relationship between the response text and the first node.

[0122] Step 605: If the first node is a non-leaf node, output at least one additional question text corresponding to the first reference question text.

[0123] For example, non-leaf nodes also include at least one leaf node or non-leaf node. If the first prompt text input by the first user matches the first node, then the at least one additional prompt text output by the computing device corresponding to the first reference prompt text also actually corresponds to the first prompt text. The at least one additional prompt text corresponding to the first reference prompt text can be understood as further reasoning about the first reference prompt text mapped from the first node.

[0124] At least one additional question text is output to the first user to guide them to further input a second prompt text, thereby clarifying their intent. This allows the second prompt text to continue matching with the non-leaf nodes of the first node.

[0125] For example, if the first prompt text entered by the first user is "My water purifier display screen is malfunctioning, what should I do?", and the reference question text of the first node matching the first prompt text is "User reports water purifier display screen malfunction", then at least one additional question text corresponding to the first reference question text could be "What is the specific malfunction of the water purifier display screen? The display screen is not lit, or the display screen is distorted."

[0126] Step 606: Receive the second prompt text input by the first user.

[0127] For example, based on step 605, after the computing device outputs at least one additional question text to the first user, it waits for the first user to further input a second prompt text. The first user can input the second prompt text on the first interface of the computing device.

[0128] Optionally, the second prompt text can be understood as a response text made by the first user based on at least one additional question text corresponding to the first reference question text. For example, the additional question text might be, "What specific fault is it? The screen is not lit, or the screen is distorted?" The first user can respond accordingly by entering the second prompt text, "Specifically, the screen is not lit." The second prompt text can also be understood as a further question raised by the first user based on at least one additional question text corresponding to the first reference question text. For example, if the first additional question text is, "What specific fault is it? The screen is not lit, or the screen is distorted?", the first user can continue to describe their further questions based on this additional question text and enter the second prompt text, "What should I do if the screen is not lit?".

[0129] Step 607: Based on the second prompt text input by the first user, determine the second node from at least one child node of the first node.

[0130] For example, when the first user further inputs second prompt text, a second node is determined from at least one child node of the first node. The second node has a mapping relationship with a second reference question text, and the similarity between the content of the second prompt text and the content of the second reference question text reaches a second threshold. Furthermore, since the second node is a child node of the first node, the second node is associated with one of the at least one additional question texts.

[0131] Understandably, the association between the second node and one of the at least one additional question texts can be understood as a semantic association between the reference question text mapped by the second node and one of the at least one additional question texts, for example, a semantic subordinate association.

[0132] Optionally, if the content of the reference question text mapped to at least one child node of the first node and the content of the second prompt text all reach the second threshold in similarity, then the child node with the highest similarity is determined as the second node.

[0133] Optionally, if the similarity between the content of the reference question text mapped to each node in at least one child node of the first node and the content of the second reference question text does not reach the second threshold, a fourth prompt text is obtained based on the second prompt text and at least one additional prompt text. Then, based on the fourth prompt text, it is re-matched with each child node of the first node to determine the second node from at least one child node of the first node.

[0134] Optionally, the first threshold and the second threshold can be the same value or different values. Understandably, the second threshold can be customized, but this is not limited here.

[0135] Understandably, the relevant information regarding the evaluation scores and similarity calculations of at least one child node of the first node can be found in the description of step 602, and will not be repeated here.

[0136] Step 608: If the second node is a leaf node, output the response text.

[0137] For example, since leaf nodes have no child nodes, when the second node matched by the second prompt text is a leaf node, the response text matching the content of the second prompt text is output, ending the current knowledge-based question-and-answer interaction. Optionally, the response text can be generated by the computing device through a large language model, or the response text can be input by the second user and the computing device can establish a mapping relationship between the response text and the second node.

[0138] Step 609: If the second node is a non-leaf node, output at least one target append question text corresponding to the second reference question text.

[0139] Step 610: Receive the third prompt text input by the first user.

[0140] Step 611: Based on the third prompt text, determine the third node from at least one child node of the second node. The third node has a mapping relationship with the third reference question text, and the similarity between the content of the third prompt text and the content of the third reference question text reaches a third threshold. Furthermore, since the third node is a child node of the second node, the third node has an association relationship with one of the at least one target append question texts.

[0141] Step 612: If the third node is a leaf node, output the response text corresponding to the third prompt text.

[0142] Understandably, the implementation process of steps 609 to 612 can be referred to the detailed explanation of steps 605 to 608, and will not be repeated here. If the third node is a non-leaf node, similarly, refer to steps 609 to 612 above to continue matching the child nodes of the third node.

[0143] It should be noted that the set threshold, first threshold, second threshold, third threshold, and fourth threshold described in the embodiments of this application can all be customized. The first threshold, second threshold, third threshold, and fourth threshold can have at least two identical thresholds or each threshold can be different. Their specific values ​​or contents are not limited here.

[0144] The following example illustrates the knowledge-based question-and-answer interaction process using a specific application scenario:

[0145] Example 2: The tree-structured node library includes Knowledge Tree 1 and Knowledge Tree 2. The root node of Knowledge Tree 1 maps to the reference question text "User feedback: Water purifier display screen is malfunctioning," with the appended question text "Hello, what is the specific malfunction of the display screen? The display screen is not lit, or the display screen is distorted." The child node A of the root node maps to the reference question text "User feedback: Water purifier display screen is malfunctioning, specifically the display screen is not lit." The appended question text for child node A is "Hello, is the display screen unresponsive and unable to light up after the water purifier is plugged in?"

[0146] In this scenario, child node A is a non-leaf node. The reference problem text mapped to child node a of child node A is "User feedback: The display screen does not respond after being plugged in and cannot light up." The response text mapped to child node a of child node A is "Hello, we apologize for the inconvenience. We will contact on-site repair for you as soon as possible." The reference problem text mapped to child node b of child node A is "User feedback: The display screen responds after being plugged in and lights up." The response text mapped to child node b is "Hello, we apologize for the inconvenience. We will contact on-site repair for you as soon as possible."

[0147] Child node B is a leaf node, and the mapped reference problem text is "User feedback: The water purifier display screen is malfunctioning, specifically the screen is displaying a distorted image." The mapped response text for node B is "Hello, we apologize for the inconvenience. We will arrange on-site repair for you as soon as possible."

[0148] The reference question text mapped to the root node of Knowledge Tree 2 is "User feedback: The sweeping brush head of the robot vacuum cleaner is malfunctioning".

[0149] refer to Figure 7 , Figure 7 This is a schematic diagram of another interactive interface for the knowledge question-answering method provided in the embodiments of this application.

[0150] The first user inputs the first prompt text "My water purifier is malfunctioning, what should I do?" on the first interface of the computing device. The computing device receives the user's input and responds to it, obtaining the first prompt text. It then calculates the similarity between the first prompt text and the reference question text mapped to the root nodes of Knowledge Tree 1 and Knowledge Tree 2, respectively. If the similarity of the root node of Knowledge Tree 1 reaches the fourth threshold while the similarity of the root node of Knowledge Tree 2 does not, the target root node is determined to be the root node of Knowledge Tree 1.

[0151] If the similarity scores of the first prompt text and the reference question texts mapped to nodes A, B, and child nodes a and b of node A are all less than the similarity scores of the target root node, then the target root node is determined as the first node. The follow-up question text mapped to the root node is output: "Hello, what is the specific fault of the display screen? The display screen is not lit, or the display screen is distorted," and presented to the first user on the first interface in a dialogue format between an assistant and the first user.

[0152] Then, the first user sees the assistant's reply with additional question text on the first interface, and can enter the second prompt text "Screen not lit". After the computing device obtains the second prompt text, it calculates the similarity between the first prompt text and the reference question text mapped to nodes A, B, and child nodes a and b of node A. If only the similarity of node A reaches the second threshold, node A is determined to be the second node.

[0153] So, after determining node A as the first node, since node A is a non-leaf node, including child nodes a and b, the appended question text mapped to node A is output: "Hello, is it that the display screen does not respond and cannot light up after the water purifier is plugged in?", and this is presented to the first user on the first interface in the form of an assistant's dialogue with the user. The first user sees the appended question text replied by the assistant on the first interface, and then enters the third prompt text: "Yes, there is no response after plugging in."

[0154] The computing device calculates the similarity between the second prompt text and the reference question text mapped to child nodes a and b, respectively. If only node a's similarity reaches the third threshold, node a is determined as the third node. Since node a is a leaf node, the response text corresponding to the third prompt text is output, such as "Hello, we apologize for the inconvenience. We will contact on-site repair as soon as possible." This completes the knowledge-based question-and-answer interaction.

[0155] The preceding sections described the specific implementation process of the knowledge question-answering method and the tree structure node library construction method provided in the embodiments of this application. The following section briefly describes the corresponding apparatus or equipment for implementing this method, as follows:

[0156] refer to Figure 8 , Figure 8 This is a schematic diagram of a knowledge question-answering device provided in an embodiment of this application.

[0157] This application provides a knowledge question-answering device. The knowledge question-answering device 800 includes: a first receiving module 801, configured to receive a first prompt text input by a first user; a first processing module 802, configured to determine a first node from multiple nodes in a tree-structured node library based on the first prompt text, wherein the first node has a mapping relationship with a first reference question text, and the similarity between the content of the first prompt text and the content of the first reference question text reaches a first threshold; and an output module 803, configured to output at least one additional question text corresponding to the first reference question text if the first node is a non-leaf node.

[0158] The first receiving module 801 is further configured to receive a second prompt text input by the first user after outputting at least one appended question text corresponding to the first reference question text. The first processing module 802 is further configured to determine a second node from at least one child node of the first node based on the second prompt text. The second node has a mapping relationship with the second reference question text, the similarity between the content of the second prompt text and the content of the second reference question text reaches a second threshold, and the second node has an association relationship with one of the at least one appended question texts. The output module 803 is further configured to output a response text corresponding to the second prompt text if the second node is a leaf node.

[0159] For example, the output module 803 is further configured to output at least one target append question text corresponding to the second reference question text when the second node is a non-leaf node.

[0160] The first receiving module 801 is further configured to receive a third prompt text input by the first user after outputting at least one target append question text corresponding to the second reference question text.

[0161] The first processing module 802 is further configured to determine a third node from at least one child node of the second node based on the third prompt text, wherein the third node has a mapping relationship with the third reference question text, the similarity between the content of the third prompt text and the content of the third reference question text reaches a third threshold, and the third node has an association relationship with one of the target append question texts.

[0162] The output module 803 is also used to output the response text corresponding to the third prompt text when the third node is a leaf node.

[0163] For example, the first processing module 802 is further configured to: if the similarity between the content of the reference question text mapped to each node in at least one child node of the first node and the content of the second reference question text does not reach a second threshold, obtain a fourth prompt text based on the second prompt text and at least one additional prompt text. The first processing module 802 is further configured to determine a second node from at least one child node of the first node based on the fourth prompt text.

[0164] For example, the multiple nodes include at least one root node and at least one child node of the root node. The first processing module 802 is further configured to: determine a target root node from the at least one root node based on the first prompt text, wherein the target root node has a mapping relationship with the target reference question text, and the similarity between the content of the target reference question text and the content of the first prompt text reaches a fourth threshold; and determine a first node from the at least one child node of the target root node based on the first prompt text.

[0165] For example, the output module 803 is further configured to: output a set response text when the similarity between the content of the reference question text mapped to each root node of at least one root node and the content of the first prompt text does not reach a fourth threshold.

[0166] For example, the knowledge question-answering device 800 further includes: a second receiving module 804, configured to receive a target document sent by a second user; and a second processing module 805, configured to parse the target document to obtain at least one text and text information of the at least one text. The second processing module 805 is further configured to: determine a tree-structured node library based on the text information, the tree-structured node library including multiple nodes, each of the multiple nodes having a mapping relationship with different reference question texts, the at least one text including reference question text, the multiple nodes including non-leaf nodes and leaf nodes, and the non-leaf nodes including at least one child node.

[0167] For example, the reference question text includes a standard reference question text and at least one similar reference question text. The second processing module 805 is further configured to: parse the target document to obtain at least one standard reference question text; and based on the standard reference question text and the guiding text, obtain at least one similar reference question text, wherein the content of the similar reference question text matches the description in the guiding text, and the content of the similar reference question text is similar to the content of the standard reference question text.

[0168] For example, the text information includes: at least one relationship between various texts in a text.

[0169] The first receiving module 801, the first processing module 802, the output module 803, the second receiving module 804, and the second processing module 805 can all be implemented in software or in hardware. For example, the implementation of the first processing module 802 will be described below using the output module 802 as an example. Similarly, the implementation of other modules can refer to the implementation of the output module 802.

[0170] As an example of a software functional unit, the first processing module 802 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the aforementioned computing instance may be one or more. For example, the first processing module 802 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0171] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0172] As an example of a hardware functional unit, the first processing module 802 may include at least one computing device, such as a server. Alternatively, the first processing module 802 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0173] The multiple computing devices included in the first processing module 802 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in module A can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in module A can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0174] It should be noted that, in other embodiments, the first processing module 802 can be used to perform, for example... Figures 2 to 7 In the knowledge question-answering method described above, the first receiving module 801, the output module 803, the second receiving module 804, and the second processing module 805 can all be used to execute the following steps: Figures 2 to 7 Any step in the knowledge question-answering method described herein. The steps implemented by the first receiving module 801, the first processing module 802, the output module 803, the second receiving module 804, and the second processing module 805 can be specified as needed. The steps implemented by the first receiving module 801, the first processing module 802, the output module 803, the second receiving module 804, and the second processing module 805 are respectively as follows: Figures 2 to 7 The knowledge question-and-answer method described herein implements all the functions of the knowledge question-and-answer device 800 through different steps.

[0175] This application also provides a computing device 900. For example... Figure 9 As shown, Figure 9 This is a schematic diagram of a computing device 900 provided in an embodiment of this application.

[0176] The computing device 900 includes a bus 901, a processor 902, a memory 903, and a communication interface 904. The processor 902, memory 903, and communication interface 904 communicate via the bus 901. The computing device 900 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 900.

[0177] The 901 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 9 The bus 901 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 901 may include a path for transmitting information between various components of the computing device 900 (e.g., memory 903, processor 902, communication interface 904).

[0178] Processor 902 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0179] Memory 903 may include volatile memory, such as random access memory (RAM). Processor 902 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0180] The memory 903 stores executable program code, and the processor 902 executes the executable program code to implement the functions of the aforementioned first receiving module 801, first processing module 802, output module 803, second receiving module 804, and second processing module 805, thereby achieving the following: Figures 2 to 7 The knowledge question-and-answer method described above. That is, the memory 903 stores information for executing such... Figures 2 to 7 The instructions for the knowledge question-and-answer method.

[0181] The communication interface 904 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 900 and other devices or communication networks.

[0182] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0183] like Figure 10 As shown, Figure 10 This is a schematic diagram of a computing device cluster provided in an embodiment of this application. The computing device cluster includes at least one computing device 900. The memory 903 of one or more computing devices 900 in the computing device cluster may store the same memory for performing tasks such as… Figures 2 to 7 The instructions for the knowledge question-and-answer method.

[0184] In some possible implementations, the memory 903 of one or more computing devices 900 in the computing device cluster may also store memory for performing tasks such as... Figures 2 to 7 Some instructions of the knowledge question-answering method described above. In other words, a combination of one or more computing devices 900 can jointly execute instructions for performing tasks such as... Figures 2 to 7 The instructions for the knowledge question-and-answer method.

[0185] It should be noted that the memories 903 in different computing devices 900 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the knowledge question-answering device 800. That is, the instructions stored in the memories 903 of different computing devices 900 can implement the functions of one or more modules among the first receiving module 801, the first processing module 802, the output module 803, the second receiving module 804, and the second processing module 805.

[0186] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 11 One possible implementation method is shown.

[0187] like Figure 11 As shown, Figure 11 This is a schematic diagram illustrating the connection method between computing device clusters provided in an embodiment of this application.

[0188] The two computing devices 900A and 900B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the memory 903 in computing device 900A stores instructions for executing the functions of the first receiving module 801, the output module 803, and the first processing module 802. Simultaneously, the memory 903 in computing device 900B stores instructions for executing the functions of the second receiving module 804 and the second processing module 805.

[0189] Figure 11 The connection method between the computing device clusters shown can be based on the provisions of this application, such as... Figures 2 to 7 The knowledge question-and-answer method described above can perform the construction of a tree structure node library and the knowledge question-and-answer interaction process, so it is considered to delegate the functions implemented by the second receiving module 804 and the second processing module 805 to the computing device 900B.

[0190] It should be understood that Figure 11 The functions of the computing device 900A shown can also be performed by multiple computing devices 900. Similarly, the functions of the computing device 900B can also be performed by multiple computing devices 900.

[0191] This application also provides another computing device cluster. The connection relationships between the computing devices in this computing device cluster can be similarly referred to... Figure 10 and Figure 11 The connection method of the computing device cluster. The difference is that the memory 903 of one or more computing devices 900 in this computing device cluster can store the same memory for performing tasks such as... Figures 2 to 7 The instructions for the knowledge question-and-answer method.

[0192] In some possible implementations, the memories 903A and 903B of one or more computing devices 900 in the computing device cluster may also respectively store memory for performing tasks such as... Figures 2 to 7 Some instructions of the knowledge question-answering method described above. In other words, a combination of one or more computing devices 900 can jointly execute instructions for performing tasks such as... Figures 2 to 7 The instructions for the knowledge question-and-answer method.

[0193] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform actions such as... Figures 2 to 7 The knowledge-based question-and-answer method described above.

[0194] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform actions such as... Figures 2 to 7 The knowledge-based question-and-answer method described above.

[0195] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A knowledge-based question-and-answer method, characterized in that, The method includes: Receive the first prompt text input by the first user; Based on the first prompt text, a first node is determined from multiple nodes in a tree structure node library. The first node has a mapping relationship with the first reference question text. The similarity between the content of the first prompt text and the content of the first reference question text reaches a first threshold. The multiple nodes include non-leaf nodes and leaf nodes. If the first node is a non-leaf node, output at least one additional question text corresponding to the first reference question text; After outputting at least one appended question text corresponding to the first reference question text, the second prompt text input by the first user is received; Based on the second prompt text, a second node is determined from at least one child node of the first node. The second node has a mapping relationship with the second reference question text. The similarity between the content of the second prompt text and the content of the second reference question text reaches a second threshold. The second node has an association relationship with one of the at least one additional question texts. If the second node is a leaf node, output the response text corresponding to the second prompt text.

2. The method according to claim 1, characterized in that, After determining the second node from at least one child node of the first node, the method further includes: If the second node is a non-leaf node, output at least one target append question text corresponding to the second reference question text; After outputting at least one target append question text corresponding to the second reference question text, the third prompt text input by the first user is received; Based on the third prompt text, a third node is determined from at least one child node of the second node. The third node has a mapping relationship with the third reference question text. The similarity between the content of the third prompt text and the content of the third reference question text reaches a third threshold. The third node has an association relationship with one of the target append question texts in the at least one target append question text. If the third node is a leaf node, output the response text corresponding to the third prompt text.

3. The method according to claim 1 or 2, characterized in that, The method further includes: If the similarity between the content of the reference question text mapped by each node in at least one child node of the first node and the content of the second reference question text does not reach the second threshold, a fourth prompt text is obtained based on the second prompt text and the at least one additional question text. Based on the fourth prompt text, the second node is determined from at least one child node of the first node.

4. The method according to any one of claims 1 to 3, characterized in that, The plurality of nodes includes at least one root node and at least one child node of the root node; determining the first node from the plurality of nodes further includes: Based on the first prompt text, a target root node is determined from the at least one root node. The target root node has a mapping relationship with the target reference question text, and the similarity between the content of the target reference question text and the content of the first prompt text reaches a fourth threshold. Based on the first prompt text, the first node is determined from at least one child node of the target root node.

5. The method according to claim 4, characterized in that, The method further includes: If the similarity between the content of the reference question text mapped to each root node of the at least one root node and the content of the first prompt text does not reach the fourth threshold, the set response text is output.

6. The method according to any one of claims 1 to 5, characterized in that, Before determining the first node from multiple nodes in the tree structure node library based on the first prompt text, the method further includes: Receive the target document sent by the second user; The target document is parsed to obtain at least one text and the text information of the at least one text; Based on the at least one text and the text information, a tree structure node library is determined. The tree structure node library includes the plurality of nodes. Each of the plurality of nodes has a mapping relationship with different reference question texts. The reference question texts are determined based on the at least one text. The plurality of nodes includes non-leaf nodes and leaf nodes. The non-leaf nodes include at least one child node.

7. The method according to claim 6, characterized in that, The reference question text includes a standard reference question text and at least one similar reference question text, and the step of parsing the target document to obtain at least one text includes: Based on the at least one text, determine at least one standard reference problem text; Based on the standard reference question text and the guiding text, at least one similar reference question text is obtained, the content of the similar reference question text matches the description of the guiding text, and the content of the similar reference question text is similar to the content of the standard reference question text.

8. The method according to claim 6 or 7, characterized in that, The text information includes: the relationships between the various texts in the at least one text.

9. A knowledge-based question-and-answer device, characterized in that, The device includes: The first receiving module is used to receive the first prompt text input by the first user; The first processing module is used to determine a first node from multiple nodes in a tree structure node library based on the first prompt text. The first node has a mapping relationship with the first reference question text. The similarity between the content of the first prompt text and the content of the first reference question text reaches a first threshold. The multiple nodes include non-leaf nodes and leaf nodes. The output module is configured to output at least one additional question text corresponding to the first reference question text when the first node is a non-leaf node; The first receiving module is further configured to receive a second prompt text input by the first user after the output of at least one appended question text corresponding to the first reference question text; The first processing module is further configured to determine a second node from at least one child node of the first node based on the second prompt text, wherein the second node has a mapping relationship with the second reference question text, the similarity between the content of the second prompt text and the content of the second reference question text reaches a second threshold, and the second node has an association relationship with one of the at least one additional question texts; The output module is also used to output a response text corresponding to the second prompt text when the second node is the leaf node.

10. The apparatus according to claim 9, characterized in that, The output module is also used to output at least one target append question text corresponding to the second reference question text when the second node is a non-leaf node; The first receiving module is further configured to receive a third prompt text input by the first user after outputting at least one target append question text corresponding to the second reference question text; The first processing module is further configured to determine a third node from at least one child node of the second node based on the third prompt text, wherein the third node has a mapping relationship with the third reference question text, the similarity between the content of the third prompt text and the content of the third reference question text reaches a third threshold, and the third node has an association relationship with one of the at least one target append question texts; The output module is also used to output a response text corresponding to the third prompt text when the third node is the leaf node.

11. The apparatus according to claim 9 or 10, characterized in that, The first processing module is further specifically used for: If the similarity between the content of the reference question text mapped by each node in at least one child node of the first node and the content of the second reference question text does not reach the second threshold, a fourth prompt text is obtained based on the second prompt text and the at least one additional question text. Based on the fourth prompt text, the second node is determined from at least one child node of the first node.

12. The apparatus according to any one of claims 9 to 11, characterized in that, The plurality of nodes includes at least one root node and at least one child node of the root node; the first processing module is further configured to: Based on the first prompt text, a target root node is determined from the at least one root node. The target root node has a mapping relationship with the target reference question text, and the similarity between the content of the target reference question text and the content of the first prompt text reaches a fourth threshold. Based on the first prompt text, the first node is determined from at least one child node of the target root node.

13. The apparatus according to claim 12, characterized in that, The output module is also specifically used for: If the similarity between the content of the reference question text mapped to each root node of the at least one root node and the content of the first prompt text does not reach the fourth threshold, the set response text is output.

14. The apparatus according to any one of claims 9 to 13, characterized in that, The device further includes: The second receiving module is used to receive the target document sent by the second user; The second processing module is used to parse the target document to obtain at least one text and the text information of the at least one text; The second processing module is further configured to: determine the tree structure node library based on the at least one text and the text information, the tree structure node library including the plurality of nodes, each of the plurality of nodes having a mapping relationship with different reference question texts, the reference question texts being determined based on the at least one text, the plurality of nodes including the non-leaf nodes and the leaf nodes, the non-leaf nodes including at least one child node.

15. The apparatus according to claim 14, characterized in that, The reference question text includes a standard reference question text and at least one similar reference question text, and the second processing module is further configured to: Based on the at least one text, determine at least one standard reference problem text; Based on the standard reference question text and the guiding text, at least one similar reference question text is obtained, the content of the similar reference question text matches the description of the guiding text, and the content of the similar reference question text is similar to the content of the standard reference question text.

16. The apparatus according to claim 14 or 15, characterized in that, The text information includes: the relationships between the various texts in the at least one text.

17. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 8.

18. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster causes the computing device cluster to perform the method as described in any one of claims 1 to 8.

19. A computer-readable storage medium, characterized in that, Includes computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1 to 8.