Method, system, and device for extracting hierarchical relationships based on multi-channel feature fusion

By using a multi-channel feature fusion method, automatic labeling and sorting are achieved, which solves the problem of low recall caused by the reliance on language templates in the extraction of hierarchical relationships in existing technologies, and realizes efficient and accurate hierarchical relationship recognition.

CN115828894BActive Publication Date: 2025-10-28CHINA POWER IND INTERNET CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211684747.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2025-10-28
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

Existing methods for extracting hyponyms and hypernyms rely on language templates, resulting in low recall rates, difficulty in effectively identifying hyponym/hypernym pairs with implicit relationships, and high labor costs.

Method used

A multi-channel feature fusion method is adopted, which integrates entity recognition, augmentation, multi-channel feature extraction and attention mechanism. It utilizes syntactic, lexical and semantic features, combined with graph convolutional network to learn the hierarchical relationship between entities, automatically labels and sorts them, and generates hierarchical relationship triples.

Benefits of technology

It reduced the cost of manual annotation, improved the accuracy of identifying hierarchical relationships, and enhanced the accuracy of template matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115828894B_ABST
    Figure CN115828894B_ABST
Patent Text Reader

Abstract

This application relates to a method, system, and device for extracting hierarchical relationships based on multi-channel feature fusion. The method includes: acquiring the original text and performing entity recognition on it; combining the identified entities in pairs to obtain entity pairs and labeling them; crawling relevant content from a database of labeled entity pairs, expanding the labeled entities based on the relevant content to obtain a candidate sentence set; extracting multi-channel features from the candidate sentence set to obtain syntactic features, lexical relation features, and semantic features; fusing the candidate sentence set using an attention mechanism based on the syntactic features, lexical relation features, and semantic features, and then calculating the probability of hierarchical relationships between entities using a Softmax layer; and sorting the triples according to the hierarchical relationship probabilities to obtain the corresponding probabilities of hierarchical relationships. This method can improve the accuracy of scoring hierarchical relationships, thereby improving the accuracy of template matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing technology, and in particular to a method, system and device for extracting hierarchical relationships based on multi-channel feature fusion. Background Technology

[0002] Hypernym extraction can be viewed as a semantic judgment problem involving two related terms, identifying whether an "is-a" or "subclass-of" relationship exists. For example, "Tencent Technology (Shenzhen) Co., Ltd." and "organization" have an "is-a" relationship, while "data mining" and "computer science" have a "subclass-of" relationship. Hypernyms exhibit symmetry; that is, if term a is a hypernym of term b, then term b is also a hyponym of term a. In the example above, "organization" and "computer science" are both hypernyms, while "Tencent Technology (Shenzhen) Co., Ltd." and "data mining" are both hyponyms. Hypernyms are considered the foundation for the creation of many knowledge graphs and ontologies. Furthermore, high-quality hypernyms play a crucial role in downstream tasks.

[0003] Current work on hyponym / hypernym relationship discovery primarily relies on large-scale text prediction to explore hyponym / hypernym word pairs. Methods for discovering contextual word pairs based on large-scale prediction fall into two categories: template-based methods and distributed methods. Template-based methods can accurately extract contextual relationship pairs using precise contextual templates. However, these templates are highly language-dependent and suffer from low recall because they can only accurately match hyponym / hypernym word pairs with explicit meanings, failing to handle hyponym / hypernym word pairs with implicit relationships. Distributed methods are mainly based on the distributed assumption that the context of a hyponym is a subset of the context of a hypernym. Therefore, various methods for representing context are defined accordingly; however, these methods are generally less effective than template-matching methods. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, system, and device for extracting hierarchical relationships based on multi-channel feature fusion that can reduce labor costs and improve template matching accuracy in response to the above-mentioned technical problems.

[0005] To achieve the above objectives, the present invention provides a method for extracting hierarchical relationships based on multi-channel feature fusion, comprising:

[0006] Obtain the original text, perform entity recognition on the original text, and confirm that it contains two or more entities;

[0007] The identified entities are combined in pairs to obtain entity pairs, and the entity pairs are labeled; relevant content of the labeled entity pairs is crawled from the database, and the labeled entities are expanded according to the relevant content to obtain a candidate sentence set, which includes two expanded entities;

[0008] Multi-channel feature extraction is performed on the candidate sentence set to obtain syntactic features, lexical relation features and semantic features, respectively;

[0009] After the candidate sentence set is fused by the attention mechanism based on the syntactic features, the lexical relation features and the semantic features, the probability of hierarchical relationship between entities is calculated through the Softmax layer. The two expanded entities and the hierarchical relationship probabilities are combined to obtain a triple.

[0010] The triplet is sorted according to the probability of the hierarchical relationship to obtain the hierarchical relationship with the corresponding probability.

[0011] In one embodiment, relevant content of labeled entity pairs is crawled from a database, and the labeled entities are expanded based on the relevant content to obtain a candidate sentence set, including:

[0012] The structured information of entities in labeled entity pairs is crawled from the database, and the labeled entities are expanded based on the structured information to obtain a set of candidate sentences.

[0013] At the same time, it is determined whether there are labeled entities in the dictionary. If not, the labeled entities and their corresponding structured information are stored in the dictionary to obtain the expanded dictionary.

[0014] In one embodiment, before performing multi-channel feature extraction on the candidate sentence set to obtain syntactic features, lexical relation features, and semantic features, the method further includes:

[0015] After verifying and correcting the candidate sentence set by crawling and expanding the dictionary, multi-channel feature extraction is performed on the verified and corrected candidate sentence set.

[0016] In one embodiment, multi-channel feature extraction is performed on the candidate sentence set to obtain syntactic features, lexical relation features, and semantic features, including:

[0017] Semantic features are extracted through pre-trained channels;

[0018] Lexical relation features are extracted using pre-trained 300-dimensional word vector channels;

[0019] Syntactic features are extracted using the syntactic dependency tree channel.

[0020] In one embodiment, after fusing the candidate sentence set with an attention mechanism based on the syntactic features, the lexical relation features, and the semantic features, a hypernym / hypernym relationship probability score is obtained to obtain triples, including:

[0021] Syntactic features, lexical relation features, and semantic features are respectively input into the corresponding encoder layers for multi-channel feature encoding, resulting in three types of hidden layer feature vectors.

[0022] The feature vectors of the three hidden layers are input into the graph convolutional network layer to learn the hierarchical relationship.

[0023] The feature vectors of the three hidden layers used for hierarchical learning are input into the decoder layer for feature fusion and association, and then input into the Softmax layer for probability scoring of the hierarchical relationship to obtain triples.

[0024] In one embodiment, the encoder layer includes a pre-trained model encoder, a bidirectional LSTM encoder, and a dependency syntax tree encoder;

[0025] The pre-trained model encoder corresponds to the pre-trained channel and performs hidden layer feature vector calculation on the semantic features;

[0026] The bidirectional LSTM encoder corresponds to a pre-trained 300-dimensional word vector channel, and performs hidden layer feature vector calculation on the lexical relation features;

[0027] The dependency tree encoder corresponds to the syntactic dependency tree channel and performs hidden layer feature vector calculation on the syntactic features.

[0028] In one embodiment, the three types of hidden layer feature vectors are input into a graph convolutional network layer for hierarchical relationship learning, including:

[0029] Using a pre-trained model as input, a graph convolutional network is used to learn semantic information between contexts, resulting in the hidden layer representation.

[0030] Using a bidirectional LSTM encoder as input, graph convolutional network layers are used to learn the inherent logic between words, resulting in the hidden layer representation.

[0031] Using the dependency syntax tree as input, a graph convolutional network is used to learn its intrinsic relationships, resulting in the hidden layer representation.

[0032]

[0033] In one embodiment, the feature vectors of the three hidden layers learned through hierarchical learning are input into the decoder layer for feature fusion and association, and then input into the Softmax layer for upper and lower position relationship probability scoring to obtain triples, including:

[0034] The three hidden layer feature vectors are associated and fused through an attention mechanism. The attention calculation expression is as follows:

[0035]

[0036] Where matrices Q and K represent the pre-trained embedding representation matrix and the graph convolution output matrix, respectively. W q and W k Here, d represents the training parameters, and d represents the dimension of the hidden layer embedding.

[0037] After performing the attention mechanism twice, the average value is taken to obtain the output H(e) of the decoder layer = {e0, e1, ..., e}. n};

[0038] The probability of the corresponding hierarchical relationship is obtained by calculating it through a Softmax layer:

[0039] p = Softmax(W p H+b p )

[0040] Among them, W p Let H represent the training weight matrix, and let b represent the decoder output matrix. p This represents the bias matrix.

[0041] A hierarchical relationship extraction system based on multi-channel feature fusion includes:

[0042] The data mining module is used to acquire the original text, perform entity recognition on the original text, and confirm that it contains two or more entities;

[0043] The annotation module is used to combine the identified entities in pairs to obtain entity pairs and to annotate the entity pairs; crawl the database to retrieve relevant content of the annotated entity pairs, expand the annotated entities according to the relevant content, and obtain a candidate sentence set, wherein the candidate sentence set includes two expanded entities;

[0044] The feature extraction module is used to perform multi-channel feature extraction on the candidate sentence set to obtain syntactic features, lexical relation features and semantic features respectively;

[0045] The scoring module is used to perform attention mechanism fusion on the candidate sentence set according to the syntactic features, the lexical relation features and the semantic features, and then calculate the probability of hierarchical relationship between entities through the Softmax layer. The two expanded entities and the hierarchical relationship probabilities are combined to obtain triples.

[0046] The result sorting module is used to sort the triples according to the probability of the upper and lower position relationship to obtain the upper and lower position relationship with the corresponding probability.

[0047] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0048] Step 102: Obtain the original text, perform entity recognition on the original text, and confirm that it contains more than two entities;

[0049] Step 104: Combine the identified entities in pairs to obtain entity pairs, and label the entity pairs; crawl the relevant content of the labeled entity pairs in the database, expand the labeled entities according to the relevant content, and obtain a candidate sentence set, which includes two expanded entities;

[0050] Step 106: Perform multi-channel feature extraction on the candidate sentence set to obtain syntactic features, lexical relation features and semantic features respectively;

[0051] Step 108: After fusing the candidate sentence set with the attention mechanism according to the syntactic features, the lexical relation features and the semantic features, the probability of having a hierarchical relationship between entities is calculated through the Softmax layer. The two expanded entities and the hierarchical relationship probabilities are combined to obtain a triple.

[0052] Step 110: Sort the triples according to the probability of the hierarchical relationship to obtain the hierarchical relationship with the corresponding probability.

[0053] The aforementioned method, system, and device for extracting hierarchical relationships based on multi-channel feature fusion involves: acquiring the original text; performing entity recognition on the original text to confirm the presence of two or more entities; combining the identified entities pairwise to obtain entity pairs and labeling the entity pairs; crawling relevant content from the database for labeled entity pairs; expanding the labeled entities based on the relevant content to obtain a candidate sentence set; extracting multi-channel features from the candidate sentence set to obtain syntactic features, lexical relation features, and semantic features; fusing the candidate sentence set with the syntactic features, lexical relation features, and semantic features using an attention mechanism; calculating the probability of hierarchical relationships between entities through a Softmax layer; combining the two expanded entities and the hierarchical relationship probabilities to obtain triples; and sorting the triples according to the hierarchical relationship probabilities to obtain the hierarchical relationships with corresponding probabilities. This invention reduces the cost of manual annotation by automatic annotation, while multi-channel feature extraction increases the complexity of syntactic relationships. It learns hierarchical relationships between entities through graph convolutional networks, fuses them through an attention mechanism, and finally obtains the probability of contextual relationships by sorting, which greatly improves the accuracy of scoring hierarchical relationships and thus improves the accuracy of template matching. Attached Figure Description

[0054] Figure 1 This is a flowchart of a hierarchical relationship extraction method based on multi-channel feature fusion in one embodiment;

[0055] Figure 2 This is a framework diagram of a hierarchical relationship extraction method based on multi-channel feature fusion in one embodiment;

[0056] Figure 3 This is a schematic diagram of the framework of a multi-feature fusion scoring model in one embodiment;

[0057] Figure 4 This is a schematic diagram of a hierarchical relationship extraction system based on multi-channel feature fusion in one embodiment;

[0058] Figure 5 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. Detailed Implementation

[0059] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0060] In existing technologies, Wikipedia is used as raw data to extract context for model training, but the hidden structured data features within Wikipedia are ignored. Secondly, short input text may lead to reduced word co-occurrence frequencies and simpler syntactic relationships, significantly reducing template matching accuracy. This invention proposes a hyponymous relationship framework that integrates multiple feature extractions from large-scale data. This is because large-scale raw data is beneficial for model training. Furthermore, this invention proposes a multi-feature fusion scoring model (MFFSM) that integrates syntactic dependency relations, pre-trained models, and graph neural networks. It uses an encoder-decoder structure, making the model more interpretable.

[0061] In one embodiment, such as Figure 1 , 2 As shown, a method for extracting hierarchical relationships based on multi-channel feature fusion is provided, applicable to e-commerce, medical, industrial and other fields, including the following steps:

[0062] Step 102: Obtain the original text, perform entity recognition on the original text, and confirm that it contains more than two entities.

[0063] Specifically, the entities identified vary depending on the domain. Taking industrial data as an example, the entities to be labeled include seven categories: organizations, positions, products, certificates, inspectors, enterprises, and laboratories. The system is trained using the currently popular domain-specific entity labeling model BERT-LSTM-CRF to achieve named entity recognition. For instance, given a massive corpus containing the original text "China Electronics Information Corporation commissioned its second-tier subsidiary, China Electronics Industrial Internet, to conduct market environment research in the industrial sector," entity recognition yields two entities: "China Electronics Information Corporation" and "China Electronics Industrial Internet," both belonging to the "enterprise" category.

[0064] Step 104: Combine the identified entities in pairs to obtain entity pairs and label the entity pairs; crawl the relevant content of the labeled entity pairs in the database, expand the labeled entities according to the relevant content, and obtain a candidate sentence set; wherein, the candidate sentence set includes two expanded entities.

[0065] Specifically, structured information of entities in labeled entity pairs is crawled from large-scale databases such as Baidu Encyclopedia, Baidu Encyclopedia Data, and Wikipedia. The labeled entities are then expanded based on this structured information or existing dictionary information to obtain a candidate sentence set. Simultaneously, it is determined whether the labeled entity exists in the dictionary. If not, the labeled entity and its corresponding structured information are stored in the dictionary, resulting in an expanded dictionary. It is worth noting that the aforementioned structured information includes, but is not limited to, the company's full name, abbreviation, establishment date, headquarters location, company type, business scope, official website information, number of employees, and annual turnover. By analyzing this structured information, relevant information that needs to be expanded can be obtained. The dictionary mentioned in this embodiment is a self-built database, mainly used to store entities and their corresponding structured information.

[0066] For example, Baidu Baike (Baidu Encyclopedia) crawled entries related to "China Electronics Information" and obtained corresponding structured information; Baidu Baike data crawled entries related to "China Electronics Industrial Internet" and obtained corresponding structured information. Through analysis, information such as the company's full name and abbreviation can be obtained. Then, using the crawled information and information from existing dictionaries, ("China Electronics Information", "China Electronics Industrial Internet") can be expanded to ("China Electronics Information Industry Group Co., Ltd." and "China Electronics Industrial Internet Co., Ltd."). Simultaneously, if "China Electronics Industrial Internet" is not found in the dictionary, it can be added to the dictionary along with the crawled structured information to expand the existing dictionary.

[0067] After verifying and correcting the candidate sentence set using the above annotation method and by employing web crawlers and an expanded dictionary, multi-channel feature extraction is performed on the corrected candidate sentence set. The edit distance is calculated between the entity names crawled by the web crawler or entities in the dictionary and the original entity names. If only characters need to be added or deleted, the original entity can be replaced as the corrected entity. Additionally, we can use the expanded dictionary or defined heuristic rules to further annotate the text. For example, entities ending with "Limited Liability Company" are classified as "Enterprise." If there are any mislabeling issues in the model, these will be corrected promptly to avoid affecting downstream tasks.

[0068] Step 106: Multi-channel feature extraction is performed on the candidate sentence set to obtain syntactic features, lexical relation features and semantic features respectively.

[0069] This section prepares the input for the subsequent Multi-Feature Fusion Scoring Model (MFFSM). Semantic features are extracted through a pre-trained channel; lexical relation features are extracted through a pre-trained 300-dimensional word vector channel; and syntactic features are extracted through a syntactic dependency tree channel. Using three channels to extract three different types of features increases the complexity of syntactic relations and prepares the way for improved template matching accuracy.

[0070] Step 108: After fusing the candidate sentence set with attention mechanism based on syntactic features, lexical relation features and semantic features, the probability of hierarchical relationship between entities is calculated through the Softmax layer. The two expanded entities and the hierarchical relationship probabilities are combined to obtain triples.

[0071] Here we enter the Multi-Feature Fusion Scoring Model (MFFSM), such as Figure 3 As shown, the model includes an encoder layer, a graph convolutional network layer, and a decoder layer. Specifically, syntactic features, lexical relation features, and semantic features are input into the corresponding encoder layer for multi-channel feature encoding, resulting in three types of hidden layer feature vectors. These three hidden layer feature vectors are then input into the graph convolutional network layer for hierarchical relation learning. After feature fusion and association, the hierarchical learned hidden layer feature vectors are input into the decoder layer and then into the Softmax layer for hierarchical relation probability scoring, resulting in triples.

[0072] More specifically, the encoder layer includes a pre-trained model encoder, a bidirectional LSTM encoder, and a dependency syntax tree encoder, each corresponding to a feature extraction channel. Specifically, the pre-trained model encoder corresponds to the pre-trained channel and calculates hidden layer feature vectors for semantic features; the bidirectional LSTM encoder corresponds to the pre-trained 300-dimensional word vector channel and calculates hidden layer feature vectors for lexical relation features; and the dependency syntax tree encoder corresponds to the syntactic dependency tree channel and calculates hidden layer feature vectors for syntactic features.

[0073] Graph convolutional network layers are primarily used to learn the hierarchical relationships between words in the embedding space of each encoder. Depending on the input from different encoders, the graph convolutional network layers learn different intrinsic information. Using a pre-trained model as input, the graph convolutional network learns semantic information between contexts, resulting in the hidden layer representation. Using a bidirectional LSTM encoder as input, graph convolutional network layers are used to learn the inherent logic between words, resulting in the hidden layer representation. Using the dependency syntax tree as input, a graph convolutional network is used to learn its intrinsic relationships, resulting in the hidden layer representation.

[0074] Because the encoders learn lexical, semantic, and syntactic features separately, there are semantic gaps between different encoders, making direct concatenation impossible. Therefore, a decoder layer is introduced. This decoder layer uses an attention mechanism to correlate and fuse the feature vectors from the three hidden layers. The attention calculation expression is as follows:

[0075]

[0076] Where matrices Q and K represent the pre-trained embedding representation matrix and the graph convolution output matrix, respectively. W q and W k Here, is the training parameter, and d is the dimension of the hidden layer embedding.

[0077] After performing the attention mechanism twice, the average value is taken to obtain the output H(e) of the decoder layer = {e0, e1, ..., e}. n}

[0078] Finally, the output matrix of the decoder is passed through a Softmax layer to calculate the probability of the corresponding upper and lower position relationships:

[0079] p = Softmax(W p H+b p )

[0080] Among them, W p Let H represent the training weight matrix, and let b represent the decoder output matrix. p This represents the bias matrix.

[0081] It is worth noting that the encoder layer of this invention first uses the pre-trained model ERNIE, which can continuously absorb knowledge of vocabulary, structure, and semantics from massive amounts of text data through continuous learning technology, thereby achieving continuous evolution of the model's performance. ERNIE significantly outperforms world-leading technologies across 16 publicly available datasets, including sentiment analysis, text matching, natural language inference, lexical analysis, and reading comprehension.

[0082] Secondly, a bidirectional LSTM encoder is used to obtain contextual information. Bi-LSTM is commonly used in sentence encoders, as it integrates contextual information into the hidden layer representation. First, we generate a word embedding matrix based on all words. Where d represents the dimension of the word embedding, and |V| represents the number of words. We then input the word embeddings into the Bi-LSTM to obtain the hidden layer representation. in Let be the hidden layer representation in step i.

[0083] The final dependency parsing tree encoder first performs dependency parsing on the input data, identifying the various components of the sentence and obtaining a dependency parsing tree. This part uses word embeddings as input, and the upper-level syntactic structure labels are the mean of the lower-level label embeddings, so that each label has an embedding representation e. i , where i represents the relation type label.

[0084] For example, after scoring using the Multi-Feature Fusion Scoring Model (MFFSM), we obtain triples in the form of ("China Electronics Information Industry Group Co., Ltd.", "China Electronics Industrial Internet Co., Ltd.", 0.99). The first two elements are entities extracted from the original text, and the third element represents the probability that the two entities have a hierarchical relationship. A triple with a higher probability implies that element one is a subsidiary of element two (or element two is a subsidiary of element one). If multiple labeled entities appear in the same sentence, such as "China Electronics Information commissioned China Electronics Industrial Internet and China Great Wall to conduct market research in the industrial sector," resulting in three entities: "China Electronics Information," "China Electronics Industrial Internet," and "China Great Wall," then we divide these into three groups, labeled with entities as ("China Electronics Information," "China Electronics Industrial Internet"), ("China Electronics Industrial Internet," "China Great Wall"), and ("China Electronics Information," "China Great Wall"), respectively, as input to the Multi-Feature Fusion Scoring Model (MFFSM).

[0085] The multi-feature fusion scoring model MFFSM proposed in this invention has the following effects:

[0086] 1. By using multiple channels, different features can learn semantic information from different embedding spaces. Multi-channel and multi-feature learning can enrich the expression of different embedding spaces.

[0087] 2. Use an attention mechanism for decoding to align the semantic information learned from different channels.

[0088] 3. Graph convolutional networks learn the hierarchical relationships between entities in the embedding space, improving the accuracy of scoring the potential hierarchical relationships between entities in the input sentence.

[0089] Step 110: Sort the triples according to the probability of the hierarchical relationship to obtain the hierarchical relationship with the corresponding probability.

[0090] Specifically, the output of the MFFSM model is a triple in the form of ("China Electronics Corporation", "China Electronics Industrial Internet Co., Ltd.", 0.99). The result set is then sorted according to the scores to obtain the corresponding probability pairs.

[0091] The aforementioned method, system, and device for extracting hierarchical relationships based on multi-channel feature fusion involves: acquiring the original text; performing entity recognition on the original text to confirm the presence of two or more entities; combining the identified entities pairwise to obtain entity pairs and labeling the entity pairs; crawling relevant content from the database for labeled entity pairs; expanding the labeled entities based on the relevant content to obtain a candidate sentence set; extracting multi-channel features from the candidate sentence set to obtain syntactic features, lexical relation features, and semantic features; fusing the candidate sentence set with the syntactic features, lexical relation features, and semantic features using an attention mechanism; calculating the probability of hierarchical relationships between entities through a Softmax layer; combining the two expanded entities and the hierarchical relationship probabilities to obtain triples; and sorting the triples according to the hierarchical relationship probabilities to obtain the hierarchical relationships with corresponding probabilities. This invention reduces the cost of manual annotation by automatic annotation, while multi-channel feature extraction increases the complexity of syntactic relationships. It learns hierarchical relationships between entities through graph convolutional networks, fuses them through an attention mechanism, and finally obtains the probability of contextual relationships by sorting, which greatly improves the accuracy of scoring hierarchical relationships and thus improves the accuracy of template matching.

[0092] In one embodiment, to better understand the present invention, hierarchical relationship prediction data from the industrial field was used, including seven entity categories: institutions, positions, products, certificates, inspectors, enterprises, and laboratories, and the subordinate relationships between concepts were determined. The data contained 1.3G of corpus data. Bert-Lstm-CRF was used as the entity recognition model. Syntactic analysis was performed using the Harbin Institute of Technology's Natural Language Processing Platform (LTP). Word vectors and part-of-speech vectors were constructed based on Stanford University's GloVe word vectors, with a dimension of 300. The model trained in this paper achieved an F1 score of 93.5%, and after corrections through web scraping and dictionary methods, the F1 score reached over 95%. Then, 18,000 texts were manually selected for training the scoring model. 14,820 positive examples and 15,180 negative examples were labeled. The training set, validation set, and test set were divided in a 7:1:3 ratio.

[0093] This paper uses the commonly used precision (P), recall (R), and F1 score as evaluation criteria, as shown below:

[0094]

[0095]

[0096]

[0097] The baseline used in this article:

[0098] PPM is a distributed representation-based method. This model predicts hyponyms and hypernyms by learning the word embedding projection matrix between word pairs through piecewise linear projection.

[0099] NPM is a distributed approach. This method uses a deep learning model to simultaneously learn and model the projection relationships between hyponymous and non-hyponymous word pairs.

[0100] HypeNet, based on both distributed representation and path-based methods, uses an LSTM (Long Short-Term Memory) network to generate path vectors. These vectors are combined with word vectors and fed into a feedforward neural network, which is then processed by a Softmax classifier. This model achieved the best recognition accuracy and F1 score at the time.

[0101] The experimental results are shown in the following table:

[0102]

[0103] Recognition performance of table model M on industrial data

[0104] The experimental results show that the proposed model, MFFSM, significantly outperforms other baseline models in accuracy and also achieves a good F1 score. This demonstrates that our method fully utilizes the three major features of Chinese text, improves the performance of extracting Chinese hyponyms and hypernyms, and shows great potential in feature fusion.

[0105] Furthermore, to verify the necessity of the proposed multi-feature fusion framework MFFSM, ablation experiments were conducted on the multi-feature fusion framework, and the results are as follows:

[0106]

[0107] In this paper, MFFSM-Model represents the multi-feature fusion framework, MFFSM-PRE represents the framework with the pre-trained model feature extraction component removed, and MFFSM-LSTM represents the framework with the Bi-LSTM encoding component removed. Similarly, MFFSM-PRASE represents the framework with the syntactic parsing tree feature component removed. When the Bi-LSTM component is removed, the accuracy drops significantly, indicating the importance of contextual relationships in contextual relationship extraction. Removing the syntactic parsing tree component results in varying degrees of decrease in both accuracy and recall, demonstrating its essential role in the model. Experimental results show that each part of the model plays a role in supporting and influencing the extraction of hyponyms and hypernyms.

[0108] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0109] In one embodiment, such as Figure 4 As shown, a hierarchical relationship extraction system based on multi-channel feature fusion is provided, including:

[0110] The data mining module is used to obtain the original text, perform entity recognition on the original text, and confirm that it contains more than two entities.

[0111] The annotation module is used to combine the identified entities in pairs to obtain entity pairs and annotate the entity pairs; crawl the relevant content of the annotated entity pairs in the database, expand the annotated entities according to the relevant content, and obtain a candidate sentence set, which includes two expanded entities.

[0112] The feature extraction module is used to extract multi-channel features from the candidate sentence set, obtaining syntactic features, lexical relation features, and semantic features respectively.

[0113] The scoring module is used to calculate the probability of hierarchical relationship between entities by fusing the candidate sentence set based on syntactic features, lexical relation features and semantic features through an attention mechanism and then through a Softmax layer. The probability of hierarchical relationship between two expanded entities is combined with the probability of hierarchical relationship to obtain a triple.

[0114] The result sorting module is used to sort triplet pairs according to the probability of their hierarchical relationship, and obtain the hierarchical relationship with the corresponding probability.

[0115] Specific limitations regarding the hierarchical relationship extraction system based on multi-channel feature fusion can be found in the limitations of the hierarchical relationship extraction method based on multi-channel feature fusion described above, and will not be repeated here. Each module in the aforementioned hierarchical relationship extraction system based on multi-channel feature fusion can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0116] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores hierarchical relationship extraction data based on multi-channel feature fusion. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a hierarchical relationship extraction method based on multi-channel feature fusion.

[0117] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0118] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0119] Step 102: Obtain the original text, perform entity recognition on the original text, and confirm that it contains more than two entities.

[0120] Step 104: Combine the identified entities in pairs to obtain entity pairs and label the entity pairs; crawl the relevant content of the labeled entity pairs in the database, expand the labeled entities according to the relevant content, and obtain a candidate sentence set; the candidate sentence set includes two expanded entities.

[0121] Step 106: Multi-channel feature extraction is performed on the candidate sentence set to obtain syntactic features, lexical relation features and semantic features respectively.

[0122] Step 108: After fusing the candidate sentence set with attention mechanism based on syntactic features, lexical relation features and semantic features, the probability of hierarchical relationship between entities is calculated through the Softmax layer. The probabilities of hierarchical relationship between the two expanded entities are combined to obtain triples.

[0123] Step 110: Sort the triples according to the probability of the hierarchical relationship to obtain the hierarchical relationship with the corresponding probability.

[0124] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

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

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

Claims

1. A method for extracting hierarchical relationships based on multi-channel feature fusion, characterized in that, The method includes: Obtain the original text, perform entity recognition on the original text, and confirm that it contains two or more entities; The identified entities are paired to obtain entity pairs, and the entity pairs are labeled; relevant content of the labeled entity pairs is crawled from the database, and the labeled entities are expanded according to the relevant content to obtain a candidate sentence set; the candidate sentence set includes two expanded entities; Multi-channel feature extraction is performed on the candidate sentence set to obtain syntactic features, lexical relation features and semantic features, respectively; After the candidate sentence set is fused by the attention mechanism based on the syntactic features, the lexical relation features and the semantic features, the probability of hierarchical relationship between entities is calculated through the Softmax layer. The two expanded entities and the hierarchical relationship probabilities are combined to obtain a triple. The triplet is sorted according to the probability of the hierarchical relationship to obtain the hierarchical relationship with the corresponding probability; Retrieve relevant content from the database for labeled entity pairs, expand the labeled entities based on the relevant content, and obtain a candidate sentence set, including: The structured information of entities in labeled entity pairs is crawled from the database, and the labeled entities are expanded based on the structured information to obtain a set of candidate sentences. At the same time, it is determined whether there are labeled entities in the dictionary. If not, the labeled entities and their corresponding structured information are stored in the dictionary to obtain the expanded dictionary. Multi-channel feature extraction is performed on the candidate sentence set to obtain syntactic features, lexical relation features, and semantic features, including: Semantic features are extracted through a pre-trained channel; lexical relation features are extracted through a pre-trained 300-dimensional word vector channel; syntactic features are extracted through a syntactic dependency tree channel. Based on the syntactic features, lexical relation features, and semantic features, the candidate sentence set is fused using an attention mechanism, and then the hypernym / hypernym relation probability is scored to obtain triples, including: Syntactic features, lexical relation features, and semantic features are respectively input into the corresponding encoder layers for multi-channel feature encoding, resulting in three types of hidden layer feature vectors. The feature vectors of the three hidden layers are input into the graph convolutional network layer to learn the hierarchical relationship. The feature vectors of the three hidden layers used for hierarchical learning are input into the decoder layer for feature fusion and association, and then input into the Softmax layer for probability scoring of the hierarchical relationship to obtain triples.

2. The method for extracting hierarchical relationships based on multi-channel feature fusion according to claim 1, characterized in that, Before performing multi-channel feature extraction on the candidate sentence set to obtain syntactic features, lexical relation features, and semantic features, the following steps are also included: After verifying and correcting the candidate sentence set by crawling and expanding the dictionary, multi-channel feature extraction is performed on the verified and corrected candidate sentence set.

3. The method for extracting hierarchical relationships based on multi-channel feature fusion according to claim 1, characterized in that, The encoder layer includes a pre-trained model encoder, a bidirectional LSTM encoder, and a dependency syntax tree encoder; The pre-trained model encoder corresponds to the pre-trained channel and performs hidden layer feature vector calculation on the semantic features; The bidirectional LSTM encoder corresponds to a pre-trained 300-dimensional word vector channel, and performs hidden layer feature vector calculation on the lexical relation features; The dependency tree encoder corresponds to the syntactic dependency tree channel and performs hidden layer feature vector calculation on the syntactic features.

4. The method for extracting hierarchical relationships based on multi-channel feature fusion according to any one of claims 1 to 3, characterized in that, The three types of hidden layer feature vectors are input into the graph convolutional network layer for hierarchical relationship learning, including: Using a pre-trained model as input, a graph convolutional network is used to learn semantic information between contexts, resulting in the hidden layer representation. ; Using a bidirectional LSTM encoder as input, graph convolutional network layers are used to learn the inherent logic between words, resulting in the hidden layer representation. ; Using the dependency syntax tree as input, a graph convolutional network is used to learn its intrinsic relationships, resulting in the hidden layer representation. .

5. The method for extracting hierarchical relationships based on multi-channel feature fusion according to any one of claims 1 to 3, characterized in that, The feature vectors from the three hidden layers used in hierarchical learning are input into the decoder layer for feature fusion and association, and then input into the Softmax layer for probability scoring of hierarchical relationships, resulting in triples, including: The three hidden layer feature vectors are associated and fused through an attention mechanism. The attention calculation expression is as follows: Among them, matrix and These represent the pre-trained embedding representation matrix and the graph convolution output matrix, respectively. and For training parameters, The dimension embedded in the hidden layer; The output of the decoder layer is obtained by averaging the attention mechanism applied twice. ; The probability of the corresponding hierarchical relationship is obtained by calculating it through a Softmax layer: in, Represents the training weight matrix. This represents the decoder output matrix. This represents the bias matrix.

6. A hierarchical relationship extraction system based on multi-channel feature fusion, characterized in that, The system employs the hierarchical relationship extraction method based on multi-channel feature fusion as described in any one of claims 1 to 5, the system comprising: The data mining module is used to acquire the original text, perform entity recognition on the original text, and confirm that it contains two or more entities; The annotation module is used to combine the identified entities in pairs to obtain entity pairs and to annotate the entity pairs; crawl the database to retrieve relevant content of the annotated entity pairs, expand the annotated entities according to the relevant content, and obtain a candidate sentence set, wherein the candidate sentence set includes two expanded entities; The feature extraction module is used to perform multi-channel feature extraction on the candidate sentence set to obtain syntactic features, lexical relation features and semantic features respectively; The scoring module is used to perform attention mechanism fusion on the candidate sentence set according to the syntactic features, the lexical relation features and the semantic features, and then calculate the probability of hierarchical relationship between entities through the Softmax layer. The two expanded entities and the hierarchical relationship probabilities are combined to obtain triples. The result sorting module is used to sort the triples according to the probability of the upper and lower position relationship to obtain the upper and lower position relationship with the corresponding probability.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Knowledge graph relational data extraction method based on semantic syntax interaction network

    CN111241295A

  • Entity relationship extraction method and device based on syntactic tree and graph attention mechanism

    CN113255320A

  • Judicial domain relation extraction method and system based on graph convolutional network

    CN114091450A

  • Associated information fused program language recognition system and method

    CN114330338A