Material data cleaning method and system fusing large language model and knowledge graph
By integrating large language models and knowledge graphs into a material data cleaning method, the problems of semantic ambiguity and difficulty in resolving ambiguities in material master data cleaning are solved. This method achieves high-precision and interpretable material data cleaning, adapts to changes in enterprise business, and improves the credibility of cleaning results and enterprise operational efficiency.
Patent Information
- Application Number
- CN202511254237.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing technologies for cleaning material master data suffer from problems such as semantic ambiguity and difficulty in resolving ambiguities, difficulty in capturing implicit associations, and lack of interpretability of the cleaning process, leading to cleaning errors and loss of data correlation, which affects the efficiency of enterprise operations.
By integrating large language models and knowledge graphs, candidate entities are extracted through large language models and retrieved and verified using knowledge graphs. Knowledge graphs provide structured knowledge anchors and standardized constraints, and attributes are completed in conjunction with context and standardized verification is performed to ensure that the cleaning results comply with industry standards.
It improves the accuracy and reliability of material data cleaning, realizes highly reliable and traceable intelligent cleaning, can adapt to changes in enterprise business, and reduces the maintenance costs of traditional methods.
Smart Images

Figure CN120744327B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data governance technology, specifically to a method and system for cleaning material data that integrates large language models and knowledge graphs. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] In the digital transformation of the manufacturing industry, material master data serves as the core foundation for production, procurement, and inventory management, and its quality directly impacts enterprise operational efficiency. Currently, master data cleaning in the industry mainly relies on three types of solutions: first, manual verification, where professionals check feature items and feature values, which is inefficient and easily affected by subjective factors; second, rule engines, which identify errors based on preset rules (such as regular expressions), but struggle to cover diverse non-standard descriptions; and third, the application of single AI technologies, such as using only large models to process text (which easily produces outputs that do not conform to industry standards) or using only knowledge graphs (which struggle to handle fuzzy semantics).
[0004] The above master data cleaning methods also have the following problems: (1) Semantic ambiguity and difficulty in resolving ambiguity. Traditional rule engines cannot effectively resolve term conflicts (such as "cold-rolled plate" and "cold-hard plate"), ambiguous expressions (such as "approximately 5cm steel pipe") and context-dependent semantics in material descriptions, resulting in cleaning errors or omissions; (2) Implicit association knowledge is difficult to capture and apply. Complex matching, substitution, and component relationships between materials (such as the matching of sealing rings and bearings) are difficult to be transformed into explicit cleaning rules, resulting in the loss of data association and affecting the integrity of master data; (3) Poor interpretability of cleaning process and results. The cleaning decision process of a single AI model (such as a pure large language model) is not transparent and lacks traceability based on industry standards or enterprise specifications, affecting trust and the efficiency of manual review. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a material data cleaning method and system that integrates a large language model and a knowledge graph. The knowledge graph provides the large language model with precise structured knowledge anchors and standardized constraints, effectively suppressing the "illusion" of the large language model and ensuring that the output content conforms to industry standards. The large language model injects powerful natural language understanding, fuzzy semantic parsing, and unstructured information extraction capabilities into the knowledge graph, making up for the lack of flexibility in the knowledge graph. The deep integration of the two jointly solves the key problems of "understanding what the semantics of the text is" and "judging whether the semantics conform to the standards," thereby improving the accuracy of material data cleaning.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a material data cleaning method that integrates large language models and knowledge graphs.
[0008] A material data cleaning method integrating large language models and knowledge graphs includes the following processes:
[0009] Extract candidate entities from the user-input language description based on the large language model;
[0010] Candidate entities are vectorized, and multiple similar nodes are retrieved in a pre-defined knowledge graph based on the vectorized candidate entities;
[0011] Based on the node information of each similar node, knowledge-enhanced prompt words are constructed to enable the large language model to generate language description recognition results, which include material entity link relationships.
[0012] A second verification is performed using a knowledge graph based on the material entity linking relationships. Once the second verification is passed, a large language model is used to generate material classification prediction results based on the material entity linking relationships. Based on the material classification prediction results, attribute verification is performed in conjunction with the knowledge graph.
[0013] The large language model completes the missing attributes based on the verification results and context, and performs standardized verification on the knowledge graph based on the completed attribute values. After the standardized verification is passed, the standardized description is obtained based on the classification prediction results after completing the missing attributes and the preset knowledge graph template.
[0014] Calculate the overall similarity score between the standardized description and the verified standardized entity description. If the overall score is greater than a set threshold, the entity is identified as a duplicate; otherwise, the standardized description is stored as new standardized entity data.
[0015] In one implementation of the first aspect of the present invention, the comprehensive similarity score is a weighted sum of the similarity of the large language model and the similarity of the knowledge graph relationship.
[0016] In one implementation of the first aspect of the present invention, when the output confidence of the large language model is less than a set threshold, or the link relationship violates the preset constraints in the knowledge graph and the secondary verification fails, the secondary verification result is sent to the client for manual review.
[0017] If the standardization validation fails, the completed attribute value will be sent to the client for manual review.
[0018] In one implementation of the first aspect of the present invention, the knowledge graph includes: a standard layer, an external data source layer, and an instance layer;
[0019] The standard layer is used to store standard text that has been converted into structured rules;
[0020] The external data source layer is used to interface with external dynamic data sources to dynamically update industry terminology, new materials, and new specifications;
[0021] The instance layer is used to store standardized descriptions of entities that have been verified in the enterprise's history.
[0022] In one implementation of the first aspect of the present invention, the knowledge-enhanced prompt includes: a prompt instruction input by the user, a knowledge base generated based on node information of similar nodes, and a task output format.
[0023] In one implementation of the first aspect of the present invention, a material classification prediction result is generated using a large language model based on the material entity linking relationship, including:
[0024] Based on the linking relationships between material entities, predictive enhancement prompts are generated. The large language model then selects the main category from the knowledge graph as the material classification prediction result based on these predictive enhancement prompts.
[0025] In one implementation of the first aspect of the present invention, attribute verification is performed in conjunction with a knowledge graph, including: verification of required attributes, verification of hierarchical rationality, and verification of attribute conflicts.
[0026] The completed attribute values are standardized and validated based on the knowledge graph, including: value range validation, unit conversion, and attribute consistency validation.
[0027] In one implementation of the first aspect of the present invention, the large language model is fine-tuned based on the results of manual review;
[0028] When the frequency of a new term exceeds a first set threshold, or the rate of manual confirmation exceeds a second set threshold, the new term is added to the knowledge graph.
[0029] When the number of conflicts for the same attribute exceeds the third set threshold, the conflict pattern is extracted, and candidate constraint rules are generated for manual confirmation. After manual confirmation, the candidate constraint rules are added to the knowledge graph.
[0030] We use a finely tuned large language model to parse human annotations, output triples, and then add the triples to the knowledge graph after confidence filtering.
[0031] Secondly, this invention provides a material data cleaning system that integrates large language models and knowledge graphs.
[0032] A material data cleaning system integrating large language models and knowledge graphs includes:
[0033] The entity extraction unit is configured to extract candidate entities from the user-input language description based on the large language model.
[0034] The node retrieval unit is configured to: vectorize candidate entities and retrieve multiple similar nodes in a preset knowledge graph based on the vectorized candidate entities;
[0035] The link relationship identification unit is configured to: construct knowledge-enhanced prompts based on the node information of each similar node so that the large language model can generate language description recognition results, which include material entity link relationships.
[0036] The verification unit is configured to: perform secondary verification based on the material entity link relationship using a knowledge graph; after the secondary verification is passed, generate material classification prediction results using a large language model based on the material entity link relationship; and perform attribute verification based on the material classification prediction results and the knowledge graph.
[0037] The attribute completion unit is configured as follows: the large language model completes the missing attributes based on the verification results and context, and performs standardized verification on the completed attribute values based on the knowledge graph. After the standardized verification is passed, the standardized description is obtained based on the classification prediction results after completing the missing attributes and the preset knowledge graph template.
[0038] The data cleaning unit is configured to: calculate the comprehensive similarity score between the standardized description and the verified standardized entity description; if the comprehensive score is greater than a set threshold, it is determined to be a duplicate entity; otherwise, the standardized description is stored as new standardized entity data.
[0039] Thirdly, the present invention provides a computer device, comprising: a processor and a computer-readable storage medium;
[0040] A processor, adapted to execute computer programs;
[0041] A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the material data cleaning method integrating a large language model and a knowledge graph as described in the first aspect of the present invention.
[0042] Compared with the prior art, the beneficial effects of the present invention are:
[0043] This invention innovatively proposes a material data cleaning method that integrates a large language model and a knowledge graph. The knowledge graph provides the large language model with precise structured knowledge anchors and standardized constraints, effectively suppressing the "illusion" of the large language model and ensuring that the output content conforms to industry standards. The large language model injects powerful natural language understanding, fuzzy semantic parsing, and unstructured information extraction capabilities into the knowledge graph, making up for the lack of flexibility of the knowledge graph. The deep integration of the two jointly solves the key problems of "understanding what the semantics of the text is" and "judging whether the semantics conform to the standards," improving the accuracy of material data cleaning and providing a highly reliable and traceable intelligent solution for the governance of complex material data.
[0044] This invention innovatively proposes a material data cleaning method that integrates a large language model and a knowledge graph. A closed-loop mechanism synchronously feeds back the results of manual review to model fine-tuning and knowledge graph updates. Manually labeled data optimizes the parameters of the large language model, enhancing its adaptability to the enterprise context. Simultaneously, confirmed new terms and rules are injected into the knowledge graph in the form of triples, forming a dynamically expanding knowledge network. This enables the system to continuously learn and automatically adapt to business changes (such as adding new product lines or adjusting terminology), avoiding frequent reconstruction of traditional rule bases. It offers significant advantages in cleaning accuracy, cross-domain adaptability, and long-term maintenance costs, providing an intelligent solution for the governance of complex material data in manufacturing and other industries.
[0045] This invention innovatively proposes a material data cleaning method that integrates a large language model and a knowledge graph. The knowledge graph stores core knowledge such as the enterprise's material classification system, terminology definitions, and quality rules in the form of structured triples, providing clear standard basis for cleaning operations (such as material coding specifications, attribute value ranges, and association verification rules). This ensures that each cleaning decision can be traced back to specific knowledge nodes, fundamentally solving the problem of uninterpretable results caused by the "black box" cleaning in traditional methods. Simultaneously, the large language model, through natural language reasoning capabilities, transforms the rule constraints of the knowledge graph into highly readable text descriptions, making the entire cleaning process transparent from rule matching to result output. This not only significantly improves the credibility of the cleaning results but also, through the dynamic update mechanism of the knowledge graph, enables the system to continuously adapt to changes in the enterprise's terminology system and business rules.
[0046] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0047] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0048] Figure 1 A three-layer knowledge graph architecture diagram is provided as an exemplary embodiment of the present invention;
[0049] Figure 2 A flowchart illustrating a material data cleaning method that integrates a large language model and a knowledge graph, provided as an exemplary embodiment of the present invention;
[0050] Figure 3 A feedback learning closed-loop flowchart is provided as an exemplary embodiment of the present invention;
[0051] Figure 4 A schematic diagram of a material data cleaning system that integrates a large language model and a knowledge graph, provided as an exemplary embodiment of the present invention;
[0052] Figure 5 A schematic diagram of a computer device provided for an exemplary embodiment of the present invention. Detailed Implementation
[0053] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0054] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0055] This implementation proposes a material data cleaning method that integrates large language models and knowledge graphs, and constructs a cleaning framework driven by dual engines and possessing dynamic autonomous evolution capabilities.
[0056] In this implementation, a domain knowledge graph (KG) for material master data governance is constructed as a structured knowledge base and standardized constraint source for the cleaning process. The LLM (Large Language Model) and KG collaborative cleaning module receives the original material description text and completes intelligent parsing, linking, verification, standardization and matching through deep interaction between LLM and KG, outputting high-quality and standardized master data records.
[0057] In this implementation, a domain knowledge graph for material master data governance is constructed, such as... Figure 1 As shown, Figure 1 The "system" in this context refers to the client-side system that supports user operations. Its core objective is to build a domain knowledge generator (KG) with dynamic mapping capabilities, providing structured knowledge anchors and real-time constraints for knowledge cleansing. Specifically, this includes:
[0058] Step 1.1: Material body definition.
[0059] (1) Cleaning-oriented ontological attribute design, specifically including:
[0060] class MaterialOntology:
[0061] mandatory_attrs=[Category, Material] Required attribute (supports the validation in step 2).
[0062] constraint_rules={
[0063] Cold-rolled steel sheet: {
[0064] Thickness: {unit: mm; min: 0.3; max: 3.0};
[0065] Value range constraint (used for standardization in subsequent step 3);
[0066] Related standard: GB / T 708 standard reference (used for the description generation in subsequent step 4);
[0067] }
[0068] }
[0069] (2) Relationship system design, as shown in Table 1.
[0070] Table 1: Relationship System
[0071]
[0072] Step 1.2: Initialize the three-layer knowledge architecture.
[0073] The standards layer integrates authoritative specifications such as national standards (GB / T) and international standards (ISO, IEC), providing the most fundamental standard basis.
[0074] The natural language standard is converted into structured rules (to support the strong validation in step 3), specifically including:
[0075] def convert_standard(text):
[0076] Example: Analysis of GB / T 20878 - Stainless Steel Grade 06Cr19Ni10 corresponding to 304
[0077] return {
[0078] Source: GB / T 20878;
[0079] Rule: IF Material = 304 Stainless Steel THEN Standardized as = 06Cr19Ni10Drools Executable Rule
[0080] }
[0081] The external data source layer connects to external dynamic data sources such as product databases and industry standard libraries, and continuously updates industry terminology, new materials, and new specifications.
[0082] The instance layer stores high-quality, historically validated master data for supplementing rules and providing statistical information. Specifically, it includes:
[0083] {
[0084] Entity: 6205-2RS bearing;
[0085] Attributes: {Inner diameter: 25mm; Outer diameter: 52mm};
[0086] Statistical information: {
[0087] Width frequency: {120mm: 82%; 125mm: 18%} / / Supports LLM attribute completion in step 3
[0088] }
[0089] }
[0090] The following uses automotive bearings (KG) as an example for explanation:
[0091] Ontology definition, specifically, includes:
[0092] Core Concepts
[0093] concepts = [deep groove ball bearing; seal ring; roller]
[0094] Attribute constraints (supporting cleaning and validation)
[0095] attrs={
[0096] Inner diameter: {unit: mm; precision: 0.01};
[0097] Accuracy class: {enum: [P0; P6; P5]} conforms to GB / T 307.1
[0098] }
[0099] Key Relationship
[0100] relations=[(deep groove ball bearing; hasPart; seal ring)] is used for implicit knowledge completion.
[0101] The three-level initialization is detailed in Table 2.
[0102] Table 2: Three-layer initialization results
[0103]
[0104] Dynamic mapping converts external terms into standard layer mappings, specifically including:
[0105] Automatically parse the correspondence between SKF data fields and GB standards
[0106] map_skf_to_gb(skf_data):
[0107] if skf_data[type] == contact seal:
[0108] return {Standard seal type: RS; Based on: GB / T 276, Clause 4.2} Output the standard code available for cleaning.
[0109] Example execution, specifically, includes:
[0110] Enter SKF data: {Model: 6205-2RS; Seal description: Double-sided rubber contact seal};
[0111] Output mapping: {Seal type: RS; Standard source: GB / T 276}.
[0112] like Figure 2 As shown, this implementation provides a collaborative cleaning method between LLM and KG. Through deep bidirectional interaction between LLM and KG, it achieves accurate semantic parsing, dynamic verification, and standardization. The LLM engine performs natural language understanding and reasoning, which is constrained by KG in real time; the KG engine provides structured knowledge (standard nodes, attribute constraints, classification trees), and its core collaborative steps include entity recognition and linking, material classification prediction and verification, attribute value standardization and completion, description standardization generation, and duplicate detection.
[0113] Example: The user inputs 304 stainless steel cold-rolled sheet, thickness 0.5±0.05mm.
[0114] Step 1: Entity recognition and linking.
[0115] (1) LLM initially extracts candidate entities from the description (e.g., material = 304 stainless steel; category = cold rolled sheet; thickness = 0.5 ± 0.05 mm).
[0116] (2) Vectorize the candidate entities and retrieve the top-3 similar nodes in the KG (based on Embedding cosine similarity).
[0117] (3) Return node information: {ID: KG_MAT_304; Standard name: ASTM_A276-304, Synonym: [304 stainless steel], Constraint: Thickness unit = mm, Value range [0.3, 3.0]};
[0118] (4) Construct knowledge-enhancing prompts, integrate KG search results and constraints, and guide LLM decision-making.
[0119] Specifically, examples are as follows:
[0120] [System Command] You are a material data cleaning expert. Please parse the text strictly according to the knowledge base constraints:
[0121] [Input text] 304 stainless steel cold-rolled sheet, approximately 0.5cm thick
[0122] [Knowledge Base] 1. KG_MAT_304: {Standard Name: ASTM_A276-304; Synonym: [304 Stainless Steel]; Unit Constraint: Thickness unit = mm}; 2. KG_PLATE: {Category: Cold Rolled Steel Sheet; Required Attributes: [Material, Thickness, Width]}
[0123] [Task] Output JSON: {Material: ASTM_A276-304; Thickness: {Value: 5.0; Unit: mm}; Missing attribute: [Width]}.
[0124] (5) KG secondary verification: if the LLM output confidence level is <0.7, or the link result violates the KG constraint (e.g., thickness = 0.5mm but the cold-rolled plate node requires the thickness unit to be cm), it is marked as a low confidence entity and transferred to the manual review queue.
[0125] Step 2: Material classification prediction and verification.
[0126] (1) LLM preliminary prediction, input enhanced prompt words (including linked entities).
[0127] Specifically, examples are as follows:
[0128] Given entity: {Material = ASTM A276-304, Category = GB / T 708-Cold Rolled Sheet};
[0129] Select the main category from the KG classification tree: [Steel / Hot-rolled sheet, Steel / Cold-rolled sheet...];
[0130] Output: {primary_class: steel / cold-rolled sheet, confidence: 0.95}.
[0131] (2) KG checks required attributes, level rationality, and attribute conflict detection. For example, the required attribute check: under the cold-rolled steel plate category, material, thickness, and width are required, triggering width attribute completion, as shown in Table 3.
[0132] Table 3: KG Verification Types
[0133]
[0134] Step 3: Attribute Completion and Standardization. This step achieves precise standardization of attribute values through LLM semantic parsing and the KG rule engine. LLM attribute value extraction and completion: for missing attributes, LLM dynamically completes them based on context.
[0135] Specifically, examples are as follows:
[0136] Given: Classification = Steel / Cold-rolled sheet, Thickness = 0.5 ± 0.05 mm; Material = 304 stainless steel;
[0137] Generate the width value based on the KG constraint: {Cold-rolled sheet width range [1000, 1500 mm]};
[0138] Output: {Attribute name: width; value: 1200mm; basis: default width of similar materials in KG}.
[0139] The KG strong constraint validation engine executes the check logic based on the Drools rule engine, specifically including:
[0140] Value range verification: If the width is 2000mm (exceeding the KG range), the application will be rejected immediately;
[0141] Intelligent unit conversion: Automatically converts 5cm to 50mm (by KG conversion factor);
[0142] Attribute consistency check: For example, surface treatment = galvanized and material = stainless steel → conflict (according to GB / T 13911).
[0143] Step 4: Standardized description generation and duplicate detection.
[0144] LLM-filled KG template, specifically including:
[0145] Template: {Category} | Standard: {Standard Number} | Material: {Material} | Thickness: {Thickness};
[0146] Output: Cold-rolled steel sheet | Standard: GB / T 708 | Material: 06Cr19Ni10 | Thickness: 0.50±0.05mm.
[0147] Duplicate detection, specifically, includes:
[0148] Integrate LLM semantic similarity with KG graph relationship similarity (such as supplier and BOM associations).
[0149] If the weighted score is greater than the set threshold, it is determined to be a duplicate material; otherwise, it is unique standardized data (i.e., a new material).
[0150] This implementation also provides a feedback learning and knowledge evolution scheme, which transforms the uncertain results and manual review feedback in the cleaning process into system knowledge, driving the continuous optimization of LLM and KG, and achieving dynamic self-evolution.
[0151] Example: Manual review revealed that "nylon gasket" was mistakenly cleaned as "rubber gasket";
[0152] Step (1): Manual intervention to mark the correct result: Material = Nylon 66 (PA66), Temperature range: -40℃~120℃;
[0153] Step (2): LLM fine-tuning, adding training data: the correct label for the original description "white high temperature resistant gasket" is PA66, strengthening the association between "color + temperature resistance" and material;
[0154] Step (3): KG dynamic update, specifically including:
[0155] Rule 1: Terminology addition (automated).
[0156] If the frequency of a new term exceeds the set threshold and the manual confirmation rate exceeds 95%, then the following terms will be added:
[0157] KG.add_node(name=PA66; type=material; props={melting point: 265℃});
[0158] Rule 2: Constraint generation (semi-automatic).
[0159] If the number of conflicts for the same attribute is greater than 5, the conflict pattern will be automatically extracted and candidate rules will be generated. After manual confirmation, the generated rule will be: Material = PA66 AND Working temperature > 120℃. If this rule is not correct, an error will be output.
[0160] Rule 3: Relationship Completion (LLM Assistance).
[0161] Using fine-tuned LLM parsing of manual notes (e.g., the gasket is used for bearing sealing): output ternary [gasket; used for; bearing sealing], which is then filtered by confidence and added to KG.
[0162] More specifically, such as Figure 3As shown, starting with manual review, the review data is transformed into structured knowledge graph triples. The update type is determined by intelligent routing: terms / attributes are directly injected into the knowledge graph for real-time expansion, while rules / constraints are used for constraint-aware training of the large language model. After the dual engines work together to complete the cleaning, the system automatically identifies low-confidence results and provides feedback for manual review, forming a closed-loop optimization mechanism of "review-routing-update-cleaning-feedback". This mechanism not only ensures rule compliance through the knowledge graph but also enhances semantic understanding capabilities with the help of the large language model, ultimately achieving continuous iterative improvement in cleaning accuracy and standardization adaptability.
[0163] Figure 4 This paper presents a material data cleaning system that integrates large language models and knowledge graphs, including:
[0164] The entity extraction unit 401 is configured to extract candidate entities from the user-input language description based on the large language model.
[0165] The node retrieval unit 402 is configured to: vectorize the candidate entity and retrieve multiple similar nodes in a preset knowledge graph based on the vectorized candidate entity;
[0166] The link relationship identification unit 403 is configured to: construct knowledge-enhanced prompt words based on the node information of each similar node so that the large language model generates language description recognition results, which include material entity link relationships.
[0167] Verification unit 404 is configured to: perform secondary verification based on the material entity link relationship using a knowledge graph; after the secondary verification is passed, generate material classification prediction results using a large language model based on the material entity link relationship; and perform attribute verification based on the material classification prediction results in conjunction with the knowledge graph.
[0168] The attribute completion unit 405 is configured as follows: the large language model completes the missing attributes based on the verification results and context, and performs standardized verification on the completed attribute values based on the knowledge graph. After the standardized verification is passed, the standardized description is obtained based on the classification prediction results after completing the missing attributes and the preset knowledge graph template.
[0169] The data cleaning unit 406 is configured to: calculate the comprehensive similarity score between the standardized description and the verified standardized entity description; if the comprehensive score is greater than a set threshold, it is determined to be a duplicate entity; otherwise, the standardized description is stored as new standardized entity data.
[0170] It is understood that the aforementioned units can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The aforementioned units are based on logical functional division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the system may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.
[0171] According to another embodiment of this application, the system described in this embodiment can be constructed by running a computer program (including program code) capable of performing the steps involved in the corresponding method of the present invention on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, loaded into the aforementioned computing device through the computer-readable recording medium, and run therein.
[0172] Figure 5 A computer device is shown, which includes a processor 501, a communication interface 502, and a computer-readable storage medium 503. The processor 501, communication interface 502, and computer-readable storage medium 503 can be connected via a bus or other means.
[0173] The communication interface 502 is used to receive and send data. The computer-readable storage medium 503 can be stored in the memory of the electronic device. The computer-readable storage medium 503 is used to store computer programs, which include program instructions. The processor 501 is used to execute the program instructions stored in the computer-readable storage medium 503.
[0174] The processor 501 is the computing and control core of the electronic device. It is suitable for implementing one or more instructions, specifically for loading and executing one or more instructions to achieve the corresponding method flow or corresponding function.
[0175] The processor 501 is configured to perform the following process:
[0176] Extract candidate entities from the user-input language description based on the large language model;
[0177] Candidate entities are vectorized, and multiple similar nodes are retrieved in a pre-defined knowledge graph based on the vectorized candidate entities;
[0178] Based on the node information of each similar node, knowledge-enhanced prompt words are constructed to enable the large language model to generate language description recognition results, which include material entity link relationships.
[0179] A second verification is performed using a knowledge graph based on the material entity linking relationships. Once the second verification is passed, a large language model is used to generate material classification prediction results based on the material entity linking relationships. Based on the material classification prediction results, attribute verification is performed in conjunction with the knowledge graph.
[0180] The large language model completes the missing attributes based on the verification results and context, and performs standardized verification on the knowledge graph based on the completed attribute values. After the standardized verification is passed, the standardized description is obtained based on the classification prediction results after completing the missing attributes and the preset knowledge graph template.
[0181] Calculate the overall similarity score between the standardized description and the verified standardized entity description. If the overall score is greater than a set threshold, the entity is identified as a duplicate; otherwise, the standardized description is stored as new standardized entity data.
[0182] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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.
[0183] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic cable, digital cable) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0184] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A material data cleaning method fusing a large language model and a knowledge graph, characterized in that, The method comprises the following processes: extracting a candidate entity in a language description input by a user according to a large language model; vectorizing the candidate entity, and retrieving a plurality of similar nodes in a preset knowledge graph according to the vectorized candidate entity; constructing a knowledge-enhanced prompt word according to node information of each similar node to enable the large language model to generate a language description recognition result, the language description recognition result comprising a material entity link relationship; performing secondary verification through the knowledge graph according to the material entity link relationship, when the secondary verification passes, generating a material classification prediction result according to the material entity link relationship by using the large language model, and performing attribute verification in combination with the knowledge graph according to the material classification prediction result; completing a missing attribute according to a verification result in combination with a context by the large language model, and performing standardized verification on a completed attribute value based on the knowledge graph, when the standardized verification passes, obtaining a standardized description according to the classification prediction result after the missing attribute is completed in combination with a preset knowledge graph template; calculating a comprehensive similarity score of the standardized description and a verified entity standardized description, when the comprehensive similarity score is greater than a set threshold, determining that it is a repeated entity; otherwise, storing the standardized description as a new standardized entity data; fine-tuning the large language model based on a manual review result; when a new term appears at a frequency greater than a first set threshold, or a manual confirmation rate is greater than a second set threshold, adding the new term to the knowledge graph; when a conflict number of a same attribute is greater than a third set threshold, extracting a conflict mode, generating a candidate constraint rule for manual confirmation, and adding the candidate constraint rule to the knowledge graph after manual confirmation; using the fine-tuned large language model to analyze a manual note, outputting a triple, and adding the triple to the knowledge graph after confidence filtering.
2. The material data cleaning method fusing a large language model and a knowledge graph according to claim 1, wherein the comprehensive similarity score is a weighted sum of a large language model similarity and a knowledge graph relationship similarity.
3. The material data cleaning method fusing a large language model and a knowledge graph according to claim 1, wherein when an output confidence of the large language model is less than a set threshold, or a link relationship violates a preset constraint in the knowledge graph, the secondary verification fails, and the secondary verification result is sent to a client for manual review; when the standardized verification fails, the completed attribute value is sent to the client for manual review.
4. The material data cleaning method fusing a large language model and a knowledge graph according to claim 1, wherein the knowledge graph comprises a standard layer, an external data source layer, and an instance layer; the standard layer is used to store standard texts converted into structured rules; the external data source layer is used to interface with external dynamic data sources to dynamically update industry terms, new materials, and new specifications; the instance layer is used to store enterprise historical verified entity standardized descriptions.
5. The material data cleaning method fusing a large language model and a knowledge graph according to claim 1, wherein the knowledge-enhanced prompt word comprises a prompt word instruction input by a user, a knowledge base generated according to node information of similar nodes, and a task output format. 6. The material data cleaning method of fusing a large language model and a knowledge graph according to claim 1, wherein a large language model is used to generate a material classification prediction result according to a material entity link relationship, including: A prediction enhancement prompt word is generated according to a material entity link relationship, and the large language model selects a main classification as the material classification prediction result from the knowledge graph according to the prediction enhancement prompt word.
7. The material data cleaning method of fusing a large language model and a knowledge graph according to claim 1, wherein attribute verification is performed in combination with the knowledge graph, including: mandatory attribute verification, hierarchical rationality verification, and attribute conflict verification; Standardization verification is performed on the completed attribute value based on the knowledge graph, including: value range verification, unit conversion, and attribute consistency verification. Including: An entity extraction unit is configured to extract candidate entities in a language description input by a user according to a large language model; 8. A material data cleaning system fusing a large language model and a knowledge graph, characterized in that, A node retrieval unit is configured to vectorize the candidate entities and retrieve a plurality of similar nodes in a preset knowledge graph according to the vectorized candidate entities; A link relationship identification unit is configured to construct a knowledge enhancement prompt word according to node information of each similar node to enable a large language model to generate a language description recognition result, which includes a material entity link relationship; A verification unit is configured to perform secondary verification through a knowledge graph according to a material entity link relationship, and when the secondary verification is passed, a large language model is used to generate a material classification prediction result according to the material entity link relationship, and attribute verification is performed in combination with the knowledge graph according to the material classification prediction result; An attribute completion unit is configured to complete missing attributes according to a verification result in combination with a context by a large language model, and perform standardization verification on the completed attribute value based on a knowledge graph, and after the standardization verification is passed, a standardized description is obtained in combination with a preset knowledge graph template according to the classification prediction result after the missing attributes are completed; A data cleaning unit is configured to calculate a comprehensive similarity score of the standardized description and a verified entity standardized description, and when the comprehensive similarity score is greater than a set threshold, it is determined as a duplicate entity; otherwise, the standardized description is stored as a new standardized entity data; The large language model is fine-tuned based on the artificial review result; When the frequency of a new term is greater than a first set threshold or the artificial confirmation rate is greater than a second set threshold, the new term is added to the knowledge graph; When the conflict times of the same attribute are greater than a third set threshold, a conflict mode is extracted, a candidate constraint rule is generated for artificial confirmation, and after the artificial confirmation, the candidate constraint rule is added to the knowledge graph; The fine-tuned large language model is used to parse the artificial remarks, and a triple is output, which is added to the knowledge graph after confidence filtering. Including: A processor and a computer readable storage medium; 9. A computer device, comprising: A processor adapted to execute a computer program; A computer readable storage medium having a computer program stored therein, wherein the computer program is executed by the processor to implement the material data cleaning method of fusing a large language model and a knowledge graph according to any one of claims 1 to 7.
Citation Information
Patent Citations
Public policy case analysis knowledge graph fusion reasoning method and system
CN120562554A
Providing a semantic encoding and language neural network
US20240013003A1