A large language model training data labeling method

CN122595987APending Publication Date: 2026-08-18QUANZHI QIHANG (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

现有标注流程仅针对文本整体语义进行浅层信息标记,缺乏对文本多粒度语义单元的精细化拆解,无法同步挖掘词汇、短语、句子多层级的语义信息,导致标注数据粒度单一、语义维度缺失,标注数据的语义置信度低、容错性差,存在大量无效、错误标注信息,从而严重影响模型训练收敛效果

Benefits of technology

通过从异构数据源获取大语言模型训练原始文本语料,对语料开展多粒度语义单元分割,生成词汇、短语、句子层级的语义单元序列,同步搭建涵盖概念定义、属性关系及逻辑约束的领域知识本体库,该步骤通过多粒度语义分割,将原始文本拆解为多层级语义单元,全面保留文本从微观词汇到宏观句子的完整语义特征,弥补传统标注粒度单一的短板。同步构建的领域知识本体库形成规范化语义网络,统一领域概念、属性与逻辑规则,为后续实体抽取、语义标注提供统一标准依据,从源头提升语料利用完整性与标注体系规范性,解决浅层标注信息缺失、规则无序的问题,为高质量结构化标注数据生成筑牢基础。其次,通过依托多层级语义单元序列与领域知识本体库,实现概念实体与关系谓词的联合抽取,构建以语义概念实体为节点、关系谓词为边的初步语义标注图,该步骤依托多粒度语义单元保障实体与关系信息的全面性,同时以领域知识本体库的标准体系为约束,同步完成实体与关系谓词的联合抽取,避免分步处理带来的信息割裂与匹配偏差。构建的初步语义标注图以图结构形式承载文本语义与逻辑关系,将零散的标注信息转化为互联的知识网络,丰富标注数据的结构维度与逻辑维度,弥补传统扁平化标注缺少关联特征的缺陷,为后续语义校验优化与模型训练提供具备完整知识逻辑的基础结构。然后,通过对初步语义标注图开展图结构语义校验与冲突消解,完成节点与边的语义置信度强化及逻辑矛盾化解,生成标准化语义标注图,该步骤针对图结构数据开展专项语义校验,全面排查节点实体错误、边关系错乱、逻辑规则冲突等各类问题,通过冲突消解机制统一梳理整体知识逻辑。同时对图中语义信息进行置信度强化,提升有效知识特征的权重占比,剔除矛盾与无效信息,完成标注图的标准化规整处理。该过程有效过滤标注噪声、修正逻辑缺陷,解决传统标注数据错误多、容错性差、规范性不足的问题,大幅提升标注数据的逻辑性、可靠性与统一性。最后,通过依托标准化语义标注图,结合大语言模型训练任务目标函数,完成标注语义信息的向量化编码与对齐映射,生成可直接驱动模型参数更新的结构化标注数据,该步骤基于规整后的标准化语义标注图,将图结构承载的多层级语义知识、实体关联、逻辑约束进行统一向量化编码,将离散语义信息转化为模型可识别的向量特征。结合训练任务目标函数完成对齐映射,让标注语义特征完全贴合模型参数迭代优化方向,生成的结构化标注数据能够直接参与模型训练迭代,提升训练数据的有效利用率,强化模型对领域知识、语义关联与逻辑规则的学习能力,从而持续优化大语言模型的训练收敛效果与综合性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122595987A_ABST
    Figure CN122595987A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of large model data processing, in particular to a large language model training data labeling method.The method comprises the following steps: obtaining original text corpus for large language model training from a heterogeneous data source and performing multi-granularity semantic unit segmentation to generate a semantic unit sequence, and simultaneously constructing a domain knowledge ontology library; performing concept entity and relation predicate extraction based on the semantic unit sequence and the domain knowledge ontology library to generate a preliminary semantic labeling graph; performing graph structure semantic verification and conflict resolution on the preliminary semantic labeling graph, performing semantic confidence reinforcement and logical contradiction resolution on nodes and edges in the graph based on the verification and resolution results, and generating a standardized semantic labeling graph; and combining a target function of a large language model training task to perform vectorization coding and alignment mapping of labeled semantic information, and generating structured labeling data that can directly drive parameter updating of the large language model.The application can improve the effective utilization rate of training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of large model data processing technology, and in particular to a method for labeling training data of large language models. Background Technology

[0002] Large language models, as a core technology in the field of natural language processing, have been widely applied in various scenarios such as intelligent question answering, text generation, knowledge reasoning, content understanding, and industry intelligence empowerment. The model's performance, generalization ability, and inference accuracy highly depend on high-quality, highly structured, and logically rigorous training annotation data. The annotation quality, semantic completeness, logical regularity, and knowledge accuracy of the training data directly determine the cognitive ability and output effect of the large language model, and are the core foundation for ensuring the stable, accurate, and reliable operation of the large language model. As large language models delve deeper into vertical domains, model training places higher demands on the semantic precision, logical rigor, knowledge relevance, and structural regularity of the training data. Traditional, coarse-grained, and flat text annotation methods are no longer suitable for the training needs of high-precision large language models.

[0003] Currently, most mainstream large language model training data annotation methods are shallow annotations at the text and sentence levels. These methods primarily rely on manual annotation, rule-based template annotation, and basic model-assisted annotation to complete simple classification, labeling, and organization of the raw corpus. Existing annotation processes only perform shallow information labeling on the overall semantics of the text, lacking fine-grained decomposition of multi-granular semantic units. They cannot simultaneously mine semantic information at multiple levels, including words, phrases, and sentences, resulting in single-granularity annotation data, missing semantic dimensions, low semantic confidence, poor fault tolerance, and a large amount of invalid and erroneous annotation information. This severely impacts the model training convergence effect. Summary of the Invention

[0004] Therefore, it is necessary for the present invention to provide a method for labeling training data of a large language model in order to solve at least one of the above-mentioned technical problems.

[0005] To achieve the above objectives, a method for labeling training data for a large language model includes the following steps: Step S1: Obtain the original text corpus for training the large language model from the heterogeneous data source, and perform multi-granular semantic unit segmentation on the original text corpus to generate a semantic unit sequence containing words, phrases and sentences. At the same time, construct a domain knowledge ontology library, which contains a semantic network of concept definitions, attribute relationships and logical constraints. Step S2: Based on the semantic unit sequence and the domain knowledge ontology, perform joint extraction of conceptual entities and relational predicates to generate a preliminary semantic annotation graph, wherein the nodes of the preliminary semantic annotation graph are semantic conceptual entities and the edges are relational predicates; Step S3: Perform graph structure semantic verification and conflict resolution on the preliminary semantic annotation graph. Based on the verification and resolution results, strengthen the semantic confidence of nodes and edges in the graph and resolve logical contradictions to generate a standardized semantic annotation graph. Step S4: Based on the standardized semantic annotation graph, and combined with the objective function of the large language model training task, perform vectorized encoding and alignment mapping of the annotated semantic information to generate structured annotation data that can directly drive the parameter update of the large language model.

[0006] Furthermore, step S1 includes the following steps: Step S11: Collect unstructured text streams from publicly available online corpora, professional literature databases, and dialogue records from various fields, and perform encoding unification and noise character filtering on the unstructured text streams to generate clean text streams; Step S12: Perform language model-dependent syntactic analysis on the purified text stream to obtain sentence-level syntax tree structure and word segmentation boundary information, and generate basic syntax parsing sequence; Step S13: Based on the basic grammar parsing sequence, perform multi-level semantic boundary detection, divide phrase segments according to grammatical component functions and pause markers, and segment complex sentences according to clause dependency relations and punctuation rules to generate a semantic unit sequence containing vocabulary, phrases and sentence levels; Step S14: Extract the concept classification system and axiom assertions from the domain expert system, and import entity relation triples from the structured knowledge graph. Integrate the concept classification system, axiom assertions and entity relation triples to construct a domain knowledge ontology. The domain knowledge ontology contains a semantic network of concept definitions, attribute relations and logical constraints.

[0007] Furthermore, after step S1 and before step S2, the method further includes a step of performing deep semantic role and reference resolution on the semantic unit sequence, specifically: Predicate-argument structure analysis is performed on the semantic unit sequence to identify the core predicate in each sentence and its associated agent, patient, time, and place arguments, generating sentence-level semantic role framework data; Based on the sentence-level semantic role framework data, cross-sentence reference chain tracing is performed to identify and associate pronouns, zero pronouns, or synonyms pointing to the same entity in different sentences, and generate document-level entity coreference resolution chains. Based on the document-level entity coreference resolution chain, semantic information is fused and replaced in the semantic unit sequence involving entity references, and the references are uniformly replaced with the corresponding entity concepts to generate the resolved semantic unit sequence. From the resolved semantic unit sequence, sentence pairs with logical or temporal relationships are extracted, and logical connectors and temporal markers are added based on the relationship type to generate a semantic unit sequence with enhanced semantic coherence. The semantic unit sequence that enhances semantic coherence is used as the semantic unit sequence in the subsequent step S2 for the joint extraction of conceptual entities and relational predicates.

[0008] Furthermore, the cross-sentence reference chain tracking based on the sentence-level semantic role framework data includes the following steps: Extract all arguments labeled as entities from the sentence-level semantic role framework data, collect the textual description, sentence position and semantic role of each entity, and generate a candidate entity mention set; Clustering analysis based on strings, semantics, and context is performed on the candidate entity mention set to calculate the comprehensive correlation between any two entity mentions in terms of string similarity, semantic vector distance, and context window co-occurrence features; An entity mention association graph is constructed based on the comprehensive relevance. In the graph, nodes are entity mentions and the weight of the edges is the comprehensive relevance. A graph clustering algorithm is used to segment the association graph and aggregate mentions with high relevance into the same category. Assign a globally unique core entity identifier to each category formed by mention aggregation, and record the original location and text of all mentions under that category to generate a preliminary entity-mention mapping table; Traverse the preliminary entity-mention mapping table, and for each core entity, examine the order and context of all its mentions in the original text, identify and mark explicit referential relationships, and finally generate a document-level entity coreference resolution chain.

[0009] Furthermore, calculating the comprehensive relevance of any two entity mentions based on string similarity, semantic vector distance, and context window co-occurrence features includes the following steps: For the original text strings mentioned by two entities, calculate their edit distance and the length of the longest common substring, normalize the two and then weight them to generate string similarity; Input the texts mentioned by the two entities into a pre-trained semantic encoding model to obtain their corresponding semantic vector representations, calculate the cosine distance between the two semantic vectors, and generate the semantic vector distance. Centered on the positions of the two entity mentions in the text, expand the context window of a preset size outwards, extract the set of all words in the two windows, calculate the Jaccard similarity coefficient of the two sets, and generate context window co-occurrence features; Based on predefined fusion weights, the string similarity, the complement of the semantic vector distance, and the co-occurrence features of the context window are linearly weighted and summed to generate a comprehensive correlation degree, wherein the complement of the semantic vector distance is the difference between 1 and the semantic vector distance.

[0010] Furthermore, the generation of document-level entity coreference resolution chains includes the following steps: For each core entity in the entity-mention mapping table, sort all its mentions in the order in which they appear in the original text to generate a temporal mention sequence for that entity. The chronological mention sequence is traversed sequentially. For each mention that is later in the sequence, the nearest preceding mention that is different from the text string of that mention is searched ahead. Determine whether there is an explicit referential indicator in the sentence's grammatical structure between the preceding mention and the current mention, or whether the current mention is a pronoun or a zero pronoun, in order to generate judgment conditions; If the judgment condition is met, a referential link is established between the preceding mention and the current mention, and the referential type and confidence level are recorded; After traversing and establishing links for all core entities, all referential links are integrated to generate a structured document-level entity core reference resolution chain. The document-level entity core reference resolution chain is grouped by core entities and clearly records the referential relationship paths between all mentions within the group.

[0011] Furthermore, step S2 includes the following steps: Step S21: Extract candidate words and phrase combinations from the semantic unit sequence, perform fuzzy string matching and semantic similarity calculation based on the concept definitions in the domain knowledge ontology, and generate a candidate concept entity set; Step S22: Perform context semantic role labeling on the candidate concept entity set, analyze the syntactic function and logical position of the concept entity in the context based on the syntactic dependency path of the semantic unit sequence, and generate semantic role label data; Step S23: Based on the semantic role tag data, and combined with the predefined relation predicate framework in the domain knowledge ontology, perform pattern matching of the predicate argument structure, extract candidate relation predicates connecting concept entities, and generate a candidate relation set; Step S24: Merge the candidate concept entity set and the candidate relation set, and construct an initial semantic graph structure with entities as nodes and relations as edges based on entity co-occurrence and relation transitivity; Step S25: Perform redundant edge pruning and isolated node filtering on the initial semantic graph structure, and evaluate and screen the necessity of nodes and edges based on the graph structure density and semantic integrity to generate a preliminary semantic annotation graph.

[0012] Furthermore, step S3 includes the following steps: Step S31: Extract triples composed of all relation predicates from the preliminary semantic annotation graph, and perform logical consistency verification based on the attribute domain, value domain and relation transitivity axioms defined in the domain knowledge ontology to generate a set of logically conflicting triples. Step S32: Perform conflict root cause analysis on the set of logical conflict triples, trace the original context of the entity nodes and relation predicates involved in the conflict triples in the semantic unit sequence, and generate conflict context tracing data. Step S33: Based on the conflict context tracing data, and combined with the concept hierarchy and relation constraints in the domain knowledge ontology, perform semantic disambiguation and relation predicate re-annotation on the conflict triples to generate a set of conflict resolution schemes; Step S34: Based on the conflict resolution scheme set, update the semantic information and partially reconstruct the graph structure of the corresponding nodes and edges in the preliminary semantic annotation graph to generate an intermediate semantic annotation graph; Step S35: Perform a global semantic flow connectivity test on the intermediate semantic annotation graph, calculate the probability that any two entity nodes in the graph can be reached through a relational path, supplement the low reachability node pairs with semantic bridging edges, and finally generate a standardized semantic annotation graph.

[0013] Furthermore, step S35 includes the following steps: Random walk sampling is performed on the intermediate semantic annotation graph to generate semantic walk paths between multiple entity nodes, and the sequence and type of relation predicates on each path are extracted to generate path semantic pattern data; Based on the path semantic pattern data, a path semantic representation learning is performed using a graph neural network model, encoding each path into a fixed-dimensional semantic vector to generate a set of path semantic vectors. Calculate the semantic distance between any two vectors in the path semantic vector set, and construct a semantic similarity matrix between entity nodes based on the semantic distance; Based on the semantic similarity matrix, identify node pairs with semantic similarity lower than a preset connectivity threshold and no direct or indirect connection in the graph structure, and generate a list of node pairs to be bridged. Based on the list of nodes to be bridged, query whether there are implicit superior concepts or shared attributes between the corresponding concepts of the node pairs in the domain knowledge ontology. Based on the query results, derive reasonable implicit relation predicates and add the implicit relation predicates as bridging edges to the intermediate semantic annotation graph to generate a standardized semantic annotation graph.

[0014] Furthermore, the step of deriving a reasonable implicit relation predicate based on the query results and adding the implicit relation predicate as a bridging edge to the intermediate semantic annotation graph includes the following steps: Extract the entity concept identifiers corresponding to the first node and the second node from the list of nodes to be bridged, and query the domain knowledge ontology based on the entity concept identifiers to obtain the parent concept set and attribute feature vector to which the first node belongs, and the parent concept set and attribute feature vector to which the second node belongs. Based on the parent concept set and attribute feature vector of the first node, and the parent concept set and attribute feature vector of the second node, a concept intersection space and a feature difference tensor are constructed. The concept intersection space contains the superior concepts shared by both nodes, and the feature difference tensor represents the distribution offset of the two nodes in the multidimensional attribute space. Based on the concept intersection space and feature difference tensor, retrieve the set of defined relational predicates in the domain knowledge ontology, filter out all candidate predicates that connect any concept in the concept intersection space to other related concepts, and extract the domain and range constraint rules of the candidate predicates. The domain and value range constraint rules of the candidate predicates are instantiated and matched using the feature difference tensor. Candidate predicates that cannot accommodate the attribute offset represented by the feature difference tensor are eliminated, and predicates that can be verified by logical implication are retained as valid implicit relation predicates. The effective implicit relation predicates are used as bridging edges to connect the first node and the second node, and the predicate type and direction information of the bridging edges are written into the edge set of the intermediate semantic annotation graph to generate a standardized semantic annotation graph.

[0015] The beneficial effects of this invention are: By acquiring raw text corpora for training large language models from heterogeneous data sources, multi-granularity semantic unit segmentation is performed on the corpora to generate semantic unit sequences at the word, phrase, and sentence levels. Simultaneously, a domain knowledge ontology covering concept definitions, attribute relationships, and logical constraints is constructed. This step, through multi-granularity semantic segmentation, decomposes the raw text into multi-level semantic units, comprehensively preserving the complete semantic features of the text from micro-vocabulary to macro-sentence, overcoming the shortcomings of traditional single-granularity annotation. The concurrently constructed domain knowledge ontology forms a standardized semantic network, unifying domain concepts, attributes, and logical rules, providing a unified standard for subsequent entity extraction and semantic annotation. This improves the completeness of corpus utilization and the standardization of the annotation system from the source, solving the problems of missing shallow annotation information and disordered rules, and laying a solid foundation for the generation of high-quality structured annotated data. Secondly, by relying on multi-level semantic unit sequences and a domain knowledge ontology, the joint extraction of conceptual entities and relational predicates is achieved, constructing a preliminary semantic annotation graph with semantic conceptual entities as nodes and relational predicates as edges. This step relies on multi-granular semantic units to ensure the comprehensiveness of entity and relational information, while simultaneously constrained by the standard system of the domain knowledge ontology, completing the joint extraction of entities and relational predicates in parallel, avoiding information fragmentation and matching bias caused by step-by-step processing. The constructed preliminary semantic annotation graph carries textual semantics and logical relationships in a graph structure, transforming scattered annotation information into an interconnected knowledge network, enriching the structural and logical dimensions of the annotation data, and compensating for the lack of associated features in traditional flat annotations. This provides a basic structure with complete knowledge logic for subsequent semantic verification optimization and model training. Then, by conducting graph structure semantic verification and conflict resolution on the preliminary semantic annotation graph, the semantic confidence of nodes and edges is strengthened and logical contradictions are resolved, generating a standardized semantic annotation graph. This step conducts specialized semantic verification on the graph structure data, comprehensively checking for various problems such as node entity errors, disordered edge relationships, and logical rule conflicts, and unifying the overall knowledge logic through a conflict resolution mechanism. Simultaneously, the semantic information in the graph is enhanced with confidence, increasing the weight of effective knowledge features, eliminating contradictions and invalid information, and completing the standardization and normalization of the annotation graph. This process effectively filters annotation noise, corrects logical defects, and solves the problems of numerous errors, poor fault tolerance, and insufficient standardization in traditional annotation data, significantly improving the logic, reliability, and consistency of the annotation data. Finally, based on the standardized semantic annotation graph and combined with the objective function of the large language model training task, the vectorized encoding and alignment mapping of the annotated semantic information are completed, generating structured annotation data that can directly drive model parameter updates. This step, based on the normalized standardized semantic annotation graph, uniformly vectorizes the multi-level semantic knowledge, entity relationships, and logical constraints carried by the graph structure, transforming discrete semantic information into vector features that the model can recognize.By combining the training task objective function to complete the alignment mapping, the labeled semantic features are fully aligned with the model parameter iteration optimization direction. The generated structured labeled data can directly participate in the model training iteration, improve the effective utilization of training data, and enhance the model's ability to learn domain knowledge, semantic associations and logical rules, thereby continuously optimizing the training convergence effect and overall performance of the large language model. Attached Figure Description

[0016] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the steps of the large language model training data annotation method of the present invention; Figure 2 for Figure 1 A detailed flowchart of step S1; Figure 3 for Figure 1 A detailed flowchart of step S2. Detailed Implementation

[0017] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0018] To achieve the above objectives, please refer to Figures 1 to 3 This invention provides a method for labeling training data for a large language model, the method comprising the following steps: Step S1: Obtain the original text corpus for training the large language model from the heterogeneous data source, and perform multi-granular semantic unit segmentation on the original text corpus to generate a semantic unit sequence containing words, phrases and sentences. At the same time, construct a domain knowledge ontology library, which contains a semantic network of concept definitions, attribute relationships and logical constraints. In this embodiment of the invention, text content from multiple heterogeneous data sources is integrated across the entire domain. General online text, industry-specific literature, and scenario-based dialogue text are aggregated to form a dedicated original text corpus for training a large language model, covering multiple domain text expression paradigms and semantic logic systems. A global standardization preprocessing operation is performed on the original text corpus, unifying the global character encoding format, completing the conversion between simplified and traditional characters, standardizing full-width and half-width characters, and removing various noise characters to form a clean and regular text data stream. Based on a hierarchical syntactic analysis architecture, multi-granularity semantic unit segmentation is implemented on the clean text stream. Through a hierarchical syntactic decomposition mechanism, the boundaries of vocabulary, phrase combinations, and sentence segmentation within the text are locked. Combining text pause markers, punctuation rules, and syntactic dependencies, a complete semantic unit sequence covering the vocabulary, phrase, and sentence levels is generated layer by layer, ensuring the standardization of semantic unit hierarchical division and the integrity of semantic boundaries. Simultaneously, the construction of a domain knowledge ontology is carried out, sorting out the inherent concept system, attribute association rules and logical constraint axioms of each domain, integrating the domain concept hierarchy definition, entity attribute association relationship, and logical constraint rules between concepts to build a complete semantic network architecture. The ontology internally solidifies standardized concept semantics, attribute mapping relationship and mandatory logical constraint system, providing unified domain knowledge regulation support for subsequent text semantic extraction and annotation verification, and realizing the adaptation and connection between the original text semantic units and the domain standardized knowledge system.

[0019] Step S2: Based on the semantic unit sequence and the domain knowledge ontology, perform joint extraction of conceptual entities and relational predicates to generate a preliminary semantic annotation graph, wherein the nodes of the preliminary semantic annotation graph are semantic conceptual entities and the edges are relational predicates; In this embodiment of the invention, based on the multi-level semantic unit sequence generated in step S1 and the established domain knowledge ontology, a joint extraction operation of conceptual entities and relational predicates is initiated. The vocabulary and phrase units of the global semantic unit sequence are traversed, and combined with the standardized concept definitions built into the domain knowledge ontology, character fuzzy matching and high-dimensional semantic feature similarity operations are performed to filter text units highly adapted to the domain concept system, forming a global candidate conceptual entity set. Contextual syntax and semantic parsing are performed on the candidate conceptual entity set. Based on the syntactic dependency paths corresponding to the semantic unit sequence, the grammatical dependency relationships between entities and surrounding semantic units are decomposed, defining the grammatical function and contextual logical position of each entity in the sentence structure, generating comprehensive semantic role label data. Based on the semantic role label data, a pre-set relational predicate framework in the domain knowledge ontology is matched, and a predicate argument structure pattern matching operation is performed to mine the associated predicate units between different conceptual entities, collecting all associated content that conforms to the domain logical rules to form a complete candidate relation set. By integrating the full-domain content of candidate concept entity sets and candidate relation sets, and relying on entity co-occurrence features and relation transmission logic, an initial graph structure is constructed with concept entities as topological nodes and relation predicates as topological edges. Then, through multi-level optimization processes such as redundant semantic edge pruning, isolated entity node filtering, and semantic integrity verification, semantically repetitive and logically invalid structural units are eliminated, generating a preliminary semantic annotation graph with regular structure and valid semantics, thus completing the preliminary structured annotation of the semantic information of the training text.

[0020] Step S3: Perform graph structure semantic verification and conflict resolution on the preliminary semantic annotation graph. Based on the verification and resolution results, strengthen the semantic confidence of nodes and edges in the graph and resolve logical contradictions to generate a standardized semantic annotation graph. In this embodiment of the invention, a comprehensive semantic verification and conflict resolution process is performed on the formed preliminary semantic annotation graph. All triple units composed of entities and relations within the semantic graph are extracted. The consistency of the triples is verified against the domain-specific rules, value domain rules, relation transitivity axioms, and mutual exclusion constraints fixed in the domain knowledge ontology. Conflicting triples that violate the domain logic system are identified and aggregated. Source analysis is performed on the conflicting triples, and the original context information of the corresponding semantic unit sequences is reverse-linked to identify the semantic root causes and structural triggers of the conflicts. Semantic ambiguity disambiguation and relation predicate re-annotation are completed in conjunction with the domain concept hierarchy, generating resolution schemes suitable for various conflict scenarios. Based on the resolution schemes, the preliminary semantic annotation graph undergoes local structural reconstruction and semantic information updates, correcting erroneous entity annotations and abnormal relation edge structures, generating a logically compliant intermediate semantic annotation graph. A global semantic connectivity verification is performed on the intermediate semantic annotation graph. The path reachability probability between any entity nodes is calculated through topological path operation. For low connectivity node pairs, the implicit conceptual associations and shared attributes of the domain ontology are mined, and the appropriate implicit relation predicates are derived as bridging edges to fill in the semantic disconnected links inside the semantic graph. The semantic confidence of each node and edge is strengthened at the same time, and the global logical contradictions are completely resolved. Finally, a standardized semantic annotation graph with unified logic, complete semantics, and stable structure is generated.

[0021] Step S4: Based on the standardized semantic annotation graph, and combined with the objective function of the large language model training task, perform vectorized encoding and alignment mapping of the annotated semantic information to generate structured annotation data that can directly drive the parameter update of the large language model.

[0022] In this embodiment of the invention, a standardized semantic annotation graph, optimized globally, serves as the core data foundation. Combined with the objective function specific to the large language model training task, vectorized encoding and alignment mapping of the annotated semantic information are performed. The structured information of all entity nodes, relation edges, and semantic constraint rules within the standardized semantic annotation graph is deconstructed. Semantic features of entity concepts, relational logic features, and global topological semantic features are extracted. Based on a deep semantic encoding architecture, all annotated semantic information is vectorized in a unified dimension, transforming discrete text semantic annotation content and graph structure association content into continuous high-density semantic vector representations. According to the convergence rules and parameter update rules of the large language model training objective function, global alignment mapping operations are performed on all semantic vectors, unifying the semantic distribution range and feature dimension paradigm of the vector representations to adapt to the underlying parameter update logic of the large language model. Redundant vector feature removal, semantic feature enhancement, and global feature alignment are completed, resulting in structured annotation data that is hierarchical, semantically accurate, and structurally unified. This type of data can directly participate in the forward inference and backward gradient update of the large language model, enabling full-process driving of iterative optimization of the large language model parameters and completing the standardized annotation output of the large language model training data.

[0023] Furthermore, as an embodiment of the present invention, reference is made to... Figure 2 As shown, Figure 1 A detailed flowchart of step S1 is shown below. In this embodiment, step S1 includes the following steps: Step S11: Collect unstructured text streams from publicly available online corpora, professional literature databases, and dialogue records from various fields, and perform encoding unification and noise character filtering on the unstructured text streams to generate clean text streams; Step S12: Perform language model-dependent syntactic analysis on the purified text stream to obtain sentence-level syntax tree structure and word segmentation boundary information, and generate basic syntax parsing sequence; Step S13: Based on the basic grammar parsing sequence, perform multi-level semantic boundary detection, divide phrase segments according to grammatical component functions and pause markers, and segment complex sentences according to clause dependency relations and punctuation rules to generate a semantic unit sequence containing vocabulary, phrases and sentence levels; Step S14: Extract the concept classification system and axiom assertions from the domain expert system, and import entity relation triples from the structured knowledge graph. Integrate the concept classification system, axiom assertions and entity relation triples to construct a domain knowledge ontology. The domain knowledge ontology contains a semantic network of concept definitions, attribute relations and logical constraints.

[0024] In this embodiment of the invention, a continuous unstructured text data stream is formed by batch acquiring publicly available general text corpora from the internet, full-text texts of professional documents from various industries, and original texts of two-way dialogues between daily and professional scenarios. The text data covers four core areas: public services, industrial production, finance and economics, and education and scientific research. For the acquired unstructured text stream, full-domain character standardization encoding processing is performed to unify the character encoding format of all text, converting all full-width letters, numbers, and symbols in the text to half-width format, and simultaneously completing the full-domain conversion from traditional Chinese characters to simplified Chinese characters, achieving complete uniformity in text encoding format. After encoding processing, a multi-level noise filtering mechanism is activated, traversing the text stream content character by character, removing blank placeholder characters, garbled characters, repeated redundant characters, special decorative symbols, and meaningless concatenated characters, retaining Chinese characters, standardized punctuation, valid numbers, and common letters, completing the thorough removal of all invalid noise information, and finally generating a purified text stream with uniform format, pure content, and no redundant interference. Based on the syntactic analysis architecture of a pre-trained basic language model, this system performs full-coverage syntactic parsing operations on each sentence of the purified text stream. Through the model's built-in hierarchical word segmentation rules, it determines the word segmentation boundary positions of each character, accurately splitting independent lexical units. Simultaneously, relying on syntactic dependency operation logic, it analyzes the hierarchical relationships of all grammatical components within a single sentence, constructing a complete tree-like grammatical structure for each sentence. It identifies the boundaries and corresponding levels of subject, predicate, object, attributive, adverbial, and complement, generating basic grammatical parsing sequences in batches, each containing a complete sentence grammatical tree structure and precise word segmentation boundary markers. For the generated basic grammatical parsing sequences, a multi-level semantic boundary detection mechanism is activated. Combining the functional attributes of grammatical components with the text's built-in pause markers, it divides the text into various phrase segments, such as noun phrases, verb phrases, adjective phrases, and prepositional phrases. Pause markers include commas, semicolons, and other sentence-separating symbols. Based on syntactic dependency and association rules, this method determines the parallel, adversative, causal, and progressive dependency relationships between clauses in the text. It also segments complex sentences using punctuation marks such as periods, question marks, and exclamation marks, breaking down multiple complex sentences into independent semantic subunits. The method progressively divides the semantic structure into three levels: vocabulary, phrases, and sentences, generating a multi-dimensional semantic unit sequence with clear hierarchy, precise boundaries, and logical correspondence. Furthermore, it integrates standardized concept classification systems from various domains with industry-fixed logical axioms and assertions, extracting triplet relationships between entities, entities and attributes, and attributes from the structured knowledge network. This three types of semantic knowledge information are deeply fused and spliced ​​together, clarifying the hierarchical relationships and logical constraints of each knowledge unit. A complete domain-specific semantic network is constructed, resulting in the creation of a domain-specific ontology. This ontology internally solidifies domain-specific concept definitions, fixed attribute relationships, and mandatory logical constraints, providing standardized knowledge references for subsequent text semantic annotation.

[0025] Furthermore, after step S1 and before step S2, the method further includes a step of performing deep semantic role and reference resolution on the semantic unit sequence, specifically: Predicate-argument structure analysis is performed on the semantic unit sequence to identify the core predicate in each sentence and its associated agent, patient, time, and place arguments, generating sentence-level semantic role framework data; Based on the sentence-level semantic role framework data, cross-sentence reference chain tracing is performed to identify and associate pronouns, zero pronouns, or synonyms pointing to the same entity in different sentences, and generate document-level entity coreference resolution chains. Based on the document-level entity coreference resolution chain, semantic information is fused and replaced in the semantic unit sequence involving entity references, and the references are uniformly replaced with the corresponding entity concepts to generate the resolved semantic unit sequence. From the resolved semantic unit sequence, sentence pairs with logical or temporal relationships are extracted, and logical connectors and temporal markers are added based on the relationship type to generate a semantic unit sequence with enhanced semantic coherence. The semantic unit sequence that enhances semantic coherence is used as the semantic unit sequence in the subsequent step S2 for the joint extraction of conceptual entities and relational predicates.

[0026] In this embodiment of the invention, after completing the construction of the semantic unit sequence, deep semantic role analysis and entity reference resolution are carried out. Relying on the predicate argument analysis operation module of the language model, the core semantic structure of the global semantic unit sequence is decomposed sentence by sentence. The core predicates that undertake the functions of action, state and judgment within a single sentence are accurately located. All related semantic components are traversed and matched around the core predicates. The four types of core arguments corresponding to the predicates are identified and labeled one by one: the agent of action initiation, the recipient of action, the time node of action occurrence, and the location of action occurrence. At the same time, the four types of auxiliary arguments are subdivided into tools, methods, causes and results. The structured sentence-level semantic role framework data corresponding to each sentence of text is fully constructed. Based on the full-domain sentence-level semantic role framework data, a cross-sentence entity association tracking operation mechanism is initiated. Following the semantic continuity logic of the text context, multiple consecutive sentences of text are traversed segment by segment, tracking personal pronouns, demonstrative pronouns, zero-pronoun ellipsis referential structures, and synonymous replacement words appearing in the text. Through semantic similarity operations and context matching operations, the real entity objects corresponding to various referential contents in different sentences are determined. All fragmented referential units pointing to the same entity are linked and bound together, forming a document-level entity co-reference resolution association chain that runs through the complete text paragraph. Based on the formed document-level entity co-reference resolution chain, full-domain semantic replacement and information fusion processing is performed on the original semantic unit sequence. All semantic fragments of pronoun reference, zero reference, and synonym reference in the sequence are locked, fragmented referential expressions are deleted, and uniformly replaced with standardized entity concept names corresponding to the references. Missing entity semantic information in the referential fragments is supplemented, eliminating textual semantic ambiguity and referential vagueness, generating a resolution semantic unit sequence with unified entity information and accurate semantic expression. Global semantic association mining is performed on the semantic unit sequence after resolution. The inherent association attributes of adjacent and spaced text units are compared sentence by sentence. Sentence pairs with causal, adversative, parallel, progressive, hypothetical, and conditional logical associations, as well as sentence pairs with sequential, simultaneous, and discontinuous temporal associations, are precisely selected. Standardized logical connection markers and temporal positioning markers are matched to different association types and embedded into the connection positions of the corresponding sentence pairs. This completes the implicit semantic association information in the text, enhances the overall semantic coherence and logical hierarchy of the text, and generates an enhanced semantic unit sequence with complete semantic information and clear association markers. The final semantic unit sequence after referential resolution and semantic enhancement is directly used as the core input data for subsequent concept entity extraction and relational predicate extraction. This provides standardized semantic foundational data support for the accurate annotation of large language model training data, ensuring the accuracy and completeness of subsequent joint entity and relation extraction operations.

[0027] Furthermore, the cross-sentence reference chain tracking based on the sentence-level semantic role framework data includes the following steps: Extract all arguments labeled as entities from the sentence-level semantic role framework data, collect the textual description, sentence position and semantic role of each entity, and generate a candidate entity mention set; Clustering analysis based on strings, semantics, and context is performed on the candidate entity mention set to calculate the comprehensive correlation between any two entity mentions in terms of string similarity, semantic vector distance, and context window co-occurrence features; An entity mention association graph is constructed based on the comprehensive relevance. In the graph, nodes are entity mentions and the weight of the edges is the comprehensive relevance. A graph clustering algorithm is used to segment the association graph and aggregate mentions with high relevance into the same category. Assign a globally unique core entity identifier to each category formed by mention aggregation, and record the original location and text of all mentions under that category to generate a preliminary entity-mention mapping table; Traverse the preliminary entity-mention mapping table, and for each core entity, examine the order and context of all its mentions in the original text, identify and mark explicit referential relationships, and finally generate a document-level entity coreference resolution chain.

[0028] In this embodiment of the invention, after completing the construction of sentence-level semantic role framework data, a cross-sentence reference chain tracing full-domain processing flow is initiated. Based on the established sentence-level semantic role framework data, the argument annotation content corresponding to all sentences is traversed across the entire domain. All argument units with completed entity attribute annotations are selected, and the original textual expression content corresponding to each entity argument, the sentence-level position code of the complete text paragraph containing the entity, and the semantic role tags of the entity (agent, patient, time, and location) are extracted one by one. The three types of core feature information of all entity arguments are integrated to construct a candidate entity mention set covering all entity content in the entire text. The original feature information of each entity mention is retained within the set, ensuring no text entity units are omitted. For the constructed candidate entity mention set, multi-dimensional fusion clustering analysis is performed. For any two different sets of entity mention units within the set, feature quantification calculations are completed from three dimensions: text string, semantic vector features, and context window co-occurrence features. The comprehensive association value of the two sets of entity mentions is obtained through the integration calculation of multi-dimensional feature values, thereby defining the semantic affinity between different entity mentions. A structured entity mention association graph is constructed based on the comprehensive association values ​​of entity mentions across the entire domain. Each independent node within the association graph corresponds to a single entity mention unit within the candidate entity mention set. The weight of the edge connecting any two nodes strictly corresponds to the comprehensive association degree calculated from the two sets of entity mentions. The complete association graph is segmented into blocks using graph clustering logic. Nodes are aggregated based on the differences in association weight values, grouping entity mention nodes with high association weights into the same category, thus achieving batch classification of related entity mentions. For each entity mention group formed after graph clustering, a unique core entity identifier code is configured, using a fixed-length character-number combination to distinguish all different entities within the document. The original text content, text location code, and semantic role features corresponding to all entity mentions within each group are recorded simultaneously. All association information is organized to generate a preliminary entity-mention mapping table with a complete structure and fixed correspondence, ensuring a one-to-one correspondence between entities and mention content. The system iterates through all entity categories in the initial entity-mention mapping table line by line. For each core entity in each category, it retrieves the order in which all entity mentions within that category are arranged in the original cleaned text stream. It then extracts the contextual semantic features of each mention unit, compares the commonalities and related features of the semantic expressions of different mention units, and mines the corresponding relationships between pronouns and entity nouns, synonyms and original entities, and omitted references and complete entities within the text paragraph. This completes the annotation and binding of global reference relationships, connects all homologous entity mention units, and generates a document-level entity coreference resolution chain that is structurally complete, has a continuous link, and has clear correspondences.

[0029] Furthermore, calculating the comprehensive relevance of any two entity mentions based on string similarity, semantic vector distance, and context window co-occurrence features includes the following steps: For the original text strings mentioned by two entities, calculate their edit distance and the length of the longest common substring, normalize the two and then weight them to generate string similarity; Input the texts mentioned by the two entities into a pre-trained semantic encoding model to obtain their corresponding semantic vector representations, calculate the cosine distance between the two semantic vectors, and generate the semantic vector distance. Centered on the positions of the two entity mentions in the text, expand the context window of a preset size outwards, extract the set of all words in the two windows, calculate the Jaccard similarity coefficient of the two sets, and generate context window co-occurrence features; Based on predefined fusion weights, the string similarity, the complement of the semantic vector distance, and the co-occurrence features of the context window are linearly weighted and summed to generate a comprehensive correlation degree, wherein the complement of the semantic vector distance is the difference between 1 and the semantic vector distance.

[0030] In this embodiment of the invention, a comprehensive correlation standardization calculation process involving multi-dimensional feature fusion is executed during the correlation calculation stage of candidate entity mention set clustering analysis. For any two sets of original text strings of entity mentions, the character composition structure and arrangement order are compared character by character, the total number of operation steps for character replacement, deletion, and insertion is counted, and the edit distance value of the two sets of strings is obtained. At the same time, continuous overlapping character segments of the two sets of strings are matched, the number of characters in the longest overlapping segment is counted, and the length of the longest common substring is determined. Interval normalization scaling processing is performed on the edit distance value and the length of the longest common substring value respectively, mapping the two types of values ​​to a value range of zero to one. A fixed weight coefficient is set to complete the weighted fusion calculation of the two types of normalized values, generating a stable entity mention string similarity value. The complete text content corresponding to the two sets of entity mentions is input into a multi-layer bidirectional semantic coding model. The model's built-in contextual semantic coding layer extracts text features layer by layer, and pre- and post-semantic information is superimposed to achieve feature fusion, outputting a fixed-dimensional high-density semantic vector representation, corresponding to the global semantic features of the two sets of entity mentions. The cosine distance between the two sets of semantic vectors is calculated using the vector space angle calculation formula to quantify the semantic differences between the two sets of entity mentions, generating a standard semantic vector distance value. Using the text positions of the two sets of entity mentions as the center, a fixed number of bidirectional contextual windows are uniformly set, extending fixed character intervals in both the pre- and post-text directions. All text vocabulary units within the window coverage area are extracted, and punctuation marks are removed to form two independent window vocabulary sets. The number of overlapping words in the two vocabulary sets is counted against the total number of words. The Jaccard similarity coefficient is calculated using the ratio of overlapping words to the total number of words, and this coefficient serves as the co-occurrence feature value of the context windows for the two sets of entity mentions. A fixed fusion weight ratio is set for the three types of features, and the sum of the weight values ​​is kept to be one. The difference between the value one and the semantic vector distance is taken to obtain the semantic similarity complement. The string similarity value, the semantic vector distance complement, and the context window co-occurrence feature value are multiplied by their respective weight values ​​and then accumulated to complete the linear weighted summation of multi-dimensional features. Finally, a comprehensive relevance value that can fully represent the entity mention association relationship is generated, providing accurate quantitative numerical support for entity mention clustering and coreference link construction.

[0031] Furthermore, the generation of document-level entity coreference resolution chains includes the following steps: For each core entity in the entity-mention mapping table, sort all its mentions in the order in which they appear in the original text to generate a temporal mention sequence for that entity. The chronological mention sequence is traversed sequentially. For each mention that is later in the sequence, the nearest preceding mention that is different from the text string of that mention is searched ahead. Determine whether there is an explicit referential indicator in the sentence's grammatical structure between the preceding mention and the current mention, or whether the current mention is a pronoun or a zero pronoun, in order to generate judgment conditions; If the judgment condition is met, a referential link is established between the preceding mention and the current mention, and the referential type and confidence level are recorded; After traversing and establishing links for all core entities, all referential links are integrated to generate a structured document-level entity core reference resolution chain. The document-level entity core reference resolution chain is grouped by core entities and clearly records the referential relationship paths between all mentions within the group.

[0032] In this embodiment of the invention, based on the initial entity-mention mapping table, a refined construction process of document-level entity coreference resolution chains is carried out. For each group of core entities within the mapping table, the original text position codes corresponding to all entity mentions within the group are retrieved. According to the text order rules corresponding to the position codes, all entity mentions are sorted in ascending order, forming a single complete and temporally ordered entity temporal mention sequence, completely preserving all occurrences of the same core entity in the full text. The formed temporal mention sequence is then traversed position by position, strictly following the traversal rule from front to back. Entity mentions at each subsequent position in the sequence are locked sequentially. Using the text position of the current subsequent mention as the search endpoint, all preceding mentions are traversed in reverse order. Preceding mentions with character structure differences in the text strings within the temporal interval are searched, and the homologous preceding mentions with the smallest temporal distance are locked, completing the pairing and association of preceding and following mentions. The grammatical structure and textual morphology of paired preceding and following mentions are validated. The complete grammatical structure of the sentences containing both sets of mentions is analyzed segment by segment. The existence of specific referential indicator words within the connection intervals of the two sets of mentions is investigated. Referential indicator words include related marker words within the text used to connect the semantic subjects before and after the mentions. Simultaneously, the textual morphological attributes of the current following mention are validated to determine whether it belongs to a pronoun form or a zero-pronoun omitting form. The structural and morphological validation results are integrated to form standardized referential relationship determination conditions. When the current following mention exhibits a pronoun form, a zero-pronoun form, or a referential indicator word exists within the connection interval, a legitimate co-reference relationship between the two sets of mentions is confirmed. A fixed bidirectional referential link structure is established between the two sets of mentions, and the referential type identifier corresponding to the current referential behavior is simultaneously marked. Referential types include four categories: noun substitution referential, pronoun referential, zero referential, and paraphrased referential. Based on the semantic overlap and positional distance between the preceding and following mentions, a fixed confidence value for the corresponding referential link is generated. After completing the temporal traversal, pairing retrieval, and link building of all core entities in the entire domain, we integrate all generated referential link structures in the full text. Taking each core entity as an independent grouping unit, we collect all the temporal arrangement relationships and referential link paths mentioned within each group, sort out all the hierarchical association links mentioned within the group, and organize them into a structured document-level entity coreference resolution chain with clear grouping, complete links, and complete attributes, providing a standardized entity association basis for subsequent semantic graph construction.

[0033] Furthermore, as an embodiment of the present invention, reference is made to... Figure 3 As shown, Figure 1 A detailed flowchart of step S2 is shown below. In this embodiment, step S2 includes the following steps: Step S21: Extract candidate words and phrase combinations from the semantic unit sequence, perform fuzzy string matching and semantic similarity calculation based on the concept definitions in the domain knowledge ontology, and generate a candidate concept entity set; Step S22: Perform context semantic role labeling on the candidate concept entity set, analyze the syntactic function and logical position of the concept entity in the context based on the syntactic dependency path of the semantic unit sequence, and generate semantic role label data; Step S23: Based on the semantic role tag data, and combined with the predefined relation predicate framework in the domain knowledge ontology, perform pattern matching of the predicate argument structure, extract candidate relation predicates connecting concept entities, and generate a candidate relation set; Step S24: Merge the candidate concept entity set and the candidate relation set, and construct an initial semantic graph structure with entities as nodes and relations as edges based on entity co-occurrence and relation transitivity; Step S25: Perform redundant edge pruning and isolated node filtering on the initial semantic graph structure, and evaluate and screen the necessity of nodes and edges based on the graph structure density and semantic integrity to generate a preliminary semantic annotation graph.

[0034] In this embodiment of the invention, after completing the document-level entity coreference resolution chain construction, the training text semantic icon construction process is initiated. A global scan of the semantic unit sequence enhancing semantic coherence is performed, extracting all independent lexical units and multi-word phrase combination units within each segment of the sequence to form a global candidate text unit set. Based on the standardized concept definitions stored in the domain knowledge ontology, character-level fuzzy matching and vector-level semantic similarity operations are performed on all units within the candidate text unit set. The character overlap features and semantic feature differences between the candidate text units and the ontology concepts are compared, and candidate units that meet the matching threshold are collected to form a candidate concept entity set covering all valid semantic subjects across the entire domain. For each entity unit within the candidate conceptual entity set, its corresponding contextual text interval in the original semantic unit sequence is matched one by one. A comprehensive semantic role labeling operation is performed. Combined with the syntactic dependency paths generated by previous syntactic analysis, the subject-predicate, verb-object, and modifier-complement dependency relationships between conceptual entities and surrounding words are decomposed. The constituent attributes of conceptual entities in the grammatical structure of a single sentence are defined, and the semantic logical function undertaken by the entity in the context is determined. Different logical positions such as subject-object, modifier-qualifier, spatiotemporal constraint, and state description are distinguished, generating standardized semantic role label data for each candidate conceptual entity. Based on the full-domain semantic role label data, the pre-defined relational predicate framework system within the domain knowledge ontology is matched. The fixed predicate adaptation rules and argument matching logic within the framework are invoked, and pattern matching operations of the predicate argument structure are performed. Action-type, association-type, attribute-type, and logical-type predicate units that can connect two or more groups of conceptual entities are selected. All predicate content that conforms to the structure matching rules is collected, forming a candidate relation set covering the full-domain semantic relationships of the text. This process integrates the effective data content of candidate concept entity sets and candidate relation sets. Based on the co-occurrence rules of entities within the text and the semantic relation transmission rules, it identifies the direct and indirect connections between entities. All candidate concept entities are defined as independent nodes in the graph structure, and all candidate relation predicates are defined as structured edges connecting corresponding nodes, thus constructing an initial semantic graph structure with a basic topological form. Refined optimization is then performed on the initial semantic graph structure. All connecting edges within the graph are traversed, and the semantic validity of the corresponding relational relationships is verified. Redundant connecting edges with semantic repetition, logical conflicts, or no actual semantic value are removed. All nodes within the graph are traversed, and isolated nodes without any connecting edges are selected and removed. Combining the overall semantic coverage of the text with the node distribution density of the graph structure, the semantic necessity of each remaining node and connecting edge is evaluated. Core nodes and core connecting edges that support the complete semantic logic of the text are retained, while secondary structural units that cannot supplement effective semantic information are removed. Finally, a preliminary semantic annotation graph with a concise structure, logical coherence, and complete semantics is generated, achieving the structured semantic annotation output of the large language model training text.

[0035] Furthermore, step S3 includes the following steps: Step S31: Extract triples composed of all relation predicates from the preliminary semantic annotation graph, and perform logical consistency verification based on the attribute domain, value domain and relation transitivity axioms defined in the domain knowledge ontology to generate a set of logically conflicting triples. Step S32: Perform conflict root cause analysis on the set of logical conflict triples, trace the original context of the entity nodes and relation predicates involved in the conflict triples in the semantic unit sequence, and generate conflict context tracing data. Step S33: Based on the conflict context tracing data, and combined with the concept hierarchy and relation constraints in the domain knowledge ontology, perform semantic disambiguation and relation predicate re-annotation on the conflict triples to generate a set of conflict resolution schemes; Step S34: Based on the conflict resolution scheme set, update the semantic information and partially reconstruct the graph structure of the corresponding nodes and edges in the preliminary semantic annotation graph to generate an intermediate semantic annotation graph; Step S35: Perform a global semantic flow connectivity test on the intermediate semantic annotation graph, calculate the probability that any two entity nodes in the graph can be reached through a relational path, supplement the low reachability node pairs with semantic bridging edges, and finally generate a standardized semantic annotation graph.

[0036] In this embodiment of the invention, after the initial semantic annotation graph is constructed, the semantic graph logic verification and structural optimization process in step S3 is initiated. The combined structure of all entity nodes and relation edges within the initial semantic annotation graph is fully decomposed, and all standardized triplet units of entity-relation-entity are extracted in batches to complete the full triplet aggregation process. All logical regulations fixed within the domain knowledge ontology, such as attribute domain constraints, attribute value domain constraints, relation transitivity axioms, and relation mutual exclusion axioms, are invoked. A comprehensive logical consistency verification is performed on each aggregated triplet, matching whether the triplet entity type conforms to the domain and value domain specifications of the corresponding relation, verifying whether the triplet relation violates the transitivity, mutual exclusion, and dependency logic rules of the ontology, and uniformly aggregating all abnormal triplets that violate standardized logical regulations to form a complete set of logically conflicting triplets. For each abnormal triplet within the set of logically conflicting triplets, a multi-level conflict root cause analysis is conducted. This identifies the two types of entity nodes and their corresponding relational predicates within the conflicting triplet, mapping them back to the preprocessed semantic unit sequence. The original text context intervals corresponding to each semantic unit are located, and all original semantic information, including syntactic structure, semantic roles, entity referential links, and logical association markers, is extracted from these intervals. All source information is then organized into structured conflict context source data, clarifying the causes of various logical conflicts. Based on this complete conflict context source data, combined with the concept hierarchy system and relational constraint rules of the domain knowledge ontology, semantic ambiguity resolution and relational renaming are performed on the conflicting triplets. For entity concept polysemy, the uniquely suitable concept definition is locked by matching the context. For relational predicate mismatch, hierarchical disorder, and logical contradictions, standard relational predicates that conform to ontology rules and textual semantics are replaced, generating a set of structured conflict resolution schemes suitable for different conflict types in batches. Based on the global regulations of the conflict resolution scheme set, the initial semantic annotation graph undergoes fixed-point semantic information updates and local structural reconstruction. This involves replacing the entity concept annotations of conflict nodes, changing the relational predicates of conflict edges, deleting erroneous topological structures that violate logical rules, and completing standard association structures that conform to ontology constraints. This completes the correction and optimization of the local semantic graph structure, generating a logically compliant intermediate semantic annotation graph. The optimized intermediate semantic annotation graph is then subjected to a global semantic flow connectivity verification operation. This involves traversing all entity node combinations within the graph, counting the number of global connected paths between any two pairs of nodes through relational path topology operations, calculating the path reachability probability between nodes based on path features, relational weights, and path length parameters, and filtering out node pairs with low reachability probabilities. For these node pairs, semantic gap filling is performed, supplementing standardized semantic bridge edges by matching implicit semantic associations in the domain. This completes the global connectivity optimization of the graph structure, generating a standardized semantic annotation graph that is structurally compliant, logically unified, and semantically coherent.

[0037] Furthermore, step S35 includes the following steps: Random walk sampling is performed on the intermediate semantic annotation graph to generate semantic walk paths between multiple entity nodes, and the sequence and type of relation predicates on each path are extracted to generate path semantic pattern data; Based on the path semantic pattern data, a path semantic representation learning is performed using a graph neural network model, encoding each path into a fixed-dimensional semantic vector to generate a set of path semantic vectors. Calculate the semantic distance between any two vectors in the path semantic vector set, and construct a semantic similarity matrix between entity nodes based on the semantic distance; Based on the semantic similarity matrix, identify node pairs with semantic similarity lower than a preset connectivity threshold and no direct or indirect connection in the graph structure, and generate a list of node pairs to be bridged. Based on the list of nodes to be bridged, query whether there are implicit superior concepts or shared attributes between the corresponding concepts of the node pairs in the domain knowledge ontology. Based on the query results, derive reasonable implicit relation predicates and add the implicit relation predicates as bridging edges to the intermediate semantic annotation graph to generate a standardized semantic annotation graph.

[0038] In this embodiment of the invention, after the intermediate semantic annotation graph is formed, a semantic graph depth optimization and implicit relationship mining process is initiated. Multi-frequency random walk sampling is performed on the global node topology of the intermediate semantic annotation graph. Starting with each entity node in the graph as a sampling point, random jumps are made along the node connection paths to generate a sufficient number of entity node semantic walk paths with no path repetition. The topological composition of each walk path is disassembled segment by segment, preserving the complete sequence of all entity nodes traversed by the path. Simultaneously, the predicate sequences and relation type attributes of all relation edges within the path are extracted, and the structural and semantic features of all paths are collected to form a fully covered path semantic pattern data. Based on the formed path semantic pattern data, path semantic representation learning is carried out using the hierarchical feature learning architecture of a graph neural network. Through the network's built-in graph convolution operation, entity features, relation features, and topological association features within the path are extracted layer by layer, completing the deep fusion of multi-dimensional features of a single path. Each differentiated semantic path is uniformly encoded into a fixed-dimensional high-density semantic vector, eliminating representational bias caused by differences in path length and structure. All path vectors are collected to form a complete set of path semantic vectors. Pairwise similarity calculations are performed on all vector units within the path semantic vector set. The spatial semantic distance between any two sets of path semantic vectors is calculated using a high-dimensional vector space distance formula. The magnitude of the distance corresponds to the degree of semantic difference in the paths. Based on the global semantic distance values, the association features of entity nodes are quantitatively statistically analyzed, and a refined semantic similarity matrix covering all entity nodes in the graph is generated. Node connectivity is screened based on the global semantic similarity matrix. A fixed node semantic connectivity threshold is set, and the similarity values ​​of each node pair in the matrix are compared. Isolated node pairs with similarity values ​​below the connectivity threshold and without direct connecting edges or indirect transmission paths in the topology are selected. All abnormal node information is then organized to generate a complete list of node pairs to be bridged. Each bridging node pair is subjected to domain knowledge matching and retrieval. The concept hierarchy tree and attribute association system within the domain knowledge ontology are retrieved to verify the superior concepts, common subordinate attributes, and implicit domain association rules of the core concepts corresponding to the two sets of nodes. Based on the concept hierarchy subordinate logic and attribute sharing features, standardized implicit relationship predicates between nodes are deduced. The derived compliant implicit relationship predicates are set as fixed bridging edges and added to the corresponding node gaps in the intermediate semantic annotation graph to complete the implicit semantic associations of the graph structure. Finally, a standardized semantic annotation graph with full domain semantic connectivity, complete explicit and implicit relationships, and uniform annotation accuracy is generated, providing the final structured semantic data support for high-precision annotation of large language model training data.

[0039] Furthermore, the step of deriving a reasonable implicit relation predicate based on the query results and adding the implicit relation predicate as a bridging edge to the intermediate semantic annotation graph includes the following steps: Extract the entity concept identifiers corresponding to the first node and the second node from the list of nodes to be bridged, and query the domain knowledge ontology based on the entity concept identifiers to obtain the parent concept set and attribute feature vector to which the first node belongs, and the parent concept set and attribute feature vector to which the second node belongs. Based on the parent concept set and attribute feature vector of the first node, and the parent concept set and attribute feature vector of the second node, a concept intersection space and a feature difference tensor are constructed. The concept intersection space contains the superior concepts shared by both nodes, and the feature difference tensor represents the distribution offset of the two nodes in the multidimensional attribute space. Based on the concept intersection space and feature difference tensor, retrieve the set of defined relational predicates in the domain knowledge ontology, filter out all candidate predicates that connect any concept in the concept intersection space to other related concepts, and extract the domain and range constraint rules of the candidate predicates. The domain and value range constraint rules of the candidate predicates are instantiated and matched using the feature difference tensor. Candidate predicates that cannot accommodate the attribute offset represented by the feature difference tensor are eliminated, and predicates that can be verified by logical implication are retained as valid implicit relation predicates. The effective implicit relation predicates are used as bridging edges to connect the first node and the second node, and the predicate type and direction information of the bridging edges are written into the edge set of the intermediate semantic annotation graph to generate a standardized semantic annotation graph.

[0040] In this embodiment of the invention, after generating the list of nodes to be bridged, a complete processing flow of implicit relation predicate inference and semantic graph bridging optimization is initiated. The unique entity concept identifiers corresponding to the first and second nodes in each pair of nodes are extracted sequentially from the list of nodes to be bridged. Based on the entity concept identifiers, a targeted traversal retrieval of the domain knowledge ontology is completed. The entity concept entries corresponding to the identifiers are matched, and all hierarchical parent concept contents to which the first node belongs are comprehensively captured and integrated to form a structured set of parent concepts. Simultaneously, feature parameters of all attribute dimensions of the entity are extracted, and the structured construction of multi-dimensional attribute feature vectors is completed. Following the same retrieval and feature extraction process, the set of parent concepts and multi-dimensional attribute feature vectors corresponding to the second node are completely obtained. The two sets and feature vectors completely preserve the domain affiliation level and attribute distribution characteristics of the entity, providing basic data support for subsequent concept association operations and feature comparison operations. Based on the parent concept sets and attribute feature vectors corresponding to two sets of nodes, spatial structure construction and feature tensor operations are performed. A global comparison operation is conducted on the two sets of parent concept sets to collect overlapping higher-level concept units. All overlapping higher-level concept units together form an entity concept intersection space, which can represent the common belonging category of the two sets of entity nodes in the domain hierarchy. Difference operations are performed on the multidimensional attribute feature vectors of the two sets of nodes, calculating the difference values ​​of corresponding attribute parameters dimension by dimension. The difference parameters of all dimensions are arranged into tensors according to attribute arrangement rules to construct a multidimensional feature difference tensor. The feature difference tensor can completely represent the numerical distribution offset and attribute feature differentiation state of the two sets of entity nodes in the global attribute space. After completing the construction of the space and tensor structure, based on the established concept intersection space, the global standardized relation predicate set stored in the domain knowledge ontology is retrieved. All relation predicate units that can realize the connection between the superordinate concepts in the concept intersection space and other related concepts in the domain are traversed and collected, and a global candidate predicate set is formed. The regulatory attributes of all predicate units in the candidate predicate set are decomposed one by one, and the domain constraint rules and value range constraint rules corresponding to each relation predicate are fully extracted to clarify the entity concept types, attribute value ranges and hierarchical association ranges that different predicates can adapt to. Based on the pre-constructed feature difference tensor, the domain and value range constraint rules of all candidate predicates are instantiated and matched one by one. The multi-dimensional attribute offsets contained in the feature difference tensor are mapped one by one to the constraint rule intervals of the candidate predicates. The adaptability of the rule intervals of the candidate predicates to the attribute offsets is verified. Invalid candidate predicates that cannot be covered by the feature difference tensor offset parameters or do not meet the logical adaptation conditions are filtered out. The remaining candidate predicates are subjected to global logical implication verification. The fit between the predicate logic regulation and entity attribute features and domain hierarchical relationships is compared. Predicate units that fully fit the domain logic system and entity feature differences are retained. Such predicate units are defined as valid implicit relation predicates.The effective implicit relation predicates obtained from the full-domain verification and screening are defined as standardized bridging edge structures. The topological connection relationship between the first node and the second node is established. The unidirectional association direction or bidirectional association attribute of the bridging edge is determined strictly according to the predicate direction regulation of the domain knowledge ontology. The implicit predicate type identifier, association start node, association end node, and semantic constraint attribute corresponding to the bridging edge are fully recorded. The structured information of all bridging edges is uniformly entered into the edge set structure of the intermediate semantic annotation graph. The topological structure of the semantic graph is supplemented, updated and partially reconstructed. The implicit semantic association links between entity nodes are completed, the node isolation and semantic disconnection problems within the semantic graph are eliminated, the integrity of entity association and the coherence of domain logic are optimized, and finally the full-domain structure optimization and semantic verification are completed, generating a standardized semantic annotation graph that is fully adapted to the annotation requirements of large language model training data.

[0041] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A method for labeling training data for a large language model, characterized in that, Includes the following steps: Step S1: Obtain the original text corpus for training the large language model from the heterogeneous data source, and perform multi-granular semantic unit segmentation on the original text corpus to generate a semantic unit sequence containing words, phrases and sentences. At the same time, construct a domain knowledge ontology library, which contains a semantic network of concept definitions, attribute relationships and logical constraints. Step S2: Based on the semantic unit sequence and the domain knowledge ontology, perform joint extraction of conceptual entities and relational predicates to generate a preliminary semantic annotation graph, wherein the nodes of the preliminary semantic annotation graph are semantic conceptual entities and the edges are relational predicates; Step S3: Perform graph structure semantic verification and conflict resolution on the preliminary semantic annotation graph. Based on the verification and resolution results, strengthen the semantic confidence of nodes and edges in the graph and resolve logical contradictions to generate a standardized semantic annotation graph. Step S4: Based on the standardized semantic annotation graph, and combined with the objective function of the large language model training task, perform vectorized encoding and alignment mapping of the annotated semantic information to generate structured annotation data that can directly drive the parameter update of the large language model.

2. The method according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Collect unstructured text streams from publicly available online corpora, professional literature databases, and dialogue records from various fields, and perform encoding unification and noise character filtering on the unstructured text streams to generate clean text streams; Step S12: Perform language model-dependent syntactic analysis on the purified text stream to obtain sentence-level syntax tree structure and word segmentation boundary information, and generate basic syntax parsing sequence; Step S13: Based on the basic grammar parsing sequence, perform multi-level semantic boundary detection, divide phrase segments according to grammatical component functions and pause markers, and segment complex sentences according to clause dependency relations and punctuation rules to generate a semantic unit sequence containing vocabulary, phrases and sentence levels; Step S14: Extract the concept classification system and axiom assertions from the domain expert system, and import entity relation triples from the structured knowledge graph. Integrate the concept classification system, axiom assertions and entity relation triples to construct a domain knowledge ontology. The domain knowledge ontology contains a semantic network of concept definitions, attribute relations and logical constraints.

3. The method according to claim 2, characterized in that, After step S1 and before step S2, the method further includes a step of deep semantic role and reference resolution of the semantic unit sequence, specifically: Predicate-argument structure analysis is performed on the semantic unit sequence to identify the core predicate in each sentence and its associated agent, patient, time, and place arguments, generating sentence-level semantic role framework data; Based on the sentence-level semantic role framework data, cross-sentence reference chain tracing is performed to identify and associate pronouns, zero pronouns, or synonyms pointing to the same entity in different sentences, and generate document-level entity coreference resolution chains. Based on the document-level entity coreference resolution chain, semantic information is fused and replaced in the semantic unit sequence involving entity references, and the references are uniformly replaced with the corresponding entity concepts to generate the resolved semantic unit sequence. From the resolved semantic unit sequence, sentence pairs with logical or temporal relationships are extracted, and logical connectors and temporal markers are added based on the relationship type to generate a semantic unit sequence with enhanced semantic coherence. The semantic unit sequence that enhances semantic coherence is used as the semantic unit sequence in the subsequent step S2 for the joint extraction of conceptual entities and relational predicates.

4. The method according to claim 3, characterized in that, The cross-sentence reference chain tracking based on the sentence-level semantic role framework data includes the following steps: Extract all arguments labeled as entities from the sentence-level semantic role framework data, collect the textual description, sentence position and semantic role of each entity, and generate a candidate entity mention set; Clustering analysis based on strings, semantics, and context is performed on the candidate entity mention set to calculate the comprehensive correlation between any two entity mentions in terms of string similarity, semantic vector distance, and context window co-occurrence features; An entity mention association graph is constructed based on the comprehensive relevance. In the graph, nodes are entity mentions and the weight of the edges is the comprehensive relevance. A graph clustering algorithm is used to segment the association graph and aggregate mentions with high relevance into the same category. Assign a globally unique core entity identifier to each category formed by mention aggregation, and record the original location and text of all mentions under that category to generate a preliminary entity-mention mapping table; Traverse the preliminary entity-mention mapping table, and for each core entity, examine the order and context of all its mentions in the original text, identify and mark explicit referential relationships, and finally generate a document-level entity coreference resolution chain.

5. The method according to claim 4, characterized in that, The calculation of the comprehensive relevance of any two entity mentions based on string similarity, semantic vector distance, and context window co-occurrence features includes the following steps: For the original text strings mentioned by two entities, calculate their edit distance and the length of the longest common substring, normalize the two and then weight them to generate string similarity; Input the texts mentioned by the two entities into a pre-trained semantic encoding model to obtain their corresponding semantic vector representations, calculate the cosine distance between the two semantic vectors, and generate the semantic vector distance. Centered on the positions of the two entity mentions in the text, expand the context window of a preset size outwards, extract the set of all words in the two windows, calculate the Jaccard similarity coefficient of the two sets, and generate context window co-occurrence features; Based on predefined fusion weights, the string similarity, the complement of the semantic vector distance, and the co-occurrence features of the context window are linearly weighted and summed to generate a comprehensive correlation degree, wherein the complement of the semantic vector distance is the difference between 1 and the semantic vector distance.

6. The method according to claim 4, characterized in that, The process of generating document-level entity coreference resolution chains includes the following steps: For each core entity in the entity-mention mapping table, sort all its mentions in the order in which they appear in the original text to generate a temporal mention sequence for that entity. The chronological mention sequence is traversed sequentially. For each mention that is later in the sequence, the nearest preceding mention that is different from the text string of that mention is searched ahead. Determine whether there is an explicit referential indicator in the sentence's grammatical structure between the preceding mention and the current mention, or whether the current mention is a pronoun or a zero pronoun, in order to generate judgment conditions; If the judgment condition is met, a referential link is established between the preceding mention and the current mention, and the referential type and confidence level are recorded; After traversing and establishing links for all core entities, all referential links are integrated to generate a structured document-level entity core reference resolution chain. The document-level entity core reference resolution chain is grouped by core entities and clearly records the referential relationship paths between all mentions within the group.

7. The method according to claim 3, characterized in that, Step S2 includes the following steps: Step S21: Extract candidate words and phrase combinations from the semantic unit sequence, perform fuzzy string matching and semantic similarity calculation based on the concept definitions in the domain knowledge ontology, and generate a candidate concept entity set; Step S22: Perform context semantic role labeling on the candidate concept entity set, analyze the syntactic function and logical position of the concept entity in the context based on the syntactic dependency path of the semantic unit sequence, and generate semantic role label data; Step S23: Based on the semantic role tag data, and combined with the predefined relation predicate framework in the domain knowledge ontology, perform pattern matching of the predicate argument structure, extract candidate relation predicates connecting concept entities, and generate a candidate relation set; Step S24: Merge the candidate concept entity set and the candidate relation set, and construct an initial semantic graph structure with entities as nodes and relations as edges based on entity co-occurrence and relation transitivity; Step S25: Perform redundant edge pruning and isolated node filtering on the initial semantic graph structure, and evaluate and screen the necessity of nodes and edges based on the graph structure density and semantic integrity to generate a preliminary semantic annotation graph.

8. The method according to claim 7, characterized in that, Step S3 includes the following steps: Step S31: Extract triples composed of all relation predicates from the preliminary semantic annotation graph, and perform logical consistency verification based on the attribute domain, value domain and relation transitivity axioms defined in the domain knowledge ontology to generate a set of logically conflicting triples. Step S32: Perform conflict root cause analysis on the set of logical conflict triples, trace the original context of the entity nodes and relation predicates involved in the conflict triples in the semantic unit sequence, and generate conflict context tracing data. Step S33: Based on the conflict context tracing data, and combined with the concept hierarchy and relation constraints in the domain knowledge ontology, perform semantic disambiguation and relation predicate re-annotation on the conflict triples to generate a set of conflict resolution schemes; Step S34: Based on the conflict resolution scheme set, update the semantic information and partially reconstruct the graph structure of the corresponding nodes and edges in the preliminary semantic annotation graph to generate an intermediate semantic annotation graph; Step S35: Perform a global semantic flow connectivity test on the intermediate semantic annotation graph, calculate the probability that any two entity nodes in the graph can be reached through a relational path, supplement the low reachability node pairs with semantic bridging edges, and finally generate a standardized semantic annotation graph.

9. The method according to claim 8, characterized in that, Step S35 includes the following steps: Random walk sampling is performed on the intermediate semantic annotation graph to generate semantic walk paths between multiple entity nodes, and the sequence and type of relation predicates on each path are extracted to generate path semantic pattern data; Based on the path semantic pattern data, a path semantic representation learning is performed using a graph neural network model, encoding each path into a fixed-dimensional semantic vector to generate a set of path semantic vectors. Calculate the semantic distance between any two vectors in the path semantic vector set, and construct a semantic similarity matrix between entity nodes based on the semantic distance; Based on the semantic similarity matrix, identify node pairs with semantic similarity lower than a preset connectivity threshold and no direct or indirect connection in the graph structure, and generate a list of node pairs to be bridged. Based on the list of nodes to be bridged, query whether there are implicit superior concepts or shared attributes between the corresponding concepts of the node pairs in the domain knowledge ontology. Based on the query results, derive reasonable implicit relation predicates and add the implicit relation predicates as bridging edges to the intermediate semantic annotation graph to generate a standardized semantic annotation graph.

10. The method according to claim 9, characterized in that, The process of deriving a reasonable implicit relation predicate based on the query results and adding the implicit relation predicate as a bridging edge to the intermediate semantic annotation graph includes the following steps: Extract the entity concept identifiers corresponding to the first node and the second node from the list of nodes to be bridged, and query the domain knowledge ontology based on the entity concept identifiers to obtain the parent concept set and attribute feature vector to which the first node belongs, and the parent concept set and attribute feature vector to which the second node belongs. Based on the parent concept set and attribute feature vector of the first node, and the parent concept set and attribute feature vector of the second node, a concept intersection space and a feature difference tensor are constructed. The concept intersection space contains the superior concepts shared by both nodes, and the feature difference tensor represents the distribution offset of the two nodes in the multidimensional attribute space. Based on the concept intersection space and feature difference tensor, retrieve the set of defined relational predicates in the domain knowledge ontology, filter out all candidate predicates that connect any concept in the concept intersection space to other related concepts, and extract the domain and range constraint rules of the candidate predicates. The domain and value range constraint rules of the candidate predicates are instantiated and matched using the feature difference tensor. Candidate predicates that cannot accommodate the attribute offset represented by the feature difference tensor are eliminated, and predicates that can be verified by logical implication are retained as valid implicit relation predicates. The effective implicit relation predicates are used as bridging edges to connect the first node and the second node, and the predicate type and direction information of the bridging edges are written into the edge set of the intermediate semantic annotation graph to generate a standardized semantic annotation graph.