Knowledge graph generation method, question and answer method, device, equipment, medium and product

Through the methods of automatic labeling and information supplement, a knowledge graph question and answer system is built, which solves the problem of manually designing graph structures and semantic templates in the existing technology, and improves the construction efficiency and accuracy of knowledge graphs.

CN119621998APending Publication Date: 2025-03-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411928772.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

When building a knowledge graph question and answer system in the prior art, it is necessary to manually design the graph structure and semantic template, which is difficult and inefficient, resulting in low knowledge query efficiency and accuracy.

Method used

By determining the problem set of predetermined scenarios from historical interaction content, using a large model to label triple elements, supplement incomplete information, and generate a complete set of triple elements, thereby building a knowledge graph.

Benefits of technology

It reduces the difficulty and time of knowledge graph construction, improves construction efficiency and accuracy, and eliminates the need for manual design of graph structures and semantic templates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621998A_ABST
    Figure CN119621998A_ABST
Patent Text Reader

Abstract

The invention provides a knowledge graph generation method, a question and answer method, a device, equipment, a medium and a program product, which can be applied to the technical field of big data and the technical field of artificial intelligence. The knowledge graph generation method comprises the following steps: determining a question set of a predetermined scene from historical interaction content; triad elements in the question set are labeled through the large model, a triad element set is obtained, and the triad elements comprise entity elements, relation elements and attribute elements which are used for constructing the knowledge graph; under the condition of determining that the incomplete information exists in the triple element set, performing information supplement on the incomplete information in the triple element set by utilizing a knowledge set of a predetermined scene to obtain a complete triple element set; and obtaining a knowledge graph of the predetermined scene based on the complete triple element set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of big data technology and artificial intelligence technology, and more specifically to a knowledge graph generation method, question-answering method, device, equipment, medium and program product. Background Art

[0002] With the explosive growth of information, knowledge query methods based on human brain memory and search engines have problems such as incomplete knowledge and inconvenient access, which will lead to low efficiency and accuracy of knowledge query. In related technologies, knowledge graph question-answering systems are usually used to understand the questions raised by users, and use the knowledge in the knowledge graph to query and reason to obtain answers to solve the questions raised by users.

[0003] However, when building a knowledge graph question-answering system, it is usually necessary to manually design the knowledge graph structure and the semantic templates for understanding user questions based on the question-answering requirements of the scenario, which is difficult and inefficient. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a knowledge graph generation method, question and answer method, device, equipment, medium and program product.

[0005] According to the first aspect of the present disclosure, a knowledge graph generation method is provided, comprising: determining a question set of a predetermined scenario from historical interaction content; using a large model to annotate triple elements in the question set to obtain a triple element set, wherein the triple elements include entity elements, relationship elements and attribute elements for constructing a knowledge graph; in the case of determining that incomplete information exists in the triple element set, using the knowledge set of the predetermined scenario to supplement the incomplete information in the triple element set to obtain a complete triple element set; and based on the complete triple element set, obtaining a knowledge graph of the predetermined scenario.

[0006] According to an embodiment of the present disclosure, the above-mentioned use of the big model to label the triple elements in the above-mentioned question set to obtain a set of triple elements includes: generating target prompt information based on the above-mentioned question set and the target element, wherein the above-mentioned target element includes one of the following: an entity element, a relationship element and an attribute element; and inputting the above-mentioned target prompt information into the above-mentioned big model to obtain a set of triple elements.

[0007] According to an embodiment of the present disclosure, the above-mentioned knowledge set of the predetermined scenario is used to supplement the incomplete information in the above-mentioned triple element set to obtain a complete triple element set, including: determining the target question from the above-mentioned question set based on the above-mentioned incomplete information; determining the answer matching the above-mentioned target question from the above-mentioned knowledge set; and completing the above-mentioned incomplete information based on the above-mentioned answer to obtain the above-mentioned complete triple element set.

[0008] According to an embodiment of the present disclosure, the above-mentioned determining an answer matching the above-mentioned target question from the above-mentioned knowledge set includes: in the case where it is determined that the above-mentioned incomplete information is statistical information, determining associated information associated with the above-mentioned incomplete information from the above-mentioned target question; based on the above-mentioned associated information and the above-mentioned incomplete information, determining an initial answer from the above-mentioned knowledge set; and performing aggregation calculation on the above-mentioned initial answer to obtain the above-mentioned answer.

[0009] According to an embodiment of the present disclosure, the above-mentioned determining the answer matching the above-mentioned target question from the above-mentioned knowledge set includes: in the case where it is determined that the above-mentioned incomplete information is query-type information, determining the associated information associated with the above-mentioned incomplete information from the above-mentioned target question; and determining the above-mentioned answer from the above-mentioned knowledge set based on the above-mentioned associated information and the above-mentioned incomplete information.

[0010] According to an embodiment of the present disclosure, the knowledge graph of the predetermined scenario is obtained based on the complete triple element set, including: performing redundancy removal processing on the complete triple element set to obtain a simplified triple element set; and obtaining the knowledge graph based on the simplified triple element set.

[0011] The second aspect of the present disclosure provides a question-answering method, including: obtaining questions sent by a target object through an interactive interface; using a large model to annotate the questions to obtain triple elements; converting the triple elements into query statements to obtain a graph query language; based on the graph query language and the knowledge graph, obtaining answers corresponding to the questions; and through the interactive interface, feeding back the answers to the target object; wherein the knowledge graph is obtained by the knowledge graph generation method.

[0012] The third aspect of the present disclosure provides a knowledge graph generation device, including: a problem determination module, used to determine a set of questions for a predetermined scenario from historical interaction content; an element annotation module, used to use a large model to annotate the triple elements in the above-mentioned problem set to obtain a set of triple elements, wherein the above-mentioned triple elements include entity elements, relationship elements and attribute elements for constructing a knowledge graph; an information supplement module, used to, when determining that incomplete information exists in the above-mentioned triple element set, use the knowledge set of the above-mentioned predetermined scenario to supplement the incomplete information in the above-mentioned triple element set to obtain a complete set of triple elements; and a graph construction module, used to obtain the knowledge graph of the above-mentioned predetermined scenario based on the above-mentioned complete set of triple elements.

[0013] The fourth aspect of the present disclosure provides a question-answering device, including: a question acquisition module, used to acquire questions sent by a target object through an interactive interface; a question annotation module, used to annotate the above questions using a large model to obtain triple elements; a sentence conversion module, used to convert the above triple elements into query sentences to obtain a graph query language; an answer determination module, used to obtain answers corresponding to the above questions based on the above graph query language and knowledge graph; an answer feedback module, used to feed back the above answers to the above target object through the above interactive interface; wherein the above knowledge graph is obtained by the knowledge graph generation method mentioned in claims 1 to 6.

[0014] A fifth aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0015] The sixth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.

[0016] The seventh aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.

[0017] According to the embodiments of the present disclosure, by automatically labeling the triple elements in the question set and using the knowledge set to supplement the incomplete information, and then constructing a knowledge graph based on the complete set of triple elements, the difficulty of constructing the knowledge graph is reduced and the construction efficiency and accuracy are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0019] Figure 1 The application scenario diagram of the knowledge graph generation method, device, equipment, medium and program product according to the embodiment of the present disclosure is schematically shown;

[0020] Figure 2 A flowchart of a method for generating a knowledge graph according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 3 The data flow diagram for generating a knowledge graph according to an embodiment of the present disclosure is schematically shown;

[0022] Figure 4 A flowchart for determining an answer according to a specific embodiment of the present disclosure is schematically shown;

[0023] Figure 5 A flowchart of a question-answering method according to an embodiment of the present disclosure is schematically shown;

[0024] Figure 6 The structure block diagram of the knowledge graph generation device according to the embodiment of the present disclosure is schematically shown;

[0025] Figure 7 A schematic diagram of a structural block diagram of a question-answering device according to an embodiment of the present disclosure is shown; and

[0026] Figure 8 A block diagram of an electronic device suitable for implementing a knowledge graph generation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0031] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0032] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0033] The Knowledge-based Question Answering (KBQA) system aims to use the machine's ability to analyze and process natural language to understand the questions raised by users, and use the structured knowledge in the knowledge graph to query and reason, find the precise answer to the problem and feedback it to the user, helping users solve different types of problems.

[0034] However, there are also some problems with the traditional KBQA construction method. Designing the graph structure for the question-answering needs of the scenario generally requires a high level of business and expert experience. At the same time, as the complexity of the scenario increases and the amount of data increases, a large number of semantic templates and expert rules need to be maintained. Although the KBQA system construction method using a semantic parsing model based on optimized conceptual knowledge representation can reduce the number of template configurations, the template configuration method is still difficult.

[0035] An embodiment of the present disclosure provides a knowledge graph generation method, which determines a question set of a predetermined scenario from historical interaction content; uses a large model to annotate triple elements in the question set to obtain a triple element set, wherein the triple elements include entity elements, relationship elements and attribute elements for constructing a knowledge graph; when it is determined that there is incomplete information in the triple element set, uses the knowledge set of the predetermined scenario to supplement the incomplete information in the triple element set to obtain a complete triple element set; and based on the complete triple element set, obtains a knowledge graph of the predetermined scenario.

[0036] The embodiments of the present disclosure can automatically generate a knowledge graph for a predetermined scenario by using a set of questions for the predetermined scenario, without the need to manually design the graph structure and semantic template, thereby reducing the difficulty of building a knowledge graph question-and-answer system while improving construction efficiency.

[0037] Figure 1 The application scenario diagram of the knowledge graph generation method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.

[0038] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0039] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0040] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0041] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0042] It should be noted that the knowledge graph generation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the knowledge graph generation device provided in the embodiment of the present disclosure can generally be set in the server 105. The knowledge graph generation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Correspondingly, the knowledge graph generation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0043] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0044] The following will be based on Figure 1 The scene described by Figure 2~Figure 6 The knowledge graph generation method of the disclosed embodiment is described in detail.

[0045] Figure 2 A flowchart of a knowledge graph generation method according to an embodiment of the present disclosure is schematically shown.

[0046] like Figure 2 As shown, the knowledge graph generation method of this embodiment includes operations S210 to S240.

[0047] In operation S210 , a question set of a predetermined scenario is determined from historical interaction content.

[0048] According to an embodiment of the present disclosure, the historical interaction content may include question and answer information between the user and the intelligent question and answer service during the historical interaction process. Specifically, the question and answer information may include the user's question information and the answer information of the intelligent question and answer service.

[0049] According to an embodiment of the present disclosure, the predetermined scenario may be a scenario corresponding to the knowledge graph to be generated, such as a banking business consulting scenario and a fund financial management consulting scenario.

[0050] According to an embodiment of the present disclosure, question information can be first extracted from historical interaction content, and then question information related to a predetermined scenario can be extracted as a question set. Specifically, the question information in the historical interaction content can be cleaned and segmented, the scenario is determined, and the scenario is classified to obtain a question set related to the predetermined scenario.

[0051] In operation S220, the triple elements in the question set are labeled using the large model to obtain a triple element set.

[0052] According to an embodiment of the present disclosure, triple elements include entity elements, relationship elements and attribute elements for constructing a knowledge graph. Specifically, relationship elements can represent the relationship between entity elements, and attribute elements can represent the attributes of entity elements.

[0053] According to an embodiment of the present disclosure, prompt words can be used to guide the large model to label triples in the question set. Specifically, the large model can be guided to label the entity elements, relationship elements and attribute elements in each question in the question set in turn.

[0054] For example, when labeling the question "Fund products managed by fund manager X", the obtained entity elements may include "fund manager" and "fund product", and the obtained relationship elements may include "the relationship between the fund manager and the fund product".

[0055] In operation S230, when it is determined that incomplete information exists in the triple element set, the incomplete information in the triple element set is supplemented by using a knowledge set of a predetermined scenario to obtain a complete triple element set.

[0056] It is understandable that since the set of triple elements is extracted from the question set, there may be incomplete information in the obtained set of triple elements. For example, in the relationship element "the relationship between fund managers and fund products", it can actually only be determined that there is a relationship between the two entity elements "fund manager" and "fund product", but it is impossible to determine which "fund products" have a relationship with "X fund manager", that is, the obtained triple elements are incomplete.

[0057] According to an embodiment of the present disclosure, the knowledge set of a predetermined scenario may include structured data and unstructured data that match the predetermined scenario, as long as the incomplete information in the triple element set can be supplemented. For example, when the knowledge set includes a data table, the triple element can be supplemented with the data in the data table based on the field name in the data table and the element name in the triple element.

[0058] According to an embodiment of the present disclosure, when using a knowledge set to supplement incomplete information, a search engine that matches the knowledge set may be used to search the knowledge set, and the answers obtained from the search may be used to supplement the incomplete information.

[0059] In operation S240, a knowledge graph of a predetermined scenario is obtained based on the complete set of triple elements.

[0060] According to an embodiment of the present disclosure, after obtaining a complete set of triple elements, the complete triple elements in the complete set of triple elements can be spliced ​​to obtain a knowledge graph of a predetermined scenario.

[0061] According to an embodiment of the present disclosure, before concatenating multiple complete triple elements, the multiple complete triple elements may be verified, redundancy processed, and information supplemented.

[0062] According to the embodiments of the present disclosure, by automatically labeling the triple elements in the question set and using the knowledge set to supplement the incomplete information, and then constructing a knowledge graph based on the complete set of triple elements, the difficulty of constructing the knowledge graph is reduced and the construction efficiency and accuracy are improved.

[0063] Figure 3 A data flow diagram for generating a knowledge graph according to an embodiment of the present disclosure is schematically shown.

[0064] like Figure 3 As shown, the question set 310 is input into the large model 320, and the triple element set 330 is output. The triple element set 330 is supplemented with information using the knowledge set 340 to obtain a complete triple element set 350. Based on the complete triple element set 350, a knowledge graph 360 is generated.

[0065] According to an embodiment of the present disclosure, a large model is used to annotate triple elements in a question set to obtain a set of triple elements, including: generating target prompt information based on the question set and the target element; and inputting the target prompt information into the large model to obtain a set of triple elements.

[0066] According to an embodiment of the present disclosure, the target element includes one of the following: an entity element, a relationship element, and an attribute element. The target prompt information may be prompt information for prompting the large model to output a set of triple elements. Specifically, the question set may be filled into a prompt information template that matches the target element to obtain the target prompt information corresponding to the target element.

[0067] According to another embodiment of the present disclosure, the large model can also be guided to perform multiple rounds of output. Specifically, the large model can be first guided to output the entity elements in the question set by using the target prompt information matching the entity elements. Then, based on the entity elements output by the large model and the target prompt information corresponding to the relationship elements, the large model can be guided to output the relationship elements in the question set. Finally, based on the entity elements output by the large model and the target prompt information corresponding to the attribute elements, the large model can be guided to output the attribute elements in the question set.

[0068] According to a specific embodiment of the present disclosure, the method for labeling triple elements may also include but is not limited to the following steps:

[0069] Step 1: Label entity elements. Specifically, the target prompt information for entity element labeling may include "Extract possible entity types from the following question set and list them in the format of "Entity Type: Example"" and the question set. For example, when labeling entity elements for the question set "Fund products managed by XX fund manager, which XX fund products of type XX have the highest return rate in the past X period of XX fund company, and hybrid fund products issued on specific dates", the output of the large model may include "Fund Product: X Fund", "Fund Manager: X Fund Manager" and "Fund Company: XX Fund Company".

[0070] Step 2: Label the relationship elements. Specifically, the target prompt information for labeling the relationship elements may include "Extract the relationship elements between the entity elements from the following question set, and list them in the format of "Entity Element 1-Relationship-Entity Element 2"" and the question set. For example, when labeling the relationship elements of the above question set, the output of the large model may include "Fund Product-Issued-Fund Company".

[0071] Step 3: Label the attribute elements. Specifically, the target prompt information for labeling the attribute elements may include "Extract the attribute types of the entity from the following question set, and list them in the format of "Entity element: attribute element 1, attribute element 2..."" and the question set. For example, when labeling the attribute elements of the above question set, the output of the large model may include "Fund product: issuance date, rate of return".

[0072] According to an embodiment of the present disclosure, after obtaining entity elements, relationship elements and attribute elements, a set of triple elements can be generated based on the entity elements, relationship elements and attribute elements. Specifically, a large model can be guided to output a set of triple elements based on the entity elements, relationship elements and attribute elements.

[0073] According to an embodiment of the present disclosure, target prompt information is used to guide a large model to annotate triple elements, thereby improving the efficiency and accuracy of annotating triple elements.

[0074] According to an embodiment of the present disclosure, a knowledge set of a predetermined scenario is used to supplement incomplete information in a triple element set to obtain a complete triple element set, including: determining a target question from a question set based on the incomplete information; determining an answer that matches the target question from the knowledge set; and completing the incomplete information based on the answer to obtain a complete triple element set.

[0075] According to an embodiment of the present disclosure, the target question may be a question including incomplete information. For example, the incomplete information is “the relationship between fund managers and fund products”, and the incomplete information is obtained by annotating the question “fund products managed by XX fund manager”. This question can be determined as the target question.

[0076] According to the embodiments of the present disclosure, a search engine matching the knowledge set can be used to search in the knowledge set to determine the answer matching the target question. Specifically, the search engine can be used to search for the fund products managed by the XX fund manager in the knowledge set, and the answers obtained are fund product A and fund product B.

[0077] According to an embodiment of the present disclosure, before determining the answer matching the target question from the knowledge set, the entity elements in the target question may be replaced to obtain the replaced target question, and the answer matching the replaced target question may be determined in the knowledge set. For example, "XX Fund Manager" in the target question may be replaced with "YY Fund Manager" to obtain the replaced target question "Fund products managed by YY Fund Manager".

[0078] According to the embodiments of the present disclosure, when completing incomplete information, the triple element with incomplete information can be expanded into multiple complete triple elements. For example, if the incomplete information is "the relationship between fund managers and fund products", it can be expanded to obtain "the relationship between XX fund manager and fund product A", "the relationship between XX fund manager and fund product B", and it can also be expanded to obtain "the relationship between YY fund manager and fund product C" according to the answer to the target question after replacement.

[0079] According to an embodiment of the present disclosure, after supplementing each triple element with incomplete information in the triple element set, multiple complete triple elements are obtained, and then a complete triple element set is obtained based on the multiple complete triple elements.

[0080] According to an embodiment of the present disclosure, by utilizing a knowledge set, information completion is performed on triple elements with incomplete information, so that the obtained complete set of triple elements has accuracy and completeness, thereby improving the accuracy of the knowledge graph.

[0081] According to an embodiment of the present disclosure, an answer matching a target question is determined from a knowledge set, including: when the incomplete information is determined to be statistical information, determining associated information associated with the incomplete information from the target question; based on the associated information and the incomplete information, determining an initial answer from the knowledge set; and performing aggregation calculations on the initial answer to obtain an answer.

[0082] According to an embodiment of the present disclosure, statistical information may represent information that needs to be processed by statistics, calculations, etc. For example, statistical information may be information that needs to be obtained by statistics and calculations, such as yields.

[0083] According to an embodiment of the present disclosure, the associated information may be information associated with incomplete statistical information in the target problem. For example, when the statistical information is the rate of return, the determined associated information may include fund products and statistical periods.

[0084] According to an embodiment of the present disclosure, an initial answer corresponding to incomplete information can be searched in a knowledge set based on associated information. For example, the return of fund product x in x period can be searched, and the initial answer obtained is the return.

[0085] According to the embodiments of the present disclosure, when performing aggregate calculation on the initial answer, the calculation can be performed according to a preset calculation formula and the initial answer, or the initial answer can be directly statistically calculated. For example, the rate of return can be calculated according to the income and the x period, that is, the answer can be obtained.

[0086] According to an embodiment of the present disclosure, by considering the case where incomplete information is statistical information, an aggregate calculation is performed on the initial answer determined from the knowledge set to obtain the answer, thereby improving the richness and accuracy of the information in the knowledge graph.

[0087] According to an embodiment of the present disclosure, determining an answer that matches a target question from a knowledge set includes: when determining that the incomplete information is query-type information, determining associated information associated with the incomplete information from the target question; and determining an answer from the knowledge set based on the associated information and the incomplete information.

[0088] According to an embodiment of the present disclosure, the query information may be information that can be obtained by directly querying the knowledge set. For example, the query information may be the fund type of a fund product.

[0089] According to an embodiment of the present disclosure, the associated information may be information associated with the incomplete query information in the target question. For example, when the query information is a fund type, the associated information may be a fund product.

[0090] According to the embodiments of the present disclosure, since query information can be directly recorded in the knowledge set, the answer corresponding to the incomplete information can be directly searched in the knowledge set based on the associated information. For example, the fund type of fund product x can be searched, and the answer obtained is fund type a.

[0091] According to an embodiment of the present disclosure, considering the case where the incomplete information is query-type information, the answer is determined directly from the knowledge set, so as to use the answer to supplement the information of the incomplete triple elements, thereby improving the accuracy of the information in the knowledge graph.

[0092] Figure 4 The flowchart of determining an answer according to a specific embodiment of the present disclosure is schematically shown.

[0093] like Figure 4 As shown, determining the answer includes operations S410 to S450.

[0094] In operation S410 , associated information associated with the incomplete information is determined from the target question.

[0095] In operation S420, it is determined whether the incomplete information is query type information. If the incomplete information is query type information, operation S430 is performed, otherwise operation S440 is performed.

[0096] In operation S430 , an answer is determined from the knowledge set based on the associated information and the incomplete information.

[0097] In operation S440 , an initial answer is determined from the knowledge set based on the associated information and the incomplete information.

[0098] In operation S450, aggregate calculation is performed on the initial answer to obtain an answer.

[0099] According to an embodiment of the present disclosure, a knowledge graph of a predetermined scenario is obtained based on a complete set of triple elements, including: performing redundancy removal processing on the complete set of triple elements to obtain a simplified set of triple elements; and obtaining a knowledge graph based on the simplified set of triple elements.

[0100] According to the embodiments of the present disclosure, due to differences in user expression habits, there may be multiple ways of expressing a certain entity, relationship or attribute in the question set, resulting in the output of the large model including multiple elements representing the same entity, relationship or attribute. For example, for the attribute "fund type", the corresponding attribute element may include "fund type" or "fund category".

[0101] According to an embodiment of the present disclosure, redundancy processing can be used to remove complete triple elements including redundant information in a complete triple element set. For example, it can be determined that "fund category" is redundant information, and the complete triple elements related to "fund category" are removed, while the complete triple elements related to "fund type" are retained.

[0102] According to an embodiment of the present disclosure, after redundant complete triple elements in a complete triple element set are deleted, a simplified triple element set can be obtained.

[0103] According to an embodiment of the present disclosure, the simplified triple elements in the simplified triple element set may be concatenated to obtain a knowledge graph.

[0104] According to an embodiment of the present disclosure, by performing redundant processing on a complete set of triple elements, the simplicity of the knowledge graph is improved, thereby avoiding low query efficiency caused by the presence of a large amount of redundant data in the knowledge graph.

[0105] Figure 5 The flowchart of the question-answering method according to the embodiment of the present disclosure is schematically shown.

[0106] like Figure 5 As shown, the question-answering method of this embodiment includes operations S510 to S550.

[0107] In operation S510, a question sent by a target object through an interactive interface is obtained.

[0108] According to an embodiment of the present disclosure, the target object may be a user who asks a question. Specifically, the user may input a question to be asked through an interactive operation with an interactive interface in a client, and the client generates a request according to the question and sends the request to a server.

[0109] According to an embodiment of the present disclosure, in response to receiving a request sent by a client, the server may obtain a question from the request.

[0110] In operation S520, the question is labeled using the large model to obtain triple elements.

[0111] According to an embodiment of the present disclosure, before using a large model to annotate questions, the large model can be trained using a knowledge graph so that the large model can annotate questions using triple elements included in the knowledge graph.

[0112] For example, when the user's question is "What are the xx types of funds with the highest return rate in the past X periods at xx fund company?", the triple elements obtained after annotating the question using the large model include "fund company", "x-period return rate", "fund type" and their respective element identifiers.

[0113] In operation S530, query statements are converted into graph query language on the triple elements.

[0114] According to an embodiment of the present disclosure, triple elements may be converted into corresponding graph query languages. Specifically, triple elements and questions may be input into a large model to guide the large model to output corresponding graph query languages.

[0115] In operation S540, an answer corresponding to the question is obtained based on the graph query language and the knowledge graph.

[0116] According to an embodiment of the present disclosure, the knowledge graph is obtained through a knowledge graph generation method.

[0117] According to an embodiment of the present disclosure, a knowledge graph may be queried using a graph query language to obtain an answer corresponding to a question.

[0118] In operation S550, the answer is fed back to the target object through the interactive interface.

[0119] According to an embodiment of the present disclosure, the answer may be converted into a natural language form, and the natural language form may be sent to a target object.

[0120] According to the embodiments of the present disclosure, by using a large model to annotate the questions sent by the target object, using the triple elements obtained by the annotation to convert the query statement, and querying the knowledge graph based on the query language to obtain the answer, there is no need to configure additional semantic templates, thereby reducing the difficulty of building a knowledge question and answer system.

[0121] Based on the above-mentioned knowledge graph generation method, the present disclosure also provides a knowledge graph generation device. Figure 6 The device is described in detail.

[0122] Figure 6 The structural block diagram of the knowledge graph device according to an embodiment of the present disclosure is schematically shown.

[0123] like Figure 6As shown, the knowledge graph generating device 600 of this embodiment includes a problem determination module 610, an element labeling module 620, an information supplementation module 630 and a graph construction module 640.

[0124] The question determination module 610 is used to determine a set of questions for a predetermined scenario from the historical interaction content. In one embodiment, the question determination module 610 can be used to perform the operation S210 described above, which will not be described in detail here.

[0125] The element annotation module 620 is used to annotate the triple elements in the question set using the large model to obtain a set of triple elements, wherein the triple elements include entity elements, relationship elements, and attribute elements used to construct the knowledge graph. In one embodiment, the element annotation module 620 can be used to perform the operation S220 described above, which will not be repeated here.

[0126] The information supplementation module 630 is used to supplement the incomplete information in the triple element set by using the knowledge set of the predetermined scenario to obtain a complete triple element set when it is determined that there is incomplete information in the triple element set. In one embodiment, the information supplementation module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0127] The graph construction module 640 is used to obtain a knowledge graph of a predetermined scenario based on a complete set of triple elements. In one embodiment, the graph construction module 640 can be used to perform the operation S240 described above, which will not be described in detail here.

[0128] According to an embodiment of the present disclosure, the element annotation module 630 includes a prompt generation submodule and a prompt input submodule.

[0129] The prompt generation submodule is used to generate target prompt information based on the question set and the target element, wherein the target element includes one of the following: an entity element, a relationship element, and an attribute element.

[0130] The prompt input submodule is used to input the target prompt information into the large model to obtain a set of triple elements.

[0131] According to an embodiment of the present disclosure, the information supplementation module 630 includes a target determination submodule, an answer determination submodule, and an information completion submodule.

[0132] The target determination submodule is used to determine the target problem from the problem set based on incomplete information.

[0133] The answer determination submodule is used to determine the answer that matches the target question from the knowledge set.

[0134] The information completion submodule is used to complete the incomplete information based on the answer to obtain a complete set of triple elements.

[0135] According to an embodiment of the present disclosure, the answer determination submodule includes a first determination unit, a second determination unit, and an aggregate calculation unit.

[0136] The first determining unit is used to determine, when it is determined that the incomplete information is statistical information, associated information associated with the incomplete information from the target question.

[0137] The second determination unit is used to determine an initial answer from the knowledge set based on the associated information and the incomplete information.

[0138] The aggregation calculation unit is used to perform aggregation calculation on the initial answer to obtain the answer.

[0139] According to an embodiment of the present disclosure, the answer determination submodule further includes a third determination unit and a fourth determination unit.

[0140] The third determining unit is used to determine, when determining that the incomplete information is query-type information, associated information associated with the incomplete information from the target question.

[0141] The fourth determination unit is used to determine an answer from the knowledge set based on the associated information and the incomplete information.

[0142] According to an embodiment of the present disclosure, the graph construction module 640 includes a redundancy processing submodule and a graph generation submodule.

[0143] The redundancy processing submodule is used to perform redundancy removal on the complete triple element set to obtain a simplified triple element set.

[0144] The graph generation submodule is used to obtain a knowledge graph based on a simplified set of triple elements.

[0145] According to an embodiment of the present disclosure, any multiple modules of the problem determination module 610, the element annotation module 620, the information supplementation module 630 and the atlas construction module 640 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the problem determination module 610, the element annotation module 620, the information supplementation module 630 and the atlas construction module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the problem determination module 610, the element annotation module 620, the information supplementation module 630 and the graph construction module 640 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be performed.

[0146] Based on the above question-answering method, the present disclosure also provides a question-answering device. Figure 7 The device is described in detail.

[0147] Figure 7 The structural block diagram of the question-answering device according to an embodiment of the present disclosure is schematically shown.

[0148] like Figure 7 As shown, the question-answering device 700 of this embodiment includes a question acquisition module 710 , a question marking module 720 , a sentence conversion module 730 , an answer determination module 740 and an answer feedback module 750 .

[0149] The question acquisition module 710 is used to acquire the question sent by the target object through the interactive interface. In one embodiment, the question acquisition module 710 can be used to perform the operation S710 described above, which will not be repeated here.

[0150] The question labeling module 720 is used to label the question using the large model to obtain triple elements. In some embodiments, the question labeling module 720 can be used to perform the operation S720 described above, which will not be repeated here.

[0151] The statement conversion module 730 is used to convert the triple elements into query statements to obtain the graph query language. In some embodiments, the statement conversion module 730 can be used to perform the operation S730 described above, which will not be repeated here.

[0152] The answer determination module 740 is used to obtain an answer corresponding to the question based on the graph query language and the knowledge graph, wherein the knowledge graph is obtained by a knowledge graph generation device. In some embodiments, the answer determination module 740 can be used to perform the operation S740 described above, which will not be repeated here.

[0153] The answer feedback module 750 is used to feed back the answer to the target object through the interactive interface. In some embodiments, the answer feedback module 750 can be used to perform the operation S750 described above, which will not be repeated here.

[0154] According to an embodiment of the present disclosure, any multiple modules of the question acquisition module 710, the question annotation module 720, the sentence conversion module 730, the answer determination module 740 and the answer feedback module 750 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the question acquisition module 710, the question annotation module 720, the sentence conversion module 730, the answer determination module 740 and the answer feedback module 750 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the question acquisition module 710, the question annotation module 720, the sentence conversion module 730, the answer determination module 740 and the answer feedback module 750 can be at least partially implemented as a computer program module, which can perform corresponding functions when executed.

[0155] Figure 8 A block diagram of an electronic device suitable for implementing a knowledge graph generation method according to an embodiment of the present disclosure is schematically shown.

[0156] like Figure 8As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0157] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.

[0158] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the input / output (I / O) interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that the computer program read therefrom is installed into the storage portion 808 as needed.

[0159] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0160] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.

[0161] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the knowledge graph generation method provided by the embodiment of the present disclosure.

[0162] The above functions defined in the system / device of the embodiment of the present disclosure are executed when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0163] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0164] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0165] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0166] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0167] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0168] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A knowledge graph generation method, characterized in that: The method comprises: A set of questions for determining predetermined scenarios from historical interaction content; Using the large model to annotate the triple elements in the question set to obtain a set of triple elements, wherein the triple elements include entity elements, relationship elements, and attribute elements for constructing a knowledge graph; In the case where it is determined that incomplete information exists in the triple element set, using the knowledge set of the predetermined scenario to supplement the incomplete information in the triple element set to obtain a complete triple element set; and Based on the complete set of triple elements, a knowledge graph of the predetermined scenario is obtained.

2. The method according to claim 1, characterized in that The method of using the large model to label the triple elements in the question set to obtain a triple element set includes: Generate target prompt information based on the question set and the target element, wherein the target element includes one of the following: an entity element, a relationship element, and an attribute element; and The target prompt information is input into the large model to obtain the triple element set.

3. The method according to claim 1, characterized in that The using the knowledge set of the predetermined scenario to supplement the incomplete information in the triple element set to obtain a complete triple element set includes: Based on the incomplete information, determining a target question from the question set; Determining an answer matching the target question from the knowledge set; and The incomplete information is completed based on the answer to obtain the complete triplet element set.

4. The method according to claim 3, characterized in that Determining an answer matching the target question from the knowledge set includes: In the case where it is determined that the incomplete information is statistical information, determining associated information associated with the incomplete information from the target question; Determining an initial answer from the knowledge set based on the associated information and the incomplete information; Aggregate calculation is performed on the initial answer to obtain the answer.

5. The method according to claim 3 or 4, characterized in that: Determining an answer matching the target question from the knowledge set includes: In the case where it is determined that the incomplete information is query-type information, determining associated information associated with the incomplete information from the target question; and The answer is determined from the knowledge set based on the associated information and the incomplete information.

6. The method according to claim 1, characterized in that The step of obtaining the knowledge graph of the predetermined scenario based on the complete triple element set includes: Performing redundancy removal processing on the complete triple element set to obtain a simplified triple element set; Based on the simplified set of triple elements, the knowledge graph is obtained.

7. A question-answering method, characterized in that: The method comprises: Get the questions sent by the target object through the interactive interface; Using the large model to label the problem, obtaining triple elements; Convert the triple elements into query statements to obtain a graph query language; Based on the graph query language and the knowledge graph, an answer corresponding to the question is obtained; Feedback the answer to the target object through the interactive interface; Wherein, the knowledge graph is obtained through the knowledge graph generation method described in claims 1 to 6.

8. A knowledge graph generation device, characterized in that: The device comprises: A problem determination module, used to determine a set of problems for a predetermined scenario from historical interaction content; An element annotation module, used to annotate triple elements in the question set using a large model to obtain a set of triple elements, wherein the triple elements include entity elements, relationship elements, and attribute elements used to construct a knowledge graph; an information supplementation module, configured to, when determining that incomplete information exists in the triple element set, supplement the incomplete information in the triple element set by using the knowledge set of the predetermined scenario to obtain a complete triple element set; and A graph construction module is used to obtain a knowledge graph of the predetermined scenario based on the complete set of triple elements.

9. A question-answering device, characterized in that: The method comprises: A question acquisition module is used to acquire questions sent by the target object through the interactive interface; A question labeling module, used to label the question using a large model to obtain triple elements; A statement conversion module, used for converting the triple elements into query statements to obtain a graph query language; An answer determination module, used to obtain an answer corresponding to the question based on the graph query language and the knowledge graph; An answer feedback module, used for feeding back the answer to the target object through the interactive interface; Wherein, the knowledge graph is obtained through the knowledge graph generation device described in claim 8.

10. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

11. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.