Knowledge graph construction method and device, equipment, medium and program product

CN122596201APending Publication Date: 2026-08-18CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610526442.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-20
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]然而,由于上述方案验证维度过于单一,导致大语言模型幻觉验证效果不佳,难以充分规避大语言模型幻觉带来的事实错误,进而导致构建的知识图谱的准确性较低

Benefits of technology

[0054] The beneficial effects of the second to sixth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122596201A_ABST
    Figure CN122596201A_ABST
Patent Text Reader

Abstract

The application provides a knowledge graph construction method and device, equipment, medium and program product, relates to the artificial intelligence technical field, and is used for accurately constructing a knowledge graph. The specific technical scheme is: obtaining original text related to a target business; inputting the original text into a first model to extract information, and extracting at least one entity relationship triple in the original text; constructing a triple verification prompt word based on the at least one entity relationship triple and an original document; inputting the triple verification prompt word into a second model for verification to obtain a verification result of each entity relationship triple; the verification result of the entity relationship triple includes an entity existence verification result and an entity relationship verification result; constructing a knowledge graph based on the verification result of each entity relationship triple and the at least one entity relationship triple; wherein the original document is a document constructed based on the original text. The application is applied to the construction scene of the knowledge graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, medium, and program product for constructing a knowledge graph. Background Technology

[0002] Large Language Models (LLMs), with their natural language understanding and generation capabilities, are widely used in the core stages of knowledge graph construction, specifically covering key steps such as entity recognition, relation extraction, and attribute completion. However, LLMs inherently suffer from the "illusion" problem, which generates seemingly reasonable but factually unfounded, erroneous, or fabricated content. This problem leads to incorrect entity information, contradictory relational logic, and distorted attribute descriptions, directly undermining the underlying logic of the knowledge graph and resulting in data distortion and low credibility in the constructed knowledge graph.

[0003] In related technologies, single-point verification is mainly used to verify the content generated by large language models in order to ensure the accuracy of entities, relations and attributes during the knowledge graph construction process.

[0004] However, because the above-mentioned scheme has too few verification dimensions, the verification effect of the large language model illusion is not good, and it is difficult to fully avoid the factual errors caused by the large language model illusion, which in turn leads to the low accuracy of the constructed knowledge graph. Summary of the Invention

[0005] This application provides a knowledge graph construction method, apparatus, device, medium, and program product for accurately constructing knowledge graphs.

[0006] In a first aspect, embodiments of this application provide a knowledge graph construction method, the method comprising:

[0007] Obtain the raw text related to the target business;

[0008] The original text is input into the first model for information extraction. At least one entity relation triplet is extracted from the original text. Each entity relation triplet includes the entity description information of the source entity, the entity description information of the target entity, and the relationship description information between the source entity and the target entity.

[0009] Construct a triplet validation prompt based on at least one entity relation triplet and the original document;

[0010] The triplet validation prompt is input into the second model for validation, and the validation result of each entity relation triplet is obtained; the validation result of the above entity relation triplet includes the entity existence validation result and the entity relation validation result.

[0011] Based on the verification results of each entity relation triplet and at least one entity relation triplet mentioned above, a knowledge graph is constructed.

[0012] The original document mentioned above is a document constructed based on the original text mentioned above.

[0013] The technical solution provided in this application brings at least the following beneficial effects: The knowledge graph construction method provided in this application uses a dual-model approach to separate the information extraction process and the information verification process into two different models for processing. The information of the two models is independent of each other and does not interfere with each other, so that the verification model will not introduce additional illusion phenomena. Furthermore, by integrating multiple entity relation triples to be verified and the original text into the prompt words, the prompt words clearly contain the instruction language of "please judge according to the given document content", which enables the verification model to perform information verification more accurately, ensuring the accuracy of the verification results. As a result, the knowledge graph constructed based on the verification results obtained from the verification model is more accurate.

[0014] One possible implementation involves inputting the aforementioned triplet validation prompts into a second model for validation, obtaining the validation results for each entity relation triplet, including:

[0015] Input the above triplet verification prompts into the above second model, and verify the above at least one entity relation triplet based on at least one first judgment criterion and at least one second judgment criterion contained in the above second model, and output the verification result of each entity relation triplet;

[0016] Wherein, at least one of the above-mentioned first determination criteria is used to determine the existence of entities in the entity relation triplet; at least one of the above-mentioned second determination criteria is used to determine the entity relation of the entity relation triplet.

[0017] Another possible implementation involves verifying the at least one entity relation triple based on at least one first decision criterion and at least one second decision criterion included in the second model, and outputting the verification result for each entity relation triple, including:

[0018] If the first entity relation triplet satisfies at least one of the above first determination criteria, the entity existence verification result of the first entity relation triplet is determined to be correct; or, if the first entity relation triplet does not satisfy any of the above first determination criteria, the entity relation verification result of the first entity relation triplet is determined to be incorrect.

[0019] If the aforementioned first entity relation triplet satisfies at least one of the aforementioned second determination criteria, the entity relation verification result of the aforementioned first entity relation triplet is determined to be correct; or, if the aforementioned first entity relation triplet does not satisfy any of the aforementioned second determination criteria, the entity existence verification result of the aforementioned first entity relation triplet is determined to be incorrect.

[0020] Another possible implementation is that at least one of the above-mentioned first criterion includes:

[0021] The entity names in the above entity relation triples match the words in the original document;

[0022] The entity types in the above entity relation triples are consistent with the contextual semantics in the original document;

[0023] The entity description information in the above entity relation triples exists in the original document.

[0024] Another possible implementation is that at least one of the above-mentioned second criterion includes:

[0025] The source and target entities in the entity relations of the above entity relation triples exist in the entity list of the extraction block;

[0026] The relationship types of the entity relationships in the above entity relationship triples conform to the predefined rules for entity relationship types;

[0027] The original document contains entity relations in entity relation triples, and the entity relations in the entity relation triples are consistent with the relevant descriptions of the source entity and the target entity.

[0028] Secondly, embodiments of this application provide a knowledge graph construction apparatus, including:

[0029] The acquisition module is used to acquire raw text related to the target business.

[0030] The extraction module is used to input the above-mentioned original text into the first model for information extraction, and to extract at least one entity relation triplet from the above-mentioned original text. Each entity relation triplet includes the entity description information of the source entity, the entity description information of the target entity, and the relationship description information between the above-mentioned source entity and the above-mentioned target entity.

[0031] The module is used to construct triplet validation prompts based on at least one of the above entity relation triplets and the original document;

[0032] The verification module is used to input the above triplet verification prompts into the second model for verification, and obtain the verification result of each entity relation triplet; the verification result of the above entity relation triplet includes the entity existence verification result and the entity relation verification result.

[0033] The aforementioned construction module is also used to construct a knowledge graph based on the verification results of each entity relation triple and at least one entity relation triple mentioned above;

[0034] The original document mentioned above is a document constructed based on the original text mentioned above.

[0035] One possible implementation, the aforementioned verification module, is specifically used for:

[0036] Input the above triplet verification prompts into the above second model, and verify the above at least one entity relation triplet based on at least one first judgment criterion and at least one second judgment criterion contained in the above second model, and output the verification result of each entity relation triplet;

[0037] Wherein, at least one first criterion is used to determine the existence of entities in the entity relationship triplet; at least one second criterion is used to determine the entity relationship of the entity relationship triplet.

[0038] Another possible implementation, the verification module mentioned above, is specifically used for:

[0039] If the first entity relation triple satisfies at least one of the above first determination criteria, the entity existence verification result of the first entity relation triple is determined to be correct; or, if the first entity relation triple does not satisfy any of the first determination criteria, the entity relation verification result of the first entity relation triple is determined to be incorrect.

[0040] If the aforementioned first entity relation triplet satisfies at least one of the aforementioned second determination criteria, the entity relation verification result of the aforementioned first entity relation triplet is determined to be correct; or, if the aforementioned first entity relation triplet does not satisfy any of the second determination criteria, the entity existence verification result of the aforementioned first entity relation triplet is determined to be incorrect.

[0041] Wherein, the first entity relation triplet mentioned above is any entity relation triplet among the at least one entity relation triplets.

[0042] Another possible implementation is that at least one of the above-mentioned first criterion includes:

[0043] The entity names in the above entity relation triples match the words in the above original document;

[0044] The entity types in the above entity relation triples are consistent with the contextual semantics in the original document.

[0045] The entity description information in the above entity relationship triples exists in the original document.

[0046] Another possible implementation is that at least one of the above-mentioned second criterion includes:

[0047] The source entity and the target entity in the entity relation of the above entity relation triple exist in the entity list of the extraction block;

[0048] The relationship types of the entity relationships in the above entity relationship triples conform to the predefined rules for entity relationship types;

[0049] The original document contains entity relations in entity relation triples, and the entity relations in the entity relation triples are consistent with the relevant descriptions of the source entity and the target entity.

[0050] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory stores a program or instructions executable on the processor, wherein the program or instructions, when executed by the processor, implement the method of the first aspect described above.

[0051] Fourthly, this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a computer, implement the method of the first aspect described above.

[0052] Fifthly, this application provides a computer program product stored in a storage medium, which, when executed by a computer, implements the method described in the first aspect.

[0053] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect.

[0054] The beneficial effects of the second to sixth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description

[0055] Figure 1 A schematic diagram of the network architecture for an application of a knowledge graph construction method provided in this application embodiment;

[0056] Figure 2 A flowchart illustrating a knowledge graph construction method provided in an embodiment of this application;

[0057] Figure 3 A flowchart illustrating a knowledge graph construction method provided in an embodiment of this application;

[0058] Figure 4 A flowchart illustrating a knowledge graph construction method provided in an embodiment of this application;

[0059] Figure 5 This is a schematic diagram of a knowledge graph construction system provided in an embodiment of this application;

[0060] Figure 6 A schematic diagram illustrating a technical effect verification process provided in an embodiment of this application;

[0061] Figure 7 A schematic diagram of the structure of a knowledge graph construction device provided in an embodiment of this application;

[0062] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0063] The knowledge graph construction method, apparatus, equipment, medium, and program products provided in this application will be described in detail below with reference to the accompanying drawings.

[0064] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0065] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0066] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."

[0067] In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0068] The embodiments of this application provide a knowledge graph construction method, apparatus, device, medium, and program product that can be applied to knowledge graph construction scenarios.

[0069] With the widespread application of Large Language Models (LLMs) in various fields, the "hallucination" problem has become increasingly prominent. Large model hallucination refers to the model generating content that "appears reasonable but is factually incorrect / fabricated / unsupported by evidence." This problem is particularly serious in knowledge-intensive applications using large language models, such as knowledge graph extraction and construction, directly affecting the accuracy and reliability of knowledge graphs.

[0070] In existing technologies, governance techniques for large model illusion mainly focus on the following levels: systems engineering and inference phase. At the systems engineering level, the most relevant patent found, CN117556920B (A method, apparatus, device, and storage medium for governing large model illusion), proposes an illusion governance method based on verification rules. This scheme uses target question-answer pairs and verifies the answers to be verified based on verification rules and target questions-answer pairs, thereby reducing the possibility of illusions in the model-generated results. The core of this patent lies in verifying the model output through preset verification rules. At the inference phase level, a CSDN blog post proposes using structured output and a generative adjudication mechanism at the application level to reduce the degree of large model illusion. The post suggests emphasizing "answering only based on evidence, without introducing external information" in the Prompt process and using an NLI (Natural Language Inference) model to perform factual verification of the generated content.

[0071] However, rule validation in CN117556920B or NLI validation in CSDN articles often employ single-point validation to verify the knowledge graph constructed from a large language model. However, single-point validation makes it difficult to verify the accuracy of information across all dimensions during the knowledge graph construction process. For example, it's difficult to verify the accuracy of entity, relation, and attribute information during knowledge graph construction, leading to poor validation of large language model illusions. This makes it difficult to fully avoid factual errors caused by large language model illusions, resulting in lower accuracy of the constructed knowledge graph.

[0072] To address the aforementioned technical problems, embodiments of this application provide a knowledge graph construction method, apparatus, device, medium, and program product, which involves: acquiring original text related to a target business; inputting the original text into a first model for information extraction, extracting at least one entity relation triplet from the original text, each entity relation triplet including entity description information of the source entity, entity description information of the target entity, and relationship description information between the source entity and the target entity; constructing triplet verification prompts based on the at least one entity relation triplet and the original document; inputting the triplet verification prompts into a second model for verification, obtaining the verification result for each entity relation triplet; the verification result of the entity relation triplet includes entity existence verification result and entity relation verification result; and constructing a knowledge graph based on the verification result of each entity relation triplet and the at least one entity relation triplet; wherein the original document is a document constructed based on the original text. In this way, by using a dual-model approach, the information extraction and verification processes are separated into two different models. The information in each model is independent and does not interfere with the other, so that the verification model does not introduce additional illusions. Furthermore, by integrating multiple entity relation triples to be verified and the original text into the prompt words, the prompt words explicitly contain the instruction language of "please judge according to the given document content," which enables the verification model to perform information verification more accurately, ensuring the accuracy of the verification results. As a result, the knowledge graph constructed based on the verification results obtained from the verification model is more accurate.

[0073] The knowledge graph construction method, apparatus, device, medium, and program product provided in this application will be described in detail below with reference to the accompanying drawings.

[0074] Figure 1 This illustration shows a network architecture for a knowledge graph construction method provided in an embodiment of this application. For example... Figure 1 As shown, the network architecture includes a knowledge graph construction device 101 and a terminal device 102. The knowledge graph construction device 101 and the terminal device 102 are interconnected.

[0075] In some embodiments, the knowledge graph construction apparatus 101 may be a server, a computer, or a processor or processing unit within a server or computer. The server may be a single server or a server cluster comprising multiple servers. It should be noted that the embodiments of this application do not limit the specific device form of the knowledge graph construction apparatus 101. Figure 1 The knowledge graph construction device 101 is illustrated as a single server.

[0076] In some embodiments, the terminal device 102 may be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., and the embodiments of this application do not specifically limit it. Figure 1 The example shown is a mobile phone, with terminal device 102 as an example.

[0077] In some embodiments, the knowledge graph construction device 101 is used to acquire original text related to a target business; input the original text into a first model for information extraction, extracting at least one entity relationship triplet from the original text, each entity relationship triplet including entity description information of the source entity, entity description information of the target entity, and relationship description information between the source entity and the target entity; construct triplet verification prompts based on the above at least one entity relationship triplet and the original document; input the triplet verification prompts into a second model for verification, obtaining the verification result of each entity relationship triplet; the verification result of the above entity relationship triplet includes entity existence verification result and entity relationship verification result; construct a knowledge graph based on the verification result of each entity relationship triplet and the above at least one entity relationship triplet; wherein, the above original document is a document constructed based on the above original text; the knowledge graph construction device 101 transmits the constructed knowledge graph to a terminal device 102; the terminal device 102 is used to display the received knowledge graph constructed by the knowledge graph construction device to the operator.

[0078] It should be noted that the network architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As network architectures evolve, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0079] See Figure 2 This is a flowchart illustrating a knowledge graph construction method provided in an embodiment of this application. Figure 2 As shown, the knowledge graph construction method provided in this application embodiment can be implemented by the above-mentioned knowledge graph construction device, specifically including the following steps 201 to 205.

[0080] Step 201: The knowledge graph construction device acquires the original text related to the target business.

[0081] In some embodiments, the target service mentioned above may be a question-and-answer service, a text polishing service, a text expansion service, a translation service, etc. The specific service can be determined according to actual needs, and this embodiment does not impose specific limitations here.

[0082] In some embodiments, the above-mentioned question-and-answer service may be a traffic query service, a call charge query service, etc., and the specific service can be determined according to actual needs. This embodiment does not impose specific limitations here.

[0083] In some embodiments, the original text may be text obtained by converting voice data or work order data related to the target business.

[0084] Step 202: The knowledge graph construction device inputs the original text into the first model for information extraction, and extracts at least one entity relation triple from the original text.

[0085] In some embodiments, the knowledge graph construction apparatus may preprocess the original text before inputting the preprocessed original text into the first model.

[0086] In some embodiments, each entity relation triple includes entity description information of the source entity, entity description information of the target entity, and relation description information between the source entity and the target entity.

[0087] In some embodiments, the first model can be an open-source large language model, such as the model used by LightRAG or the model used by DeepSeek V3, and the first model is used to extract information from the original text.

[0088] In some embodiments, the source entity may be an entity contained in the original text.

[0089] In some embodiments, after the knowledge graph construction device inputs the original text into the first model, it can process the target business based on the original text through the first model to obtain the corresponding business processing result.

[0090] In some embodiments, the target entity may be an entity included in the business processing result.

[0091] In some embodiments, the knowledge graph construction apparatus can extract entity description information of the source entity from the original text using the first model described above, extract entity description information of the target entity from the business processing result described above, and determine the relationship description information between the source entity and the target entity.

[0092] In some embodiments, the entity description information of the source entity described above includes at least one of the following:

[0093] The name information of the aforementioned source entity, the type information of the aforementioned source entity, and the first identifier information of the aforementioned source entity.

[0094] In some embodiments, the first identification information described above is used to identify the source of the source entity.

[0095] In some embodiments, the entity description information of the target entity includes at least one of the following:

[0096] The name information of the aforementioned target entity, the type information of the aforementioned target entity, and the second identification information of the aforementioned target entity.

[0097] In some embodiments, the second identification information described above is used to identify the source of the target entity.

[0098] Step 203: The knowledge graph construction device constructs a triplet verification prompt word based on at least one entity relation triplet and the original document.

[0099] In some embodiments, the original document described above is a document constructed based on the original text described above.

[0100] In some embodiments, the triplet validation prompt can be used to validate the entity relation triplet.

[0101] In some embodiments, the knowledge graph construction apparatus can integrate the above-mentioned at least one entity relation triple with the above-mentioned original document into the prompt word template, thereby constructing the above-mentioned triple verification prompt word.

[0102] Step 204: The knowledge graph construction device inputs the triple verification prompt into the second model for verification, and obtains the verification result of each entity relation triple.

[0103] In some embodiments, the verification results of the above entity relationship triples include entity existence verification results and entity relationship verification results.

[0104] In some embodiments, the second model described above can be a referee model.

[0105] In some embodiments, combined with Figure 2 ,like Figure 3 As shown, step 204 above can be achieved through the following step 204a:

[0106] Step 204a: The knowledge graph construction device inputs the triple verification prompts into the second model, verifies at least one entity relation triple based on at least one first judgment criterion and at least one second judgment criterion contained in the second model, and outputs the verification result of each entity relation triple.

[0107] Wherein, at least one of the above-mentioned first determination criteria is used to determine the existence of entities in the entity relation triplet; at least one of the above-mentioned second determination criteria is used to determine the entity relation of the entity relation triplet.

[0108] In some embodiments, the above-mentioned at least one first determination criterion includes:

[0109] The entity names in the above entity relation triples match the words in the original document;

[0110] The entity types in the above entity relation triples are consistent with the contextual semantics in the original document;

[0111] The entity description information in the above entity relation triples exists in the original document.

[0112] In some embodiments, the at least one second criterion mentioned above includes:

[0113] The source and target entities in the entity relations of the above entity relation triples exist in the entity list of the extraction block;

[0114] The relationship types of the entity relationships in the above entity relationship triples conform to the predefined rules for entity relationship types;

[0115] The original document contains entity relations in entity relation triples, and the entity relations in the entity relation triples are consistent with the relevant descriptions of the source entity and the target entity.

[0116] In some embodiments, combined with Figure 3 ,like Figure 4 As shown, step 204a above can be achieved through the following steps 204a1 and / or 204a2:

[0117] Step 204a1: If the first entity relation triplet satisfies at least one first judgment criterion, the knowledge graph construction device determines that the entity existence verification result of the first entity relation triplet is correct; or, if the first entity relation triplet does not satisfy any of the first judgment criterions, the entity relation verification result of the first entity relation triplet is determined to be incorrect.

[0118] Wherein, the first entity relation triplet mentioned above is any entity relation triplet among the above at least one entity relation triplets.

[0119] In some embodiments, satisfying at least one of the above-mentioned first determination criteria can be understood as satisfying each of the above-mentioned first determination criteria.

[0120] Step 204a2: If the first entity relation triplet satisfies at least one second criterion, the knowledge graph construction device determines that the entity relation verification result of the first entity relation triplet is correct; or, if the first entity relation triplet does not satisfy any of the above second criterion, the entity existence verification result of the first entity relation triplet is determined to be incorrect.

[0121] In some embodiments, satisfying at least one of the above-mentioned second determination criteria can be understood as satisfying each of the above-mentioned at least one second determination criteria.

[0122] It should be noted that the execution order of steps 204a1 and 204a2 described above is not limited in this embodiment. For example, step 204a1 can be executed first, followed by step 204a2; or step 204a2 can be executed first, followed by step 204a1; or steps 204a1 and 204a2 can be executed simultaneously. Figure 4 This is illustrated by taking the example of executing step 204a1 first and then step 204a2.

[0123] Thus, on the one hand, if the first entity relation triplet satisfies at least one first criterion, the knowledge graph construction device determines that the entity existence verification result of the first entity relation triplet is correct; or, if the first entity relation triplet does not satisfy any of the first criterion, it determines that the entity relation verification result of the first entity relation triplet is incorrect. This accurately determines the verification result of the entity relation of the entity relation triplet, ensuring the accuracy of the verification result, and thus making the knowledge graph constructed based on the verification result obtained from the second model more accurate. On the other hand, if the first entity relation triplet satisfies at least one second criterion, the knowledge graph construction device determines that the entity relation verification result of the first entity relation triplet is correct; or, if the first entity relation triplet does not satisfy any of the above second criterion, it determines that the entity existence verification result of the first entity relation triplet is incorrect. This accurately determines the verification result of the entity relation of the entity relation triplet, ensuring the accuracy of the verification result, and thus making the knowledge graph constructed based on the verification result obtained from the second model more accurate.

[0124] In this way, the knowledge graph construction device can accurately output the verification result of each entity relation triple by inputting the triple verification prompt words into the second model and verifying at least one entity relation triple based on at least one first judgment criterion and at least one second judgment criterion contained in the second model. This ensures the accuracy of the verification results and makes the knowledge graph constructed based on the verification results obtained from the second model more accurate.

[0125] Step 205: The knowledge graph construction device constructs a knowledge graph based on the verification results of each entity relation triple and at least one entity relation triple.

[0126] In some embodiments, the knowledge graph construction apparatus determines the accuracy rate and error rate of the verification results of at least one entity relation triple based on the verification results of each entity relation triple, and when the accuracy rate is greater than or equal to the error rate, it performs fusion processing on the at least one entity relation triple through knowledge disambiguation to obtain a knowledge graph.

[0127] The knowledge graph construction method provided in this application uses a dual-model approach to separate the information extraction and verification processes into two different models. The information in each model is independent and does not interfere with the other, preventing the verification model from introducing additional illusions. Furthermore, by integrating multiple entity relation triples to be verified and the original text into prompt words, the prompt words explicitly contain the instruction language "Please judge based on the given document content," enabling the verification model to perform information verification more accurately and ensuring the accuracy of the verification results. Consequently, the knowledge graph constructed based on the verification results obtained from the verification model is more accurate.

[0128] The knowledge graph construction method provided in this application will be described below with reference to specific implementation methods.

[0129] In this embodiment, entity relation triples are extracted from the preprocessed text data and validated as the basis of the model to ensure the accuracy of the entity relation triple validation results, thereby making the knowledge graph construction more accurate.

[0130] The knowledge graph construction method provided in this embodiment can be applied to, for example... Figure 5The knowledge graph construction system 500 shown is primarily composed of three core modules: an unstructured data preprocessing module 501, a large-model-based knowledge extraction module 502, and an entity-relationship extraction illusion governance module 503. This knowledge graph construction system 500 receives voice-to-text information from customer service dialogues and, through the collaborative work of the aforementioned modules, outputs a more accurate and reliable business scenario knowledge graph, providing support for downstream applications.

[0131] For example, the main workflow of this knowledge graph construction system 500 begins with data filtering and input. The required work order data and speech-to-text data are filtered from the data source and sent to the unstructured data preprocessing module 501. This module is responsible for cleaning and processing the multi-turn dialogue information from the raw data and performing rule-based and large-scale model text correction and rewriting. The processed speech-to-text data is then input to the large-scale model knowledge extraction module 502 to extract the original entity relationships. This is then input to the entity-relationship illusion governance module 503, which combines the corresponding block information to verify contextual consistency and knowledge extraction illusions. Finally, the data is integrated and merged based on the verification results to form a complete knowledge graph, which is persistently stored in a graph database and provided to business systems through corresponding API interfaces.

[0132] For example, the unstructured data preprocessing module 501 is an important component of the knowledge graph construction system 500. Its purpose is to process the raw speech-to-text data extracted from the data source into effective multi-turn dialogue text data that can be recognized by large models. For example, the unstructured data preprocessing module 501 mainly implements three sub-processes: data cleaning and format processing, rule matching and modification and character punctuation correction, and overall LLM correction and rewriting.

[0133] The data cleaning and formatting sub-process is implemented as follows: First, the speech-to-text work order JSON data is queried via SQL (the actual logic differs from the specific data format of each database). The raw JSON data is then loaded into memory using Spark. The Role and Text fields in the JSON are retrieved using the get method. Prefixes and concatenated text are added based on the Role field, finally forming continuous multi-turn dialogue text information (e.g., Account Manager: xxxxx. Customer: xxxx).

[0134] The implementation process of the rule matching modification and character punctuation correction sub - process is as follows: First, when initializing the class instance, the system automatically loads six preset standardized cleaning rule sequences: removing extra spaces (replacing consecutive whitespace characters with a single space and removing leading and trailing spaces), fixing punctuation (standardizing Chinese punctuation such as "。" with no extra space after it, and adding a single space after English punctuation such as ","), correcting common errors (applying predefined regular expressions to replace common speech recognition errors, e.g., replacing "因该" with "应该"), normalizing number expressions (converting full - width numbers to half - width numbers), fixing date and time formats (unifying the date format to "YYYY年MM月DD日"), and removing duplicate words (deleting consecutive duplicate modal particles, e.g., "哦哦", "嗯嗯", etc.). Second, if a configuration file path is provided, the system reads the JSON - formatted configuration file from that path, parses the'replacements' field in it to obtain custom homophone replacement rules, and these rules will be integrated into the cleaning process in the order of the rule sequence. Then, when calling the clean method to process a single text, the system strictly executes in the fixed order of the above six rules: first, execute removing extra spaces, then execute fixing punctuation, then execute correcting common errors, then execute normalizing number expressions, then execute fixing date and time formats, and finally execute removing duplicate words, ensuring that the processing result of each step is used as the input for the next step. Then, when calling the batch_clean method to process a list of texts, the system traverses each string in the input list, independently executes the complete cleaning process of the clean method for each string, and returns a list of cleaned strings. Finally, through the add_rule method, a custom cleaning function can be inserted at a specified position in the rule sequence. This function needs to receive a string input and return a cleaned string. After insertion, the execution order of the rule sequence remains fixed, thus achieving the dynamic expansion of the cleaning process without affecting the original rule execution logic.

[0135] The implementation process of the LLM overall correction and rewriting sub-process is as follows: It mainly involves encapsulating the corresponding text data through the prompt word project, and then calling the capabilities of the large model to perform overall correction and rewriting of the multi-turn dialogue text information processed by the above sub-process. The aim is to correct homophones, remove useless information such as interjections in spoken language, and correct contextual expressions without changing the meaning of the sentences, maintaining the semantic flow and integrity of the text so that the large model can better understand and extract knowledge in subsequent knowledge extraction. Specifically, the system first constructs standardized correction prompt words, explicitly requiring the correction of homophone errors, grammatical errors, and punctuation errors, while strictly emphasizing maintaining the integrity of the dialogue, not omitting any parts, not adding extra content, or changing the original meaning. Secondly, the calling method is selected based on the model type: for cloud-based models, the specified model is called via the OpenAI format request interface compatible with the client (deepseek-ai / DeepSeek-R1-0528-Qwen3-8B is used in this project), using system prompts and user prompts to construct the dialogue, and setting a low temperature (0.1) and a sufficient token limit (2000) to ensure long text processing; for local models, the specified locally deployed model is called via the Ollam API format. Then, the system implements an exponential backoff retry mechanism (maximum 3 retries), automatically waiting and retrying when the API call fails to avoid processing interruptions caused by temporary network problems. Finally, the corrected text is extracted from the model response, and by filtering out the introductory text (such as "corrected text", "suggestions", etc.) and explanatory text, the complete dialogue content is retained to ensure that the output only contains the corrected plain text and does not introduce any additional information.

[0136] For example, the main purpose of the knowledge extraction module 502 based on the large model is to extract the preprocessed multi-turn speech-to-text dialogue data. Before this, it is necessary to encapsulate the entity and relationship rules (such as setting which business entity types are involved in this knowledge graph extraction and which entity types have relationships) through professional business knowledge, using prompt word engineering, and then use the large model capability to extract the original entity-relationship. This module can be replaced with technology and modified with processing logic according to the actual needs of the business scenario. In this technology, the LightRAG framework and DeepSeek V3 are used as examples. LightRAG comes with a large model capability interface, and the function of this module can be reproduced by configuring it according to the interface specification.

[0137] For example, the entity-relation extraction illusion governance module 503 is a core part of the knowledge graph construction system 500. Its purpose is to introduce a referee model to automatically verify the entities and triples extracted by the aforementioned techniques, wherein:

[0138] Batch verification construction: The system adopts a structured batch verification construction method to convert the entity or relation triple information to be verified into a standardized text description format. During the entity verification phase, the system iterates through all entities, generating a detailed description for each entity containing name, type, description, and source ID, organized sequentially into the format "Entity 1: - Entity Name: [Name]\n- Entity Type: [Type]\n- Entity Description: [Description]\n- Source ID: [ID]". During the relation verification phase, the system not only collects relation descriptions but also generates a complete context containing the source entity name, type, and description, and the target entity name, type, and description, by obtaining detailed information about the source and target entities. This forms a structured description like "Relationship Triple 1: - Source Entity ID: [ID]\n- Source Entity Name: [Name]\n- Source Entity Type: [Type]\n- Source Entity Description: [Description]\n- Target Entity ID: [ID]\n- Target Entity Name: [Name]\n- Target Entity Type: [Type]\n- Target Entity Description: [Description]\n- Relationship Description: [Description]\n- Keyword: [Keyword]\n- Source ID: [ID]". This structured information is integrated with the original document content into the prompt words, ensuring that the model can make accurate judgments based on the document content and avoiding verification deviations caused by inconsistent formats. At the same time, by constructing verification data in batches, frequent requests to the large model API interface are avoided, which can also speed up the construction process to some extent.

[0139] Furthermore, the knowledge graph construction system 500 can ensure the accuracy and repeatability of verification results through rigorous contextual consistency verification technology. It calls the Qwen3-8B model for batch verification, sets temperature=0.0 to ensure the determinism of the model output, and explicitly requires the model to return only "yes" or "no" results. The criteria for entity existence judgment are as follows:

[0140] ① The entity name must exactly match or match a synonym of a word in the document.

[0141] ② The entity type must be consistent with the contextual meaning of the term in the document.

[0142] ③ The entity description must be able to find a corresponding description or inference basis in the document.

[0143] ④ If all three criteria above are met, it is judged as "Yes"; otherwise, it is judged as "No".

[0144] The criteria for determining entity-relationship are:

[0145] ① Do the head and tail entities in the relation exist in the entity list in the extraction block?

[0146] ② Does the relation type conform to the predefined rules for relation types between entities?

[0147] ③ For the original document, does this relationship exist and remain consistent with the descriptions of the head and tail entities?

[0148] ④ If the above criteria are met, it is "Yes"; otherwise, it is "No".

[0149] For example, context-consistent batch validation is a method for batch validating entities and relation triples, integrating multiple items to be validated into a single prompt word while maintaining the contextual integrity of each item. The prompt word structure includes: professional role definition, validation rule description, original document content, list of items to be validated, and output format requirements. Different structured data presentation methods are designed for entity validation and relation triple validation, especially for relation validation which includes complete contextual information for both the source and target entities.

[0150] In addition, the large model is required to not add any extra content during the judgment process. The system parses the text response returned by the model, converts each line of result into a Boolean value, and ensures through rigorous validation that the number of returned results is completely consistent with the number of input entities or relations. If the number of response results is insufficient, it automatically supplements with False as the default value, ensuring the robustness of the validation process. This design makes the validation process rely entirely on the document content itself, avoiding the introduction of external information or subjective judgment, while achieving the accuracy and reliability of contextual consistency validation through standardized prompts and response handling mechanisms.

[0151] In addition, the Knowledge Graph Construction System 500 can also achieve knowledge fusion and storage, mainly by fusing processed entities and relationships through knowledge disambiguation to form a complete knowledge graph and persistently store it. The knowledge graph storage adopts a dual-database storage architecture of "graph database + vector database," wherein:

[0152] The graph database uses Neo4j, which is responsible for storing the topological structure between graph nodes and relations, and also has built-in support for efficient graph retrieval and common graph algorithms.

[0153] The vector database uses faiss to store the embedding vectors of entities and relationships, enabling efficient similarity retrieval calculations and other operations.

[0154] At the system level, interfaces are encapsulated through RESTful APIs to provide unified knowledge services, supporting business scenarios such as precision marketing, customer retention, and intelligent recommendations.

[0155] For example, the technical effectiveness of the knowledge graph construction method provided in this embodiment can be verified using 1000 open-source voice-to-text call records. The verification process can be as follows: Figure 6 As shown:

[0156] The verification phase utilizes a dual-model cross-validation architecture to verify the technical effectiveness of the knowledge graph construction method provided in this implementation. This dual-model cross-validation architecture is a knowledge graph triplet verification method based on two large models. The first large model extracts entity and relation triples from the text, while the second large model is specifically used to verify the existence of these extracted results in the original document. The second large model used for verification employs a different architecture or parameter configuration than the first large model used for extraction (e.g., using Qwen2.5-7B-Instruct to verify the results extracted by DeepSeek-V3). During verification, the second large model is required to make judgments solely based on the content of the original document and does not rely on its own knowledge.

[0157] In this implementation, DeepSeek V3 and Qwen2.5 72B, two large language models, were selected as the second major model in the dual-model cross-validation architecture. Each model needs to perform multiple rounds of validation on these triples and provide a judgment result and self-confidence score for each triple. The judgment result is divided into two categories: "correct" or "incorrect," and the self-confidence score reflects the model's confidence in its judgment (here, the score range is set to 1-10). During the multiple rounds of judgment, the self-confidence scores of each round are accumulated, and the judgment result with the highest accumulated score is selected as the final conclusion of the model.

[0158] The final verification experiment results are as follows:

[0159] processing method accuracy Baseline (extracted only) 86.03% Baseline + Data Preprocessing 89.77% Baseline + Data Preprocessing + Dual Model Extraction Validation 95.98%

[0160] The detailed invention and verification methods described above demonstrate that the knowledge graph construction method provided in this embodiment has a significant effect on the illusion resolution problem in the automated construction of knowledge graphs.

[0161] It should be noted that the above-described method embodiments, or the various possible implementations of the method embodiments, can be executed individually, or, provided there is no conflict, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.

[0162] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0163] This application embodiment can divide the knowledge graph construction device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0164] In some embodiments, this application also provides a knowledge graph construction apparatus. The knowledge graph construction apparatus may include one or more functional modules for implementing the knowledge graph construction method of the above method embodiments.

[0165] For example, Figure 7 This is a schematic diagram of a knowledge graph construction device provided in an embodiment of this application. Figure 7 As shown, the knowledge graph construction device 700 includes: an acquisition module 701, an extraction module 702, a construction module 703, and a verification module 704.

[0166] The aforementioned acquisition module 701 is used to acquire raw text related to the target business.

[0167] The extraction module 702 is used to input the original text into the first model for information extraction, and to extract at least one entity relation triplet from the original text. Each entity relation triplet includes entity description information of the source entity, entity description information of the target entity, and relation description information between the source entity and the target entity.

[0168] The aforementioned construction module 703 is used to construct a triplet verification prompt based on at least one entity relation triplet and the original document;

[0169] The aforementioned verification module 704 is used to input the aforementioned triplet verification prompts into the second model for verification, and obtain the verification result of each entity relation triplet; the verification result of the aforementioned entity relation triplet includes the entity existence verification result and the entity relation verification result;

[0170] The aforementioned construction module 703 is also used to construct a knowledge graph based on the verification result of each entity relation triple and at least one entity relation triple.

[0171] The original document mentioned above is a document constructed based on the original text mentioned above.

[0172] The knowledge graph construction apparatus provided in this application acquires original text related to the target business; inputs the original text into a first model for information extraction, extracting at least one entity relation triplet from the original text; constructs triplet verification prompts based on at least one entity relation triplet and the original document; inputs the triplet verification prompts into a second model for verification, obtaining the verification result of each entity relation triplet; the verification result of the entity relation triplet includes entity existence verification result and entity relation verification result; and constructs a knowledge graph based on the verification result of each entity relation triplet and at least one entity relation triplet; wherein, the original document is a document constructed based on the original text. In this way, by using a dual-model approach, the information extraction and verification processes are separated into two different models. The information in each model is independent and does not interfere with the other, so that the verification model does not introduce additional illusions. Furthermore, by integrating multiple entity relation triples to be verified and the original text into the prompt words, the prompt words explicitly contain the instruction language of "please judge according to the given document content," which enables the verification model to perform information verification more accurately, ensuring the accuracy of the verification results. As a result, the knowledge graph constructed based on the verification results obtained from the verification model is more accurate.

[0173] In some embodiments, the verification module 704 is specifically used for:

[0174] Input the above triplet verification prompts into the second model, and verify the above at least one entity relation triplet based on at least one first decision criterion and at least one second decision criterion contained in the second model, and output the verification result of each entity relation triplet;

[0175] Wherein, at least one first criterion is used to determine the existence of entities in the entity relationship triplet; at least one second criterion is used to determine the entity relationship of the entity relationship triplet.

[0176] In other embodiments, the verification module 704 described above is specifically used for:

[0177] If the first entity relation triple satisfies at least one of the above first determination criteria, the entity existence verification result of the first entity relation triple is determined to be correct; or, if the first entity relation triple does not satisfy any of the first determination criteria, the entity relation verification result of the first entity relation triple is determined to be incorrect.

[0178] If the aforementioned first entity relation triplet satisfies at least one of the aforementioned second determination criteria, the entity relation verification result of the aforementioned first entity relation triplet is determined to be correct; or, if the aforementioned first entity relation triplet does not satisfy any of the second determination criteria, the entity existence verification result of the aforementioned first entity relation triplet is determined to be incorrect.

[0179] Wherein, the first entity relation triplet is any one of the at least one entity relation triplets.

[0180] In some other embodiments, the above-mentioned at least one first determination criterion includes:

[0181] The entity names in the above entity relation triples match the words in the above original document;

[0182] The entity types in the above entity relation triples are consistent with the contextual semantics in the original document.

[0183] The entity description information in the above entity relationship triples exists in the original document.

[0184] In some other embodiments, the above-mentioned at least one second criterion includes:

[0185] The source entity and the target entity in the entity relation of the above entity relation triple exist in the entity list of the extraction block;

[0186] The relationship types of the entity relationships in the above entity relationship triples conform to the predefined rules for entity relationship types;

[0187] The original document contains entity relations in entity relation triples, and the entity relations in the entity relation triples are consistent with the relevant descriptions of the source entity and the target entity.

[0188] It should be noted that the knowledge graph construction device can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.

[0189] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 8As shown, the electronic device 80 includes: a processor 82, a communication interface 83, and a bus 84. Optionally, the electronic device 80 may also include a memory 81.

[0190] Processor 82 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 82 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 82 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0191] Communication interface 83 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.

[0192] The memory 81 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0193] As one possible implementation, the memory 81 can exist independently of the processor 82. The memory 81 can be connected to the processor 82 via a bus 84 and is used to store instructions or program code. When the processor 82 calls and executes the instructions or program code stored in the memory 81, it can implement the knowledge graph construction method provided in the embodiments of this application.

[0194] In another possible implementation, memory 81 can also be integrated with processor 82.

[0195] Bus 84 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 84 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0196] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.

[0197] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described knowledge graph construction method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0198] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0199] This application also provides a readable storage medium storing a program or instructions that, when executed by a computer, implement the knowledge graph construction method provided in the above embodiments. It is understood that all or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware; the readable storage medium can be any of the foregoing embodiments or memory; the readable storage medium can also be an external storage device of the service invocation device, such as a pluggable hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, flash card, etc., equipped on the service invocation device. Further, the readable storage medium can include both internal storage units of the service invocation device and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the service invocation device. The readable storage medium can also be used to temporarily store data that has been output or will be output.

[0200] This application also provides a computer program product, which is stored in a storage medium and implements the knowledge graph construction method provided in the above embodiments when the computer program product is executed by a computer.

[0201] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0202] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0203] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for constructing a knowledge graph, characterized in that, include: Obtain the raw text related to the target business; The original text is input into the first model for information extraction, and at least one entity relation triplet is extracted from the original text. Each entity relation triplet includes the entity description information of the source entity, the entity description information of the target entity, and the relationship description information between the source entity and the target entity. Construct a triplet verification prompt based on the at least one entity relation triplet and the original document; The triplet verification prompt is input into the second model for verification, and the verification result of each entity relation triplet is obtained. The verification results of the entity relationship triple include the entity existence verification results and the entity relationship verification results; A knowledge graph is constructed based on the verification result of each entity relation triplet and the at least one entity relation triplet. The original document is a document constructed based on the original text.

2. The method according to claim 1, characterized in that, The step of inputting the triplet verification prompts into the second model for verification, and obtaining the verification result for each entity relation triplet, includes: Input the triplet verification prompt into the second model, verify the at least one entity relation triplet based on at least one first judgment criterion and at least one second judgment criterion contained in the second model, and output the verification result of each entity relation triplet; Wherein, the at least one first criterion is used to determine the existence of entities in the entity relation triplet; the at least one second criterion is used to determine the entity relation of the entity relation triplet.

3. The method according to claim 2, characterized in that, The at least one entity relation triplet is validated based on at least one first decision criterion and at least one second decision criterion included in the second model, and the validation result of each entity relation triplet is output, including: If the first entity relation triplet satisfies at least one of the first determination criteria, the entity existence verification result of the first entity relation triplet is determined to be correct; or, if the first entity relation triplet does not satisfy any of the first determination criteria, the entity relation verification result of the first entity relation triplet is determined to be incorrect. If the first entity relation triplet satisfies at least one of the second determination criteria, the entity relation verification result of the first entity relation triplet is determined to be correct; or, if the first entity relation triplet does not satisfy any of the second determination criteria, the entity existence verification result of the first entity relation triplet is determined to be incorrect. Wherein, the first entity relation triplet is any one of the at least one entity relation triplets.

4. The method according to claim 2 or 3, characterized in that, The at least one first determination criterion includes: The entity names in the entity relation triples match the words in the original document; The entity types in the entity relation triples are consistent with the contextual semantics in the original document; The entity description information in the entity relation triple exists in the original document.

5. The method according to claim 2 or 3, characterized in that, The at least one second determination criterion includes: The source entity and the target entity in the entity relation of the entity relation triple exist in the entity list in the extraction block; The relationship type of the entity relationship triple conforms to the predefined rules for the relationship type between entities; The original document contains entity relations in entity relation triples, and the entity relations in the entity relation triples are consistent with the relevant descriptions of the source entity and the target entity.

6. A knowledge graph construction device, characterized in that, include: The acquisition module is used to acquire raw text related to the target business. The extraction module is used to input the original text into the first model for information extraction, and to extract at least one entity relation triplet from the original text. Each entity relation triplet includes entity description information of the source entity, entity description information of the target entity, and relation description information between the source entity and the target entity. The construction module is used to construct triplet verification prompts based on the at least one entity relation triplet and the original document; The verification module is used to input the verification prompts of the triples into the second model for verification, and obtain the verification result of each entity relation triple; the verification result of the entity relation triple includes the entity existence verification result and the entity relation verification result; The construction module is also used to construct a knowledge graph based on the verification result of each entity relation triple and the at least one entity relation triple; The original document is a document constructed based on the original text.

7. The apparatus according to claim 6, characterized in that, The verification module is specifically used for: Input the triplet verification prompt into the second model, verify the at least one entity relation triplet based on at least one first judgment criterion and at least one second judgment criterion contained in the second model, and output the verification result of each entity relation triplet; Wherein, the at least one first criterion is used to determine the existence of entities in the entity relation triplet; the at least one second criterion is used to determine the entity relation of the entity relation triplet.

8. The apparatus according to claim 7, characterized in that, The verification module is specifically used for: If the first entity relation triplet satisfies at least one of the first determination criteria, the entity existence verification result of the first entity relation triplet is determined to be correct; or, if the first entity relation triplet does not satisfy any of the first determination criteria, the entity relation verification result of the first entity relation triplet is determined to be incorrect. If the first entity relation triplet satisfies at least one of the second determination criteria, the entity relation verification result of the first entity relation triplet is determined to be correct. Alternatively, if the first entity relation triplet does not meet any of the second determination criteria, the entity existence verification result of the first entity relation triplet is determined to be incorrect; Wherein, the first entity relation triplet is any one of the at least one entity relation triplets.

9. The apparatus according to claim 7 or 8, characterized in that, The at least one first determination criterion includes: The entity names in the entity relation triples match the words in the original document; The entity types in the entity relation triples are consistent with the contextual semantics in the original document; The entity description information in the entity relation triple exists in the original document.

10. The apparatus according to claim 7 or 8, characterized in that, The at least one second determination criterion includes: The source entity and the target entity in the entity relation of the entity relation triple exist in the entity list in the extraction block; The relationship type of the entity relationship triple conforms to the predefined rules for the relationship type between entities; The original document contains entity relations in entity relation triples, and the entity relations in the entity relation triples are consistent with the relevant descriptions of the source entity and the target entity.

11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the knowledge graph construction method as described in any one of claims 1-5.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a computer, implement the knowledge graph construction method as described in any one of claims 1-5.

13. A computer program product, characterized in that, The computer program product is stored in a storage medium, and when the computer program product is executed by a computer, it implements the knowledge graph construction method as described in any one of claims 1-5.