A hierarchical knowledge base construction method and system for the field of battery design

CN122388070BActive Publication Date: 2026-10-09SUZHOU CHUHUI INTELLIGENT TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610875005.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-10-09
Estimated Expiration
2046-06-17

AI Technical Summary

Technical Problem

[0006]本发明提供了一种面向电池设计领域的层级化知识库构建方法及系统,其主要目的在于解决现有技术中文本数据无法溯源且存储数据信息缺失的问题

Benefits of technology

本发明提供一种面向电池设计领域的层级化知识库构建方法及系统,通过唯一联合主键和幂等性写入算法存储至元数据表,同时区分标准化存储字段与非结构化存储字段,实现了原始文本数据的有序分类存储,并通过唯一联合主键确保了数据唯一性;为各片段分配与唯一联合主键关联的片段标识符和角色标签,并对问题片段设置哨兵标识,实现了句子片段的精准拆分和分类管理,哨兵标识的设置使得上下文片段与问题片段能够采用统一处理逻辑,减少处理结构冗余并提高处理效率;对实体节点和数值节点进行差异化处理及去重后写入知识图谱节点表,有效剔除重复节点,避免节点数据冗余并提升节点数据的准确性;建立了节点与原始句子片段之间的显式关联,实现了节点的可追溯;本发明将非结构化的文本数据转化为结构化的知识图谱,实现知识图谱对原始文本数据的精确回溯,建立主辅证据分级体系克服了现有技术将所有上下文视为同等证据导致的噪声干扰问题,实现电池领域文献材料的精确锚定实验条件和结构化存储性能指标,并能够全链路溯源至原始文献段。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122388070B_ABST
    Figure CN122388070B_ABST
Patent Text Reader

Abstract

The application provides a hierarchical knowledge base construction method and system for the field of battery design, which comprises the following steps: obtaining original text data and constructing a unique joint primary key from data sources, data types and original identifiers, storing the original text data in a metadata table, and decomposing the original text data into multiple sentence segments, each sentence segment being configured with a segment identifier and a role label; performing differential processing on the nodes extracted from the sentence segments, writing the processed nodes into a knowledge graph node table after deduplication, and writing the position information of the nodes in the sentence segments, the segment identifiers, the original text data and the character offset into a knowledge graph mention table; constructing entity pairs from the nodes in the sentence segments, generating semantic relationship calculation confidence degrees by a preset large language model, marking primary evidence and auxiliary evidence, and updating the primary evidence corresponding to the semantic relationship when the current semantic relationship confidence degree is higher than the original semantic relationship confidence degree after comparison of the confidence degrees; and the method can realize text data tracing and improve the information integrity of stored data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and in particular to a method and system for constructing a hierarchical knowledge base for the field of battery design. Background Technology

[0002] Existing knowledge graph construction and retrieval augmented generation (RAG) technologies include traditional extraction techniques based on rules and templates, pipeline extraction techniques based on supervised learning, and end-to-end graph construction techniques based on large language models. These technologies have addressed the needs for information extraction and material screening to some extent, but they still have significant technical shortcomings when facing complex application scenarios in vertical fields.

[0003] First, existing technologies typically employ a flat processing model that directly outputs a graph from the input document. The processes of cleaning the original text data, text slicing, entity recognition, and relation extraction are highly coupled, lacking intermediate state retention. When upstream data is updated or the entity extraction strategy needs to be adjusted, the entire dataset needs to be reprocessed. Fine-grained incremental updates are not supported, resulting in high system maintenance costs and difficulty in effective data governance.

[0004] Secondly, existing knowledge graphs are mostly result-oriented, storing only the extracted triples without storing the context and specific location information of the knowledge in the original text. When errors occur in the graph, the system cannot provide intuitive original evidence sentences, and users cannot verify the authenticity of the knowledge, resulting in insufficient credibility of the graph in rigorous scenarios such as medicine and law.

[0005] Furthermore, existing solutions broadly define all key information in the text as entities, failing to effectively distinguish between material entities and performance values. Due to the lack of standardized and structured modeling of scientific numerical nodes, the knowledge base is difficult to support quantitative screening and comparative reasoning based on performance parameters. Researchers cannot directly query materials with specific screening requirements. When processing multi-source heterogeneous data, different text fragments show significant differences in the support strength for the same relationship. Existing technologies typically treat all sentences containing entities as evidence without distinguishing between direct evidence and background mentions. This coarse-grained evidence association method is prone to introducing noise when facing long contexts or battery-related reasoning tasks, causing the reasoning engine to be misled by secondary information, thus producing incorrect reasoning conclusions. Therefore, a method for constructing a hierarchical knowledge base in the battery field that can accurately anchor experimental conditions and structured storage performance indicators, and support full-link tracing back to the original literature paragraphs, is needed. Summary of the Invention

[0006] This invention provides a hierarchical knowledge base construction method and system for the field of battery design, the main purpose of which is to solve the problems of untraceable text data and missing stored data information in the prior art.

[0007] To achieve the above objectives, this invention provides a method for constructing a hierarchical knowledge base in the field of battery design, comprising: The original text data is obtained and its data source, data type, and original identifier are used to construct a unique composite primary key. The original text data is then stored in a metadata table using an idempotent write algorithm. The metadata table includes standardized storage fields and unstructured storage fields. The original text data is parsed and decomposed into at least one sentence segment according to a preset physical boundary. Each sentence segment is assigned a segment identifier and a role label corresponding to the unique joint primary key relationship. The role label includes context segment and question segment. A sentinel identifier is set for the question segment so that the context segment and question segment can be processed uniformly. Extract the entity nodes and numerical nodes of the sentence fragment, perform differential processing on the entity nodes and numerical nodes and remove duplicates, and write them into the knowledge graph node table. Write the position information, fragment identifier, original text data and character offset of the sentence fragment in which the entity nodes and numerical nodes are located into the knowledge graph mention table. After extracting nodes from each sentence fragment and constructing entity pairs, the data is input into a pre-defined large language model to generate semantic relations and calculate confidence levels. The sentence fragment containing the semantic relation is marked as primary evidence, and the sentence fragment containing background information related to the semantic relation is marked as secondary evidence. The semantic relations are subjected to repeatability checks, and the confidence levels of the current semantic relation and the original semantic relation are compared. When the confidence level of the current semantic relation is higher than that of the original semantic relation, the primary evidence corresponding to the semantic relation is updated.

[0008] Optionally, storing the original text data in a metadata table using an idempotent write algorithm includes: The metadata table is retrieved based on the unique composite primary key to determine whether the original text data already exists in the metadata table. If no record matching the unique composite primary key exists in the metadata table, the original text data is inserted into the metadata table. If the metadata table exists, the location of existing data that duplicates the original text data is obtained based on the unique composite primary key of the original text data, and the standardized storage field content and unstructured storage field content in the corresponding metadata table are updated according to the original text data.

[0009] Optionally, the preset physical boundaries include line breaks and periods, dividing the original document into multiple independent sentence segments.

[0010] Optionally, when the original text data contains verified benchmark supporting evidence that can serve as a truth value, the sentence segment containing the benchmark supporting evidence is explicitly marked using a preset Boolean field.

[0011] Optionally, the process of differentiating the entity nodes and the numerical nodes includes: The entity nodes are normalized by name, punctuation at the beginning and end are removed, and redundant modifiers are removed; the entity nodes include material name, chemical formula, synthesis method, and equipment name; After performing structured parsing on the numerical nodes, standard data values ​​and units are extracted; the numerical nodes include time, amount, unit of measurement, and percentage.

[0012] Optionally, the process of extracting nodes contained in each sentence fragment, constructing entity pairs, inputting them into a pre-defined large language model to generate semantic relations, and calculating confidence scores includes: After extracting all nodes from each sentence segment and classifying and deduplicating them, the nodes are combined in pairs according to the form of entity node-numeric node and entity node-entity node to construct entity pairs; After inputting the entity pair and the sentence fragment containing the node into the preset large language model, the semantic relationship of the entity pair is output and the confidence of the semantic relationship is calculated. When the semantic relationship has a semantic conflict with the sentence fragment or the confidence of the semantic relationship is lower than the preset confidence, the semantic relationship is discarded.

[0013] Optionally, the process of performing a repeatability check on the semantic relationship and comparing the confidence levels of the current semantic relationship and the original semantic relationship; updating the master evidence corresponding to the semantic relationship when the confidence level of the current semantic relationship is higher than that of the original semantic relationship includes: The nodes and relation types of the current semantic relation are compared with those of the original semantic relation; if the nodes and relation types of the current semantic relation and the original semantic relation are the same, it is a duplicate semantic relation. The confidence level of the current semantic relationship is compared with the confidence level of the original semantic relationship. If the confidence level of the current semantic relationship is higher than that of the original semantic relationship, the confidence level of the current semantic relationship is updated to the confidence level of the original semantic relationship, and the main evidence of the original semantic relationship is replaced with the main evidence corresponding to the current semantic relationship.

[0014] To address the aforementioned problems, this invention also provides a hierarchical knowledge base construction system for the battery design field. This system is used to execute the aforementioned hierarchical knowledge base construction method for the battery design field. The system includes: The raw text data acquisition module is used to acquire raw text data and construct a unique composite primary key from the data source, data type, and original identifier of the raw text data, and store the raw text data in a metadata table using an idempotent write algorithm; the metadata table includes standardized storage fields and unstructured storage fields; The text data slicing module is used to parse the original text data and decompose it into at least one sentence segment according to a preset physical boundary. Each sentence segment is assigned a segment identifier and a role label corresponding to the unique joint primary key relationship. The role label includes context segment and question segment. A sentinel identifier is set for the question segment so that the context segment and question segment can be processed uniformly. The node extraction and storage module is used to extract entity nodes and numerical nodes of the sentence fragment, perform differential processing on the entity nodes and the numerical nodes and write them into the knowledge graph node table after deduplication, and write the position information, fragment identifier, original text data and character offset of the sentence fragment where the entity nodes and the numerical nodes are located into the knowledge graph mention table. The data storage update module is used to extract nodes contained in each sentence fragment, construct entity pairs, input them into a preset large language model to generate semantic relations and calculate confidence levels. The sentence fragment containing the semantic relation is marked as primary evidence, and the sentence fragment containing background information related to the semantic relation is marked as secondary evidence. The semantic relation is subjected to a repeatability check, and the confidence levels of the current semantic relation and the original semantic relation are compared. When the confidence level of the current semantic relation is higher than that of the original semantic relation, the primary evidence corresponding to the semantic relation is updated.

[0015] To address the above problems, the present invention also provides an electronic device, the electronic device comprising: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory has a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the hierarchical knowledge base construction method for the field of battery design described above.

[0016] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-described methods for constructing a hierarchical knowledge base in the field of battery design.

[0017] The beneficial effects of this invention are as follows: This invention provides a hierarchical knowledge base construction method and system for the field of battery design. It stores data in a metadata table using a unique composite primary key and an idempotent write algorithm, while distinguishing between standardized and unstructured storage fields. This achieves ordered classification and storage of raw text data, and ensures data uniqueness through the unique composite primary key. Each segment is assigned a segment identifier and role label associated with the unique composite primary key, and a sentinel identifier is set for question segments, enabling precise segmentation and classification management of sentence segments. The sentinel identifier allows context segments and question segments to use a unified processing logic, reducing processing redundancy and improving processing efficiency. After differential processing and deduplication of volume nodes and numerical nodes, they are written into the knowledge graph node table, effectively eliminating duplicate nodes, avoiding node data redundancy, and improving the accuracy of node data; an explicit association between nodes and original sentence fragments is established, realizing node traceability; this invention transforms unstructured text data into a structured knowledge graph, enabling the knowledge graph to accurately trace back to the original text data, and establishes a primary and secondary evidence hierarchical system to overcome the noise interference problem caused by treating all contexts as equal evidence in existing technologies, realizing accurate anchoring of experimental conditions and structured storage performance indicators for literature materials in the battery field, and enabling full-link traceability back to the original document segment.

[0018] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0019] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a method for constructing a hierarchical knowledge base for battery design, as described in an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the structure of a hierarchical knowledge base construction method for the field of battery design, as described in an embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram of a hierarchical knowledge base construction system for the field of battery design, as described in an embodiment of the present invention.

[0023] Figure 4 This is a schematic diagram of a battery knowledge graph database model according to an embodiment of the present invention.

[0024] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0026] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0027] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0028] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0029] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0030] Figure 1 This is a flowchart illustrating a method for constructing a hierarchical knowledge base for battery design, as described in an embodiment of the present invention. Figure 2 This is a schematic diagram of a hierarchical knowledge base construction method for the field of battery design according to an embodiment of the present invention. This application provides a hierarchical knowledge base construction method for the field of battery design, which includes the following steps S101~S104: Step S101: Obtain the original text data and construct a unique composite primary key from the data source, data type, and original identifier of the original text data. Store the original text data in the metadata table using an idempotent write algorithm. The metadata table includes standardized storage fields and unstructured storage fields.

[0031] Step S102: Parse the original text data and decompose it into at least one sentence fragment according to the preset physical boundary. Assign a fragment identifier and role label to each sentence fragment corresponding to the unique joint primary key relationship. The role label includes context fragment and question fragment. Set a sentinel identifier for the question fragment so that the context fragment and question fragment can be processed uniformly.

[0032] Step S103: Extract entity nodes and numerical nodes from sentence fragments, perform differential processing on entity nodes and numerical nodes and remove duplicates, then write them into the knowledge graph node table. Write the position information of the sentence fragment where the entity node and numerical node are located, the fragment identifier, the original text data and the character offset into the knowledge graph mention table.

[0033] Step S104: Extract the nodes contained in each sentence fragment and construct entity pairs, then input them into a preset large language model to generate semantic relations and calculate the confidence level. Mark the sentence fragment containing the semantic relation as primary evidence and the sentence fragment containing background information related to the semantic relation as secondary evidence. Perform a repeatability judgment on the semantic relations and compare the confidence levels of the current semantic relations with the original semantic relations. When the confidence level of the current semantic relation is higher than that of the original semantic relation, update the primary evidence corresponding to the semantic relation.

[0034] In step S101, the original text data includes unstructured data about electrochemical energy storage devices, including but not limited to PDF documents, academic papers, patents, and experimental reports related to electrochemical energy storage devices. Standardized storage fields are used to store the question text and standard answers, while unstructured storage fields are used to store the full information of the original text data without loss. The full information includes the original context and heading levels. When the idempotent write algorithm repeatedly imports the same data, it automatically updates the content based on the unique composite primary key. If the target data record does not exist, an insertion operation is performed; if the target data record already exists, an update operation is performed, ensuring the uniqueness of each data item in the metadata table.

[0035] In this embodiment of the invention, storing the original text data in the metadata table using an idempotent write algorithm includes: The metadata table is retrieved based on the unique composite primary key to determine whether the original text data already exists in the metadata table. If no record matching the unique composite primary key exists in the metadata table, the original text data is inserted into the metadata table. If the metadata table exists, the location of existing data that duplicates the original text data is obtained based on the unique composite primary key of the original text data, and the contents of the standardized storage fields and unstructured storage fields in the corresponding metadata table are updated according to the original text data.

[0036] In step S102, the physical boundary decomposes the original text data into multiple sentence fragments. Each sentence fragment is assigned a globally unique fragment identifier and role label. The role label includes context fragments and question fragments. Context fragments originate from sentences in the reference document, and question fragments originate from questions queried by the user. Sentinel identifiers enable unified processing of context fragments and question fragments. In this embodiment of the invention, the preset physical boundary includes line breaks and periods, dividing the original document into multiple independent sentence fragments.

[0037] In this embodiment of the invention, the method further includes: when the original text data contains verified benchmark supporting evidence that can serve as a truth value, explicitly marking the sentence segment containing the benchmark supporting evidence using a preset Boolean field. The explicitly marked sentence segment serves as the truth value for model training.

[0038] In step S103, graph nodes are divided into entity nodes and numerical nodes, and the two types of nodes are differentiated. In this embodiment of the invention, the process of differentiating entity nodes and numerical nodes includes: The entity nodes are normalized in name, and punctuation at the beginning and end and redundant modifiers are removed. The entity nodes include material name, chemical formula, synthesis method and equipment name.

[0039] After performing structured parsing on the numerical nodes, standard data values ​​and units are extracted; the numerical nodes include time, amount, unit of measurement, and percentage.

[0040] Furthermore, the knowledge graph mention table includes a node table and a mention table. The node table stores the deduplicated concepts, and the mention table stores the occurrence records of the concepts in sentence fragments. The occurrence records include the position information of the entity node and the numerical node in the sentence fragment, the fragment identifier, the original text data, and the character offset.

[0041] In step S104, in this embodiment of the invention, the process of extracting nodes contained in each sentence fragment, constructing entity pairs, inputting them into a preset large language model to generate semantic relations, and calculating confidence includes steps S1041~S1042: Step S1041: Extract all nodes from each sentence segment, classify and deduplicate them, and then combine the nodes in pairs in the form of entity node-numeric node and entity node-entity node to construct entity pairs.

[0042] Step S1042: Input the entity pair and the sentence fragment containing the node into the preset large language model, output the semantic relationship of the entity pair, and calculate the confidence of the semantic relationship; discard the semantic relationship when there is a semantic conflict between the semantic relationship and the sentence fragment or when the confidence of the semantic relationship is lower than the preset confidence.

[0043] Furthermore, when relation R(A, B) is extracted from the first sentence fragment, the first sentence fragment is marked as primary evidence, and each relation is assigned a primary piece of evidence. When the second sentence fragment does not directly state the relation but provides relevant background information, the second sentence fragment is marked as secondary evidence. In this embodiment of the invention, the semantic relations are subjected to a repetition judgment, and the confidence of the current semantic relation and the original semantic relation are compared. The process of updating the primary evidence corresponding to the semantic relation when the confidence of the current semantic relation is higher than that of the original semantic relation includes steps S1 to S2: Step S1: Compare the nodes and relation types of the current semantic relation with the original semantic relation; if the nodes and relation types of the current semantic relation and the original semantic relation are the same, it is a duplicate semantic relation.

[0044] Step S2: Compare the confidence of the current semantic relationship with the confidence of the original semantic relationship; if the confidence of the current semantic relationship is higher than that of the original semantic relationship, update the confidence of the original semantic relationship with the confidence of the current semantic relationship, and replace the main evidence of the original semantic relationship with the main evidence corresponding to the current semantic relationship.

[0045] Specifically, an atomic update strategy based on confidence is used to process the results of multiple extractions of the same relation. When the newly extracted semantic relation is significantly higher than the original semantic relation, the relation attributes and corresponding master evidence are updated to ensure the updating of the knowledge graph.

[0046] Figure 3 This is a schematic diagram of a hierarchical knowledge base construction system for the battery design field according to an embodiment of the present invention. On the other hand, the present invention also provides a hierarchical knowledge base construction system for the battery design field, the system being used to execute the above-described hierarchical knowledge base construction method for the battery design field, the system comprising: The raw text data acquisition module is used to acquire raw text data and construct a unique composite primary key from the data source, data type, and original identifier of the raw text data. The raw text data is stored in the metadata table through an idempotent write algorithm. The metadata table includes standardized storage fields and unstructured storage fields.

[0047] The text data slicing module is used to parse the raw text data and decompose it into at least one sentence fragment according to the preset physical boundaries. Each sentence fragment is assigned a fragment identifier and a role label corresponding to a unique joint primary key relationship. The role labels include context fragments and question fragments. A sentinel identifier is set for the question fragment so that the context fragments and question fragments can be processed uniformly.

[0048] The node extraction and storage module is used to extract entity nodes and numerical nodes of sentence fragments, perform differential processing on entity nodes and numerical nodes and write them into the knowledge graph node table after deduplication, and write the position information of the sentence fragment where the entity node and numerical node are located, fragment identifier, original text data and character offset into the knowledge graph mention table.

[0049] The data storage update module is used to extract nodes contained in each sentence fragment, construct entity pairs, input them into a preset large language model to generate semantic relations and calculate confidence scores. The sentence fragment containing the semantic relation is marked as primary evidence, and the sentence fragment containing background information related to the semantic relation is marked as secondary evidence. The module performs a repeatability check on the semantic relations and compares the confidence scores of the current semantic relation with those of the original semantic relation. When the confidence score of the current semantic relation is higher than that of the original semantic relation, the primary evidence corresponding to the semantic relation is updated.

[0050] On the other hand, embodiments of the present invention also provide an electronic device, the electronic device including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory has a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute to implement the above-described hierarchical knowledge base construction method for the field of battery design.

[0051] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the above-described hierarchical knowledge base construction method for the field of battery design.

[0052] The present invention will now be described with reference to a specific embodiment: Figure 4 This is a schematic diagram of a battery knowledge graph database model according to an embodiment of the present invention. The present invention proposes a hierarchical knowledge base construction method and system for the field of battery design.

[0053] Step 1: Constructing the L1 document slicing layer. This involves transforming unstructured long text into system-operable atomic units, including the following steps: 1.1 Generation of Globally Unique Identifiers. After receiving the raw text data, the system generates a globally unique composite primary key (dataset, split, qa id) based on the data source (Source), data type (Split), and original ID.

[0054] 1.2 Structured Storage of Raw Text Data. The system creates a metadata table (qa instance meta) that stores standardized fields, including but not limited to question text and standard answers. It also sets an unstructured field, which can use raw fields of type JSONB to preserve the full information of the raw text data without loss. The full information includes but is not limited to the original context and heading level.

[0055] 1.3 Idempotent Write Mechanism. A UPSERT strategy is used for updates and inserts. When the same data is imported repeatedly, the content is automatically updated based on the composite primary key instead of being repeatedly inserted, ensuring the uniqueness of the metadata layer.

[0056] Step 2, Construction of the L2 Evidence Layer. This involves extracting entities and values ​​from the text fragment and establishing anchoring relationships between nodes and character-level positions in the original text through a mention mechanism. This includes the following steps: 2.1 Text Fragmentation. The system parses the original document and divides it into independent sentence-level fragments based on physical boundaries including but not limited to line breaks and periods. Each fragment is assigned a globally unique fragment identifier (l1 id).

[0057] 2.2 Role Tagging and Indexing. The system assigns a role tag to each segment, including context segments (CONTEXT SENT) derived from sentences in reference documents and question segments (QUESTION) derived from user queries.

[0058] 2.3 Sentinel Mechanism. To unify the handling of question fragments and context fragments, a predefined sentinel identifier (e.g., doc id='QUESTION') is introduced when storing question fragments. This design allows question nodes and document nodes to be treated isomorphically in subsequent vector retrieval and graph traversal, eliminating the need to develop two sets of indexing logic.

[0059] 2.4 Supporting Pre-labeling: When the original text data contains gold evidence, the system will explicitly label the fragment in the L1 layer with a boolean field (is support sent) and use it as the ground truth for subsequent model training or evaluation.

[0060] Step 3: Construction of the L3 knowledge graph layer. Semantic connections are established between nodes, and the relational topology of the knowledge graph is constructed. Through this design, the system achieves end-to-end interpretability, including the following steps: 3.1 Dual-type node modeling. Graph nodes are divided into two categories and differentiated accordingly.

[0061] Entity nodes include, but are not limited to, material names (e.g., Lithium Iron Phosphate), chemical formulas, synthesis methods, and equipment names. The system performs canonicalization on these nodes, removing punctuation and redundant modifiers.

[0062] Value nodes (VALUE): including but not limited to time, amount, unit of measurement, and percentage. The system performs structured parsing to extract the standard value and unit for subsequent numerical comparison and reasoning.

[0063] 3.2 Mention Anchoring. To address the issues of illusion and untraceability, a separate Mention Table was designed. There is a Node Table that stores only the deduplicated concepts; and a Mention Table that stores the specific occurrence records of the concepts within L1 segments. Each record includes the position information of the sentence segment (node ​​id), the segment identifier (l1 id), the original text data (span text), and the character offset (char start / char end).

[0064] Step 4: Construction of the L4 Conceptual Layer. This involves constructing a conceptual system that binds each relationship to direct evidence supporting the relationship's validity, forming a logical loop. This includes the following steps: 4.1 Sentence-level relation extraction. The system takes sentences at the L1 level as units, retrieves all L2 node mentions contained in the sentence, constructs candidate entity pairs, and inputs them into the large language model to determine whether semantic relations exist.

[0065] 4.2 The Primary / Support evidence grading mechanism introduces evidence grading.

[0066] PRIMARY: When relation R(A,B) is extracted from sentence S1, then S1 is marked as the PRIMARY of the relation. The system mandates that each relation must have a PRIMARY.

[0067] Support: When sentence S2 does not directly state relation R, but provides background information, S2 is marked as support evidence.

[0068] 4.3 Atomic Update Strategy. When processing multiple extraction results of the same relation, the system adopts an atomic update strategy based on confidence score; the relation attributes and master evidence pointer are only updated when the confidence score of the newly extracted record is significantly higher than that of the old record, ensuring that the quality of the knowledge graph continues to evolve.

[0069] In summary, this invention provides a method and system for constructing a hierarchical knowledge base in the field of battery design. The method includes: acquiring raw text data and constructing a unique composite primary key from the data source, data type, and original identifier of the raw text data; storing the raw text data in a metadata table using an idempotent write algorithm; parsing the raw text data and decomposing it into at least one sentence fragment according to a preset physical boundary; assigning a fragment identifier and role label corresponding to the unique composite primary key relationship to each sentence fragment; the role label includes context fragments and question fragments; setting a sentinel identifier for question fragments to enable unified processing of context fragments and question fragments; extracting entity nodes and numerical nodes from the sentence fragments; and... Entity nodes and numerical nodes are differentiated and deduplicated before being written into the knowledge graph node table. The position information, segment identifier, original text data, and character offset of the sentence segments in which the entity nodes and numerical nodes are located are written into the knowledge graph mention table. Nodes contained in each sentence segment are extracted and entity pairs are constructed. These are then input into a pre-defined large language model to generate semantic relations and calculate confidence scores. Sentence segments containing semantic relations are marked as primary evidence, and sentence segments containing background information related to semantic relations are marked as secondary evidence. Repeatability checks are performed on semantic relations, and the confidence scores of the current semantic relations and the original semantic relations are compared. When the confidence score of the current semantic relations is higher than that of the original semantic relations, the primary evidence corresponding to the semantic relations is updated.

[0070] This invention also provides an electronic device, which includes: At least one processor; and, A memory that is communicatively connected to at least one processor; wherein, The memory contains a computer program that can be executed by at least one processor, such that the at least one processor can execute the hierarchical knowledge base construction method described above for the field of battery design.

[0071] This invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the above-described hierarchical knowledge base construction method for the field of battery design.

[0072] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0073] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method for constructing a hierarchical knowledge base for the field of battery design, characterized in that, The method includes: The process involves acquiring raw text data and constructing a unique composite primary key from the data source, data type, and original identifier of the raw text data. The raw text data is then stored in a metadata table using an idempotent write algorithm. The metadata table includes standardized storage fields and unstructured storage fields. The idempotent write algorithm for storing the raw text data in the metadata table includes: retrieving the metadata table based on the unique composite primary key to determine if the raw text data already exists in the metadata table; inserting the raw text data into the metadata table if no record matching the unique composite primary key exists; and retrieving the location of existing data that duplicates the raw text data based on the unique composite primary key of the raw text data, and updating the standardized storage field content and unstructured storage field content in the corresponding metadata table according to the raw text data. The original text data is parsed and decomposed into at least one sentence segment according to a preset physical boundary. Each sentence segment is assigned a segment identifier and a role label corresponding to the unique joint primary key relationship. The role label includes context segment and question segment. A sentinel identifier is set for the question segment so that the context segment and question segment can be processed uniformly. Extract the entity nodes and numerical nodes of the sentence fragment, perform differential processing on the entity nodes and numerical nodes and remove duplicates, and write them into the knowledge graph node table. Write the position information, fragment identifier, original text data and character offset of the sentence fragment in which the entity nodes and numerical nodes are located into the knowledge graph mention table. After extracting nodes from each sentence fragment and constructing entity pairs, the data is input into a pre-defined large language model to generate semantic relations and calculate confidence levels. The sentence fragment containing the semantic relation is marked as primary evidence, and the sentence fragment containing background information related to the semantic relation is marked as secondary evidence. The semantic relations are subjected to repeatability checks, and the confidence levels of the current semantic relation and the original semantic relation are compared. When the confidence level of the current semantic relation is higher than that of the original semantic relation, the primary evidence corresponding to the semantic relation is updated.

2. The method for constructing a hierarchical knowledge base for battery design as described in claim 1, characterized in that, The preset physical boundaries include line breaks and periods, which divide the original document into multiple independent sentence segments.

3. The method for constructing a hierarchical knowledge base for battery design as described in claim 1, characterized in that, The method also includes: When the original text data contains verified benchmark supporting evidence that can serve as truth, the sentence segment containing the benchmark supporting evidence is explicitly marked using a preset Boolean field.

4. The method for constructing a hierarchical knowledge base for battery design as described in claim 1, characterized in that, The process of differentiating the entity nodes and the numerical nodes includes: The entity nodes are normalized by name, punctuation at the beginning and end are removed, and redundant modifiers are removed; the entity nodes include material name, chemical formula, synthesis method, and equipment name; After performing structured parsing on the numerical nodes, standard data values ​​and units are extracted; the numerical nodes include time, amount, unit of measurement, and percentage.

5. The method for constructing a hierarchical knowledge base for battery design as described in claim 1, characterized in that, The process of extracting nodes from each sentence fragment, constructing entity pairs, inputting them into a pre-defined large language model to generate semantic relations, and calculating confidence scores includes: After extracting all nodes from each sentence segment and classifying and deduplicating them, the nodes are combined in pairs according to the form of entity node-numeric node and entity node-entity node to construct entity pairs; After inputting the entity pair and the sentence fragment containing the node into the preset large language model, the semantic relationship of the entity pair is output and the confidence of the semantic relationship is calculated. When the semantic relationship has a semantic conflict with the sentence fragment or the confidence of the semantic relationship is lower than the preset confidence, the semantic relationship is discarded.

6. The method for constructing a hierarchical knowledge base for battery design as described in claim 1, characterized in that, The semantic relationships are subjected to a repeatability check, and the confidence levels of the current semantic relationship and the original semantic relationship are compared. The process of updating the master evidence corresponding to the semantic relation when the current semantic relation confidence is higher than the original semantic relation confidence includes: The nodes and relation types of the current semantic relation are compared with those of the original semantic relation; if the nodes and relation types of the current semantic relation and the original semantic relation are the same, it is a duplicate semantic relation. The confidence level of the current semantic relationship is compared with the confidence level of the original semantic relationship. If the confidence level of the current semantic relationship is higher than that of the original semantic relationship, the confidence level of the current semantic relationship is updated to the confidence level of the original semantic relationship, and the main evidence of the original semantic relationship is replaced with the main evidence corresponding to the current semantic relationship.

7. A hierarchical knowledge base construction system for the field of battery design, characterized in that, The system is used to execute the hierarchical knowledge base construction method for the field of battery design as described in any one of claims 1 to 6, and the system includes: The raw text data acquisition module is used to acquire raw text data and construct a unique composite primary key from the data source, data type, and original identifier of the raw text data, and store the raw text data in a metadata table using an idempotent write algorithm; the metadata table includes standardized storage fields and unstructured storage fields; The text data slicing module is used to parse the original text data and decompose it into at least one sentence segment according to a preset physical boundary. Each sentence segment is assigned a segment identifier and a role label corresponding to the unique joint primary key relationship. The role label includes context segment and question segment. A sentinel identifier is set for the question segment so that the context segment and question segment can be processed uniformly. The node extraction and storage module is used to extract entity nodes and numerical nodes of the sentence fragment, perform differential processing on the entity nodes and the numerical nodes and write them into the knowledge graph node table after deduplication, and write the position information, fragment identifier, original text data and character offset of the sentence fragment where the entity nodes and the numerical nodes are located into the knowledge graph mention table. The data storage update module is used to extract nodes contained in each sentence fragment, construct entity pairs, input them into a preset large language model to generate semantic relations and calculate confidence levels. The sentence fragment containing the semantic relation is marked as primary evidence, and the sentence fragment containing background information related to the semantic relation is marked as secondary evidence. The semantic relation is subjected to a repeatability check, and the confidence levels of the current semantic relation and the original semantic relation are compared. When the confidence level of the current semantic relation is higher than that of the original semantic relation, the primary evidence corresponding to the semantic relation is updated.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the hierarchical knowledge base construction method for the field of battery design as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the hierarchical knowledge base construction method for the field of battery design as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Comprehensive energy large model knowledge base dynamic construction method and system

    CN121144529A

  • Virtual power plant knowledge question-answering method and system based on large model, and program product

    CN121388093A