A large model enhanced semi-open knowledge extraction method and system

Through the semi-open knowledge extraction method enhanced by the large model, the language understanding ability of the large model is used to perform high-precision knowledge extraction, which solves the problems of strong field dependence, lagging knowledge update, insufficient extraction accuracy and low computing efficiency in the existing methods. Achieve high-precision and high-efficiency knowledge extraction.

CN118966203BActive Publication Date: 2025-02-11ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411456385.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-11
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The existing semi-open knowledge extraction methods have problems such as strong field dependence, lag in knowledge update, insufficient extraction accuracy and low computing efficiency, making it difficult to achieve high-precision and high-scaling knowledge extraction.

Method used

A semi-open knowledge extraction method enhanced by large model is proposed. Through the steps of seed entity-based corpus retrieval, correlation calculation, triple extraction, confidence screening, grammar checking and standardized alignment, the language understanding ability of the large model is used for High-precision knowledge extraction.

Benefits of technology

It significantly improves the accuracy and efficiency of knowledge extraction, and can effectively utilize the powerful language understanding capabilities of the big model to achieve high-precision and high-scaling knowledge extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966203B_ABST
    Figure CN118966203B_ABST
Patent Text Reader

Abstract

The present invention discloses a large model-enhanced semi-open knowledge extraction method and system, which can accurately screen high-quality corpora related to the issues of concern, and realize efficient and accurate knowledge extraction. It includes: first, based on given seed entities, relevant corpora containing these seed entities are retrieved; then, based on the purpose of knowledge extraction and the issues of concern, the degree of association between the retrieved corpora and the focus is calculated, and the corpora with high association are screened out as the source corpora for knowledge extraction; then, the large model is used to extract triples with the seed entity as the head entity from the source corpus; the large model is used to judge the confidence of the extracted triples, and the triples with confidence exceeding the threshold are screened out; the grammar, part of speech, etc. of the obtained triples are further checked, and the triples that meet the specifications are screened out; finally, through the entity, relationship standardization alignment, synonym extraction fusion and other technologies, the knowledge is deduplicated and standardized, and the final required triples are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a large-model enhanced semi-open knowledge extraction method and system. Background Art

[0002] In the era of information explosion, how to extract valuable knowledge from massive unstructured data has become an important research direction in the field of natural language processing and artificial intelligence. Existing knowledge extraction methods mainly include closed domain knowledge extraction, semi-open knowledge extraction and open domain knowledge extraction. Semi-open knowledge extraction takes into account the accuracy of closed domain knowledge extraction and the scalability of open domain knowledge extraction, but existing methods still face limitations such as strong domain dependence, lagging knowledge update, insufficient extraction accuracy and low computational efficiency. In recent years, large models based on pre-trained language models have shown excellent performance in NLP tasks. How to use the powerful language understanding ability of large models to achieve high-precision and high-scalability knowledge extraction is a key issue that needs to be solved. Summary of the invention

[0003] In order to effectively realize high-precision and high-scalability knowledge extraction with regard to the problem of semi-open knowledge extraction, the present invention proposes a large-model enhanced semi-open knowledge extraction method and system.

[0004] The objective of the present invention is achieved through the following technical solutions:

[0005] The present invention provides a large model enhanced semi-open knowledge extraction method, comprising the following steps:

[0006] Step 1: Based on the given seed entities, retrieve the relevant corpus containing these seed entities;

[0007] Step 2: Based on the purpose of knowledge extraction and the issues of concern, calculate the degree of correlation between the retrieved corpus and the focus, and select the corpus with high correlation as the source corpus for knowledge extraction;

[0008] Step 3: Based on the source corpus obtained in step 2, use the large model to extract triples with the seed entity as the head entity;

[0009] Step 4: Determine the confidence of the extracted triples and select the triples whose confidence exceeds the threshold;

[0010] Step 5: Check the grammar and part of speech of the triples obtained in step 4, and select the triples that meet the specifications;

[0011] Step 6: Through the standardized alignment of entities and relationships and the extraction and fusion of synonyms, the knowledge is deduplicated and standardized to obtain the final required triples;

[0012] Step 7: Take the tail entity of the triple obtained in step 6 as the new seed entity, and repeat steps 1 to 6 until all triples in the corpus are extracted, or the threshold of the number of extracted triples is reached, or the number of times the above steps are repeated to extract triples is reached.

[0013] Furthermore, the step 1 comprises:

[0014] The corpus in the corpus is segmented and the keyword search method is used to search for corpus segments containing the given seed entity.

[0015] Furthermore, the step 2 comprises:

[0016] Based on the corpus fragments obtained in step 1, the purpose of knowledge extraction and the issues of concern, the pre-trained language model is used to convert them into vector representations, and then the similarity between the vector representations is calculated to obtain the degree of correlation between the corpus fragments and the issues of concern, and the corpus with high correlation is selected as the source corpus for knowledge extraction; or the corpus fragment C and the issue of concern Q are directly constructed into the input prompt word "You are a smart assistant, and your task is to evaluate the correlation between the given corpus fragment and the issue of concern; the correlation score is between 0 and 1, and the higher the score, the stronger the correlation, Corpus fragment: C Focus on the question: "Q" and input it into the big model. According to the answer of the big model, the corpus with high relevance is selected as the source corpus for knowledge extraction; among them, Represents a line break character.

[0017] Furthermore, the step 3 comprises:

[0018] Based on the source corpus C obtained in step 2, construct the input prompt word "You are an expert in triple extraction. Extract triples from the given source corpus. The extracted triples are required to use the given seed entity as the head entity. Source: C Seed entity: E" is input into the large model to obtain a triple; among them, Represents a line break character.

[0019] Furthermore, the step 4 comprises:

[0020] Based on the triple Ts obtained in step 3 and the corpus segment C associated with it, determine the confidence score of the triple Ts in the original corpus segment, and use the keyword matching method to check whether the head entity, relationship, and tail entity of the triple all appear in the original corpus; or train a classification model to determine the existence of the triple in the text.

[0021] Furthermore, the step 5 comprises:

[0022] Based on the triple Ts obtained in step 4, the keyword matching method is used to determine whether its head entity is consistent with the given head entity, and its grammar and part of speech are further checked. The triple Ts is input into the large model to "evaluate the rationality of the following triples, focusing on the grammatical correctness and part of speech of its relations and tail entities, without paying attention to the content and factual accuracy of the triples themselves; Triple: Ts" obtains a triple that meets the specification based on the output of the large model; among them, Represents a line break character.

[0023] Further, the step 6 comprises:

[0024] Based on the triples Ts obtained in step 5, if multiple entities represent the same entity, normalize them into a unified representation; use the pre-trained word vector model to calculate the similarity between entities, identify synonyms, and merge the identified synonyms into a unified representation; for the relationships in the triples, use the same method to identify and align the relationships.

[0025] The present invention also provides a large model enhanced semi-open knowledge extraction system for implementing the above method, comprising:

[0026] A corpus retrieval module, used to retrieve corpus containing seed entities;

[0027] Corpus screening module, used to screen corpus with high relevance to the issue of concern;

[0028] The triple extraction module is used to extract triples with a given seed entity as the head entity from a given corpus;

[0029] The triplet trusted screening module is used to screen triples with high confidence;

[0030] The triple format review module is used to filter triples that do not conform to grammar and part of speech standards;

[0031] The standardization and alignment module is used to normalize entities and relations in different expression forms into a standard form;

[0032] The seed entity screening module is used to screen out new seed entities from the tail entities of the newly obtained triples.

[0033] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned large model enhanced semi-open knowledge extraction method.

[0034] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the above-mentioned large model enhanced semi-open knowledge extraction method is implemented.

[0035] The beneficial effects of the present invention are as follows: the present invention provides a large model-enhanced semi-open knowledge extraction method, which provides an effective solution for achieving high-precision and high-scalability knowledge extraction. The present invention can effectively utilize the powerful language understanding ability of the large model to screen high-quality and highly relevant candidate corpora before extraction, and then, through the semi-open knowledge extraction framework, extract knowledge from the candidate corpora, and then screen, verify and expand. When the present invention is applied to semi-open knowledge extraction, the accuracy and efficiency of knowledge extraction are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flow chart of the large model enhanced semi-open knowledge extraction method proposed by the present invention;

[0037] Figure 2 It is a schematic diagram of the structure of the large model enhanced semi-open knowledge extraction system provided by the present invention;

[0038] Figure 3 It is a schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0039] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of systems and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0040] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0041] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0042] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in combination with specific implementation cases and with reference to the accompanying drawings.

[0043] See also Figure 1 The present invention proposes a large model enhanced semi-open knowledge extraction method, the main steps of which include:

[0044] Step 1: Based on the given seed entities, relevant corpus containing these seed entities is retrieved.

[0045] Specifically, the corpus in the corpus is first segmented, and then the keyword search method is used to directly search for corpus segments containing specific entities.

[0046] Step 2: Based on the purpose of knowledge extraction and the issues of concern, the degree of correlation between the retrieved corpus and the focus is calculated, and the corpus with high correlation is selected as the source corpus for knowledge extraction.

[0047] Specifically, based on the corpus fragments obtained in step 1, as well as the purpose of knowledge extraction and the issues of concern, the pre-trained language model is used to convert them into vector representations, and then the similarity between the vector representations is calculated to obtain the degree of correlation between the corpus fragments and the issues of concern, and the corpus with high correlation is screened out as the source corpus for knowledge extraction. You can also directly construct the input prompt word "You are a smart assistant, and your task is to evaluate the correlation between the given corpus fragment and the issue of concern. The correlation score should be between 0 and 1. The higher the score, the stronger the correlation, where 0 indicates no correlation and 1 indicates maximum correlation. Corpus fragment: C Focus on the question: "Q" is input to the big model, and the highly relevant corpus is selected as the source corpus for knowledge extraction based on the answer of the big model. Among them, represents a line break, and C represents a corpus fragment.

[0048] It should be noted that the scoring rules for association and relevance can be referred to:

[0049] 1. Highly relevant (score: 0.8 - 1.0):

[0050] (1.1) The text directly answers the question;

[0051] (1.2) The text provides specific information or examples to answer the question;

[0052] (1.3) The text uses key words and phrases that match the question;

[0053] (1.4) The text is comprehensive and covers many aspects of the issue.

[0054] 2. Moderately correlated (score: 0.5 - 0.7):

[0055] (2.1) The text partially answers the question;

[0056] (2.2) The text provides some relevant information but may lack detail or specificity;

[0057] (2.3) The text mentions key words or phrases relevant to the question but does not fully expand on them;

[0058] (2.4) The text covers some aspects of the problem but is not comprehensive.

[0059] Step 3: Based on the source corpus obtained in step 2, use the large model to extract triples with the seed entity as the head entity.

[0060] Specifically, based on the source corpus C obtained in step 2, the input prompt word "You are an expert in triple extraction. You extract triples from the given source corpus, and the extracted triples must take the given seed entity as the head entity" is constructed together with the associated seed entity E. Source: C Seed entity: E" is input to the large model to obtain a triple.

[0061] By searching the open source knowledge graph library, we get the open source triples with the seed entity E as the head entity, and input them into the large model prompt words together with the sample triples T.

[0062] The question of interest Q is input to the big model, and only the triples related to the question of interest are extracted. The input prompt of the big model is "You are an expert in triple extraction. Extract triples from the given source corpus. The extracted triples must have the given seed entity as the head entity. The output must strictly follow the format of the example triples. The extracted triples must be closely related to the following question of interest. Source: C Seed Entity: E Example triple: T Question of concern: Q".

[0063] Step 4: Determine the confidence of the extracted triples and select the triples whose confidence exceeds the threshold (which can be adjusted according to actual needs, generally 0.8).

[0064] Specifically, based on the triple Ts obtained in step 3 and the corpus fragment C associated with it, the confidence score of the triple Ts in the original corpus fragment is determined. The keyword matching method can be used to check whether the head entity, relationship, and tail entity of the triple all appear in the original corpus. A classification model can also be trained to determine the existence of the triple in the text. The triple and its associated corpus fragment can also be constructed into an input prompt word "Your role is to evaluate the listed potential relationships and evaluate whether the relationship in a given triple is relevant to the provided corpus. Evaluation criteria: 1. The relationship is clearly mentioned in the text, and the head entity and the tail entity are directly connected through the relationship, which is a high confidence. 2. The relationship is logically implied by the text, and there is strong but unclear evidence connecting the head entity and the tail entity through the relationship, that is, medium to high confidence. 3. The relationship is very far-fetched, the textual evidence is weak and indirect, and there is almost no hint of the connection between the head entity and the tail entity, that is, low confidence. " Input to the big model, and based on the big model's answer, filter out the triples with high confidence.

[0065] Step 5, check the grammar, part of speech, etc. of the triples obtained in step 4, and select the triples that meet the specifications.

[0066] Specifically, based on the triple Ts obtained in step 4, the keyword matching method is used to determine whether its head entity is consistent with the given head entity, and its grammar, part of speech, etc. are further checked. The triple Ts is input into the large model to "evaluate the rationality of the following triples, focusing on the grammatical correctness and part of speech of its relations and tail entities, without paying attention to the content and factual accuracy of the triple itself. Triplet: Ts” obtains triplet that meets the specification based on the output of the large model.

[0067] Step 6: Through standardized alignment of entities and relationships, synonym extraction and fusion, etc., knowledge is deduplicated and normalized to obtain the final required triples.

[0068] Specifically, based on the triples Ts obtained in step 5, if multiple entities actually represent the same entity, they are normalized into a unified representation. The pre-trained word vector model is used to calculate the similarity between entities, identify synonyms, and merge the identified synonyms into a unified representation. For the relations in the triples, the same method is used to identify and align the relations.

[0069] Step 7: Use the tail entity of the triple obtained in step 6 as a new seed entity and repeat the above process until the end condition is met.

[0070] Specifically, based on the triple Ts obtained in step 6, extract its tail entity, remove duplicates, and remove the tail entity that has been used as a head entity in the previous step to obtain a new seed entity Es. According to the needs, the source corpus that extracts the triple containing the seed entity as the tail entity can be used as the source corpus associated with the seed entity, and repeat the above steps 3-6, or directly repeat the above steps 1-6 until the end condition is met. The end condition can be that all triples in the corpus have been extracted, or the threshold of the number of extracted triples has been reached (manually set), or the number of times the above steps have been repeated to extract triples has been reached (manually set, generally 2-3 times in actual operation).

[0071] The large model enhanced semi-open knowledge extraction system provided by the present invention is described below. The large model enhanced semi-open knowledge extraction system described below and the large model enhanced semi-open knowledge extraction method described above can refer to each other.

[0072] Figure 2 The schematic diagram of the structure of the large model enhanced semi-open knowledge extraction system provided by the present invention is as follows: Figure 2 As shown, the present invention provides a large model enhanced semi-open knowledge extraction system, the system includes:

[0073] A corpus retrieval module, used to retrieve corpus containing seed entities;

[0074] Corpus screening module, used to screen corpus with high relevance to the issue of concern;

[0075] The triple extraction module is used to extract triples with a given seed entity as the head entity from a given corpus;

[0076] The triplet trusted screening module is used to screen triples with high confidence;

[0077] The triple format review module is used to filter triples that do not conform to grammar and part of speech standards;

[0078] The standardization and alignment module is used to normalize entities and relations in different expression forms into a standard form;

[0079] The seed entity screening module is used to screen out new seed entities from the tail entities of the newly obtained triples.

[0080] This embodiment uses the powerful language understanding ability of the large model to intervene in all aspects from corpus screening to triple extraction to triple verification, effectively improving the accuracy and efficiency of semi-open knowledge extraction.

[0081] Corresponding to the embodiment of the aforementioned large model enhanced semi-open knowledge extraction method, the embodiment of the present application further provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the large model enhanced semi-open knowledge extraction method as described above. Figure 3 As shown, it is a hardware structure diagram of any device with data processing capability where the large model enhanced semi-open knowledge extraction method provided in the embodiment of the present application is located, except Figure 3 In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, which will not be described in detail, generally based on the actual functions of the device with data processing capabilities.

[0082] Corresponding to the embodiment of the aforementioned large model enhanced semi-open knowledge extraction method, an embodiment of the present invention also provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the large model enhanced semi-open knowledge extraction method in the above embodiment is implemented.

[0083] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

[0085] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.

Claims

1. A large model enhanced semi-open knowledge extraction method, characterized in that: The following steps are involved: Step 1: Based on the given seed entities, retrieve the relevant corpus containing these seed entities; Step 2: Based on the purpose of knowledge extraction and the issues of concern, calculate the degree of correlation between the retrieved corpus and the focus, and select the corpus with high correlation as the source corpus for knowledge extraction; Specifically, based on the corpus fragments obtained in step 1 and the purpose and concerns of knowledge extraction, the pre-trained language model is used to convert them into vector representations, and then the similarity between the vector representations is calculated to obtain the degree of correlation between the corpus fragments and the concerns, and the corpus with high correlation is selected as the source corpus for knowledge extraction; or the corpus fragment C and the concern question Q are directly constructed into the input prompt word "You are a smart assistant, and your task is to evaluate the correlation between the given corpus fragment and the concern question; The correlation score is between 0 and 1, with higher scores indicating stronger correlation. Corpus fragment: C Focus on the question: "Q" and input it into the big model. According to the answer of the big model, the corpus with high relevance is selected as the source corpus for knowledge extraction; among them, Represents a line break character; Step 3: Based on the source corpus obtained in step 2, use the large model to extract triples with the seed entity as the head entity; Step 4: Determine the confidence of the extracted triples and filter out the triples whose confidence exceeds the threshold; Step 5: Check the grammar and part of speech of the triples obtained in step 4, and select the triples that meet the specifications; Step 6: Through the standardized alignment of entities and relationships and the extraction and fusion of synonyms, the knowledge is deduplicated and standardized to obtain the final required triples; Step 7: Take the tail entity of the triple obtained in step 6 as the new seed entity, and repeat steps 1 to 6 until all triples in the corpus are extracted, or the threshold of the number of extracted triples is reached, or the number of times the above steps are repeated to extract triples is reached.

2. The large model enhanced semi-open knowledge extraction method according to claim 1, characterized in that: The step 1 comprises: The corpus in the corpus is segmented and the keyword search method is used to search for corpus segments containing the given seed entity.

3. The large model enhanced semi-open knowledge extraction method according to claim 1, characterized in that: The step 3 comprises: Based on the source corpus C obtained in step 2, construct the input prompt word "You are an expert in triple extraction, extracting triples from the given source corpus, requiring the extracted triples to have the given seed entity as the head entity; Source material: C Seed entity: E" is input into the large model to obtain a triple; among them, Represents a line break character.

4. The large model enhanced semi-open knowledge extraction method according to claim 1, characterized in that: The step 4 comprises: Based on the triple Ts obtained in step 3 and the corpus segment C associated with it, determine the confidence score of the triple Ts in the original corpus segment, and use the keyword matching method to check whether the head entity, relationship, and tail entity of the triple all appear in the original corpus; or train a classification model to determine the existence of the triple in the text.

5. The large model enhanced semi-open knowledge extraction method according to claim 1, characterized in that: The step 5 comprises: Based on the triple Ts obtained in step 4, determine whether its head entity is consistent with the given head entity through keyword matching, further check its grammar and part of speech, and input the triple Ts into the big model to "evaluate the rationality of the following triples, focusing on the grammatical correctness and part of speech of its relations and tail entities, and not on the content and factual accuracy of the triple itself; Triple: Ts" obtains a triple that meets the specification based on the output of the large model; among them, Represents a line break character.

6. The large model enhanced semi-open knowledge extraction method according to claim 1, characterized in that: The step 6 comprises: Based on the triples Ts obtained in step 5, if multiple entities represent the same entity, normalize them into a unified representation; use the pre-trained word vector model to calculate the similarity between entities, identify synonyms, and merge the identified synonyms into a unified representation; for the relationships in the triples, use the same method to identify and align the relationships.

7. A large model enhanced semi-open knowledge extraction system implementing the method as claimed in claim 1, characterized in that: include: A corpus retrieval module, used to retrieve corpus containing seed entities; Corpus screening module, used to screen corpus with high relevance to the issue of concern; The triple extraction module is used to extract triples with a given seed entity as the head entity from a given corpus; The triplet trusted screening module is used to screen triples with high confidence; The triple format review module is used to filter triples that do not conform to grammar and part of speech standards; The standardization and alignment module is used to normalize entities and relations in different expression forms into a standard form; The seed entity screening module is used to screen out new seed entities from the tail entities of the newly obtained triples.

8. An electronic device, comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the large model enhanced semi-open knowledge extraction method described in any one of claims 1-6 above.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the large model enhanced semi-open knowledge extraction method as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Data enhancement method and device based on large language model

    CN118277645A

  • Reinforced generation: reinforcement learning for text and knowledge graph bi-directional generation using pretrained language models

    US20240070404A1