Question answering method and device and computer readable storage medium

By determining the domain knowledge base based on historical questions, the problem of low accuracy in answering progressive questions is solved, and more efficient progressive question-and-answer processing is achieved, which improves the accuracy and efficiency of answers.

CN119166792AActive Publication Date: 2024-12-20ZHEJIANG DAHUA TECH CO LTD

Patent Information

Application Number
CN202411649751.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2024-12-20
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

When dealing with progressive questions, the existing intelligent question-and-answer methods have low answer accuracy and cannot effectively utilize the context information of historical questions, resulting in insufficient answer efficiency and accuracy.

Method used

By obtaining users' non-first input questions, determining the corresponding domain knowledge base based on historical questions, and then finding matching answers from more accurate domain knowledge bases, improving the answer accuracy and context connectivity of progressive questions.

Benefits of technology

Improve the accuracy and efficiency of answers to progressive questions, and ensure the accuracy and context connectivity of answers by narrowing the search scope.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166792A_ABST
    Figure CN119166792A_ABST
Patent Text Reader

Abstract

The invention discloses a question answering method and device and a computer readable storage medium. The method comprises the steps that a current question which is not input by a target user for the first time is acquired; in response to the situation that the current question and a historical question previously input by the target user are progressive questions, a second domain knowledge base corresponding to the current question is determined based on a first domain knowledge base corresponding to the historical question, and the first domain knowledge base and the second domain knowledge base are at least one domain knowledge base in a domain knowledge base set; and searching a current answer matched with the current question from the second domain knowledge base. Through the above mode, the answer accuracy of the progressive question can be improved, and the context connectivity of the progressive question answering is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing, and in particular to a question answering method, device and computer-readable storage medium. Background Art

[0002] At present, all walks of life have begun to use intelligent question-and-answer methods to obtain information about their industries. However, the general intelligent question-and-answer method is to search for each question independently. If the user asks progressive questions, the subsequent questions are often described in a relatively simple way. If the simple questions are searched independently, it is easy to fail to provide accurate answers to users, so the accuracy of the answers is relatively low. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a question answering method, device and computer-readable storage medium, which can improve the accuracy of answering progressive questions.

[0004] To solve the above technical problems, a technical solution adopted by the present application is: to provide a question answering method, the method comprising: obtaining a current question that is not input for the first time by a target user; in response to the current question and the historical questions previously input by the target user being progressive questions, determining a second domain knowledge base corresponding to the current question based on a first domain knowledge base corresponding to the historical questions, wherein the first domain knowledge base and the second domain knowledge base are respectively at least one domain knowledge base in a domain knowledge base set; and finding a current answer that matches the current question from the second domain knowledge base.

[0005] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, including a memory and a processor, the memory stores program instructions, and the processor is used to execute the program instructions to implement the above question answering method.

[0006] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium, which is used to store program instructions, and the program instructions can be executed to implement the above question answering method.

[0007] In the above scheme, for the current question that is not input for the first time, in response to the current question and the historical question previously input by the target user being a progressive question, the second domain knowledge base corresponding to the current question is determined based on the first domain knowledge base corresponding to the historical question, and then the current answer matching the current question is found from the second domain knowledge base. Therefore, the second domain knowledge base corresponding to the progressive question is determined through the first domain knowledge base corresponding to the historical question, so that the domain knowledge base determined for the progressive question is more accurate and related to the historical question, and then the relevant answers to the progressive question are retrieved from the second domain knowledge base, which can improve the accuracy of the answers to the progressive questions and enhance the contextual connectivity of the progressive questions and answers. Moreover, compared with directly retrieving the answers to the progressive questions from all domain knowledge bases, the narrowed search scope improves the efficiency of obtaining answers. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 It is a flowchart of an embodiment of a question answering method provided by the present application; Figure 2 It is a flowchart of another embodiment of the question answering method provided by the present application; Figure 3 This is a schematic diagram of the structure of some domain knowledge bases in the domain knowledge base set provided by this application; Figure 4 It is a partial flow chart of another embodiment of the question answering method provided by the present application; Figure 5 It is a flowchart of an embodiment of the question answering device of the present application; Figure 6 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application; Figure 7 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0009] In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail below with reference to the accompanying drawings and examples.

[0010] It should be noted that the term "several" in this article means at least one, and the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. The term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0011] See also Figure 1 , Figure 1 is a flow chart of an embodiment of the question answering method provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 1 The method of this embodiment is executed by a question-and-answer device, which can be any device with processing capabilities, such as a computer, a mobile phone, a server, etc. Figure 1 As shown, this embodiment includes: Step S110: Obtain the current question that is not the first time input by the target user.

[0012] Specifically, the question-answering device may be provided with a human-computer interaction interface, and obtains questions input by the user through the human-computer interaction interface. Of course, in other embodiments, the question-answering device has a communication module, and the question-answering device receives questions sent by a terminal device through the communication module. The terminal device has a human-computer interaction function, and the user uses the human-computer interaction function to input questions to be sent to the question-answering device on the terminal device.

[0013] Step S120: In response to the current question and the historical question previously input by the target user being a progressive question, a second domain knowledge base corresponding to the current question is determined based on the first domain knowledge base corresponding to the historical question.

[0014] Among them, the first domain knowledge base and the second domain knowledge base are at least one domain knowledge base in the domain knowledge base set. Each domain knowledge base stores domain knowledge, which can be recorded in the form of triples, and the domain knowledge between different domain knowledge bases can be the same field or different fields. In a specific embodiment, different domain knowledge bases store knowledge in different fields, for example, including a research and development domain knowledge base and a production domain knowledge base. It can be understood that the first domain knowledge base and the second domain knowledge base can be the same domain knowledge base, or the first domain knowledge base and the second domain knowledge base are completely different domain knowledge bases.

[0015] The historical question may be any question previously input by the user. For example, a question previously input by the user may be selected as the historical question.

[0016] The progressive questions in this article can be understood as further questions based on the historical question and its answer. In this embodiment, it can be determined whether the current question is a progressive question of the historical question by judging whether there is a correlation between the historical question and the current question. For example, the question elements of the current question and the question elements of the historical question are determined separately, and by judging whether there is a correlation between the question elements of the current question and the question elements of the historical question, it is determined that the current question is a progressive question of the historical question. Among them, the question elements can specifically include some keywords in the corresponding question and the corresponding answers, etc.

[0017] After determining that the current problem is a progressive problem of the historical problem, it is determined that the current problem is related to the historical problem, so the second domain knowledge base of the current problem can be determined based on the first domain knowledge base corresponding to the historical problem. It can be understood that at least part of the domain knowledge bases related to the first domain knowledge base in the domain knowledge base set can be selected as the second domain knowledge base. In some specific embodiments, at least part of the domain knowledge bases in the domain knowledge base set are associated, and the first domain knowledge base and at least one of the domain knowledge bases that have a first association relationship with the first domain knowledge base can be used as a reference domain knowledge base, and at least one domain knowledge base can be selected from the reference domain knowledge base as the second domain knowledge base. Specifically, the reference domain knowledge base related to the first problem element in the current problem can be used as the second domain knowledge base, and the first problem element includes at least one of an object and an attribute. Among them, the association relationship between domain knowledge bases can be determined by an association relationship table between knowledge bases that is set up separately, or if some domain knowledge between domain knowledge bases has an association relationship, then it is considered that the domain knowledge bases have an association relationship. For example, the domain knowledge base includes triples, and there are entities in two domain knowledge bases that belong to the same triple, then it is considered that the two domain knowledge bases have an association relationship.

[0018] Step S130: Find the current answer matching the current question from the second domain knowledge base.

[0019] Specifically, the domain knowledge matching the current question is searched out from the second domain knowledge base as the current answer. In one implementation scenario, the relational matching model may be used to perform step S130 to search out the current answer matching the current question.

[0020] In a specific embodiment, the current answer can be found based on the keywords in the current question or the current answer can be found after semantically expanding the keywords in the current question. For example, the keyword includes objects and attributes. This step 130 includes: determining at least one target object and target attribute, the target object includes at least one of the following: a first object extracted from the current question and a second object semantically matching the first object, the target attribute includes at least one of the following: a first attribute extracted from the current question and a second attribute semantically matching the first attribute; finding the current answer related to the target object and the target attribute from the second domain knowledge base. It can be understood that the keywords in this article can be obtained by extracting the questions of the corresponding questions through a text classification model. Specifically, the text classification model can first use a text feature extraction network to extract features from the input question text to obtain text features, and then use a classification module to process based on the text features to obtain corresponding keywords.

[0021] In a specific implementation, the domain knowledge base may include several semantically matching word groups, which are used to find words that semantically match the keywords (such as objects, attributes) in the current question. For example, each domain knowledge base in the domain knowledge base set includes a standard question and answer base and a semantic base. The standard question and answer base includes several domain knowledge, such as several triples. The triples that match the keywords in the current question are found, and the entities corresponding to the triples are used as the current answers. In a specific scenario, the standard question base can be divided into question and answer bases corresponding to each field according to the business type. Specifically, the domain knowledge can be extracted from existing documents, systems and other channels in combination with the corresponding industry corpus to form a domain dictionary, and then domain experts can judge the relationships of the generated domain dictionary to form the standard question and answer base. Domain knowledge can store question and answer pairs in the form of triples. For example, suppose The object, that is, the subject of the question, ; is the attribute, that is, the action of asking questions, ; is the value, i.e. the result of the problem, ; Combination is (object, attribute, value), the standard question-answering library set is The semantic library includes at least one group of semantic words, and each group of semantic words includes several semantically matched words. The semantic library can be used to find words that semantically match the keywords of the current question as supplementary keywords, and the standard question and answer library can be used to find domain knowledge that matches the keywords or supplementary keywords as the current answer. In a specific scenario, the semantic library stores a semantic network of several entities (such as objects, attributes, etc.), which are linked to the entities in the standard question library (it can be a one-to-one or one-to-many mapping). For example, suppose is an item in the semantic library. The mapping relationship between the standard question-answering library and the semantic library can be expressed as (by For example), where Feature Entity The i-th item in the semantic network of .

[0022] In another embodiment, when the current answer matching the current question cannot be found in the second domain knowledge base, other methods can be used to determine the current answer for the current question. For example, in response to the current answer matching the current question not being found in the target domain knowledge base, the current answer matching the current question is determined using an expert judgment model. Keywords in the current question and the current answer determined by the expert judgment model can be used to form new domain knowledge and store it in the second domain knowledge base, wherein the keywords in the current question are, for example, objects and attributes in the current question. For example, the domain knowledge of the second domain knowledge base is recorded in the form of triples, that is, new triples are formed and stored in the second domain knowledge base. Specifically, the triple includes two entities and an intra-group entity relationship. The object in the current question and the current answer determined by the expert judgment model can be used as two entities of the new triple, and the attributes of the current question can be used as the intra-group entity relationship of the new triple.

[0023] In another embodiment, after obtaining the current answer, the current answer can be further processed and then fed back to the target user. The further processing can include at least one of the following: semantic enhancement and combining multiple current answers obtained by searching. In a specific scenario, after step S130, it also includes: using the semantic enhancement model to semantically enhance the current answer, and feeding back the semantically enhanced current answer to the target user. In another specific scenario, after step S130, it also includes: in response to there being multiple current answers, combining the multiple current answers to obtain a combined answer, and feeding back the combined answer to the target user. For example, if two current answers matching the current question "Which is the most prosperous block in City A" are found from the second domain knowledge base, namely "B Block" and "C Block", then a combined answer "B Block and C Block" can be obtained and fed back to the target user; for another example, if two current answers matching the current question "Which is the best restaurant in City A and what is the most famous dish", namely "D Restaurant" and "F Dish", can be obtained and fed back to the target user. In another specific scenario, after step S130, it also includes: in response to there being multiple current answers, using a semantic enhancement model to combine and semantically enhance the multiple current answers to obtain a combined answer, and feeding the combined answer back to the target user. As in the first example above, the two current answers "B Block" and "C Block" are combined and semantically enhanced to obtain the combined answer "The most prosperous blocks in City A are Block B and Block C" and fed back to the target user; for another example, the two current answers "D Restaurant" and "F Dish" are combined and semantically enhanced to obtain the combined answer "The best restaurant in City A is D Restaurant, and Dish F is the most famous" and fed back to the target user.

[0024] See also Figure 2 , Figure 2It is a flow chart of another embodiment of the question answering method provided by the present application. In this embodiment, the domain knowledge in the domain knowledge base is stored in the domain knowledge base in the form of triples. Specifically, each domain knowledge base in the domain knowledge base set includes a standard question base, and each standard question and answer base includes multiple triples, each triple includes two entities and an intra-group entity relationship between the two entities. At least two triples in the same domain knowledge base contain the same entity, for example, (material code, product line, automotive electronics), (automotive electronics, extended attributes, automotive parts number), (automotive electronics, extended attributes, supplier code), the middle element of the above triples is an intra-group entity relationship, and the remaining two elements are entities, so the above three triples all contain the entity of automotive electronics. In some specific scenarios, the entity in the triple can include the object in the question and the corresponding answer, and the intra-group entity relationship in the triple is the attribute in the question. It is worth noting that the role of the entity in the triple can be flexibly changed. For example, the answer corresponding to the question in a triple can be used as the object of the question in another triple.

[0025] Each domain knowledge base can construct association relationships between different elements through the above-mentioned triples, and then form a complete association network through multiple association relationships. It is understandable that in addition to the intra-group entity relationship, there can also be an inter-group entity relationship between entities in the domain knowledge base. That is, the intra-group entity relationship described in this article is the relationship between two entities of the same triple, and the inter-group entity relationship described in this article is the relationship between two target inter-group entities. The triples where the two target inter-group entities are located form a triple sequence, and the first and last triples of the triple sequence are respectively the triples where the two target inter-group entities are located, and there is a same entity in the adjacent two triples in the triple sequence, that is, the adjacent two entities in the triple sequence have an intra-group entity relationship. It is understandable that the triple sequence at least includes the triples where the two target inter-group entities are located, for example, the triple sequence is only composed of the triples where the two target inter-group entities are located, or the triple sequence is composed of the triples where the two target inter-group entities are located, and at least one triple between the triples where the two target inter-group entities are located.

[0026] In a specific implementation, the domain knowledge base may be a knowledge graph, which includes a number of nodes connected by directed edges. Each node represents an entity in the domain knowledge base, and the directed edge represents an intra-group entity relationship between entities corresponding to two connected nodes. Among them, each directed edge and the entities corresponding to the two nodes connected at both ends of the directed edge are a triple. It can be understood that the entity pointed to by the directed edge in the triple is located downstream of the other entity. In a specific scenario, the entity pointed to by the directed edge is used as an answer to a question, that is, the entity at the head end of the directed edge is the object of the question, the corresponding intra-group entity relationship is the attribute of the question, and the pointed entity is the value (the answer to the question). It can be understood that the entity at the starting end of each directed edge is the question entity, and the entity pointed to by each directed edge is the answer entity, wherein each answer entity is located on the downstream side of the question entity, that is, the answer entity corresponding to each question is located on the downstream side of the question entity corresponding to the question. It can be understood that the question entity and the answer entity of the same question can belong to the same triplet, or different triples. In the case of belonging to different triples, the triplet where the question entity is located and the triplet where the answer entity is located can form a triple sequence, the head and tail of the triple sequence are the triplet where the question entity is located and the triplet where the answer entity is located, respectively, and the entity pointed to by the directed edge of the previous triple in the triple sequence serves as the starting end of the directed edge of the next triple.

[0027] like Figure 2 As shown, the method of this embodiment includes the following steps: Step S210: Obtain the current question that is not the first time input by the target user.

[0028] For the specific description of step S210 , please refer to the relevant description of step S110 .

[0029] Step S221: Determine whether there is a third association relationship between the first question element and the second question element.

[0030] Among them, the first question element includes at least one of the object and attribute in the current question, and the second question element includes at least one of the object, attribute and historical answer corresponding to the historical question in the aforementioned historical question. The above-mentioned third association relationship includes an intra-group entity relationship and a second inter-group entity relationship. The second inter-group entity relationship is a triple sequence composed of the third triplet where the first question element is located and the fourth triplet where the second question element is located. The two adjacent entities in the triple sequence have the intra-group entity relationship, and the first and last triples are the third triplet and the fourth triplet respectively. In some implementation scenarios, the triples of the triple sequence are all from the same domain knowledge base. In another implementation scenario, the triples of the triple sequence come from at least two domain knowledge bases.

[0031] Step S222: In response to the third association relationship between the first question element and the second question element, determining that the current question and the historical question are progressive questions.

[0032] Combination Figure 3 To illustrate, each domain knowledge base in the domain knowledge base set is a knowledge graph composed of triples, and the domain knowledge base includes the R&D domain knowledge base, in which each node in the R&D domain knowledge base corresponds to an entity, each directed edge corresponds to a set of internal entity relationships, and any directed edge and the nodes at both ends form a triple, such as (PLM system, establishment, material code). In a specific example, the historical question is "I want to modify the product attributes of the material code, what process do I need to go through", and the objects it contains include "material code" and "process", and the attributes include "product attributes" and "modification", and the historical answer corresponding to the historical question is "PIC process". Therefore, one or more of "material code", "process", "product attributes", "modification", and "PIC process" can be used as the second question element. The current question is "Which systems will the automobile part number be synchronized to", and the objects it contains include "automobile part number" and "system", and the attributes include "synchronization", so one or more of "automobile part number", "system", and "synchronization" can be used as the first question element.

[0033] In a specific scenario, if the third association relationship is for the same domain knowledge base, the first question element that has a third association relationship with the second question element can be found in the R&D domain knowledge base corresponding to the historical question. In this scenario, the entity "PIC process" corresponding to the historical answer is used as the second question element, and the object and attributes of the current question "automotive part number", "system", and "synchronization" are all used as the first question elements. Since in the R&D domain knowledge base: the second question element "PIC process" and the first question element "automotive part number" have an intra-group entity relationship. Therefore, it can be determined that the current question and the historical question are progressive questions, that is, the current question is a further question of the historical question. In another scenario, the objects and attributes of the historical questions are taken as the second question elements, and the objects and attributes of the current question are taken as the first question elements. Since in the R&D domain knowledge base: the second question element "material code" and the first question element "automotive part number" have a second set of inter-entity relationships ("material code" points to "automotive electronics" through the directed edge corresponding to "product line", and "automotive electronics" points to "automotive part number" through the directed edge corresponding to "extended attribute", that is, the triples of "material code" and "automotive part number" respectively form the aforementioned triple sequence), it can be determined that the current question and the historical question are progressive questions.

[0034] In some specific embodiments, the domain knowledge base also includes the above-mentioned semantic library, and the first question element and the second question element can be semantically expanded, and then the first question element and the second question element after semantic expansion can be searched in the domain knowledge base. For example, the historical question is "I want to modify the product attributes of the whole machine, what process do I need to go through?" The historical question contains the object "whole machine". The entities corresponding to the two nodes pointed by the double arrows in the knowledge graph are semantically matched entities, so combined with Figure 3 In the R&D domain knowledge base, the semantics of "complete machine" can be expanded to "material code". Therefore, when the second question element includes an object, "complete machine" and "material code" can both be used as the second question elements.

[0035] Step S231: In response to the current question and the historical question being progressive questions, an entity in the first domain knowledge base that is related to the historical question is used as a reference entity.

[0036] Specifically, the reference entity may be an entity corresponding to a keyword contained in a historical question and / or an entity corresponding to a historical answer to a historical question. For example, an entity corresponding to an object in a historical question is used as a reference entity, or an entity corresponding to an object and an attribute in a historical question and an entity corresponding to a historical answer are all used as reference entities. It is understandable that, in the case where the first domain knowledge base includes the aforementioned semantic library, the entity corresponding to the keyword in the historical question may also include an entity corresponding to an extended word in the semantic library that matches the semantics of the keyword, and the entity corresponding to the historical answer may also include an entity corresponding to an extended word in the semantic library that matches the semantics of the historical answer.

[0037] In a specific implementation, the reference entity is an entity corresponding to a historical answer, which is an answer to a historical question, and the reference entity has an intra-group entity relationship or a first inter-group entity relationship with the object in the historical question. The first inter-group entity relationship is a triplet sequence consisting of a triplet containing the entity corresponding to the historical answer and a triplet containing the object in the historical question, and two adjacent entities in the triplet sequence have an intra-group entity relationship. It can be understood that the historical answer corresponding to the historical question is an entity found in the first domain knowledge base that has an intra-group entity relationship or an inter-group entity relationship with the object in the historical question, and the entity corresponding to the historical answer in the first domain knowledge base is used as the reference entity.

[0038] Step S232: Find a target entity that has a second association relationship with the reference entity and matches the first question element from the reference domain knowledge base.

[0039] In this embodiment, the domain knowledge bases with an associated relationship in the domain knowledge base set are associated knowledge base pairs, and there is at least one group of associated knowledge base pairs in the domain knowledge base set, wherein each group of the associated domain knowledge base pairs has at least one cross-domain triple, and the two entities of the cross-domain triple are respectively from the two domain knowledge bases in the associated domain knowledge base pair. The reference domain knowledge base may include at least one of the following: a first domain knowledge base, and a domain knowledge base with a first associated relationship in the first domain knowledge base. The domain knowledge base with a first associated relationship in the first domain knowledge base may include at least one of a third domain knowledge base and a fourth domain knowledge base. The third domain knowledge base is a directly associated knowledge base of the first domain knowledge base, that is, it belongs to the same associated domain knowledge base pair as the first domain knowledge base, and the fourth domain knowledge base is an indirectly associated knowledge base of the first domain knowledge base, that is, the fourth domain knowledge base does not belong to the same associated domain knowledge base pair as the first domain knowledge base, and forms a knowledge base sequence with the first domain knowledge base, and each two adjacent domain knowledge bases in the knowledge base sequence are an associated domain knowledge base pair.

[0040] The first question element may include at least one of an object and an attribute in the current question, and details may refer to the above related description.

[0041] The second association relationship includes an intra-group entity relationship and a first inter-group entity relationship. The first inter-group entity relationship is a triplet sequence consisting of a first triplet where a reference entity is located and a second triplet where a target entity is located. Two adjacent entities in the triplet sequence have the intra-group entity relationship, and the first and last triplet are the first triplet and the second triplet respectively.

[0042] Continue to combine Figure 3For example, the domain knowledge base set includes the R&D domain knowledge base and the production domain knowledge base, and the R&D domain knowledge base and the production domain knowledge base have a cross-domain triple (automotive parts number, acquisition, serial number), so it is an associated knowledge base pair. The first domain knowledge base is the R&D domain knowledge base, wherein the first domain knowledge base can be determined according to the user information of the target user, or directly specified by the target user, or the domain knowledge base defaulted by the system. The user information can be a position. For example, a user is a R&D personnel. For the historical question entered by the target user for the first time, the first domain knowledge base corresponding to the historical question can be determined to be the R&D domain knowledge base based on the target user's position. In this example, the historical question is "I want to modify the product attributes of the material code, what process do I need to go through", and the historical answer corresponding to the historical question is "PIC process", the current question is "which systems will the automotive parts number be synchronized to", the reference domain knowledge base is the first domain knowledge base, and the reference entity is the entity corresponding to the historical answer, so the reference domain knowledge base includes the R&D domain knowledge base and the production domain knowledge base, the reference entity is "PIC process", and the first question element is the object and attribute "automotive parts number", "system", "synchronization" contained in the current question. Therefore, from the R&D domain knowledge base, search for "automobile parts number", "system", or "synchronization" that has an intra-group entity relationship or an inter-group entity relationship with the "PIC process". Therefore, the "automobile parts number" that has an intra-group entity relationship of "change" with the "PIC process" can be found from the R&D knowledge base as the target entity. It can be understood that when the domain knowledge base includes a semantic base, the reference entity and the first question element can be semantically extended, and then the target entity that has a second association relationship with the semantically extended reference entity and matches the semantically extended first question element can be searched from the reference domain knowledge base. For example, the semantic extension words "automobile parts identification" and "parts number" of "automobile parts number" are found from the semantic base, and then the "automobile parts number", "automobile parts identification", or "parts number" that have a second association relationship with the "PIC process" are searched from the R&D domain knowledge base as the target entity.

[0043] Step S233: taking at least one of the domain knowledge base where the target entity is located and the domain knowledge base where an entity having an intra-group entity relationship with the target entity is located as the second domain knowledge base.

[0044] In some embodiments, only the domain knowledge base where the target entity is located can be used as the second domain knowledge base, or the domain knowledge base where the target entity is located and the domain knowledge base where entities having an intra-group entity relationship with the target entity are located can both be used as the second domain knowledge base.

[0045] Continue to combine Figure 3Let's take an example. In this example, the domain knowledge base where the target entity is located and the domain knowledge base where the entity that has an intra-group entity relationship with the target entity is located are both used as the second domain knowledge base. The target entity is "Auto Parts Number" in the R&D domain knowledge base. Since "Auto Parts Number" has an intra-group entity relationship with "Serial Number" and "Label Template" in the production domain knowledge base, both the R&D domain knowledge base and the production domain knowledge base are used as the second domain knowledge base.

[0046] Step S241: Determine at least one target object and target attribute.

[0047] The target object includes at least one of the following: a first object extracted from the current question and a second object semantically matching the first object; the target attribute includes at least one of the following: a first attribute extracted from the current question and a second attribute semantically matching the first attribute.

[0048] Step S242: Find the current answer related to the target object and target attribute from the second domain knowledge base.

[0049] Herein, this step S242 can be but is not limited to being executed by a relationship matching model, and the relationship matching model is trained using training data in a related field.

[0050] In a specific embodiment, the answer related to the target object and the target attribute can be that the target object and the answer have an intra-group entity relationship that matches the target attribute, or there is an inter-group entity relationship and the inter-group entity relationship includes an intra-group entity relationship that matches the target attribute. Specifically, this step S242 includes: taking the entity corresponding to the target object in the second domain knowledge base as the question entity; finding the answer entity that has a fourth association relationship with the question entity from the second domain knowledge base as the current answer, wherein the fourth association relationship includes that the question entity and the answer entity have an intra-group entity relationship that matches the target attribute, and a third inter-group entity relationship, wherein the third inter-group entity relationship is a triple sequence composed of the fifth triplet where the question entity is located and the sixth triplet where the answer entity is located, wherein the two adjacent entities in the triple sequence both have the intra-group entity relationship, and the first and last triplet are the fifth triplet and the sixth triplet respectively, and the intra-group entity relationship that matches the target attribute exists in the triple sequence. In the scenario where the domain knowledge base is the above-mentioned knowledge graph, the answer entity is located on the downstream side of the question entity. It can be understood that the answer entity and the question entity can be located in the same triple or different triples.

[0051] Continue to combine Figure 3An example is given. In this example, the target object includes the first object extracted from the current question and the second object semantically matching the first object, and the target attribute includes the first attribute extracted from the current question and the second attribute semantically matching the first attribute. The current question is "which systems will the automobile parts number be synchronized to", so the first object "automobile parts number", "system" and the first attribute "synchronization" are extracted from the current question, and the second object "automobile parts identification" semantically matching the first object "automobile parts number" is found through the semantic library, and the second attribute "acquisition" semantically matching the first attribute "synchronization" is found through the semantic library. "Automobile parts number", "system", or "automobile parts identification" is used as the question entity, and the answer entity with the intra-group entity relationship or inter-group entity relationship related to "synchronization" or "acquisition" is found from the R&D domain knowledge base and the production domain knowledge base respectively. No relevant answer entity is found from the R&D domain knowledge base, and the answer entity "ERP system" and "MES system" with the inter-group entity relationship related to "acquisition" of "automobile parts number" are found from the production domain knowledge base. The inter-group entity relationship related to "acquisition", that is, the triple sequence corresponding to the inter-group relationship, such as (automobile part number, acquisition, serial number), (serial number, establishment, ERP system), has an intra-group entity relationship corresponding to "acquisition".

[0052] After obtaining the current answer, the current answer can be fed back to the target user. For example, since the current answer includes "ERP system" and "MES system", multiple current answers can be combined and semantically enhanced to obtain the combined answer "will be synchronized to the production system and technical parameter system", and then fed back to the target user.

[0053] In another specific embodiment, when there are at least two answer entities, the answer entity can be further matched with the first object extracted from the current question to obtain a text matching relevance. According to the text matching relevance, the answer entity as the current answer is obtained.

[0054] Continue to combine Figure 3For example, the current question is "I want to expand the product attributes of the whole machine, what code do I need?" The objects included in the current question are "whole machine" and "code", and the answer entities found are "supplier code" and "automotive part number". Match "supplier code" and "automotive part number" with "whole machine" and "code". Among them, "supplier code" and "whole machine" and "code" have a higher text matching correlation than "automotive part number" and "whole machine" and "code". Therefore, "supplier code" is used as the answer entity for the current answer. It can be understood that when there are multiple answer entities finally obtained as the current answer, the multiple answer entities can be further combined and fed back to the target user.

[0055] See also Figure 4 , Figure 4 This is a partial flow chart of another embodiment of the question answering method provided by the present application. In this embodiment, before step S110, it also includes: Step S410: Obtaining historical questions input by the target user.

[0056] Specifically, the method for obtaining historical questions can refer to the steps for obtaining current questions, which will not be repeated here.

[0057] Step S420: Determine a target reference question and answer database that matches the user information of the target user from among the plurality of reference question and answer databases.

[0058] Among them, each reference question and answer database includes multiple groups of questions and answers, and each group of questions and answers includes reference questions and corresponding reference answers.

[0059] Specifically, the reference question and answer library can be a data source that can be updated in real time or regularly. In some specific implementation scenarios, the reference question and answer library is used to store historical question and answer information, each of which includes a reference question and one or more corresponding reference answers. The historical question and answer information can be stored in the reference question and answer library in the form of a variety of data structures. For example, question and answer knowledge is stored in the reference question and answer library in the form of a two-dimensional table. For example, the two-dimensional table includes reference questions and reference answers.

[0060] In a specific implementation, the reference question and answer library can be divided into multiple levels based on different historical question and answer information. For example, the reference question and answer library of the first level can be divided into a research and development question and answer library, a market question and answer library, and a production question and answer library. Among them, the research and development question and answer library can be divided into a technical question and answer library, a big data research institute question and answer library, etc., which can achieve unlimited stratification. It should be noted that the upper-level question and answer library inherits all the question and answer information of the lower level. For example, the question and answer information in the research and development knowledge base contains historical question and answer information in all reference question and answer libraries of the next level, such as the technical question and answer library and the big data research institute question and answer library.

[0061] In this embodiment, a target reference question and answer library may be selected from a number of reference question and answer libraries based on user information of the target user, and the user information may be, but is not limited to, position, age group, etc. In a specific scenario, the target reference question and answer library may be determined based on the position of the target user. For example, if the position of the target user is a research and development personnel, the research and development question and answer library may be selected as the target reference question and answer library.

[0062] Step S430: Find reference questions matching the historical questions from the target reference question and answer database.

[0063] Step S440: taking the reference answer corresponding to the matching reference question in the target reference question and answer database as the historical answer.

[0064] After determining the target reference question and answer library, the similarity between the historical question and each reference question in the target reference question and answer library can be obtained, and then the reference question whose similarity with the historical question meets the similarity requirement can be found from the target reference question and answer library to serve as the reference question matching the historical question. The similarity requirement can be set according to actual needs, for example, the similarity can be greater than a set similarity threshold.

[0065] In a specific implementation, historical questions can be matched with questions in the reference question-answer library using a natural language model, such as a semantic matching model.

[0066] After determining the reference question matching the historical question, a reference answer in a set of questions and answers where the matching reference question is located is obtained as the historical answer, thereby achieving the answer to the historical question using the reference question and answer pair.

[0067] In some embodiments, the historical question and its historical answer can be used to perform intensive training on the target reference question and answer library. For example, after this step S440, it also includes: using historical questions and historical answers to adjust the corresponding group of questions and answers in the reference question and answer library (i.e., a group of questions and answers where the reference questions matching the historical questions are located), and the adjustment includes at least one of the following: adjusting the content of the group of questions and answers, adjusting the search priority of the group of questions and answers, and adjusting the importance of the group of questions and answers. The adjustment of the content of the group of questions and answers is, for example, to adjust the description of the reference questions in the group of questions and answers in combination with the historical questions, so that the reference questions can contain the content corresponding to the historical questions, or to use the historical questions as a reference question in the group of questions and answers. The adjustment of the search priority of the group of questions and answers is, for example, to adjust the search priority of the group of questions and answers to a higher level, so that when the target reference question and answer library is searched for new questions in the subsequent search, it is judged earlier whether the reference questions in the group of questions and answers match the new questions. Specifically, whenever a reference question in the set of questions and answers matches a question, the number of matches of the set of questions and answers is increased by one, and the search priority of the set of questions and answers is adjusted based on the number of matches of the set of questions and answers, wherein the search priority of the set of questions and answers is positively correlated with the number of matches. The adjustment of the importance of the set of questions and answers is, for example, to adjust the importance of the set of questions and answers to a higher level. Specifically, similarly to the search priority, the importance of the set of questions and answers can be positively correlated with the number of matches.

[0068] Step S450: In response to the historical answer not being found in the target reference question and answer database, a first domain knowledge database matching the user information of the target user is determined from the domain knowledge database set.

[0069] In this embodiment, the first domain knowledge base corresponding to the historical question can be determined by user information. Specifically, the user information may include a position. For example, the target user's position is a research and development personnel, and the research and development domain knowledge base is determined to be the first domain knowledge base.

[0070] In some implementations, when the historical question is the first question input by the target user in this round of questioning, the first domain knowledge base corresponding to the historical question can be determined through user information. When the historical question is not the first question input by the target user in this round of questioning, the first domain knowledge base corresponding to the historical question is determined based on the domain knowledge base corresponding to the previous question of the historical question. For this process, reference can be made to the above description of determining the second domain knowledge base based on the first domain knowledge base.

[0071] Step S460: Find historical answers matching the historical questions from the first domain knowledge base.

[0072] In one embodiment, this step S460 includes: determining at least one target object and target attribute; searching for historical answers related to the target object and the target attribute from the first domain knowledge base. The target object includes at least one of the following: a first object extracted from a historical question and a second object semantically matching the first object, and the target attribute includes at least one of the following: a first attribute extracted from a historical question and a second attribute semantically matching the first attribute. Among them, searching for historical answers related to the target object and the target attribute from the first domain knowledge base may specifically include: using the entity corresponding to the target object in the first domain knowledge base as the question entity; searching for an answer entity having a fourth association relationship with the question entity from the first domain knowledge base as a historical answer. For specific instructions on searching for historical answers from the first domain knowledge base, please refer to the relevant description of searching for the current answer from the second domain knowledge base in the previous embodiment, which will not be repeated here.

[0073] This embodiment uses at least one of the reference question and answer library and the first domain knowledge base to search for the corresponding historical answer. Specifically, the historical answer corresponding to the historical question is first searched from the reference question and answer library. If the historical answer cannot be found in the reference question and answer library, the first domain knowledge base is used to search for the historical answer. Of course, the search order of the reference question and answer library and the first domain knowledge base can be swapped. For example, the first domain knowledge base can be used to search for the historical answer corresponding to the historical question first. If the historical answer cannot be found in the first domain knowledge base, the reference question and answer library is used to search for the historical answer. It can be understood that in other embodiments, the reference question and answer library and the first domain knowledge base can also be selected for use according to actual conditions. For example, in some scenarios, only the reference question and answer library can be used to search for historical answers, or only the first domain knowledge base can be used to search for historical answers.

[0074] In other embodiments, when the relevant library used (such as the reference question and answer library and / or the first domain knowledge base) cannot find the historical answer that matches the historical question, other methods can be used to determine the historical answer for the historical question. For example, in response to the inability to find the current answer that matches the current question in the first domain knowledge base, the expert judgment model is used to determine the historical answer that matches the historical question. Keywords in the historical questions and the historical answers determined by the expert judgment model can be used to form new domain knowledge and store it in the first domain knowledge base, where the keywords in the historical questions are, for example, objects and attributes in the historical questions. For specific implementation, please refer to the relevant description of step S130, which will not be repeated here.

[0075] In another embodiment, after obtaining the historical answers, the historical answers may be further processed and then fed back to the target user. The further processing may include at least one of the following: semantic enhancement and combining the multiple historical answers found. For specific implementation, please refer to the relevant description of step S130, which will not be repeated here.

[0076] See also Figure 5 , Figure 5 It is a flow chart of an embodiment of the question answering device of the present application. The question answering device 500 includes a question acquisition module 510, a knowledge base determination module 520 and an answer search module 530. The question acquisition module 510 is used to obtain a current question that is not input for the first time by a target user. The knowledge base determination module 520 is used to determine the second domain knowledge base corresponding to the current question based on the first domain knowledge base corresponding to the historical question in response to the current question and the historical question previously input by the target user being a progressive question, wherein the first domain knowledge base and the second domain knowledge base are respectively at least one domain knowledge base in the domain knowledge base set. The answer search module 530 is used to find a current answer that matches the current question from the second domain knowledge base.

[0077] In some embodiments, the knowledge base determination module 520 is specifically used to use the first domain knowledge base and at least one of the domain knowledge bases that have a first association relationship with the first domain knowledge base as a reference domain knowledge base; and use the reference domain knowledge base related to the first problem element in the current problem as the second domain knowledge base, and the first problem element includes at least one of an object and an attribute.

[0078] In some embodiments, each domain knowledge base in the domain knowledge base set includes multiple triples, each triple includes two entities and an intra-group entity relationship between the two entities, and at least two triples in the same domain knowledge base contain a same entity; there is at least one group of associated domain knowledge base pairs in the domain knowledge base set, and each group of associated domain knowledge base pairs has at least one cross-domain triple, and the two entities of the cross-domain triple are respectively from the two domain knowledge bases in the associated domain knowledge base pair; the knowledge base determination module 520 executes the reference domain knowledge base related to the first question element in the current question as the second domain knowledge base, including: an entity related to the question as a reference entity; from the reference domain knowledge base, find a target entity that has a second association relationship with the reference entity and matches the first question element, wherein the second association relationship includes an intra-group entity relationship and a first inter-group entity relationship, the first inter-group entity relationship is a triplet sequence composed of a first triplet where the reference entity is located and a second triplet where the target entity is located, two adjacent entities in the triplet sequence both have the intra-group entity relationship, and the first and last triplet are the first triplet and the second triplet respectively; use at least one of the domain knowledge base where the target entity is located and the domain knowledge base where the entity having the intra-group entity relationship with the target entity is located as the second domain knowledge base.

[0079] In some embodiments, the domain knowledge base that has a first association relationship with the first domain knowledge base includes at least one of the third domain knowledge base and the fourth domain knowledge base, the third domain knowledge base and the first domain knowledge base belong to the same associated domain knowledge base pair, the fourth domain knowledge base and the first domain knowledge base form a knowledge base sequence, and every two adjacent domain knowledge bases in the knowledge base sequence are an associated domain knowledge base pair.

[0080] In some embodiments, the domain knowledge base is a knowledge graph, which includes a number of nodes connected by directed edges. Each node represents an entity in the domain knowledge base, and the directed edge represents the intra-group entity relationship between the entities corresponding to the two connected nodes, wherein the entity pointed to by the directed edge is used as the answer to the question.

[0081] In some embodiments, the entities in the triples include the objects in the question and the corresponding answers, and the intra-entity relationships in the triples are the attributes in the question.

[0082] In some embodiments, the reference entity is an entity corresponding to the historical answer, the historical answer is the answer to the historical question, and the reference entity has an intra-group entity relationship or a first inter-group entity relationship with the object in the historical question.

[0083] In some embodiments, each domain knowledge base in the domain knowledge base set includes multiple triples, each triple includes two entities and an intra-group entity relationship between the two entities, and at least two triples in the same domain knowledge base contain a same entity. The question answering device 500 also includes a question judgment module, which is used to judge whether there is a third association relationship between the first question element and the second question element, wherein the third association relationship includes an intra-group entity relationship and a second inter-group entity relationship, and the second inter-group entity relationship is a triple sequence composed of the third triple where the first question element is located and the fourth triple where the second question element is located, and the two adjacent entities in the triple sequence have an intra-group entity relationship, and the first and last triples are the third triple and the fourth triple respectively, the first question element includes at least one of the object and attribute in the current question, and the second question element includes at least one of the object, attribute and historical answer corresponding to the historical question in the historical question; in response to the existence of the third association relationship between the first question element and the second question element, it is determined that the current question and the historical question are progressive questions.

[0084] In some embodiments, the question acquisition module 510 can also be used to obtain historical questions input by the target user; the knowledge base determination module 520 can also be used to determine a first domain knowledge base that matches the user information of the target user from the domain knowledge base set; the answer search module 530 can also be used to find historical answers that match historical questions from the first domain knowledge base.

[0085] In some embodiments, the question answering device 500 also includes a question matching search module 540, which is used to determine a target reference question and answer library that matches the user information of the target user from a number of reference question and answer libraries, each reference question and answer library including multiple groups of questions and answers, and each group of questions and answers including reference questions and corresponding reference answers; search for reference questions that match historical questions from the target reference question and answer library; use the reference answers corresponding to the matched reference questions in the target reference question and answer library as historical answers; wherein, the steps of determining a first domain knowledge base that matches the user information of the target user from the domain knowledge base set and searching for historical answers that match historical questions from the first domain knowledge base are performed when the historical answers cannot be found in the target reference question and answer library.

[0086] In some embodiments, the user information includes a job title; In some embodiments, the question matching search module 540 searches for reference questions matching the historical question from the target reference question-answer database, including: searching for reference questions whose similarity to the historical question meets similarity requirements from the target reference question-answer database; In some embodiments, the question matching search module 540 also includes a semantic adjustment module, which is used to use historical questions and historical answers to adjust the corresponding group questions and answers in the target reference question and answer library, and the adjustment includes at least one of the following: adjusting the content of the group questions and answers, adjusting the search priority of the group questions and answers, and adjusting the importance of the group questions and answers.

[0087] In some embodiments, the answer search module 530 is specifically used to determine at least one target object and target attribute, the target object includes at least one of the following: a first object extracted from the target question and a second object semantically matching the first object, the target attribute includes at least one of the following: a first attribute extracted from the target question and a second attribute semantically matching the first attribute; searching for a target answer related to the target object and the target attribute from a target domain knowledge base; wherein the target domain knowledge base is a first domain knowledge base, the target question is a historical question, and the target answer is a historical answer, or the target domain knowledge base is a second domain knowledge base, the target question is a current question, and the target answer is a current answer.

[0088] In some embodiments, each domain knowledge base in the domain knowledge base set includes multiple triples, each triplet includes two entities and an intra-group entity relationship between the two entities, and at least two triples in the same domain knowledge base contain an identical entity; the answer search module 530 executes the target domain knowledge base to search for a target answer related to the target object and the target attribute, including: taking the entity corresponding to the target object in the target domain knowledge base as the question entity; searching for an answer entity having a fourth association relationship with the question entity from the target domain knowledge base as the target answer, wherein the fourth association relationship includes an intra-group entity relationship between the question entity and the answer entity that matches the target attribute, and a third inter-group entity relationship, the third inter-group entity relationship is a triplet sequence consisting of the fifth triplet where the question entity is located and the sixth triplet where the answer entity is located, wherein two adjacent entities in the triplet sequence both have an intra-group entity relationship, and the first and last triplet are the fifth triplet and the sixth triplet respectively, and there is an intra-group entity relationship matching the target attribute in the triplet sequence.

[0089] In some embodiments, the domain knowledge base is a knowledge graph, which includes a number of nodes connected by directed edges, each node represents an entity in the domain knowledge base, and the directed edge represents an intra-group entity relationship between entities corresponding to two connected nodes. The entity pointed to by the directed edge in the triple is located downstream of another entity, and the answer entity is located on the downstream side of the question entity. In some embodiments, the step of searching the target domain knowledge base for an answer entity having a fourth association relationship with the question entity is performed by a relationship matching model; In some embodiments, the target object includes the second object, the target attribute includes the second attribute, and the domain knowledge base includes a semantic base, which contains at least one semantically matched object group and at least one semantically matched attribute group.

[0090] In some embodiments, each domain knowledge base in the domain knowledge base set includes multiple triples, and the question answering device 500 also includes a model generation answer module 550. The model generation answer module 550 is used to respond to the inability to find a target answer matching the target question in the target domain knowledge base, and use the expert judgment model to determine the target answer matching the target question; use the target object, target attribute in the target question, and the target answer determined by the expert judgment model to form a new triple, and store it in the target domain knowledge base; wherein the target domain knowledge base is the first domain knowledge base, the target question is a historical question, and the target answer is a historical answer, or the target domain knowledge base is the second domain knowledge base, the target question is the current question, and the target answer is the current answer.

[0091] In some embodiments, each domain knowledge base in the domain knowledge base set includes multiple triples; the question answering device 500 also includes a semantic enhancement module 560, which is used to use a semantic enhancement model to semantically enhance the current answer, and feed back the semantically enhanced current answer to the target user; the semantic enhancement module 560 can also be used to respond to the fact that there are multiple current answers, combine multiple current answers to obtain a combined answer, or use a semantic enhancement model to combine multiple current answers and semantically enhance them to obtain a combined answer; and feed back the combined answer to the target user.

[0092] See also Figure 6 , Figure 6 : is a schematic diagram of a framework of an embodiment of an electronic device of the present application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other, and the processor 62 is used to execute program instructions stored in the memory 61 to implement the steps in any of the above-mentioned question answering method embodiments. In a specific implementation scenario, the electronic device 60 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 60 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.

[0093] Specifically, the processor 62 is used to control itself and the memory 61 to implement the steps in any of the above-mentioned question answering method embodiments. The processor 62 can also be called a CPU (Central Processing Unit). The processor 62 may be an integrated circuit chip with signal processing capabilities. The processor 62 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 62 can be implemented by an integrated circuit chip.

[0094] See also Figure 7 , Figure 7 The computer-readable storage medium 70 stores program instructions 71 that can be executed by a processor, and the program instructions 71 are used to implement the steps in any of the above-mentioned question answering method embodiments.

[0095] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0096] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0097] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0098] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A question answering method, characterized in that: The method comprises: Get the current question that the target user enters for the first time; In response to the current question and the historical question previously input by the target user being a progressive question, based on the first domain knowledge base corresponding to the historical question, determining the second domain knowledge base corresponding to the current question, wherein the first domain knowledge base and the second domain knowledge base are respectively at least one domain knowledge base in a domain knowledge base set; A current answer matching the current question is found from the second domain knowledge base.

2. The method according to claim 1, characterized in that The determining, based on the first domain knowledge base corresponding to the historical problem, the second domain knowledge base corresponding to the current problem comprises: Using the first domain knowledge base and at least one of the domain knowledge bases having a first association relationship with the first domain knowledge base as a reference domain knowledge base; The reference domain knowledge base associated with a first question element in the current question is used as the second domain knowledge base, wherein the first question element includes at least one of an object and an attribute.

3. The method according to claim 2, characterized in that Each of the domain knowledge bases in the domain knowledge base set includes a plurality of triples, each triplet includes two entities and an intra-group entity relationship between the two entities, and at least two of the triples in the same domain knowledge base contain a same entity; there is at least one group of associated domain knowledge base pairs in the domain knowledge base set, each group of associated domain knowledge base pairs has at least one cross-domain triplet, and two entities of the cross-domain triplet come from two of the domain knowledge bases in the associated domain knowledge base pair respectively; The reference domain knowledge base associated with the first question element in the current question, as the second domain knowledge base, includes: Taking entities related to historical issues in the first domain knowledge base as reference entities; From the reference domain knowledge base, find a target entity that has a second association relationship with the reference entity and matches the first question element, wherein the second association relationship includes an intra-group entity relationship and a first inter-group entity relationship, the first inter-group entity relationship is a triplet sequence consisting of a first triplet where the reference entity is located and a second triplet where the target entity is located, two adjacent entities in the triplet sequence both have the intra-group entity relationship, and the first and last triplet are the first triplet and the second triplet respectively; At least one of the domain knowledge base where the target entity is located and the domain knowledge base where an entity having an intra-group entity relationship with the target entity is located is used as the second domain knowledge base.

4. The method according to claim 3, characterized in that The domain knowledge base having a first association relationship with the first domain knowledge base includes at least one of a third domain knowledge base and a fourth domain knowledge base, the third domain knowledge base and the first domain knowledge base belong to the same associated domain knowledge base pair, the fourth domain knowledge base and the first domain knowledge base form a knowledge base sequence, and every two adjacent domain knowledge bases in the knowledge base sequence are an associated domain knowledge base pair; And / or, the domain knowledge base is a knowledge graph, the knowledge graph includes a plurality of nodes and the nodes are connected by directed edges, each of the nodes represents each of the entities in the domain knowledge base, the directed edge represents an intra-group entity relationship between entities corresponding to two connected nodes, wherein the entity pointed to by the directed edge is used as an answer to the question; and / or, the entities in the triples include the objects in the question and the corresponding answers, and the intra-group entity relationships in the triples are the attributes in the question; And / or, the reference entity is an entity corresponding to the historical answer, the historical answer is the answer to the historical question, and the reference entity has an intra-group entity relationship or a first inter-group entity relationship with the object in the historical question.

5. The method according to claim 1, characterized in that Each of the domain knowledge bases in the domain knowledge base set includes a plurality of triples, each triple includes two entities and an intra-group entity relationship between the two entities, and at least two of the triples in the same domain knowledge base include a same entity; In response to the current question and the previous historical question input by the target user being a progressive question, before determining the second domain knowledge base corresponding to the current question based on the first domain knowledge base corresponding to the historical question, the method further includes: Determine whether there is a third association relationship between the first question element and the second question element, wherein the third association relationship includes the intra-group entity relationship and the second inter-group entity relationship, the second inter-group entity relationship is a triplet sequence consisting of a third triplet where the first question element is located and a fourth triplet where the second question element is located, two adjacent entities in the triplet sequence both have the intra-group entity relationship, and the first and last triplet are the third triplet and the fourth triplet respectively, the first question element includes at least one of an object and an attribute in the current question, and the second question element includes at least one of an object and an attribute in the historical question and a historical answer corresponding to the historical question; In response to a third association relationship between the first question element and the second question element, it is determined that the current question and the historical question are progressive questions.

6. The method according to claim 1, characterized in that Before obtaining the current question that is not the first input by the target user, the method further includes: Obtain the historical question input by the target user; Determining the first domain knowledge base that matches the user information of the target user from the set of domain knowledge bases; From the first domain knowledge base, historical answers matching the historical questions are searched.

7. The method according to claim 6, characterized in that Before determining the first domain knowledge base matching the target user from the domain knowledge base set, the method further includes: Determine a target reference question and answer library matching the user information of the target user from a plurality of reference question and answer libraries, each of the reference question and answer libraries including a plurality of sets of questions and answers, each set of questions and answers including a reference question and a corresponding reference answer; Finding a reference question matching the historical question from the target reference question-answer library; Using the reference answer corresponding to the matched reference question in the target reference question and answer library as the historical answer; Among them, the steps of determining the first domain knowledge base that matches the user information of the target user from the domain knowledge base set and searching for historical answers that match the historical questions from the first domain knowledge base are performed when the historical answers cannot be found in the target reference question and answer library.

8. The method according to claim 7, characterized in that The user information includes job title; And / or, searching for a reference question matching the historical question from the target reference question-answer library includes: Finding a reference question from the target reference question-answer database whose similarity to the historical question meets the similarity requirement; And / or, after taking the reference answer corresponding to the matched reference question in the target reference question and answer library as the historical answer, the method further includes: The historical questions and the historical answers are used to adjust the corresponding group of questions and answers in the target reference question and answer library, and the adjustment includes at least one of the following: adjusting the content of the group of questions and answers, adjusting the search priority of the group of questions and answers, and adjusting the importance of the group of questions and answers.

9. The method according to claim 1 or 6, characterized in that: The step of searching for a historical answer matching the historical question from the first domain knowledge base, or searching for a current answer matching the current question from the second domain knowledge base, includes: Determine at least one target object and a target attribute, the target object comprising at least one of the following: a first object extracted from a target question and a second object semantically matching the first object, the target attribute comprising at least one of the following: a first attribute extracted from the target question and a second attribute semantically matching the first attribute; Finding a target answer related to the target object and target attribute from a target domain knowledge base; Among them, the target domain knowledge base is the first domain knowledge base, the target question is a historical question, and the target answer is a historical answer, or the target domain knowledge base is the second domain knowledge base, the target question is a current question, and the target answer is a current answer.

10. The method according to claim 9, characterized in that Each of the domain knowledge bases in the domain knowledge base set includes a plurality of triples, each triple includes two entities and an intra-group entity relationship between the two entities, and at least two of the triples in the same domain knowledge base include a same entity; The step of searching the target domain knowledge base for a target answer related to the target object and the target attribute includes: Taking the entity corresponding to the target object in the target domain knowledge base as the problem entity; An answer entity having a fourth association relationship with the question entity is searched from the target domain knowledge base as the target answer, wherein the fourth association relationship includes an intra-group entity relationship between the question entity and the answer entity that matches the target attribute, and a third inter-group entity relationship, wherein the third inter-group entity relationship is a triplet sequence consisting of a fifth triplet where the question entity is located and a sixth triplet where the answer entity is located, wherein two adjacent entities in the triplet sequence both have the intra-group entity relationship, and the first and last triplet are the fifth triplet and the sixth triplet respectively, and the intra-group entity relationship that matches the target attribute exists in the triplet sequence.

11. The method according to claim 10, characterized in that The domain knowledge base is a knowledge graph, which includes a plurality of nodes connected by directed edges, each of which represents each of the entities in the domain knowledge base, and the directed edge represents an intra-group entity relationship between entities corresponding to two connected nodes. The entity pointed to by the directed edge in the triple is located downstream of another entity, and the answer entity is located on the downstream side of the question entity; And / or, the step of searching the target domain knowledge base for an answer entity having a fourth association relationship with the question entity is performed by a relationship matching model; And / or, the target object includes the second object, the target attribute includes the second attribute, and the domain knowledge base includes a semantic library, and the semantic library contains at least one group of semantically matched objects and at least one group of semantically matched attributes.

12. The method according to claim 1 or 6, characterized in that: Each of the domain knowledge bases in the domain knowledge base set includes a plurality of triples; The method further comprises: In response to a target answer that cannot be found in the target domain knowledge base and that matches the target question, determining a target answer that matches the target question using an expert judgment model; Using the target object, target attribute in the target question, and the target answer determined by the expert judgment model, a new triple is formed and stored in the target domain knowledge base; Among them, the target domain knowledge base is the first domain knowledge base, the target question is a historical question, and the target answer is a historical answer, or the target domain knowledge base is the second domain knowledge base, the target question is a current question, and the target answer is a current answer.

13. The method according to claim 1 or 6, characterized in that: Each of the domain knowledge bases in the domain knowledge base set includes a plurality of triples; After searching the first domain knowledge base for a historical answer matching the historical question, or searching the second domain knowledge base for a current answer matching the current question, at least one of the following steps is further included: Performing semantic enhancement processing on the current answer using a semantic enhancement model, and feeding back the semantically enhanced current answer to the target user; In response to there being multiple current answers, the multiple current answers are combined to obtain a combined answer, or the multiple current answers are combined and semantically enhanced using a semantic enhancement model to obtain a combined answer; the combined answer is fed back to the target user.

14. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores program instructions, and the processor is used to execute the program instructions to implement the question answering method as described in any one of claims 1-13.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program instructions, and the program instructions can be executed to implement the question answering method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Data processing method and device based on artificial intelligence and electronic equipment

    CN111813961A

  • Intelligent dialogue system architecture and dialogue method of intelligent dialogue system

    CN115438186A

  • User-oriented intelligent customer service method and device, equipment and medium

    CN116521843A

  • Question and answer model construction method, knowledge base creation method, question and answer search method and electronic equipment

    CN116842151A

  • Interactive knowledge interaction system based on knowledge base and large language model

    CN118013001A

Cited By

  • Question and answer method and device based on large model, storage medium and electronic equipment

    CN119848222A

  • A Question Answering Method, Device, Storage Medium and Electronic Device Based on a Large Model

    CN119848222B