Construction method and construction device of local knowledge graph

By introducing semi-automated methods of expert knowledge and large language models, the problems of entity representation context dependence, entity representation fusion and relationship correlation in knowledge graph construction are solved, and efficient and accurate knowledge graph construction is achieved, which improves the universality and robustness of the knowledge graph.

CN119669481APending Publication Date: 2025-03-21SAIC VOLKSWAGEN AUTOMOTIVE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411716854.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

Existing knowledge graph construction technology is difficult to effectively deal with the context dependence of entity representation, the fusion of entity representation and the correlation between relationships, which limits the wide application of knowledge graphs in different industry fields.

Method used

A semi-automated method that introduces expert knowledge and large language models is adopted, and a local knowledge graph is constructed through multi-step processing, including concept classification hierarchy, entity relationship extraction and fusion, relationship similarity analysis, etc.

Benefits of technology

It improves the efficiency and accuracy of knowledge graph construction, ensures the refinement and order of knowledge construction, enhances the universality and robustness of knowledge graphs, and provides richer information support for knowledge association retrieval in different industries and fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669481A_ABST
    Figure CN119669481A_ABST
Patent Text Reader

Abstract

The invention provides a construction method and device for a local knowledge graph, and the construction method comprises the steps: extracting a first concept from the multi-text data of a local database, and carrying out the classification and layering of the first concept; and confirming and supplementing the classified and layered first concepts, and optimizing the first concepts into a plurality of second concepts. And segmenting multi-text data into a plurality of text paragraphs in advance, and matching and associating the text paragraphs with the second concept. And respectively extracting a plurality of local concepts and relationships thereof from the associated text paragraphs, and constructing an entity relationship multi-tuple. And integrating similar local concepts in the entity relationship multi-tuple into the same local concept. And analyzing the similarity of all the relationships in the plurality of entity relationship multi-tuples, and evaluating the relevance among all the entity relationship multi-tuples. And based on this, obtaining the constructed knowledge graph. According to the semi-automatic construction method and device, on the basis that expert knowledge is well utilized, the method does not excessively depend on manual construction rules, and the reasoning and understanding ability of a large model is utilized to the maximum extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic information, and in particular to a method and device for constructing a local knowledge graph. Background Art

[0002] Knowledge graphs are generally used to extract conceptual entities from complex and diverse knowledge content, find out the associations between entities, and classify and stratify concepts to meet the association and retrieval between knowledge concepts. Entity-relationship triples are a structure that is currently widely used in the construction of knowledge graph databases. Two entities are connected through relationship descriptions, which are usually a predefined type or entity descriptions extracted directly from text through models. At present, the main technical direction for the construction of knowledge graphs is how to better extract entities and associations from text or data. From the traditional analysis of predefined entity and relationship rules to further semantic analysis models and current large language models for direct triple extraction, the core of this technology is still how to extract entities and relationships.

[0003] Knowledge graphs can help build a structured knowledge content system, and have broad prospects in content retrieval and current large-scale model-assisted question and answer, but there are still some limitations in current applications. For example: 1. The extraction of triple entity relationships is mainly obtained through text analysis. One problem here is that the entity representations in sentences may often have similar entity concept names due to different context paragraphs, and this requires further conceptual association or conceptual alienation with the current context. Some rules or semantic analysis model methods are difficult to handle well. 2. Similar or similar entity representations need to be fused. Most entity-based fusion methods are based on rules or set standards, which results in a more mechanical processing result for entity fusion and is difficult to adapt to different knowledge systems. 3. Relationships are often only related to entities, and there is no good correlation between relationships, which is not conducive to the retrieval of relationship-based associations. These are factors that limit the wider application of knowledge graph technology in internal knowledge bases in different industry fields.

[0004] The present invention aims to solve the above-mentioned problems. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a semi-automatic construction method and construction device of a knowledge graph by introducing expert knowledge and combining a large language model.

[0006] The present invention proposes a method for constructing a local knowledge graph, comprising the following steps:

[0007] Acquire multi-text data from a local database, extract a plurality of first concepts from the multi-text data, and classify and stratify the plurality of first concepts;

[0008] Confirm and supplement the first concepts after classification and stratification, and optimize all first concepts into multiple second concepts;

[0009] Pre-segmenting the multi-text data into a plurality of text paragraphs according to organizational relationships, and then matching and associating each text paragraph with the second concept;

[0010] Extracting multiple local concepts and the relationships between the multiple local concepts from the associated text paragraphs, and constructing multiple entity relationship tuples;

[0011] Integrate similar local concepts in the plurality of entity relationship tuples into a same local concept;

[0012] Analyzing the similarity of the relationships among all local concepts in the plurality of entity relationship tuples, and evaluating the relevance among all entity relationship tuples;

[0013] Based on the results of the above steps, the constructed knowledge graph is obtained.

[0014] In one embodiment, the confirming and supplementing the first concept after classification and stratification includes: based on the first concept after classification and stratification, correcting erroneous parts, supplementing missing parts, and adjusting inconsistent classification or stratification.

[0015] In one embodiment, the organizational relationship includes topics, paragraphs, chapters, sentences, titles, or word counts.

[0016] In one embodiment, before extracting the multiple local concepts and the relationships between the multiple local concepts from the associated text paragraphs, the method includes: dividing the associated text paragraphs into multiple sub-text paragraphs.

[0017] In one embodiment, extracting multiple local concepts and the relationship between the multiple local concepts from the associated text paragraphs is:

[0018] Two local concepts and the relationship between the two local concepts are extracted from the associated text paragraphs and output in the form of entity relationship triples, wherein the structure of the entity relationship triples is: first local concept-relationship-second local concept.

[0019] In one embodiment, after integrating similar local concepts in the plurality of entity relationship tuples into the same local concept, the method further includes: outputting a corresponding relationship between the local concepts before and after the integration.

[0020] In one embodiment, analyzing the similarity of the relationships among all local concepts in the plurality of entity relationship tuples includes:

[0021] Analyze two entity relationship tuples from multiple similarity perspectives and output similarity scores of the two entity relationship tuples based on preset scoring criteria.

[0022] The present invention also proposes a local knowledge graph construction device, which is used to implement the local knowledge graph construction method as described above, and the construction device includes:

[0023] A classification and stratification extraction module extracts a plurality of first concepts from the multi-text data, and classifies and stratifies the plurality of first concepts;

[0024] An expert confirmation and supplementation module confirms and supplements the first concept output by the classification and hierarchical extraction module to obtain a second concept;

[0025] An entity-associated text segmentation module pre-segments the multi-text data into a plurality of text paragraphs according to organizational relationships, and then matches and associates each text paragraph with the second concept;

[0026] The hierarchical concept entity relationship extraction module extracts multiple local concepts and the relationships between multiple local concepts from the associated text paragraphs, and constructs multiple entity relationship tuples;

[0027] A concept entity fusion module integrates similar local concepts in the multiple entity relationship tuples into a same local concept;

[0028] The entity relationship similarity analysis module analyzes the similarity of the relationships among all local concepts in the plurality of entity relationship tuples, and evaluates the relevance among all entity relationship tuples.

[0029] In one embodiment, the construction device also includes: a large model module, which cooperates with the classification and hierarchical extraction module, the entity association text segmentation module, the hierarchical concept entity relationship extraction module, the concept entity fusion module and the entity relationship similarity analysis module to implement the functions.

[0030] In one embodiment, the construction device further includes: an information description module, the information description module is used to extract key information descriptions from the segmented text paragraphs, and the key information descriptions are used to assist in extracting local concepts.

[0031] The knowledge graph construction method and construction device of the present invention have the following beneficial effects:

[0032] 1. Semi-automatic construction improves efficiency and accuracy: This invention realizes semi-automatic construction of knowledge graphs by introducing expert knowledge and combining it with a large language model. This method not only reduces the reliance on manual construction rules, but also avoids the proliferation and disorder of conceptual entities, ensuring the refinement and orderliness of knowledge construction, thereby improving construction efficiency and knowledge quality.

[0033] 2. Global concept and text alignment optimization: In the text segmentation process, the present invention makes full use of the global concept and combines the large model to perform paragraph segmentation to ensure the accurate alignment between text data and concepts. At the same time, for approximate expressions in long texts, the large model is used for fusion resolution and fusion processing, which further improves the accuracy and consistency of text processing.

[0034] 3. Entity relationship combing and similarity judgment enhancement: In the process of constructing the knowledge graph, the present invention summarizes and combs the extracted entity relationships and performs similarity judgments on hierarchical relationships of different categories. This processing method helps to discover potential connections between information, improve the versatility and robustness of the knowledge graph, and provide richer information support for related knowledge associative retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of a process for constructing a local knowledge graph according to an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of the structure of a local knowledge graph construction device according to an embodiment of the present invention.

[0037] Reference numerals

[0038] 1. Classification and hierarchical extraction module; 2. Expert confirmation and supplement module; 3. Entity association text segmentation module; 4. Hierarchical concept entity relationship extraction module; 5. Concept entity fusion module; 6. Entity relationship similarity analysis module; 7. Large model module. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the invention and are not used to limit the invention.

[0040] The present invention proposes a method for constructing a local knowledge graph. By combining the understanding ability of a large model, the concepts of multi-text data in the local database are systematically classified and hierarchically extracted, and expert knowledge is introduced to supplement entity confirmation. The text data is then segmented according to the sorted concepts, and the text paragraphs obtained after segmentation are subjected to triple entity relationship extraction and fusion based on the large model, and the entity relationship is further associated with the large model. Finally, a knowledge graph library combining category-level entity relationships and approximate associations between relationships is constructed. Considering that the current knowledge graph construction method relies too much on manually constructed rules and introduces too many divergent conceptual entities, which limits the deployment of the general knowledge base construction process, this semi-automatic construction method can better utilize expert knowledge without relying too much on manually constructed rules and maximize the use of the reasoning and understanding ability of the large model.

[0041] like Figure 1 As shown, the method for constructing a local knowledge graph of the present invention specifically includes the following steps:

[0042] S1, obtaining multi-text data from a local database, extracting a plurality of first concepts from the multi-text data, classifying and stratifying the plurality of first concepts, and marking the categories and hierarchical relationships of all first concepts.

[0043] S2, experts confirm and supplement the first concept after classification and stratification to ensure the accuracy and completeness of the concept. This step optimizes the first concept into a more accurate and comprehensive second concept. Specifically, it includes: based on the first concept after classification and stratification, correcting the wrong parts, supplementing the missing parts, and adjusting the classification or stratification inconsistencies.

[0044] S3, pre-segment the multi-text data into multiple text paragraphs according to the organizational relationship, and then match and associate each text paragraph with the second concept, establish a connection between the text and the concept, and obtain hierarchically classified text. The organizational relationship includes a topic, or a paragraph, or a chapter, or a sentence, or a title, or a word count.

[0045] S4, extracting multiple local concepts and the relationship between the multiple local concepts from the associated text paragraphs, and constructing multiple entity relationship tuples. Prior to this step, it includes: dividing the associated text paragraphs into multiple sub-text paragraphs. The present embodiment preferably extracts two local concepts and the relationship between the two local concepts from the associated text paragraphs, and outputs them in the form of entity relationship triples. The structure of the entity relationship triple is: first local concept-relationship-second local concept. For example, Paris-is-located-in-France.

[0046] S5, integrating similar local concepts in the multiple entity relationship tuples into the same local concept to reduce redundancy and enhance the simplicity and consistency of the knowledge graph. After this step, it includes: outputting the corresponding relationship between the local concepts before and after the integration.

[0047] S6, analyze the similarity of the relationships between all local concepts in multiple entity relationship tuples, and evaluate the correlation between all entity relationship tuples. This step helps to discover potential knowledge connections and rules. In this embodiment, two entity relationship tuples are analyzed from multiple similarity angles, and the similarity scores of the two entity relationship tuples are output according to preset scoring criteria. This step proposes similarity judgments of hierarchical relationships of different categories, which can perform dimension-changing associations on knowledge entities and further explore information when related knowledge is retrieved.

[0048] Based on the structure of the above steps, the constructed knowledge graph is obtained.

[0049] The present invention also proposes a local knowledge graph construction device, which is used to implement the local knowledge graph construction method as described above. Figure 2 As shown, the construction device includes: classification and hierarchical extraction module 1, expert confirmation and supplement module 2, entity association text segmentation module 3, hierarchical concept entity relationship extraction module 4, concept entity fusion module 5, entity relationship similarity analysis module 6. The construction device also includes: large model module 7, which cooperates with the classification and hierarchical extraction module 1, entity association text segmentation module 3, hierarchical concept entity relationship extraction module 4, concept entity fusion module 5 and entity relationship similarity analysis module 6 to realize the functions. The modules that need to be used in conjunction with the large model may involve the optimization and adaptation of prompt words during the debugging process, which are also some necessary debugging steps for application development based on the large language model.

[0050] Specifically, the classification and hierarchical extraction module 1 extracts multiple unified global first concepts from the multi-text data, and classifies and hierarchizes the multiple first concepts. Specifically, the input of the classification and hierarchical extraction module 1 is the multi-text data corresponding to the local knowledge base. The text is packaged and output to the large model module 7 in the form of task prompt words designed specifically for the large model. The output knowledge base contained in the classification and hierarchical concepts after reasoning by the large model module 7. The task prompt words can be designed based on the expert's understanding of the local knowledge base, or general analytical prompt words can be used, as shown in the following example: "As a master of concept summary, you are very good at extracting the main concepts described in the content and classifying and hierarchically representing these concepts. A paragraph of text will be given below. Please extract the main concepts described in it and mark the categories and hierarchical relationships."

[0051] The expert confirmation and supplement module 2 confirms and supplements the first concept output by the classification and stratification extraction module 1 to obtain the second concept. The expert confirmation and supplement module 2 is generally processed manually, and the missing or relatively incorrect concept entities are corrected and supplemented by analyzing the content output by the classification and stratification extraction module 1. In addition, concepts with inconsistent classification or stratification also need to be adjusted.

[0052] The entity-associated text segmentation module 3 pre-segments the multi-text data into multiple text paragraphs according to the organizational relationship, and then matches and associates each text paragraph with the second concept. The entity-associated text segmentation module 3 can first adopt a segmentation method based on themes and paragraphs to divide the text according to organizational relationships. The segmented text is matched with the aforementioned confirmed second concept in the form of task prompt words designed for the large model, and the output after reasoning by the large model is the segmented text and its corresponding second concept. Compared with the mechanical processing of text segmentation, making full use of global concepts in the segmentation process and combining paragraph segmentation performed by the large model can more fully guarantee the alignment between text data and concepts, and confirm the consistency of local concepts that depend on the context. The design prompt words are as follows: "You will get a classified and hierarchical concept structure and a paragraph of text. Please carefully analyze which or which concepts are described in this text, and output the concepts contained in the classification or hierarchical tags."

[0053] The hierarchical concept entity relationship extraction module 4 extracts multiple local concepts and the relationships between multiple local concepts from the associated text paragraphs, and constructs multiple entity relationship tuples. In this embodiment, the entity relationship tuple is preferably an entity relationship triple. In this module, generally, a segmentation method based on paragraph, word count and other rule requirements can be first adopted to segment the text into shorter sub-texts, thereby improving the accuracy and coverage of the entity relationship triples extracted therein. The design prompt words are as follows: "Please extract the concepts described in this paragraph and the relationships between them, and output them in the form of {head-relationship-tail} (i.e. the structure described above: first local concept-relationship-second local concept), where the head and tail represent two local concepts respectively, and the relationship is used to describe the relationship between the two local concepts. Refer to the following output structure: Paris-located in-France."

[0054] The concept entity fusion module 5 integrates similar local concepts in multiple entity relationship tuples into the same local concept. For approximate expressions of the same concept that may appear in a long text, a large model is used to perform fusion resolution and fusion processing, avoiding excessive knowledge dependence on the design of artificial fusion rules. In this embodiment, the design prompt words are as follows: "There are some local concepts below, which are affiliated with {the second concept}. Please extract similar concepts and represent them with one of the concepts. Please output the correspondence between the new and old concepts."

[0055] The entity relationship similarity analysis module 6 analyzes the similarity of the relationships between all local concepts in multiple entity relationship tuples, and evaluates the correlation between all entity relationship tuples. The entity relationship similarity analysis module is used to think in a different dimension, so that the constructed knowledge graph has the ability to further explore the associative ability in the dimension of knowledge association. The similarity analysis of the relationship between entities is realized through the understanding ability of the large model. The prompt words are designed as follows: "Please analyze the similarity between the following two paragraphs. {Head 1-Relationship 1-Tail 1}, {Head 2-Relationship 2-Tail 2}. You can analyze from multiple similarity angles, but in the end please output a 0-10 point similarity score, and you can also output your basis for this score." Usually, multiple similarity angles can be semantic similarity, structural similarity, contextual similarity and domain relevance, and weights are assigned to multiple similarity angles to obtain preset scoring standards.

[0056] The construction device also includes: an information description module. The information description module is used to extract key information descriptions from the segmented text paragraphs, and the key information descriptions are used to assist in extracting local concepts.

[0057] The knowledge graph construction method and construction device of the present invention have the following beneficial effects:

[0058] 1. Semi-automatic construction improves efficiency and accuracy: This invention realizes semi-automatic construction of knowledge graphs by introducing expert knowledge and combining it with a large language model. This method not only reduces the reliance on manual construction rules, but also avoids the proliferation and disorder of conceptual entities, ensuring the refinement and orderliness of knowledge construction, thereby improving construction efficiency and knowledge quality.

[0059] 2. Global concept and text alignment optimization: In the text segmentation process, the present invention makes full use of the global concept and combines the large model to perform paragraph segmentation to ensure the accurate alignment between text data and concepts. At the same time, for approximate expressions in long texts, the large model is used for fusion resolution and fusion processing, which further improves the accuracy and consistency of text processing.

[0060] 3. Entity relationship combing and similarity judgment enhancement: In the process of constructing the knowledge graph, the present invention summarizes and combs the extracted entity relationships and performs similarity judgments on hierarchical relationships of different categories. This processing method helps to discover potential connections between information, improve the versatility and robustness of the knowledge graph, and provide richer information support for related knowledge associative retrieval.

[0061] The above-described embodiments are only further explanations of the present invention, and are not intended to limit the present invention in other forms. The present invention may also have other various embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may make various corresponding modifications and changes according to the present invention, but these corresponding modifications and changes should all fall within the protection scope of the present invention.

Claims

1. A method for constructing a local knowledge graph, characterized in that: The steps include: Acquire multi-text data from a local database, extract a plurality of first concepts from the multi-text data, and classify and stratify the plurality of first concepts; Confirm and supplement the first concepts after classification and stratification, and optimize all first concepts into multiple second concepts; Pre-segmenting the multi-text data into a plurality of text paragraphs according to organizational relationships, and then matching and associating each text paragraph with the second concept; Extracting multiple local concepts and the relationships between the multiple local concepts from the associated text paragraphs, and constructing multiple entity relationship tuples; Integrate similar local concepts in the plurality of entity relationship tuples into a same local concept; Analyzing the similarity of the relationships among all local concepts in the plurality of entity relationship tuples, and evaluating the relevance among all entity relationship tuples; Based on the results of the above steps, the constructed knowledge graph is obtained.

2. The method for constructing a local knowledge graph according to claim 1, characterized in that: The confirming and supplementing of the first concept after classification and stratification includes: based on the first concept after classification and stratification, correcting erroneous parts, supplementing missing parts, and adjusting inconsistent classification or stratification.

3. The method for constructing a local knowledge graph according to claim 1, characterized in that: The organizational relationships include topics, paragraphs, chapters, sentences, titles, or word counts.

4. The method for constructing a local knowledge graph according to claim 1, characterized in that: Before extracting the multiple local concepts and the relations between the multiple local concepts from the associated text paragraphs, the method includes: dividing the associated text paragraphs into multiple sub-text paragraphs.

5. The method for constructing a local knowledge graph according to claim 1, characterized in that: The extraction of multiple local concepts and the relationship between the multiple local concepts from the associated text paragraphs is as follows: Two local concepts and the relationship between the two local concepts are extracted from the associated text paragraphs and output in the form of entity relationship triples, wherein the structure of the entity relationship triples is: first local concept-relationship-second local concept.

6. The method for constructing a local knowledge graph according to claim 1, characterized in that: After integrating similar local concepts in the plurality of entity relationship tuples into the same local concept, the method includes: outputting the corresponding relationship between the local concepts before and after the integration.

7. The method for constructing a local knowledge graph according to claim 1, characterized in that: The analyzing the similarity between the relationships among all local concepts in the plurality of entity relationship tuples includes: Analyze two entity relationship tuples from multiple similarity perspectives and output similarity scores of the two entity relationship tuples based on preset scoring criteria.

8. A device for constructing a local knowledge graph, characterized in that: Applied to implement the method for constructing a local knowledge graph as claimed in any one of claims 1 to 7, the construction device comprising: A classification and stratification extraction module extracts a plurality of first concepts from the multi-text data, and classifies and stratifies the plurality of first concepts; An expert confirmation and supplementation module confirms and supplements the first concept output by the classification and hierarchical extraction module to obtain a second concept; An entity-associated text segmentation module pre-segments the multi-text data into a plurality of text paragraphs according to organizational relationships, and then matches and associates each text paragraph with the second concept; The hierarchical concept entity relationship extraction module extracts multiple local concepts and the relationships between multiple local concepts from the associated text paragraphs, and constructs multiple entity relationship tuples; A concept entity fusion module integrates similar local concepts in the multiple entity relationship tuples into a same local concept; The entity relationship similarity analysis module analyzes the similarity of the relationships among all local concepts in the plurality of entity relationship tuples, and evaluates the relevance among all entity relationship tuples.

9. The local knowledge graph construction device according to claim 8, characterized in that: The construction device also includes: a large model module, which cooperates with the classification and hierarchical extraction module, the entity association text segmentation module, the hierarchical concept entity relationship extraction module, the concept entity fusion module and the entity relationship similarity analysis module to realize the functions.

10. The local knowledge graph construction device according to claim 8, characterized in that: The construction device further includes: an information description module, which is used to extract key information descriptions from the segmented text paragraphs, and the key information descriptions are used to assist in extracting local concepts.

Citation Information

Cited By

  • Customer service question and answer processing method and device

    CN120353902A

  • Knowledge graph construction method and device, electronic equipment and storage medium

    CN121009197A