Intelligent text data labeling method and device, and medium

By constructing a semantic alignment graph across ontology and formal semantic equivalence determination, translated logical rules applicable to the target domain are generated, solving the problems of semantic drift and conflict misjudgment in cross-domain text data annotation, realizing accurate translation and consistency verification of logical rules, and improving the accuracy and reliability of annotation results.

CN122113843APending Publication Date: 2026-05-29ZHONGQI LIANXIN TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGQI LIANXIN TECHNOLOGY GROUP CO LTD
Filing Date
2026-03-25
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies for intelligent annotation of cross-domain text data suffer from problems such as semantic drift and misjudgment of conflicts when transferring logical rules. They cannot achieve semantic fidelity and structural consistency in the translation of logical rules between heterogeneous ontologies, resulting in inaccurate annotation results.

Method used

By constructing a semantic alignment graph across ontology, and based on formal semantic equivalence determination, translated logical rules applicable to the target domain are generated. Combined with consistency verification and minimum conflict repair mechanisms, the consistency of logical constraints of the annotation results is ensured.

Benefits of technology

It achieves accurate translation and consistency verification of the logical rules for cross-domain text data annotation in the target domain, avoids semantic drift and conflict misjudgment, and improves the accuracy and reliability of annotation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122113843A_ABST
    Figure CN122113843A_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent labeling method, equipment and medium of text data, belong to electric digital data processing technical field, comprising: obtaining the label ontology of source field and target field;Based on the concept granularity, semantic boundary and axiom form between the two, construct the semantic alignment graph of cross ontology;According to the formal semantic equivalence determination of the logic rule of the graph to source field, generate the translated logic rule suitable for target field;After multi-label prediction is carried out to target text, the consistency check is carried out to candidate label combination using translation rule, and the final labeling result is output.The application solves the logic rule invalidation problem caused by label system isomerism and semantic boundary dynamic change in cross-domain scene by constructing the migration framework based on formal ontology semantic alignment and hierarchical translation verification, realizes the semantic fidelity and structure consistent translation of logic rule between heterogeneous knowledge system, effectively avoids semantic drift and conflict misjudgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic digital data processing technology, and more particularly to a method, device and medium for intelligent annotation of text data. Background Technology

[0002] In the context of artificial intelligence and natural language processing technologies, intelligent annotation of text data has become a core prerequisite for constructing high-quality training corpora, playing a decisive supporting role in the performance of downstream tasks such as information extraction, sentiment analysis, and knowledge graph construction. Especially in multi-label annotation scenarios, a single text instance often needs to be assigned multiple semantic labels, and these labels have complex logical relationships such as mutual exclusion, implication, hierarchical inclusion, or conditional dependence. To ensure the inherent consistency and semantic rationality of the annotation results, introducing a knowledge-driven logical verification mechanism has become a mainstream technical direction for improving the quality of annotated data. This mechanism relies on a pre-set label relationship graph to formalize domain expert experience into explicit logical rules, and performs consistency verification on candidate label combinations during the annotation process to filter out erroneous labels that violate common sense or domain axioms.

[0003] Existing intelligent text annotation methods generally adopt a static approach of constructing tag relationship graphs. This involves manually defining structured tag ontologies and constraint rules for a specific domain, using directed graphs or sets of logical axioms to characterize semantic relationships between tags, and embedding these graphs into the annotation process as a verification module. This approach is effective in improving annotation accuracy and reducing manual correction costs within closed and stable single domains such as medicine and law, demonstrating good application results. However, as annotation tasks evolve towards cross-domain approaches, this technical solution reveals significant shortcomings. Tag systems in different domains are heterogeneous knowledge ontologies, with structural differences in concept granularity, semantic boundaries, and underlying logical axioms. Directly transferring rules from the source domain can easily lead to misjudgments. Current mainstream statistical adaptation strategies can only achieve surface-level parameter adjustments and cannot solve the core problems, leading to issues such as semantic drift of logical rules and annotation result contamination, severely restricting the reliability and scalability of cross-domain intelligent annotation systems. Summary of the Invention

[0004] This invention overcomes the shortcomings of the prior art and provides an intelligent annotation method, device and medium for text data.

[0005] To achieve the above objectives, the technical solution adopted by this invention is: an intelligent annotation method for text data, comprising:

[0006] S1. Obtain the tag ontology of the source domain and its corresponding set of logical rules;

[0007] S2. Obtain the tag ontology of the target domain;

[0008] S3. Based on the conceptual granularity, semantic boundary, and axiomatic expression form between the source domain tag ontology and the target domain tag ontology, construct a cross-ontology semantic alignment graph;

[0009] S4. Based on the semantic alignment graph, perform formal semantic equivalence determination on each logical rule in the source domain, and generate translated logical rules applicable to the target domain.

[0010] S5. Based on multi-label prediction of the target domain text, perform consistency verification on the candidate label combination using the translated logic rules, and output the final annotation result that satisfies the logical constraints.

[0011] In a preferred embodiment of the present invention, constructing a cross-ontology semantic alignment graph includes:

[0012] Obtain the initial semantic embedding vectors of the source domain labels and the target domain labels;

[0013] The semantic embedding vectors of the source and target domain labels are projected into a shared semantic space, and the semantic alignment scores between the source and target labels are calculated to form an initial structural alignment matrix.

[0014] Based on the hierarchical structure information of the source domain tag ontology and the target domain tag ontology, structural consistency pruning is performed on the structure alignment matrix to remove tag mapping pairs that violate ontology topological constraints, thus forming the final semantic alignment graph.

[0015] In a preferred embodiment of the present invention, constructing the shared semantic space includes:

[0016] Obtain the semantic embedding vectors of labels in the source and target domains;

[0017] Based on a pre-defined set of semantic anchor points, a transformation matrix is ​​learned that projects the semantic embeddings of the source domain onto the semantic space of the target domain.

[0018] Using the transformation matrix, the semantic embedding vectors of all source domain labels are projected onto the semantic space of the target domain to perform cross-domain semantic similarity calculation.

[0019] In a preferred embodiment of the present invention, step S4, which involves formal semantic equivalence determination and generating translated logical rules, includes:

[0020] Decompose the logical rules of the source domain into logical expressions based on its atomic concepts;

[0021] Based on the semantic alignment graph, for each source domain atomic concept in the logical expression, find the target concept with the highest alignment confidence in the target domain;

[0022] When all atomic concepts find a target concept that satisfies the preset confidence threshold, a structure-preserving concept replacement is performed to generate a logical expression for the target domain, which serves as the translated logical rule.

[0023] The satisfiability and consistency of the translated logical rules in the target ontology context are verified using a formal inference engine.

[0024] In a preferred embodiment of the present invention, the source domain label ontology obtained in step S1 is multiple. When the logical rules from multiple source domains are migrated in step S4, each rule is assigned a weight based on the alignment confidence between each source domain and the target domain, and the final translated logical rule set is generated by filtering or merging based on the weighted results.

[0025] In a preferred embodiment of the present invention, step S5, which involves performing a consistency check on the candidate tag combination using the translated logic rules, includes:

[0026] The initial results of multi-label prediction and the translated logical rules are transformed into a Boolean satisfiability problem.

[0027] Call the SAT solver to find a set of final label assignments that satisfy all logical rules;

[0028] If the initial result conflicts with the logical rules, resulting in no solution, the minimum conflict repair mechanism is activated. This mechanism identifies and removes low-confidence labels from the minimum set of labels that cause the conflict, and iterates until the final labeling result that satisfies all logical constraints is obtained.

[0029] In a preferred embodiment of the present invention, the tag ontology is constructed using a web ontology language and includes classes, attributes, and axioms defined to describe logic; the set of logical rules is formally expressed using descriptive logical axioms or first-order logic formulas; and the tag ontology and its rule set of the source and target domains are persistently stored in a triple-based database.

[0030] This invention provides an intelligent annotation system for text data, comprising:

[0031] The text preprocessing module receives the raw natural language sequence, performs text normalization operations, and outputs a subword sequence that conforms to the byte pair encoding algorithm;

[0032] The initial prediction module generates preliminary multi-label classification results based on a pre-trained language model for the target domain.

[0033] The ontology management module maintains formalized labeled ontology of the source and target domains;

[0034] The alignment calculation module constructs a shared semantic space and structural alignment matrix between source and target tags;

[0035] The rule migration module translates source domain logical rules into target domain rules based on the alignment matrix.

[0036] The consistency verification module performs logical consistency verification and forced correction on the initial prediction results;

[0037] The feedback learning module collects manually corrected, real annotations to enable online incremental learning.

[0038] This invention provides an electronic device, comprising:

[0039] At least one processor; and

[0040] A memory communicatively connected to the at least one processor; wherein,

[0041] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the intelligent annotation method for the text data.

[0042] The present invention provides a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute the intelligent annotation method for the text data.

[0043] This invention addresses the shortcomings of the prior art and has the following beneficial effects:

[0044] (1) This invention solves the semantic drift problem caused by direct reliance on lexical similarity or statistical association in cross-domain rule transfer by constructing a cross-ontology semantic alignment graph and combining it with formal semantic equivalence determination. Existing technologies perform surface mapping without touching the ontology structure, while this invention performs structural consistency pruning based on concept-level topology during semantic alignment, ensuring that the mapping relationship is not only similar at the lexical level, but also compatible at the ontology logical structure. This allows subsequent logical rule translation to be based on concept correspondence with structural fidelity, avoiding the risk of incorrectly grafting source domain rules to semantically mismatched concepts in the target domain.

[0045] (2) This invention achieves accurate translation of logical constraints at the formal semantic level by decomposing source domain logical rules into descriptive logical expressions based on atomic concepts and performing structure-preserving concept replacement based on a high-confidence semantic alignment graph. Unlike existing technologies that perform empirical fitting by adjusting graph edge weights or model parameters, this invention retains the original logical operators and composite structures of the rules within the descriptive logic framework, replacing only the underlying atomic concepts that carry semantics. This ensures that the translated rules carry isomorphic logical validity in the target domain compared to the source domain.

[0046] (3) This invention realizes the automatic logical correction of the initial prediction results of the neural network by converting the translated logical rules into Boolean constraints and adopting a consistency check and minimum conflict repair mechanism based on SAT solution. When the initial prediction violates common sense or axioms in the domain, it can locate the minimum conflict set and make a minimum correction based on the prediction confidence, thereby achieving a balance between the model prediction results and the domain logic. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart of a preferred embodiment of the present invention;

[0049] Figure 2 This is a block diagram of a preferred embodiment of the present invention;

[0050] Figure 3 This is a media diagram of a preferred embodiment of the present invention. Detailed Implementation

[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein. Therefore, the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0053] Application Overview:

[0054] This invention addresses the intelligent annotation of multi-label text across multiple domains. Existing technologies are adapted to specific domain annotation tasks with fixed label ontologies and unified logical axioms. However, their limitations lie in the fact that the underlying assumptions of their logical verification system deviate from the characteristics of cross-domain scenarios. They also incorrectly assume that the knowledge ontologies upon which their label systems rely have cross-domain invariance. Furthermore, their technical approach does not establish a rule transfer framework based on formal semantics, resulting in the inability to achieve semantic fidelity and structural consistency in the translation of logical rules between heterogeneous ontologies. In cross-domain scenarios, there are fundamental differences in the semantic anchors, concept hierarchy divisions, and logical axiom systems of heterogeneous label ontologies. The application of existing technologies in the scenario of this invention will lead to problems such as semantic drift and misjudgment during the rule transfer process.

[0055] Existing technologies perform poorly in transferring rules across domains, failing to adapt to the heterogeneous nature of multiple knowledge systems and the dynamic changes in semantic boundaries in cross-domain scenarios. Conventional solutions are limited to adaptation at the data representation layer or parameter tuning layer, representing optimization strategies for fixed knowledge systems in closed scenarios. They attempt to compensate for cross-domain differences by adjusting label co-occurrence frequencies, fine-tuning graph edge weights, or neural network parameters—essentially approximations based on empirical data—without addressing the underlying ontological semantic structure and logical axioms of the label system. Because a semantic-level rule translation logic has not been established, when applied to cross-domain annotation scenarios, it cannot identify the semantic differences of label concepts in heterogeneous ontologies or the applicable boundaries of logical axioms, nor can it achieve accurate rule adaptation and transfer.

[0056] This invention solves the core problem of logical rules failing due to semantic drift in cross-domain scenarios by constructing a migration framework based on formal ontology semantic alignment and hierarchical translation verification. Combined with a context-aware dynamic constraint rewriting mechanism, it further solves the rule adaptation problem caused by heterogeneous tag systems and dynamic changes in semantic boundaries.

[0057] Exemplary method:

[0058] like Figure 1 As shown, an intelligent annotation method for text data includes the following steps:

[0059] S1. Obtain the tag ontology of the source domain and its corresponding set of logical rules;

[0060] S2. Obtain the tag ontology of the target domain;

[0061] S3. Based on the conceptual granularity, semantic boundaries, and axiomatic expressions between the source domain label ontology and the target domain label ontology, construct a cross-ontology semantic alignment graph;

[0062] S4. Based on the semantic alignment graph, perform formal semantic equivalence determination on each logical rule in the source domain, and generate translated logical rules applicable to the target domain.

[0063] S5. Based on multi-label prediction of the target domain text, perform consistency verification on the candidate label combination using the translated logical rules, and output the final annotation result that satisfies the logical constraints.

[0064] The essence of cross-domain annotation is to achieve semantically faithful transfer of mature knowledge and rules from the source domain to the target domain. The reliability of this transfer process depends first and foremost on the standardization and completeness of the knowledge carrier in the source domain. Therefore, step S1 needs to acquire and establish the knowledge foundation upon which all subsequent processes depend, extracting a complete and formally described tag ontology and a set of logical rules rigorously defined based on this ontology from the source domain.

[0065] The source domain refers to a specific application domain that has a mature annotation system, a clear knowledge framework, and available logical constraints. Text annotation tasks in this domain have been running for a long time and have formed relatively stable label definitions and semantic association patterns. It is the source of knowledge and rules output during cross-domain migration.

[0066] The tag ontology is a structured and formalized description system of the core concepts and relationships between concepts required for text annotation in the source domain. It provides a unified semantic benchmark for annotation tasks, ensures that different annotation subjects or systems have a consistent understanding of the tags, and avoids annotation deviations caused by conceptual ambiguity or semantic ambiguity.

[0067] In this invention, the tag ontology is a knowledge model constructed and described using the OWL ontology language, including: Class, Object Property, Data Property, and Axiom. Among them, the class represents the most core concept or category in the domain, namely the tag concept itself. Each class can have subclasses, forming a clear hierarchical classification system. Object properties are used to define the relationships between different classes. Data properties are used to describe the data characteristics of the class. Axioms are used to define the constraint relationships between classes and properties, ensuring the internal consistency of the ontology structure.

[0068] The logical rule set is a set of rules built on the source domain label ontology to constrain the rationality of label combinations. In essence, it transforms common sense, axioms or expert experience in the domain into formal logical expressions that can be recognized and executed by computers, and is used to filter out erroneous label combinations that violate semantic logic.

[0069] In the specific implementation of step S1, obtaining the tag ontology of the source domain first requires semantic extraction and structured reorganization of the original knowledge base to be transferred. Specifically, each source domain tag is represented by a defined DL atomic concept; description logic, i.e., DL, is a family of logics used to represent knowledge, with strong expressive power and decidability, and uses ALC language fragments as the basic tool for logical expression; ALC, or belonging language and its complement, supports conjunction, disjunction, negation, existential quantification restrictions, and universal quantification restrictions.

[0070] To characterize the semantic relationships between tags, step S1 formalizes the logical relations of the source domain into TBox axioms. A TBox, or term box, is a set used in descriptive logic to store term definitions and concept inclusion relationships. Let the set of tags in the source domain be... For any one of these tags Each defines a corresponding descriptive logical atom concept. The set of logical rules in the source domain Each of these axioms All are expressed in the following formal form: or In this formula, C and D are composite concepts formed by combining basic atomic concepts through descriptive logical constructs. This represents the inclusion relationship, or the implication rule, which states that if an instance belongs to concept C, then it must also belong to concept D. (Symbol) This represents an equivalence relation, indicating that concepts C and D are semantically identical.

[0071] When handling logical constraints in multi-label scenarios, step S1 uses the aforementioned constructors to achieve complex semantic characterization. For example, mutual exclusion is the most common constraint in annotation, meaning two labels cannot appear simultaneously. In the description logic, if the source domain label... and If they are mutually exclusive, then their corresponding formal axiom is expressed as: ,in, This represents logical conjunction, i.e., intersection; Representing the underlying concept or empty set, the meaning of this axiom is: The intersection of these pairs is empty, thus rigorously defining mutual exclusion at the formal logic level.

[0072] Implication relationships are used to describe the inference logic between tags. If tags Contains That is, it is marked Then it must be marked. Its formal axiom is: .

[0073] Hierarchical relationships are a special case of implication relationships, used to describe the containment structure of parent and child classes. If... yes A direct subclass of a class must, in addition to satisfying the inclusion relationship, also satisfy the constraint that the two classes are not equivalent, that is: .

[0074] Furthermore, this solution also supports expressing rules using first-order logic formulas. For example, for a mutual exclusion rule, it can be expressed as: This formula means that for any instance x, if it has the property... Then it must not have any attributes. The implied rule can be expressed as: By introducing first-order logic, the rule set not only possesses structured hierarchical features but also the mathematical ability for dynamic reasoning.

[0075] This invention elevates the meaning of tags from textual symbols to a semantic representation level by defining descriptive logic. This enables the system to understand that the logical constraints of tags are based on underlying ontological axioms, rather than merely statistical relationships. Secondly, by employing the OWL standard and DL axiom set, the rules possess the potential for structure-preserving translation. In subsequent migration steps, the system no longer reuses rules but translates the composite logical structure of the source domain to the target domain through a mapping function by aligning atomic concepts from both domains. This translation process is based on semantic fidelity, ensuring that the structure of logical constraints is consistently maintained across heterogeneous systems.

[0076] In the final step of S1, the acquired source domain ontology data is persistently stored in an RDF triple database and managed using a high-performance engine such as Apache Jena Fuseki. This provides an efficient data access interface for subsequent steps S3, which computes concept embedding vectors in the shared semantic space, and S4, which executes structured mappings of rules.

[0077] This step is not limited to single-domain knowledge acquisition; it also supports the parallel extraction of rules from multiple source domains. In complex real-world scenarios, a target domain may need to draw upon knowledge from multiple mature domains simultaneously. Step S1 allows for the simultaneous construction of tag ontologs from multiple source domains. Each ontology is independently modeled according to the above-described logical specifications, ensuring the diversity and complementarity of knowledge sources.

[0078] Step S2, based on the source domain knowledge framework established in Step S1, shifts the system's focus to the new application scenario, acquiring and establishing the target domain's own independent knowledge architecture. Step S2 is the receiver-side construction phase in the cross-domain migration process, requiring the establishment of a tag semantic space in the target domain that is aligned with the formal language of the source domain but has completely independent semantic content.

[0079] The target domain refers to the new application scenario that the current annotation task is targeting. It has an independent business background, a heterogeneous knowledge system, and dynamically changing semantic boundaries. Compared with the source domain, the target domain often faces problems such as a lack of labeled data, missing logical axioms, or the absence of a standard terminology system. The target domain is not merely the object of prediction, but a semantic entity to be characterized, requiring formal methods to make its implicit label associations explicit.

[0080] A target ontology is a machine-readable description of the labels to be annotated and their underlying logical structure within the target domain. This is to ensure consistency with the source domain. In terms of compatibility at the logical operator level, the target ontology is also described using the Web Ontology Language (OWL) and strictly follows the language specifications in the description logic.

[0081] In the specific implementation method, the first step is to determine the tag set of the target domain. Let the target domain label set be... , is a finite and non-empty set containing all the classification categories required by the business. For each label in the target domain Each defines a corresponding descriptive logical atom concept. The concept of atoms constitutes the most basic unit of the semantic space of the target domain.

[0082] Unlike the source domain, the target domain's tag ontology is initially treated as an axiom-poor, empty shell. Specifically, the initial terminology box of the target domain... In the initial acquisition phase, the system does not require the target domain to possess prior logical axioms. The target domain is often newly emerging or its knowledge is not yet solidified. If rigid rules are pre-defined, conflicts with the source domain's migration rules may arise, or incorrect constraints may be introduced due to the semantic ambiguity of the target domain itself. This "initial empty set" strategy endows the system with extremely strong dynamic expansion capabilities, leaving a clean injection space for the localized logical constraint set subsequently generated through the alignment matrix.

[0083] In terms of construction methodology, step S2 initializes the tag ontology using a large-scale unlabeled corpus of the target domain. For each tag... The semantic boundaries are defined by extracting tags. The natural language definition of the class and its contextual features in the target domain corpus are mapped to an embedded representation in a shared semantic space. For each class in the target domain, its semantic vector representation is... Obtained through a pre-trained encoder, the class name is concatenated with its natural language definition text and input, and the hidden state corresponding to a specific tag is taken as the semantic embedding vector of that class.

[0084] Step S2, with its independent construction and formal definition, ensures the ontology independence of the target domain's tagging system. This is achieved by defining each tag as an independent descriptive logical atomic concept. The target domain has its own logical boundaries. In subsequent processes, the system doesn't simply transplant the rules, but rather translates the complex conceptual structure of the source domain into these independent... Above.

[0085] Furthermore, step S2 also considered the hierarchical characteristics of the target domain labeling system during its implementation. Although initially... While the definition is empty, for hierarchical tagging systems with a tree structure, this invention allows the explicit inclusion of equivalence definition axioms between parent and child nodes in the target ontology.

[0086] The core reason for adopting this complex ontology acquisition method, rather than directly using a tag list, is that cross-domain annotation essentially achieves precise alignment between heterogeneous knowledge systems. A tag list is merely isolated symbols, while an ontology is structured knowledge. Through step S2, the system establishes a framework for the target domain that is heterogeneous to the source domain but is isomorphic to a logical language. This allows the subsequent alignment calculation module to find the most matching semantic correspondence between the source tag s and the target tag t based on the axiomatic structure of the descriptive logic.

[0087] At the hardware and system level, the ontology acquisition process in step S2 is executed through the ontology management module, which is responsible for maintaining the target domain. Persistent storage. All defined atomic concepts. All data is encoded in OWL2DL syntax and stored in a storage system based on a triplet database engine.

[0088] Step S2 establishes an independent set of atomic concepts, so that each transfer rule must undergo a formal semantic equivalence judgment model for validity before entering the target domain.

[0089] Step S2 also includes embedding the semantic vector of the target domain label. The calculation is performed by extracting context sentences containing the label t from the target domain corpus, inputting them into the encoder model, and then performing mean pooling. This process provides a numerical semantic foundation for the structural alignment in the subsequent step S3. The calculation formula is as follows: , This represents the semantic focus of label t in the real context of the target domain. Step S2 not only defines the label at the logical level, but also captures the actual connotation of the label at the vector space level.

[0090] Having established the formal logical framework of the source domain in step S1 and constructed the heterogeneous tag ontology and distributed semantic representation of the target domain in step S2, step S3 constructs a cross-ontology semantic alignment graph based on the conceptual granularity, semantic boundaries, and axiomatic expressions between the source and target domain tag ontologs. Step S3 breaks down the semantic silos between heterogeneous ontologs and establishes a concept mapping matrix with structural consistency guarantees in a shared semantic space.

[0091] A shared semantic space is a high-dimensional vector space transformed mathematically. In this space, label embedding vectors, originally belonging to different domains and with different distribution characteristics, are projected onto the same metric system, giving physical meaning to cross-domain semantic similarity calculations. The structural alignment matrix is ​​a quantitative representation of the correlation strength between source and target labels within this space. It not only records symbolic equivalence but also implies structural correspondences at the ontology level. The process of constructing a semantic alignment graph is essentially about finding a cross-domain semantic translation function that can preserve the logical topology of the source domain.

[0092] The specific implementation method of step S3 first requires obtaining the initial semantic embeddings of the source domain labels and the target domain labels. For each label in the source domain... The process involves extracting context sentences containing the label 's' from a large-scale unlabeled corpus in the source domain, inputting these sentences into a pre-trained language model in the source domain, extracting hidden state vectors at specific positions, and performing mean pooling to obtain the source label embeddings. ,in, For n-dimensional hidden states, utilize a large-scale corpus in the target domain to define each label in the target domain. Construct its corresponding target tag embedding .

[0093] To overcome the embedding space shift problem caused by corpora from different domains, step S3 introduces a shared semantic space transformation mechanism. This is achieved by learning a linear transformation matrix. This involves embedding the source domain into the semantic space of the target domain, thereby achieving cross-ontology concept bridging. The solution process for this transformation matrix relies on the aligned set of anchor pairs. Anchor pairs represent core concepts that are semantically absolutely equivalent in two domains, and their number is typically no less than 5% of the total number of source tags and no more than 20 pairs. Transformation matrix The optimization objective is defined as a least squares problem with a regularization term: The first term represents minimizing the Euclidean distance between anchor pairs after projection, ensuring the overlap of known equivalent concepts in the shared space; the second term is the Frobenius norm regularization term, used to prevent overfitting of the model. The regularization coefficients are preset. This problem belongs to the convex quadratic optimization problem. In a GPU-accelerated environment, the optimal transformation matrix can be efficiently obtained through numerical computation using CUDA 11.8 and the cuBLAS library. .

[0094] In obtaining the projection matrix Next, step S3 further calculates the alignment score between the source domain label s and the target domain label t, thereby constructing the structural alignment matrix M, where each matrix element... Represents the source tag With target label The semantic alignment strength is calculated using the cosine similarity function.

[0095] The alignment matrix M forms the basic topology of the semantic alignment graph.

[0096] In a preferred embodiment of the present invention, when the semantic gap between the source domain and the target domain is large, step S3 can also use nonlinear projection instead of linear transformation. This nonlinear projection is implemented using a two-layer fully connected neural network with a hidden layer dimension of 1024 and employing the GELU activation function.

[0097] To ensure that semantic alignment goes beyond statistical similarity, step S3 introduces a crucial structural consistency pruning mechanism to form the final semantic alignment graph. This mechanism combines the ontology structure information obtained in steps S1 and S2 to perform topological verification on the preliminary mapping results. Its logical judgment is as follows: if the source class... With target class A mapping relationship has been established, and it exists in the source ontology. yes If it is a direct subclass of the target ontology, then the corresponding class must exist in the target ontology. , making yes A direct subclass of, and and The alignment score must be no less than a preset threshold; if this topological constraint is not met, the system will remove it. Mapping pairs are problematic because, although they may be similar at the lexical level, they conflict at the ontology level, which can easily lead to logical distortions in the subsequent rule migration process.

[0098] The formal ontology-aligned transfer framework implemented in step S3 fundamentally ensures the semantic fidelity of logical constraints across heterogeneous knowledge systems. By introducing a projection matrix, semantic biases between domains are mathematically calibrated; and through structural consistency pruning, the topological equivalence of hierarchical logic before and after the transfer is ensured.

[0099] The alignment calculation module in step S3 continuously optimizes the alignment matrix through the online incremental learning module. Whenever the feedback learning module receives a corrected ground truth label that violates the current logical constraints, the system triggers an update mechanism to re-estimate the alignment score based on the newly added positive and negative sample pairs. The update formula uses weighted cosine similarity.

[0100] Step S3 establishes a high-confidence concept mapping system between heterogeneous ontologies in the source and target domains by constructing a shared semantic space, learning cross-domain projection matrices, and performing structural consistency pruning. This improves the precision and recall of cross-domain alignment and provides a semantically faithful mapping foundation for the logical rule transfer in step S4.

[0101] Step S3 successfully constructed a cross-domain shared semantic space and established a structural alignment matrix M. Based on the semantic alignment graph, a formal semantic equivalence determination was performed on each logical rule in the source domain, and translated logical rules applicable to the target domain were generated.

[0102] Formal semantic equivalence determination refers to verifying, within the framework of descriptive logic, whether axioms from the source domain possess the same logical validity and structural integrity in the target domain context using mathematical methods. Translated logical rules, on the other hand, refer to rules that, after semantic alignment and syntactic reconstruction, can be applied to the target domain ontology. The localized set of logical constraints is executed directly in the code. This process is not a simple text replacement, but rather a high-confidence semantic substitution of the underlying atomic concepts while keeping the logical operators unchanged.

[0103] The specific implementation method of step S4 first requires the source domain rule set. Each axiom in the source domain undergoes a deep structural decomposition. Let a typical axiom of the source domain be... In this scheme, C and D are composite concepts composed of source tags. The translation engine first recursively decomposes the composite concepts C and D into their lowest-level atomic Boolean combinations.

[0104] Step S4 uses the structure alignment matrix generated in step S3 to find its optimal alignment label in the target domain. The process of finding the optimal alignment label in the target domain follows the maximum confidence principle, and its mathematical expression is as follows: When the selected target label A mapping is considered valid only if the alignment score is not lower than a preset threshold. If any atomic concept involved in the axiom cannot find a corresponding term in the target domain that meets the threshold, the axiom will be judged as "untranslatable" and discarded to prevent low-quality knowledge transfer from introducing logical conflicts.

[0105] After passing the confidence check, the translation engine performs a structure-preserving concept replacement operation. Specifically, it replaces all atomic concepts s in the source domain composite concept C with their corresponding... This generates composite concepts in the target domain. Similarly, replace D with Subsequently, the system retains the original descriptive logic constructors and reassembles them into equivalent axioms of the target domain.

[0106] Step S4 further introduces a formal semantic verification model. This model invokes a description logic-based inference engine, Pellet 2.4.0 or HermiT, to perform immediate verification of the satisfiability of the newly generated axiom set within the target ontology context. The verification process includes: first, performing a grammatical validity check to ensure that the transferred axioms strictly conform to the ALL grammatical specification; second, using the inference engine to verify the target ontology. If a translation rule causes a logical contradiction in the target ontology during consistent reasoning, the rule will be marked as invalid.

[0107] In a preferred embodiment of multi-domain knowledge fusion, step S4 also supports weighted transfer for rules from multiple source domains. When there are multiple source domains, the system calculates the alignment matrix between each source domain and the target domain, and for each candidate transfer axiom, the system calculates its weighted transfer confidence.

[0108] The reason why step S4 is technically superior to existing solutions is that it transcends superficial statistical approximation and achieves precise mapping at the knowledge representation level. Existing technologies, when handling cross-domain rule transfer, often employ methods that adjust graph edge weights based on label co-occurrence frequency. This method is essentially an empirical approximation and cannot identify the ontological semantic structure behind the labels. When heterogeneity exists between domains, existing technologies are prone to "semantic drift," forcibly grafting logic that holds true in the source domain onto unrelated concepts in the target domain, resulting in serious logical conflicts. In contrast, the structure-preserving mapping established in step S4 in this application ensures that each logical operator still carries the correct semantic carrier after translation.

[0109] After completing step S4 to translate the logical rules into localized logical constraints for the target domain, step S5 performs consistency checks on the candidate label combinations based on multi-label prediction of the target domain text, and outputs the final annotation results that satisfy the logical constraints.

[0110] The initial multi-label prediction result refers to the original label probability distribution generated by the target domain pre-trained language model based on text semantic features before logical intervention. In this scheme, this prediction is generated by a fine-tuned Transformer encoder model (such as RoBERTa-large) in conjunction with a multi-label classification head. For each target label... The model outputs a probability value, which is then binarized using a preset threshold to obtain the initial label set. However, since neural networks are essentially probabilistic statistical models, their outputs... It often contains combinations that violate the axioms of the domain.

[0111] The specific implementation method of step S5 first requires transforming the logical consistency verification task into a mathematically solvable Boolean satisfiability problem, namely the SAT problem. The SAT problem is a classic logical decision problem in computer science, aiming to find a set of Boolean variable assignments that make the entire set of given logical formulas true. In this scheme, for each label t in the target domain label set T, a corresponding Boolean variable is constructed. ,when When this happens, it means that label t is selected; When this happens, it means the tag 't' is removed.

[0112] Each descriptive logical axiom in the localized logical constraint set generated in step S4 is transformed into a first-order logical constraint condition through syntax mapping rules.

[0113] The specific mapping rules are as follows: Mutual Exclusion Axiom Transformed into a clause ,Right now and They cannot both be 1;

[0114] Implies axioms Transformed into implication , equivalent to a clause ;

[0115] Equivalence axioms This then transforms into a two-way implication constraint. .

[0116] The set of clauses derived from the axioms constitutes the hard constraint space of the SAT problem.

[0117] After constructing the logical constraint space, step S5 calls the SAT solver based on the conflict-driven clause learning algorithm, namely the CDCL algorithm, to solve the problem. The CDCL algorithm is an efficient non-temporally backtracking search algorithm that greatly reduces the search space by continuously learning clauses that lead to conflicts during the search process. In this embodiment, MiniSat 2.2 is used as the kernel, and its decision heuristic strategy adopts the Variable State Independent Decay Summation (VSIDS) method, combined with the Luby sequence restart strategy. The solver's task is to find a set of final label assignments. This ensures that all translated logical rules are satisfied.

[0118] In the solution process, step S5 follows the principle of minimizing corrections. This principle requires that the corrected result... While satisfying logical constraints, the prediction result should be as close as possible to the initial prediction result. The mathematical objective function is defined as minimizing the Hamming distance.

[0119] If an extended assignment exists that satisfies all logical constraints, the system directly outputs the optimal solution. However, in real-world annotation scenarios, initial predictions may fail. When an irreconcilable conflict arises with the constraint set, i.e., the SAT solver returns "unsatisfiable" (UNSAT), step S5 initiates the minimum conflict resolution mechanism. This mechanism first identifies the minimum set of labels causing the conflict using a fast minimum unsatisfiable subset extraction algorithm, also known as the fast MUS extraction algorithm. Based on recursive backtracking and clause deletion testing, the source of the conflict is located.

[0120] After identifying the minimum conflict subset, step S5 performs confidence-driven label removal based on the original probability values ​​output by the model. Specifically, the system calculates... Sigmoid output value for each label The system then removes the label with the lowest probability value and restarts the SAT verification process. This iterative process continues until a feasible solution that fully conforms to the domain logic axioms is obtained, ultimately outputting the corrected label set. .

[0121] Regarding system performance, step S5 is designed with full consideration of the performance requirements of real-time annotation. Although the SAT problem is theoretically an NP-complete problem, due to the simplification of ontology axioms in steps S1 to S4 of this invention, which retains only high-confidence axioms, and the limitation on ALL language fragments, the actual size of the generated clauses is within a controlled range.

[0122] Step S5 completes the process from initial probability prediction to final logical labeling by converting translation rules into Boolean constraints, performing consistency checks using an efficient SAT solver, and performing automated corrections using a minimum conflict resolution mechanism.

[0123] Exemplary device:

[0124] like Figure 2 As shown, an intelligent text data annotation system includes:

[0125] The text preprocessing module receives the raw natural language sequence, performs text standardization operations, and outputs a subword sequence that conforms to the byte pair encoding algorithm; specifically, it converts the subword to lowercase, removes URLs / emails, replaces numbers with [NUM] tags, compresses whitespace characters, and performs subword segmentation according to the Unicode Standard Annex #31 specification.

[0126] The initial prediction module generates preliminary multi-label classification results based on a pre-trained language model for the target domain. Specifically, a 12-layer Transformer encoder is used to extract text representation vectors, and a multi-label classification head with a Sigmoid activation function outputs the probability values ​​of each label.

[0127] The ontology management module maintains formalized tagged ontology of the source and target domains; specifically, it stores the description logic (DL) axiom set encoded using OWL2 DL syntax; and it uses an RDF triple database for persistent management.

[0128] The alignment calculation module constructs a shared semantic space and structural alignment matrix between source and target labels. Specifically, it minimizes the Euclidean distance between artificial anchor pairs by learning a linear transformation matrix, calculates the cosine similarity between the projected source label and the target label, and forms the alignment matrix.

[0129] The rule migration module translates source domain logical rules into target domain rules based on the alignment matrix; specifically, it maintains the original axiomatic structure and only replaces the source label atomic concepts with the corresponding target label alignment items.

[0130] The consistency verification module performs logical consistency verification and forced correction on the initial prediction results; specifically, it transforms logical axioms into Boolean satisfiability (SAT) constraints; if a conflict occurs, it uses the fast MUS extraction algorithm to locate the minimum conflict subset and remove the label with the lowest confidence.

[0131] The feedback learning module collects manually corrected, real annotations to enable online incremental learning.

[0132] In another aspect, the present invention provides an electronic device for implementing the above-mentioned intelligent annotation method for text data.

[0133] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0134] The electronic device includes at least one processor and a memory, such as a read-only memory (ROM) or a random access memory (RAM), which is communicatively connected to the at least one processor. The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to execute the intelligent annotation method for text data provided by the present invention.

[0135] The processor can perform various appropriate actions and processes based on computer programs stored in read-only memory (ROM) or loaded into random access memory (RAM) from storage units. RAM can also store various programs and data required for the operation of the electronic device. The processor, ROM, and RAM are interconnected via a bus. Input / output interfaces are also connected to the bus.

[0136] Multiple components in an electronic device are connected to an input / output interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0137] A processor can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Examples of processors include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated artificial intelligence computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor performs the various methods and processes described above, such as the intelligent text data annotation method provided by this invention.

[0138] like Figure 3 As shown, in some embodiments, the intelligent text annotation method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device via a read-only memory and / or a communication unit. When the computer program is loaded into random access memory and executed by a processor, one or more steps of the intelligent text annotation method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform the intelligent text annotation method by any other suitable means (e.g., by means of firmware).

[0139] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0140] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0141] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, flash memory, optical fiber, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube or liquid crystal display monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0143] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0144] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system. This addresses the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.

[0145] Based on the preferred embodiments of the present invention described above, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for intelligent annotation of text data, characterized in that, include: S1. Obtain the tag ontology of the source domain and its corresponding set of logical rules; S2. Obtain the tag ontology of the target domain; S3. Based on the conceptual granularity, semantic boundary, and axiomatic expression form between the source domain tag ontology and the target domain tag ontology, construct a cross-ontology semantic alignment graph; S4. Based on the semantic alignment graph, perform formal semantic equivalence determination on each logical rule in the source domain, and generate translated logical rules applicable to the target domain. S5. Based on multi-label prediction of the target domain text, perform consistency verification on the candidate label combination using the translated logic rules, and output the final annotation result that satisfies the logical constraints.

2. The intelligent annotation method for text data according to claim 1, characterized in that: Constructing a semantic alignment graph across ontologies includes: Obtain the initial semantic embedding vectors of the source domain labels and the target domain labels; The semantic embedding vectors of the source and target domain labels are projected into a shared semantic space, and the semantic alignment scores between the source and target labels are calculated to form an initial structural alignment matrix. Based on the hierarchical structure information of the source domain tag ontology and the target domain tag ontology, structural consistency pruning is performed on the structure alignment matrix to remove tag mapping pairs that violate ontology topological constraints, thus forming the final semantic alignment graph.

3. The intelligent annotation method for text data according to claim 2, characterized in that: Constructing the shared semantic space includes: Obtain the semantic embedding vectors of labels in the source and target domains; Based on a pre-defined set of semantic anchor points, a transformation matrix is ​​learned that projects the semantic embeddings of the source domain onto the semantic space of the target domain. Using the transformation matrix, the semantic embedding vectors of all source domain labels are projected onto the semantic space of the target domain to perform cross-domain semantic similarity calculation.

4. The intelligent annotation method for text data according to claim 1, characterized in that: Step S4 involves formal semantic equivalence determination and generating translated logical rules, including: Decompose the logical rules of the source domain into logical expressions based on its atomic concepts; Based on the semantic alignment graph, for each source domain atomic concept in the logical expression, find the target concept with the highest alignment confidence in the target domain; When all atomic concepts find a target concept that satisfies the preset confidence threshold, a structure-preserving concept replacement is performed to generate a logical expression for the target domain, which serves as the translated logical rule. The satisfiability and consistency of the translated logical rules in the target ontology context are verified using a formal inference engine.

5. The intelligent annotation method for text data according to claim 1, characterized in that: In step S1, multiple source domain label ontologs are obtained. In step S4, when the logical rules from multiple source domains are migrated, each rule is assigned a weight based on the alignment confidence between each source domain and the target domain, and the final translated logical rule set is generated by filtering or merging based on the weighted results.

6. The intelligent annotation method for text data according to claim 1, characterized in that: Step S5 involves performing a consistency check on the candidate label combination using the translated logical rules, including: The initial results of multi-label prediction and the translated logical rules are transformed into a Boolean satisfiability problem. Call the SAT solver to find a set of final label assignments that satisfy all logical rules; If the initial result conflicts with the logical rules, resulting in no solution, the minimum conflict repair mechanism is activated. This mechanism identifies and removes low-confidence labels from the minimum set of labels that cause the conflict, and iterates until the final labeling result that satisfies all logical constraints is obtained.

7. The intelligent annotation method for text data according to claim 1, characterized in that: The tag ontology is constructed using a web ontology language and includes classes, attributes, and axioms defined by descriptive logic. The set of logical rules is formally expressed using descriptive logical axioms or first-order logical formulas. The tag ontology and its rule set of the source and target domains are persistently stored in a triplet-based database.

8. A text data intelligent annotation system, comprising a text data intelligent annotation method according to any one of claims 1-7, characterized in that, include: The text preprocessing module receives the raw natural language sequence, performs text normalization operations, and outputs a subword sequence that conforms to the byte pair encoding algorithm; The initial prediction module generates preliminary multi-label classification results based on a pre-trained language model for the target domain. The ontology management module maintains formalized labeled ontology of the source and target domains; The alignment calculation module constructs a shared semantic space and structural alignment matrix between source and target tags; The rule migration module translates source domain logical rules into target domain rules based on the alignment matrix. The consistency verification module performs logical consistency verification and forced correction on the initial prediction results; The feedback learning module collects manually corrected, real annotations to enable online incremental learning.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the intelligent annotation method for text data according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the intelligent annotation method for text data according to any one of claims 1-7.