An unsupervised approach to extracting English relations from niche domains

Through technical means such as unsupervised learning and dependency syntax analysis, the problem of difficult relationship extraction in niche fields is solved, efficient and accurate relationship extraction is achieved, the adaptability and generalization ability of the model are improved, and the labeling cost is reduced.

CN118377910BInactive Publication Date: 2024-09-10UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410806214.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies are difficult to extract relationships in niche fields, especially due to difficulty in obtaining annotated data, poor model generalization capabilities, low processing efficiency, and lack of domain knowledge utilization, resulting in inaccurate extraction results and insufficient adaptability.

Method used

Using unsupervised learning methods, through preprocessing, reference resolution, entity extraction and relationship triple matching, combined with dependency syntax analysis and cluster analysis, we can reduce the dependence on annotated data, improve the syntax and semantic accuracy of the extraction results, and Ensure result quality through user-provided entity dictionary and rule filtering.

Benefits of technology

It achieves efficient and accurate relationship extraction in niche fields, improves the adaptability and generalization capabilities of the model, ensures high reliability and accuracy of extraction results, and reduces manual labeling costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118377910B
    Figure CN118377910B
Patent Text Reader

Abstract

The present invention discloses a method for extracting English relations in a niche field based on an unsupervised approach, including S1, obtaining English text data in a niche field; S2, preprocessing the English text data; S3, using an E2E model to perform reference resolution; S4, extracting different types of entity content from the preprocessed English text data through a T5 model; S5, extracting relation triples in the English text data based on dependency syntactic analysis; S6, matching the extracted relation triples with the entity content extracted in step S4; S7, filtering the matched relation triples according to the entity dictionary provided by the user; S8, performing rule filtering on the obtained relation triples; S9, performing unsupervised cluster analysis on the filtered relation triples; S10, forming a final relation extraction result. The present invention adopts an unsupervised learning method, avoids dependence on a large amount of labeled data, and reduces the high cost of manual labeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of English relation extraction, and in particular to a method for extracting English relations in a niche field based on an unsupervised approach. Background Art

[0002] With the rapid development of Internet technology, the acquisition and dissemination of information has become increasingly convenient. In the massive amount of network data, there is a wealth of information about the relationship between entities, which is of great value to applications such as knowledge graph construction, intelligent search engines, and recommendation systems. English relation extraction, as one of the key tasks in the field of natural language processing (NLP), aims to automatically identify entities in text and their relationships, thereby promoting intelligent processing and utilization of data.

[0003] However, existing relation extraction methods mainly rely on supervised learning, which requires a large amount of labeled data to train the model. In most general fields, labeled data is relatively easy to obtain, so supervised learning methods have achieved remarkable results in these fields. However, in some niche fields, such as professional literature in specific industries, niche cultural research, etc., obtaining sufficient and high-quality labeled data is often expensive and difficult to achieve. The texts in these fields are usually characterized by rich terminology, abstract concepts, and hidden relationships, making it difficult to apply existing supervised learning methods.

[0004] In addition, supervised learning methods are often limited in their generalization and adaptability when faced with domain migration, resulting in reduced model performance. For example, a relationship extraction model trained in the financial field may not be directly applied to the medical field because the terminology and relationship types of the two fields are quite different. In this case, it is often necessary to re-label a large amount of data and retrain the model, which increases time and economic costs.

[0005] In order to solve the above problems, unsupervised learning has emerged as an effective solution. Unsupervised learning methods do not rely on labeled data, but learn by mining the structure and patterns of the data itself. This method has significant advantages under resource-constrained conditions, especially in niche areas, and can extract and filter relationships between entities more quickly and efficiently. However, existing unsupervised relationship extraction methods mainly focus on general fields, and do not give enough consideration to the particularity and complexity of niche fields. Texts in niche fields often have the characteristics of rich terminology, abstract concepts, and hidden relationships, which brings additional challenges to relationship extraction.

[0006] The current unsupervised relationship extraction methods face the following defects when dealing with niche texts:

[0007] 1. Syntactic and semantic accuracy: Existing methods often fail to accurately identify and extract relationships when dealing with complex syntactic structures and hidden semantic relationships. This is especially true for specialized terms and unique expressions in niche areas.

[0008] 2. Scalability and adaptability of the model: Since texts in niche fields are highly specialized, existing methods have limited migration and expansion capabilities between different fields and are difficult to meet diverse needs.

[0009] 3. Data processing efficiency: Processing large amounts of text data in niche areas requires efficient data processing and analysis capabilities. Existing methods still have room for improvement in processing speed and efficiency.

[0010] 4. Lack of comprehensive utilization of domain knowledge: Existing unsupervised learning methods are insufficient in utilizing domain knowledge and background information, and cannot fully combine the knowledge of domain experts for relationship extraction.

[0011] Therefore, how to provide a method for extracting English relations in niche fields based on an unsupervised approach is an urgent problem that technicians in this field need to solve. Summary of the invention

[0012] One purpose of the present invention is to propose a method for extracting English relations in niche fields based on an unsupervised approach. The present invention adopts an unsupervised learning method, avoids dependence on a large amount of labeled data, reduces the high cost of manual labeling, and is particularly suitable for niche fields where data is scarce and labeling is difficult.

[0013] According to an embodiment of the present invention, a method for extracting English relations in a niche domain based on an unsupervised manner includes the following steps:

[0014] S1. Obtain English text data in niche areas;

[0015] S2. Preprocessing the English text data, including word segmentation, part-of-speech tagging, and dependency syntactic analysis;

[0016] S3, using the E2E model to perform reference resolution and solve the pronoun reference problem in the preprocessed English text data;

[0017] S4, extracting different types of entity content from the preprocessed English text data through the T5 model;

[0018] S5. Extract relation triplets from English text data based on dependency syntactic analysis;

[0019] S6, matching the extracted relation triples with the entity content extracted in step S4;

[0020] S7. Filter the matching relationship triples according to the entity dictionary provided by the user;

[0021] S8, performing rule filtering on the acquired relationship triples, so that the relationship triples finally outputted meet the preset quality standards;

[0022] S9, perform unsupervised cluster analysis on the filtered relationship triplets to identify and summarize relationship categories;

[0023] S10, output structured relationship triples to form the final relationship extraction result;

[0024] S11. Provide a certain degree of explainability so that users can understand and trust the extraction results of the model.

[0025] Optionally, S2 includes the following steps:

[0026] S21, performing word segmentation processing on the English text data, dividing the English text data into independent word units:

[0027] ;

[0028] in, Represents the word set after word segmentation. Represents a single word, Represents the original English text data, Represents the word segmentation algorithm;

[0029] S22, perform part-of-speech tagging on the English text data after word segmentation, and determine the part-of-speech tag of each word unit, where the part-of-speech tags include nouns, verbs, adjectives, and adverbs:

[0030] ;

[0031] in, Represents the words and their part-of-speech tags after part-of-speech tagging. Expressing words The part-of-speech tag, represents the part-of-speech tagging algorithm;

[0032] S23, performing dependency syntactic analysis on the English text data after part-of-speech tagging, and constructing a dependency tree of the sentence, where the dependency tree represents the grammatical dependency relationship between words in the sentence, wherein each node represents a word, and the edge represents the dependency relationship between words;

[0033] ;

[0034] ;

[0035] ;

[0036] in, Represents the preprocessed English text data, Represents a set of word nodes, represents the set of dependency relationships between words. Expressing words and The type of dependency relationship between Represents the dependency identification algorithm.

[0037] Optionally, S3 includes the following steps:

[0038] S31. Perform multi-layer context encoding on the preprocessed English text data, encode the English text data into a multi-level context representation, and capture semantic information:

[0039] ;

[0040] ;

[0041] in, represents the context representation after multi-level encoding, represents the end-to-end model encoder of the lth layer, L represents the number of encoder layers, Indicates the number of encoder layers;

[0042] S32. Using the improved reference relationship recognition algorithm, combined with the context representation and the prior knowledge base, the reference relationship in the text is identified to identify the referent of each pronoun:

[0043] ;

[0044] in, represents the set of identified referential relations, Indicates pronouns, Pronouns The object of reference, represents the pronoun identification algorithm, Pronouns The set of candidate referents of Represents the combination of prior knowledge base The referential relationship score function of Representing multi-level context representation;

[0045] S33, introduce an adaptive verification mechanism to dynamically verify and correct the identified reference relationship, adjust it according to context changes and semantic consistency, and adjust the referent of each pronoun to be semantically correct:

[0046] ;

[0047] in, Represents the set of reference relations after dynamic verification and correction, Represents the adaptive checksum correction function, output 1 indicates the check is passed, and output 0 indicates the check is not passed;

[0048] S34, according to the verified and corrected reference relationship, the pronoun is replaced with its referent, and the English text data after reference resolution is generated:

[0049] ;

[0050] in, Represents the English text data after reference resolution. Removing pronouns from preprocessed text data , Pronoun to be removed Replace with its referent ;

[0051] S35. Keep the original pronouns in the English text data after reference resolution:

[0052] ;

[0053] in, It means that the original pronouns are retained after the decomposition of the English text data. Represents the set of referential relations Extract all pronouns from The formed collection.

[0054] Optionally, S4 includes the following steps:

[0055] S41. Serialize the preprocessed English text data and convert the English text data into a format suitable for T5 model input:

[0056] ;

[0057] in, Represents serialized English text data. Represents the serialization processing algorithm, represents the English text data after reference digestion, N represents the number of English text data, Represents the word segmentation algorithm, represents the part-of-speech tagging matrix, Represents the i-th English text data, Expressing words The weight of represents word embedding, represents part-of-speech embedding, Represents the part-of-speech tag of the jth word in the i-th text data;

[0058] S42. Input the serialized English text data into the pre-trained T5 model to generate entity content prediction results:

[0059] ;

[0060] ;

[0061] ;

[0062] in, Represents the entity content set predicted by the T5 model, represents the pre-trained T5 model, represents the serialized English text data, L represents the number of layers of the T5 model, represents the self-attention mechanism, represents a feed-forward neural network, , , denote query, key, and value matrices respectively, represents the dimension of the key matrix, represents the weight matrix, represents the bias term;

[0063] S43, decoding the entity content prediction result output by the T5 model, and converting the tag sequence output by the model into entity content:

[0064] ;

[0065] in, Represents the decoded entity content collection, represents the decoding algorithm, represents the vocabulary, represents the embedding vector of each word in the vocabulary, Represents the i-th prediction result;

[0066] S44, classify the decoded entity content by type, and classify and mark different types of entity content:

[0067] ;

[0068] in, Represents a collection of classified entity contents. Represents a single entity content, Representing Entities The classification label of Represents a set of classification labels, represents the embedding vector of the classification label, Representing Entities Context representation.

[0069] S45. Perform quality check on the classified entity content to ensure that the classification of each entity content is correct and accurate:

[0070] ;

[0071] ;

[0072] in, Represents the verified entity content collection, Representation quality verification algorithm, combined with context representation , output 1 means the verification is passed, output 0 means the verification is not passed, Indicates the threshold value;

[0073] S46. Output the verified entity content as the final extraction result:

[0074] ;

[0075] in, Represents the final output entity content collection.

[0076] Optionally, S5 includes the following steps:

[0077] S51: Based on the dependency syntactic analysis result in step S2, identify the subject, predicate and object in the sentence and construct a preliminary relation triple :

[0078] ;

[0079] in, represents the set of preliminary relation triples, Represents the subject in a relation triple, represents the predicate in a relation triple, Represents the object in a relation triple, Represents a set of word nodes, represents a set of predicates, Represents a set of dependencies;

[0080] S52, performing context semantic matching on the preliminary relationship triples, verifying and adjusting the correctness of the relationship triples;

[0081] S53, using the prior knowledge base to complete and correct the matched relation triples;

[0082] S54, filtering the completed and corrected relationship triples, removing the relationship triples that do not meet the preset quality standards, and obtaining filtered relationship triples ;

[0083] S55, filter the relationship triples As the final output:

[0084] ;

[0085] in, Represents the set of relation triples of the final output.

[0086] Optionally, the S6 includes the following steps:

[0087] S61, perform entity matching preprocessing on the set of relation triples finally output in step S5, and extract entity information in the relation triples:

[0088] ;

[0089] in, Represents the set of entities extracted from the final output relation triples;

[0090] S62, standardizing the entity content extracted in step S4 to ensure that it is consistent with the entity in the final output relation triple;

[0091] S63. Using a similarity calculation algorithm, the entities in the final output relationship triple set are matched with the standardized entity content, and the matching degree of each pair of entities is calculated:

[0092] ;

[0093] in, Represents the entity in the final output relation triple set and Standardized entity content The matching degree, represents the similarity calculation function, Represents standardized entity content;

[0094] S64. Threshold filtering is performed on the calculated matching degree, and entity matches with matching degrees greater than a preset threshold are retained:

[0095] ;

[0096] in, Represents the filtered entity matching set, Indicates the preset matching threshold;

[0097] S65, integrating the filtered entity matching results with the final output relation triples to generate the final matching relation triples:

[0098] ;

[0099] in, Represents the final set of matching relation triples.

[0100] Optionally, the S7 includes the following steps:

[0101] S71. Obtain the entity dictionary provided by the user and convert the entity dictionary into a standard format ;

[0102] S72: Perform entity dictionary filtering on the set of relation triples that are finally matched in step S6, and retain relation triples that match entities in the entity dictionary. :

[0103] ;

[0104] in, Represents the set of relation triples filtered by the entity dictionary;

[0105] S73. Calculate the relationship triples matching the relationship entity The matching degree between the entity in the entity dictionary and the entity triples of the retained entity matching Correlation with dictionary entities ;

[0106] S74. Perform threshold filtering on the calculated matching degree, and retain the relationship triples whose matching degree is greater than the preset threshold:

[0107] ;

[0108] in, represents the set of relation triples after threshold filtering, Indicates the preset matching threshold;

[0109] S75. Take the filtered relationship triples as the final output result, and retain the relationship triples that are highly matched with the user entity dictionary:

[0110] ;

[0111] in, Represents the final filtered set of relation triples.

[0112] Optionally, the S8 includes the following steps:

[0113] S81. Define quality criteria for relation triples, including grammatical correctness, semantic rationality, and entity consistency;

[0114] S82, performing grammatical rule filtering on the acquired relation triples to ensure grammatical correctness of the relation triples;

[0115] S83, performing semantic rationality check on the relation triples that pass the grammatical filtering to ensure the semantic rationality of the relation triples;

[0116] S84. Perform entity consistency check on the relation triples that pass the semantic rationality check to ensure the consistency of entities in the relation triples in the context;

[0117] S85, performing quality scoring on the relation triples that pass the entity consistency check, so that the output relation triples meet the preset quality standards;

[0118] S86. Take the relationship triplet that meets the quality standard as the final relationship triplet .

[0119] Optionally, the S9 includes the following steps:

[0120] S91. Final relationship triples after quality filtering Perform feature extraction and generate feature vectors for cluster analysis:

[0121] ;

[0122] in, The context of the subject indicates that is the context representation of the predicate, The context of the object is expressed as represents the Hadamard product, represents the vector concatenation operation, N represents the context window size, represents the attention weight of the context word, Represents the context word, Represents the weight matrix of context words.

[0123] S92, normalizing the extracted feature vector ;

[0124] S93, using the final relation triple Perform cluster analysis on the feature vectors extracted from the dataset to identify the clustering categories of the relationship triples:

[0125] ;

[0126] ;

[0127] in, Represents the final relation triple The extracted feature vector set, represents the cluster center, represents the Euclidean norm of a vector, represents clustering, Represents the unsupervised clustering results;

[0128] S94. Analyze and verify the clustering results:

[0129] ;

[0130] in, represents the layer weight, Represents the similarity calculation function, combined with the context representation of the entity , Indicates Cluster centers, represents the verification threshold;

[0131] S95. Summarize the relationship categories of the verified clustering results and generate a relationship description for each category:

[0132] ;

[0133] ;

[0134] in, Represents a set of relationship category descriptions, represents the relational category induction algorithm, represents a single cluster category, represents the normalized feature vector, Expressing predicate The context indicates that Represents the relationship category function used to summarize the clustering results;

[0135] S96. Take the summarized relationship categories as the final output result to form a relationship category analysis report:

[0136] ;

[0137] ;

[0138] in, Represents a relationship category analysis report, A description function representing a relation triple.

[0139] The beneficial effects of the present invention are:

[0140] (1) The present invention adopts an unsupervised learning method, which avoids the reliance on a large amount of labeled data and reduces the high cost of manual labeling. It is particularly suitable for niche fields where data is scarce and labeling is difficult. Through data preprocessing, coreference resolution, entity extraction, and relation triple extraction and matching, the grammatical and semantic accuracy of the extraction results is ensured. In particular, the dependency syntactic analysis and coreference resolution steps can accurately identify entities and their relationships in sentences, thereby improving the quality of the extraction results.

[0141] (2) Through feature extraction and unsupervised cluster analysis, the present invention can quickly adapt to text data in new fields, automatically discover and extract entity relationships in new fields, without the need to re-label data and train models. This significantly enhances the adaptability and generalization ability of the model in different niche fields, and ensures that the final output relationship triples meet the preset quality standards through rule filtering and quality inspection steps. Multi-level quality control of syntax, semantics and entity consistency checks ensures the high reliability of relationship extraction results.

[0142] (3) The present invention does not rely on predefined relationship types and can flexibly discover and extract new relationship types. Unsupervised cluster analysis can identify and summarize relationship categories, providing new possibilities for knowledge discovery and data mining, and improving the efficiency of knowledge acquisition in niche fields. The relationship triples are filtered through the entity dictionary provided by the user, combined with domain knowledge, to improve the accuracy of the extraction results. Standardization processing and matching preprocessing ensure the close integration of relationship triples and domain knowledge. BRIEF DESCRIPTION OF THE DRAWINGS

[0143] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0144] Figure 1 This is a flowchart of a method for extracting English relations in a niche domain based on an unsupervised approach proposed by the present invention. DETAILED DESCRIPTION

[0145] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0146] refer to Figure 1 , a niche domain English relation extraction method based on unsupervised approach, including the following steps:

[0147] S1. Obtain English text data in niche areas;

[0148] S2. Preprocess the English text data, including word segmentation, part-of-speech tagging, and dependency syntax analysis;

[0149] S3, using the E2E model to perform reference resolution and solve the pronoun reference problem in the preprocessed English text data;

[0150] S4, extracting different types of entity content from the preprocessed English text data through the T5 model;

[0151] S5. Extract relation triplets from English text data based on dependency syntactic analysis;

[0152] S6, matching the extracted relation triples with the entity content extracted in step S4;

[0153] S7. Filter the matching relationship triples according to the entity dictionary provided by the user;

[0154] S8, performing rule filtering on the acquired relationship triples, so that the relationship triples finally outputted meet the preset quality standards;

[0155] S9, perform unsupervised cluster analysis on the filtered relationship triplets to identify and summarize relationship categories;

[0156] S10, output structured relationship triples to form the final relationship extraction result;

[0157] S11. Provide a certain degree of explainability so that users can understand and trust the extraction results of the model.

[0158] In this implementation, S2 includes the following steps:

[0159] S21, performing word segmentation processing on the English text data, dividing the English text data into independent word units:

[0160] ;

[0161] in, Represents the word set after word segmentation. Represents a single word, Represents the original English text data, Represents the word segmentation algorithm;

[0162] S22, perform part-of-speech tagging on the English text data after word segmentation, and determine the part-of-speech tag of each word unit, where the part-of-speech tags include nouns, verbs, adjectives, and adverbs:

[0163] ;

[0164] in, Represents the words and their part-of-speech tags after part-of-speech tagging. Expressing words The part-of-speech tag, represents the part-of-speech tagging algorithm;

[0165] S23, performing dependency syntactic analysis on the English text data after part-of-speech tagging, and constructing a dependency tree of the sentence, where the dependency tree represents the grammatical dependency relationship between words in the sentence, wherein each node represents a word, and the edge represents the dependency relationship between words;

[0166] ;

[0167] ;

[0168] ;

[0169] in, Represents the preprocessed English text data, Represents a set of word nodes, represents the set of dependency relationships between words. Expressing words and The type of dependency relationship between Represents the dependency identification algorithm.

[0170] In this implementation, S3 includes the following steps:

[0171] S31. Perform multi-layer context encoding on the preprocessed English text data, encode the English text data into a multi-level context representation, and capture semantic information:

[0172] ;

[0173] ;

[0174] in, represents the context representation after multi-level encoding, represents the end-to-end model encoder of the lth layer, L represents the number of encoder layers, Indicates the number of encoder layers;

[0175] S32. Using the improved reference relationship recognition algorithm, combined with the context representation and the prior knowledge base, the reference relationship in the text is identified to identify the referent of each pronoun:

[0176] ;

[0177] in, represents the set of identified referential relations, Indicates pronouns, Pronouns The object of reference, represents the pronoun identification algorithm, Pronouns The set of candidate referents of Represents the combination of prior knowledge base The referential relationship score function of Representing multi-level context representation;

[0178] S33, introduce an adaptive verification mechanism to dynamically verify and correct the identified reference relationship, adjust it according to context changes and semantic consistency, and adjust the referent of each pronoun to be semantically correct:

[0179] ;

[0180] in, Represents the set of reference relations after dynamic verification and correction, Represents the adaptive checksum correction function, output 1 indicates the check is passed, and output 0 indicates the check is not passed;

[0181] S34. According to the verified and corrected reference relationship, the pronoun is replaced with its referent to generate English text data after reference resolution:

[0182] ;

[0183] in, Represents the English text data after reference resolution. Removing pronouns from preprocessed text data , Pronoun to be removed Replace with its referent ;

[0184] S35. Keep the original pronouns in the English text data after reference resolution:

[0185] ;

[0186] in, It means that the original pronouns are retained after the decomposition of the English text data. Represents the set of referential relations Extract all pronouns from The formed collection.

[0187] In this implementation, S4 includes the following steps:

[0188] S41. Serialize the preprocessed English text data and convert the English text data into a format suitable for T5 model input:

[0189] ;

[0190] in, Represents serialized English text data. Represents the serialization processing algorithm, represents the English text data after reference digestion, N represents the number of English text data, Represents the word segmentation algorithm, represents the part-of-speech tagging matrix, Represents the i-th English text data, Expressing words The weight of represents word embedding, represents part-of-speech embedding, Represents the part-of-speech tag of the jth word in the i-th text data;

[0191] S42. Input the serialized English text data into the pre-trained T5 model to generate entity content prediction results:

[0192] ;

[0193] ;

[0194] ;

[0195] in, Represents the entity content set predicted by the T5 model, represents the pre-trained T5 model, represents the serialized English text data, L represents the number of layers of the T5 model, represents the self-attention mechanism, represents a feed-forward neural network, , , denote query, key, and value matrices respectively, represents the dimension of the key matrix, represents the weight matrix, represents the bias term;

[0196] S43, decoding the entity content prediction result output by the T5 model, and converting the tag sequence output by the model into entity content:

[0197] ;

[0198] in, Represents the decoded entity content collection, represents the decoding algorithm, represents the vocabulary, represents the embedding vector of each word in the vocabulary, Represents the i-th prediction result;

[0199] S44, classify the decoded entity content by type, and classify and mark different types of entity content:

[0200] ;

[0201] in, Represents a collection of classified entity contents. Represents a single entity content, Representing Entities The classification label of Represents a set of classification labels, represents the embedding vector of the classification label, Representing Entities Context representation.

[0202] S45. Perform quality check on the classified entity content to ensure that the classification of each entity content is correct and accurate:

[0203] ;

[0204] ;

[0205] in, Represents the verified entity content collection, Representation quality verification algorithm, combined with context representation , output 1 means the verification is passed, output 0 means the verification is not passed, Indicates the threshold value;

[0206] S46. Output the verified entity content as the final extraction result:

[0207] ;

[0208] in, Represents the final output entity content collection.

[0209] In this implementation, S5 includes the following steps:

[0210] S51: Based on the dependency syntactic analysis result in step S2, identify the subject, predicate and object in the sentence and construct a preliminary relation triple :

[0211] ;

[0212] in, represents the set of preliminary relation triples, Represents the subject in a relation triple, represents the predicate in a relation triple, Represents the object in a relation triple, Represents a set of word nodes, represents a set of predicates, Represents a set of dependencies;

[0213] S52, performing context semantic matching on the preliminary relationship triples, verifying and adjusting the correctness of the relationship triples;

[0214] S53, using the prior knowledge base to complete and correct the matched relation triples;

[0215] S54, filtering the completed and corrected relationship triples, removing the relationship triples that do not meet the preset quality standards, and obtaining filtered relationship triples ;

[0216] S55, filter the relationship triples As the final output:

[0217] ;

[0218] in, Represents the set of relation triples of the final output.

[0219] In this implementation, S6 includes the following steps:

[0220] S61, perform entity matching preprocessing on the set of relation triples finally output in step S5, and extract entity information in the relation triples:

[0221] ;

[0222] in, Represents the set of entities extracted from the final output relation triples;

[0223] S62, standardizing the entity content extracted in step S4 to ensure that it is consistent with the entity in the final output relation triple;

[0224] S63. Using a similarity calculation algorithm, the entities in the final output relationship triple set are matched with the standardized entity content, and the matching degree of each pair of entities is calculated:

[0225] ;

[0226] in, Represents the entity in the final output relation triple set and Standardized entity content The matching degree, represents the similarity calculation function, Represents standardized entity content;

[0227] S64. Threshold filtering is performed on the calculated matching degree, and entity matches with matching degrees greater than a preset threshold are retained:

[0228] ;

[0229] in, Represents the filtered entity matching set, Indicates the preset matching threshold;

[0230] S65, integrating the filtered entity matching results with the final output relation triples to generate the final matching relation triples:

[0231] ;

[0232] in, Represents the final set of matching relation triples.

[0233] In this implementation, S7 includes the following steps:

[0234] S71. Obtain the entity dictionary provided by the user and convert the entity dictionary into a standard format ;

[0235] S72: Perform entity dictionary filtering on the set of relation triples that are finally matched in step S6, and retain relation triples that match entities in the entity dictionary. :

[0236] ;

[0237] in, Represents the set of relation triples filtered by the entity dictionary;

[0238] S73. Calculate the relationship triples matching the relationship entity The matching degree between the entity in the entity dictionary and the entity triples of the retained entity matching Correlation with dictionary entities ;

[0239] S74. Perform threshold filtering on the calculated matching degree, and retain the relationship triples whose matching degree is greater than the preset threshold:

[0240] ;

[0241] in, represents the set of relation triples after threshold filtering, Indicates the preset matching threshold;

[0242] S75. Take the filtered relationship triples as the final output result, and retain the relationship triples that are highly matched with the user entity dictionary:

[0243] ;

[0244] in, Represents the final filtered set of relation triples.

[0245] In this implementation, S8 includes the following steps:

[0246] S81. Define quality criteria for relation triples, including grammatical correctness, semantic rationality, and entity consistency;

[0247] S82, performing grammatical rule filtering on the acquired relation triples to ensure grammatical correctness of the relation triples;

[0248] S83, performing semantic rationality check on the relation triples that pass the grammatical filtering to ensure the semantic rationality of the relation triples;

[0249] S84. Perform entity consistency check on the relation triples that pass the semantic rationality check to ensure the consistency of entities in the relation triples in the context;

[0250] S85, performing quality scoring on the relation triples that pass the entity consistency check, so that the output relation triples meet the preset quality standards;

[0251] S86. Take the relationship triplet that meets the quality standard as the final relationship triplet .

[0252] In this implementation, S9 includes the following steps:

[0253] S91. Final relationship triples after quality filtering Perform feature extraction and generate feature vectors for cluster analysis:

[0254] ;

[0255] in, The context of the subject indicates that is the context representation of the predicate, The context of the object is expressed as represents the Hadamard product, represents the vector concatenation operation, N represents the context window size, represents the attention weight of the context word, Represents the context word, Represents the weight matrix of context words.

[0256] S92, normalizing the extracted feature vector ;

[0257] S93, using the final relation triple Perform cluster analysis on the feature vectors extracted from the dataset to identify the clustering categories of the relationship triples:

[0258] ;

[0259] ;

[0260] in, Represents the final relation triple The extracted feature vector set, represents the cluster center, represents the Euclidean norm of a vector, represents clustering, Represents the unsupervised clustering results;

[0261] S94. Analyze and verify the clustering results:

[0262] ;

[0263] in, represents the layer weight, Represents the similarity calculation function, combined with the context representation of the entity , Indicates Cluster centers, represents the verification threshold;

[0264] S95. Summarize the relationship categories of the verified clustering results and generate a relationship description for each category:

[0265] ;

[0266] ;

[0267] in, Represents a set of relationship category descriptions, represents the relational category induction algorithm, represents a single cluster category, represents the normalized feature vector, Expressing predicate The context indicates that Represents the relationship category function used to summarize the clustering results;

[0268] S96. Take the summarized relationship categories as the final output result to form a relationship category analysis report:

[0269] ;

[0270] ;

[0271] in, Represents a relationship category analysis report, A description function representing a relation triple.

[0272] Embodiment 1:

[0273] The present invention selects a representative document dataset for model comparison for the relation extraction task. The dataset contains 5,000 English document data, covering a wide range of document fields, providing rich test samples for the comparative experiment.

[0274] In the process of model comparison and evaluation, the present invention uses a variety of evaluation indicators, including accuracy, recall rate and F1 score, to comprehensively evaluate the performance of the model. By comparing the performance of models of the same type, the model selected by the present invention shows good performance in all indicators, proving its effectiveness in the task of document relationship extraction.

[0275] In addition, the present invention normalizes the data set to ensure that each text contains only one target extraction triple. This normalized data processing method helps improve the performance of the model in the relation extraction task, reduces noise interference during the model training process, and enables the model to focus more on learning the key information in the text.

[0276] In order to evaluate the performance of our proposed new model in extracting entity relations from English documents, we selected the classic models LSTM-CRF, BILSTM-CRF, BERT, and BERT-CRF as baseline models. We conducted experiments on extracting entity relations from English documents and conducted a detailed comparative analysis of the evaluation index results of each model.

[0277] The following table compares the relationship triple prediction performance of the new model of the present invention and four classic models.

[0278]

[0279] Experimental results show that the model performs better than the classic model.

[0280] The present invention adopts an unsupervised learning method, avoiding the reliance on a large amount of labeled data and reducing the high cost of manual labeling. It is particularly suitable for niche fields where data is scarce and labeling is difficult. Through data preprocessing, coreference resolution, entity extraction, and relation triple extraction and matching, the grammatical and semantic accuracy of the extraction results is ensured. In particular, the dependency syntactic analysis and coreference resolution steps can accurately identify entities and their relationships in sentences, improving the quality of the extraction results.

[0281] Through feature extraction and unsupervised cluster analysis, the present invention can quickly adapt to text data in new fields, automatically discover and extract entity relationships in new fields, without re-labeling data and training models. This significantly enhances the adaptability and generalization ability of the model in different niche fields, and ensures that the final output relationship triples meet the preset quality standards through rule filtering and quality inspection steps. Multi-level quality control of syntax, semantics and entity consistency checks ensures the high reliability of relationship extraction results.

[0282] The present invention does not rely on predefined relationship types and can flexibly discover and extract new relationship types. Unsupervised cluster analysis can identify and summarize relationship categories, providing new possibilities for knowledge discovery and data mining, and improving the efficiency of knowledge acquisition in niche fields. The relationship triples are filtered through the entity dictionary provided by the user, combined with domain knowledge, to improve the accuracy of the extraction results. Standardization processing and matching preprocessing ensure the close integration of relationship triples and domain knowledge.

[0283] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for extracting English relations in a niche domain based on an unsupervised approach, characterized in that: The following steps are involved: S1. Obtain English text data in niche areas; S2. Preprocessing the English text data, including word segmentation, part-of-speech tagging, and dependency syntactic analysis; S3, using the E2E model to perform reference resolution and solve the pronoun reference problem in the preprocessed English text data; S4, extracting different types of entity content from the preprocessed English text data through the T5 model; S5. Extract relation triplets from English text data based on dependency syntactic analysis; S6, matching the extracted relation triples with the entity content extracted in step S4; S7. Filter the matching relationship triples according to the entity dictionary provided by the user; S8, performing rule filtering on the acquired relationship triples, so that the relationship triples finally outputted meet the preset quality standards; S9, perform unsupervised cluster analysis on the relationship triplets filtered by S8 to identify and summarize relationship categories; S10, output structured relationship triples to form the final relationship extraction result; The S8 comprises the following steps: S81. Define quality criteria for relation triples, including grammatical correctness, semantic rationality, and entity consistency; S82, performing grammatical rule filtering on the acquired relation triples; S83, perform semantic rationality check on the relation triples that pass the grammatical filtering; S84, performing entity consistency check on the relation triples that pass the semantic rationality check; S85, performing quality scoring on the relation triples that pass the entity consistency check, so that the output relation triples meet the preset quality standards; S86. Take the relationship triplet that meets the quality standard as the final relationship triplet ; The S9 comprises the following steps: S91. Final relationship triples after quality filtering Perform feature extraction and generate feature vectors for cluster analysis: ; in, The context of the subject indicates that is the context representation of the predicate, The context of the object is expressed as represents the Hadamard product, represents a vector concatenation operation, represents the context window size, represents the attention weight of the context word, represents the weight matrix of the context words, Indicates context words; S92, normalizing the extracted feature vector ; S93, using the final relation triple Perform cluster analysis on the feature vectors extracted from the dataset to identify the clustering categories of the relationship triples: ; ; in, Represents the final relation triple The extracted feature vector set, represents the cluster center, represents the Euclidean norm of a vector, represents the unsupervised clustering result, Represents clustering; S94. Analyze and verify the clustering results: ; in, represents the layer weight, Represents the similarity calculation function, combined with the context representation of the entity , represents the kth cluster center, represents the verification threshold; S95. Summarize the relationship categories of the verified clustering results and generate a relationship description for each category: ; ; in, Represents a set of relationship category descriptions, represents the relational category induction algorithm, represents the normalized feature vector, Expressing predicate The context indicates that Represents the relationship category function used to summarize the clustering results; S96. Take the summarized relationship categories as the final output result to form a relationship category analysis report: ; ; in, Represents a relationship category analysis report, A description function that represents a relation triple.

2. According to the unsupervised method for extracting English relations in a niche domain according to claim 1, it is characterized in that: The S2 comprises the following steps: S21, performing word segmentation processing on the English text data, dividing the English text data into independent word units: ; in, Represents the word set after word segmentation. Represents a single word, Represents the original English text data, Represents the word segmentation algorithm; S22, perform part-of-speech tagging on the English text data after word segmentation, and determine the part-of-speech tag of each word unit, where the part-of-speech tags include nouns, verbs, adjectives, and adverbs: ; in, Represents the words and their part-of-speech tags after part-of-speech tagging. Expressing words The part-of-speech tag, represents the part-of-speech tagging algorithm; S23, performing dependency syntactic analysis on the English text data after part-of-speech tagging, and constructing a dependency tree of the sentence, where the dependency tree represents the grammatical dependency relationship between words in the sentence, wherein each node represents a word, and the edge represents the dependency relationship between words; ; ; ; in, Represents the preprocessed English text data, Represents a set of word nodes, represents the set of dependency relationships between words. Expressing words and The type of dependency relationship between Represents the dependency identification algorithm.

3. According to claim 2, the method for extracting English relations in a niche domain based on an unsupervised approach is characterized in that: The S3 comprises the following steps: S31. Perform multi-layer context encoding on the preprocessed English text data, encode the English text data into a multi-level context representation, and capture semantic information: ; ; in, represents the context representation after multi-level encoding, represents the end-to-end model encoder at layer l, and L represents the total number of encoder layers; S32. Using the improved reference relationship recognition algorithm, combined with the context representation and the prior knowledge base, the reference relationship in the text is identified to identify the referent of each pronoun: ; in, represents the set of identified referential relations, Indicates pronouns, Pronouns The object of reference, represents the pronoun identification algorithm, Pronouns The set of candidate referents of Represents the combination of prior knowledge base The referential relationship score function of Representing multi-level context representation; S33, introduce an adaptive verification mechanism to dynamically verify and correct the identified reference relationship, adjust it according to context changes and semantic consistency, and adjust the referent of each pronoun to be semantically correct: ; in, Represents the set of reference relations after dynamic verification and correction, Represents the adaptive checksum correction function, output 1 indicates the check is passed, and output 0 indicates the check is not passed; S34, according to the verified and corrected reference relationship, the pronoun is replaced with its referent, and the English text data after reference resolution is generated: ; in, Represents the English text data after reference resolution. Removing pronouns from preprocessed text data , Pronoun to be removed Replace with its referent ; S35. Keep the original pronouns in the English text data after reference resolution: ; in, It means that the original pronouns are retained after the decomposition of the English text data. Represents the set of referential relations Extract all pronouns from The formed collection.

4. According to claim 3, the method for extracting English relations in a niche domain based on an unsupervised approach is characterized in that: The S4 comprises the following steps: S41. Serialize the preprocessed English text data and convert the English text data into a format suitable for T5 model input: ; in, Represents serialized English text data. Represents the serialization processing algorithm, represents the English text data after reference digestion, N represents the number of English text data, Represents the word segmentation algorithm, represents the part-of-speech tagging matrix, Indicates English text data, Expressing words The weight of represents word embedding, represents part-of-speech embedding, Indicates The text data The part-of-speech tag of each word; S42. Input the serialized English text data into the pre-trained T5 model to generate entity content prediction results: ; ; ; in, Represents the entity content set predicted by the T5 model, represents the pre-trained T5 model, Represents serialized English text data. Indicates the number of layers of the T5 model, represents the self-attention mechanism, represents a feed-forward neural network, , , denote query, key, and value matrices respectively, represents the dimension of the key matrix, , represents the weight matrix, , represents the bias term; S43, decoding the entity content prediction result output by the T5 model, and converting the tag sequence output by the T5 model into entity content: ; in, Represents the decoded entity content collection, represents the decoding algorithm, represents the vocabulary, represents the embedding vector of each word in the vocabulary, Indicates prediction results; S44, classify the decoded entity content by type, and classify and mark different types of entity content: ; in, Represents a collection of classified entity contents. Represents a single entity content, Representing Entities The classification label of Represents a set of classification labels, represents the embedding vector of the classification label, Representing Entities Contextual representation of ; S45. Perform quality check on the classified entity content: ; ; in, Represents the verified entity content collection, Representation quality verification algorithm, combined with context representation , output 1 means the verification is passed, output 0 means the verification is not passed, Indicates the threshold value; S46. Output the verified entity content as the final extraction result: ; in, Represents the final output entity content collection.

5. According to claim 4, the method for extracting English relations in a niche domain based on an unsupervised approach is characterized in that: The S5 comprises the following steps: S51: Based on the dependency syntactic analysis result in step S2, identify the subject, predicate and object in the sentence and construct a preliminary relation triple : ; in, represents the set of preliminary relation triples, Represents the subject in a relation triple, represents the predicate in a relation triple, represents the object in the relation triple, represents a set of predicates, Represents a set of dependencies; S52, performing context semantic matching on the preliminary relationship triples, verifying and adjusting the correctness of the relationship triples; S53, using the prior knowledge base to complete and correct the matched relation triples; S54, filtering the completed and corrected relationship triples, removing the relationship triples that do not meet the preset quality standards, and obtaining filtered relationship triples ; S55, filter the relationship triples As the final output: ; in, Represents the set of relation triples of the final output.

6. The method for extracting English relations in a niche domain based on an unsupervised approach according to claim 5, characterized in that: The S6 comprises the following steps: S61, perform entity matching preprocessing on the set of relation triples finally output in step S5, and extract entity information in the relation triples: ; in, Represents the set of entities extracted from the final output relation triples; S62, standardizing the entity content extracted in step S4 to ensure that it is consistent with the entity in the final output relation triple; S63. Using a similarity calculation algorithm, the entities in the final output relationship triple set are matched with the standardized entity content, and the matching degree of each pair of entities is calculated: ; in, Represents the entity in the final output relation triple set and Standardized entity content The matching degree, Represents the similarity calculation function; S64. Threshold filtering is performed on the calculated matching degree, and entity matches with matching degrees greater than a preset threshold are retained: ; in, Represents the filtered entity matching set, Indicates the preset matching threshold; S65, integrating the filtered entity matching results with the final output relation triples to generate the final matching relation triples: ; in, Represents the final set of matching relation triples.

7. The method for extracting English relations in a niche domain based on an unsupervised approach according to claim 6, characterized in that: The S7 comprises the following steps: S71. Obtain the entity dictionary provided by the user and convert the entity dictionary into a standard format ; S72: Filter the set of relation triples that are finally matched in step S6 by the entity dictionary, and retain the relation triples that match the entities in the entity dictionary. : ; in, Represents the set of relation triples filtered by the entity dictionary; S73. Calculate the relationship triples matching the relationship entity The matching degree between the entity in the entity dictionary and the entity triples of the retained entity matching Correlation with dictionary entities ; S74. Perform threshold filtering on the calculated matching degree, and retain the relationship triples whose matching degree is greater than the preset threshold: ; in, represents the set of relation triples after threshold filtering, Indicates the preset matching threshold; S75. Take the filtered relationship triples as the final output result, and retain the relationship triples that are highly matched with the user entity dictionary: ; in, Represents the final filtered set of relation triples.