Multi-modal Chinese agricultural named entity recognition method
Through a multi-modal fusion method that combines characters, words, glyphs and pinyin features in Chinese agricultural named entity recognition, the problem of information loss and polysemy in the existing technology is solved, and the performance of named entity recognition is improved.
Patent Information
- Application Number
- CN202410679861.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-13
AI Technical Summary
Existing Chinese agricultural named entity recognition methods ignore word information when utilizing multi-modal information, resulting in information loss, and the mutual information between cross-modalities is reduced, unable to fully utilize text information, especially when facing polysemy problems. decline.
The multi-modal Chinese agricultural named entity recognition method is adopted to capture character features, words through input embedding layer, cross-modal and self-modal attention network layer, multi-modal gate selection fusion layer, sequence encoding layer and label prediction layer. features, glyph features and pinyin features, dynamically integrated Combining multi-modal information, using models such as BERT-WMM, SoftLexicon, Tianzige convolutional neural network, and Pypinyin to enhance feature information, and perform feature expression and label prediction through bidirectional long short-term memory networks and conditional random fields.
Effective use of text information improves character-word and cross-modal mutual information, solves the problem of polysemy, improves the performance of agricultural named entity recognition, and ensures model performance improvement.
Smart Images

Figure CN118643831A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Chinese agricultural named entity recognition, and in particular to a multimodal Chinese agricultural named entity recognition method. Background Art
[0002] Named entity recognition is a very important basic research task in natural language processing. Different from general entities such as people and locations, the goal of agricultural named entity recognition is to identify related entities such as crops, diseases, pests, etc. from unstructured text. Agricultural named entity recognition has considerable research value because it is an indispensable basic component of downstream tasks, such as agricultural knowledge graph construction and question answering.
[0003] The task of Chinese named entity recognition is more complicated. The most difficult problem is the word boundary problem. The basic unit of English semantic expression is generally a single word, and there are spaces between words for natural word segmentation. However, there is no natural separator in Chinese. Therefore, if you want to obtain the semantics of Chinese sentences, you must first perform Chinese word segmentation. In order to prevent the performance degradation caused by word segmentation errors, the word enhancement method that uses dictionaries to integrate word information into character sequences has become the mainstream of Chinese named entity recognition tasks. Chinese named entity recognition has been widely used in social media and biomedical fields, while agricultural named entity recognition is still a difficult and challenging task because there are many proper nouns and mixed entities composed of numbers, letters and Chinese characters in unstructured agricultural texts, such as wheat fusarium rust, thiophanate-methyl and GS Yudou No. 8.
[0004] In the field of Chinese named entity recognition, the Lattice-LSTM model proposed in the prior art is the pioneer of word enhancement. Some scholars also use convolutional neural networks for word enhancement, such as LR-CNN. With the outstanding performance of Transformer in natural language processing, Transformer-based word enhancement methods have been proposed, represented by FLAT-Lattice. The SoftLexicon model chooses to use word enhancement for the input representation layer. The above methods have been proven to be effective in agricultural named entity recognition tasks. However, these methods only use static weights in the text modality, which greatly reduces the mutual information between characters and words, resulting in information loss. To address this problem, the prior art proposes the PGAT method, which uses a graph attention mechanism network to dynamically select the most relevant word information for characters, improves the mutual information between characters and words to a certain extent, and achieves good results. However, PGAT only captures the unidirectional fine-grained correlation between characters and words, and ignores the reverse fine-grained correlation between words and characters, resulting in the failure to fully utilize the fine-grained correlation information, causing information loss.
[0005] In addition, previous research has mainly focused on Chinese text modal information, which contains limited semantic information and cannot solve the polysemy problem commonly existing in the field of agricultural named entity recognition. To address this issue, the unique language features of Chinese as a sign language, namely glyphs and pinyin, are introduced. Chinese characters evolved from ancient pictographs, so the development process of Chinese characters can still provide rich semantic information of the characters for the model to help the model understand the text semantics. Research shows that in different contexts, different pinyin pronunciations express different meanings, which is very important for modeling Chinese semantic features and is also information that cannot be captured by context or glyphs. Although pinyin is the annotation of the pronunciation of Chinese characters, even the same Chinese character may have different semantics. For example, the Chinese character "乐" has two different pronunciations: one is pronounced as "yuè", meaning music, and the other is pronounced as "lè", meaning happy.
[0006] Currently, in the fields of Chinese named entity recognition and agricultural named entity recognition, some existing works have chosen to use these multimodal information such as glyphs and pinyin to supplement the word enhancement method to improve the model performance. Among them, the Glyce model and CG-A named entity recognition choose to treat glyphs as image information for visual processing and extract image features to obtain more semantic information of Chinese characters. While PDMD and Visphone choose to use Chinese pinyin to help eliminate the ambiguity of Chinese entity boundaries. However, these multimodal information supplementation methods only use static weights between cross-modalities, greatly reducing the mutual information between cross-modalities and causing information loss. To address this problem, the existing technology has proposed the MPM-C named entity recognition method, which fuses semantic, glyph, and pinyin information in sequence through an interactive manner for cross-modal information, dynamically captures the fine-grained correlation between cross-modalities, effectively improves the cross-modal mutual information, and achieves the optimal performance. But this method ignores the crucial word information, which greatly affects the model performance. Summary of the Invention
[0007] To overcome the deficiencies of the prior art, the object of the present invention is to provide a multimodal Chinese agricultural named entity recognition method that can simultaneously capture the character features, word features, glyph features, and pinyin features of the text, make full use of the text information, and solve the polysemy problem commonly existing in the field of agricultural named entity recognition.
[0008] To achieve the above object, the present invention provides the following solution:
[0009] A multimodal Chinese agricultural named entity recognition method, comprising:
[0010] Obtain agricultural text data to be identified, and input the agricultural text data to be identified into a trained multimodal Chinese agricultural named entity recognition model to obtain a recognition result; the multimodal Chinese agricultural named entity recognition model includes an input embedding layer, a cross-modal and self-modal attention network layer, a multimodal gated selection fusion layer, a sequence encoding layer, and a label prediction layer connected in sequence;
[0011] The input embedding layer is used to perform feature embedding extraction on the preset original text data to obtain multimodal Chinese feature information; the multimodal Chinese feature information includes: character feature embedding, word feature embedding, glyph feature embedding and pinyin feature embedding; the cross-modal and self-modal attention network layer is used to strengthen the feature information of the multimodal Chinese feature information to obtain enhanced feature information; the enhanced feature information includes: enhanced character representation, enhanced word representation, enhanced glyph representation and enhanced pinyin representation; the multimodal gated selection fusion layer is used to calculate the gating value of the enhanced feature information, and concatenate the gating values to obtain a fused feature embedding; the sequence encoding layer is used to capture the temporal features of the fused feature embedding through a preset bidirectional long short-term memory network to obtain a feature expression; the label prediction layer is used to perform Bayesian probability calculation on the feature expression using a conditional random field, and optimize the conditional parameters of the conditional random field through a maximum likelihood function to obtain the recognition result.
[0012] Preferably, the input embedding layer comprises:
[0013] A character feature acquisition unit, used for converting the original text data into a character sequence, and mapping the character sequence through a BERT-WMM model based on a self-attention algorithm to obtain the character feature embedding;
[0014] a word feature acquisition unit, for constructing, according to the SoftLexicon method and the character sequence, a first word set starting with a subsequence in the character sequence, a second word set with the subsequence as an intermediate word, a third word set ending with the subsequence, and a fourth word set consisting of the subsequence, and concatenating fixed-dimensional feature embeddings of the first word set, the second word set, the third word set, and the fourth word set to obtain the word feature embedding;
[0015] A glyph feature acquisition unit, used for constructing a glyph multimodal database according to the target calligraphy and the character sequence, instantiating the glyph multimodal database into a glyph image, and inputting the glyph image into a preset Tianzi grid convolutional neural network model to obtain the glyph feature embedding;
[0016] A pinyin feature acquisition unit is used to construct a pinyin multimodal database of the character sequence, obtain the pinyin data of the pinyin multimodal database by matching a preset pinyin database, and use a preset feature extraction neural network model to perform pinyin feature extraction and average pinyin merging on the pinyin data to obtain the pinyin feature embedding.
[0017] Preferably, the cross-modal and self-modal attention network layer comprises: a first attention network layer and a second attention network layer;
[0018] The first attention network layer is used to convert the character feature embedding and the word feature embedding into the enhanced character representation and the enhanced word representation respectively; the second attention network layer is used to convert the glyph feature embedding and the pinyin feature embedding into the enhanced glyph representation and the enhanced pinyin representation respectively.
[0019] Preferably, the sequence coding layer comprises:
[0020] A bidirectional capture unit, used to simultaneously perform forward temporal feature capture and backward temporal feature capture on the fusion feature embedding to obtain a forward hidden state and a backward hidden state respectively;
[0021] The feature fusion unit is used to concatenate and fuse the forward hidden state and the backward hidden state at the same moment to obtain the feature expression.
[0022] Preferably, the pinyin data is a romanized pinyin sequence; the fixed length of each pinyin subsequence in the romanized pinyin sequence is set to 8, and the last digit of each pinyin subsequence is used to represent the tone.
[0023] Preferably, the target calligraphy includes: Song style, official script, cursive script and seal script.
[0024] Preferably, the glyph image has a format of 24 dimensions×24 dimensions.
[0025] Preferably, the pinyin database is an open source Pypinyin package.
[0026] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0027] The present invention provides a multimodal Chinese agricultural named entity recognition method, which belongs to the field of Chinese agricultural named entity recognition, and includes: obtaining agricultural text data to be recognized, and inputting the agricultural text data to be recognized into a trained multimodal Chinese agricultural named entity recognition model to obtain a recognition result; the multimodal Chinese agricultural named entity recognition model includes an input embedding layer, a cross-modal and self-modal attention network layer, a multimodal gated selection fusion layer, a sequence encoding layer, and a label prediction layer connected in sequence. The present invention simultaneously captures the character features, word features, glyph features, and pinyin features of the text, so that the text information is fully utilized, and at the same time solves the polysemy problem that is prevalent in the field of agricultural named entity recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0029] Figure 1 A flowchart of a method for named entity recognition provided by an embodiment of the present invention;
[0030] Figure 2 The CSMA-ACNER model architecture provided by the embodiment of the present invention;
[0031] Figure 3 Schematic diagram of cross-modal and self-modal attention network layers provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] The purpose of the present invention is to provide a multimodal Chinese agricultural named entity recognition method, which simultaneously captures the character features, word features, glyph features and phonetic features of the text, makes full use of text information, and solves the polysemy problem that is prevalent in the field of agricultural named entity recognition.
[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] Figure 1A flowchart of a method for named entity recognition provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the present invention provides a multimodal Chinese agricultural named entity recognition method, comprising:
[0036] Obtain agricultural text data to be identified, and input the agricultural text data to be identified into a trained multimodal Chinese agricultural named entity recognition model to obtain a recognition result; the multimodal Chinese agricultural named entity recognition model includes an input embedding layer, a cross-modal and self-modal attention network layer, a multimodal gated selection fusion layer, a sequence encoding layer, and a label prediction layer connected in sequence;
[0037] The input embedding layer is used to perform feature embedding extraction on the preset original text data to obtain multimodal Chinese feature information; the multimodal Chinese feature information includes: character feature embedding, word feature embedding, glyph feature embedding and pinyin feature embedding; the cross-modal and self-modal attention network layer is used to strengthen the feature information of the multimodal Chinese feature information to obtain enhanced feature information; the enhanced feature information includes: enhanced character representation, enhanced word representation, enhanced glyph representation and enhanced pinyin representation; the multimodal gated selection fusion layer is used to calculate the gating value of the enhanced feature information, and concatenate the gating values to obtain a fused feature embedding; the sequence encoding layer is used to capture the temporal features of the fused feature embedding through a preset bidirectional long short-term memory network to obtain a feature expression; the label prediction layer is used to perform Bayesian probability calculation on the feature expression using a conditional random field, and optimize the conditional parameters of the conditional random field through a maximum likelihood function to obtain the recognition result.
[0038] Furthermore, the input embedding layer comprises:
[0039] A character feature acquisition unit, used for converting the original text data into a character sequence, and mapping the character sequence through a BERT-WMM model based on a self-attention algorithm to obtain the character feature embedding;
[0040] a word feature acquisition unit, for constructing, according to the SoftLexicon method and the character sequence, a first word set starting with a subsequence in the character sequence, a second word set with the subsequence as an intermediate word, a third word set ending with the subsequence, and a fourth word set consisting of the subsequence, and concatenating fixed-dimensional feature embeddings of the first word set, the second word set, the third word set, and the fourth word set to obtain the word feature embedding;
[0041] A glyph feature acquisition unit, used for constructing a glyph multimodal database according to the target calligraphy and the character sequence, instantiating the glyph multimodal database into a glyph image, and inputting the glyph image into a preset Tianzi grid convolutional neural network model to obtain the glyph feature embedding;
[0042] A pinyin feature acquisition unit is used to construct a pinyin multimodal database of the character sequence, obtain the pinyin data of the pinyin multimodal database by matching a preset pinyin database, and use a preset feature extraction neural network model to perform pinyin feature extraction and average pinyin merging on the pinyin data to obtain the pinyin feature embedding.
[0043] Specifically, the cross-modal and self-modal attention network layer includes: a first attention network layer and a second attention network layer;
[0044] The first attention network layer is used to convert the character feature embedding and the word feature embedding into the enhanced character representation and the enhanced word representation respectively; the second attention network layer is used to convert the glyph feature embedding and the pinyin feature embedding into the enhanced glyph representation and the enhanced pinyin representation respectively.
[0045] Furthermore, the sequence coding layer includes:
[0046] A bidirectional capture unit, used to simultaneously perform forward temporal feature capture and backward temporal feature capture on the fusion feature embedding to obtain a forward hidden state and a backward hidden state respectively;
[0047] The feature fusion unit is used to concatenate and fuse the forward hidden state and the backward hidden state at the same moment to obtain the feature expression.
[0048] Specifically, the pinyin data is a romanized pinyin sequence; the fixed length of each pinyin subsequence in the romanized pinyin sequence is set to 8, and the last digit of each pinyin subsequence is used to represent the tone.
[0049] Optionally, the target calligraphy includes: Song style, official script, cursive script and seal script.
[0050] Specifically, the format of the glyph image is 24 dimensions×24 dimensions.
[0051] Optionally, the pinyin database is an open source Pypinyin package.
[0052] Specifically, the CSMA-ACNER model architecture used in this embodiment is as follows: Figure 2As shown in the figure. In the feature embedding extraction layer, character embedding, word embedding, glyph embedding and pinyin embedding are obtained respectively, and then the fine-grained correlation between text modality information and cross-modality information is dynamically captured through the Cross-and Self-ModalityAttention network layer, multi-granularity information is improved to enhance multi-modal features, and a multi-modal gating selection fusion module is adopted to fuse features. After that, the fused features are sent to the sequence encoding layer, and finally to the Conditional Random Field (CRF) layer for label prediction.
[0053] Furthermore, the specific process of feature embedding extraction is as follows:
[0054] Character embedding acquisition. The input sentence S is regarded as a character sequence: S = {c1, c2, ..., c n}, where c i represents the i-th character in the character sequence, and n represents the number of characters in the input sentence. This embodiment uses a pre-trained model based on Transformer (Bidirectional Encoder Representations from Transformers, BERT) to map each character to a real-valued embedding to represent its semantic and syntactic meaning. Finally, the character feature embedding x is obtained. ec , expressed as:
[0055]
[0056]
[0057] in, is d c ×n-dimensional space, BERT is BERT-WMM, i ranges from [1, ..., n], d c is the dimension of character embedding, n represents the number of characters in the input sentence, and BERT() is used for BERT-WMM model training.
[0058] Word embedding acquisition. This embodiment adopts the SoftLexicon method to solve the error propagation problem caused by word segmentation errors. This method uses four word sets as character c i The four word sets are divided into c i At the beginning of a word, c appears in the middle of a word i , with c i For the end and by c i The word B(c i )、M(c i )、E(c i ) and S(ci ) word set. If the word set is empty, the special word "NONE" is added to the word set. Then the four word sets are condensed into fixed-dimensional feature embeddings and the frequency of each word is used as the weight. Finally, the fixed-dimensional feature embeddings of the four word sets are concatenated to obtain the word embedding x ew , with B(c i ) word set as an example:
[0059]
[0060]
[0061] x ew =[v s (B);v s (M); v s (E); v s (S)]
[0062] Among them, z(w) represents the frequency of word w in the statistical data set (training set and validation set), e w (w) represents the word embedding lookup table. If word w is nested, that is, the word is covered by another word that matches the dictionary, then the frequency of word w will not increase, and B is B(c i ), M is M(c i ), E is E(c i ), S is S(c i ).
[0063] Font embedding acquisition. This example selects four most representative fonts (Song, Li, Cao, and Zhuan), converts each character in the input training and test data sets into the corresponding four fonts and instantiates them into character images to build a font multimodal database. Then, the 24-dimensional × 24-dimensional font image of the corresponding character is obtained by matching the font image database. Then, the image is processed by Tianzi grid CNN and finally input into the fully connected layer to build the font embedding x eg .
[0064] Pinyin embedding acquisition. This embodiment uses the open source Pypinyin package to annotate each character in the input training and test data sets with Chinese pinyin. Then a pinyin multimodal database is constructed. Then the romanized pinyin sequence of the corresponding character is obtained by matching the pinyin database, and then the pinyin features are extracted through CNN and the average pinyin is merged to obtain the pinyin embedding x ep In this embodiment, numbers from 0 to 4 are added to the end of the pinyin sequence to represent additional tones such as neutral tone (), high tone (ˉ), rising tone (′), falling rising tone (ˇ), and falling tone ('). The fixed length of the pinyin sequence is set to 8, and " / " is used to fill it when it is not enough.
[0065] Furthermore, after obtaining multimodal Chinese feature information, this embodiment proposes a cross-modal and self-modal attention network to dynamically capture the fine-grained correlation between text modalities and cross-modalities, enhance multi-granular information, and reduce information loss. This embodiment first designs a self-modal attention network layer (such as Figure 3 (a)) The multi-level dynamic capture of the bidirectional fine-grained correlation between the character-word space effectively improves the text modality mutual information. Secondly, a cross-modal attention network layer is designed (such as Figure 3 (b) dynamically captures the fine-grained correlations between cross-modalities to improve cross-modal mutual information.
[0066] Specifically, the self-modal attention network layer. Considering that characters and words are two crucial information in Chinese, the weight of the word (character) information matched by the character (word) should be dynamic rather than static. The cross-modal attention network layer dynamically selects word (character) information with different relevance weights for the character (word) to obtain enhanced word and character representation. Taking the word attention layer as an example, the input query Q, key K, value V comes from x ec , x ew , through the multi-head attention mechanism, the one-way fine-grained correlation mutual information between characters and words is captured at multiple levels. W→C Finally, I W→C With word information x ew Concatenate and transform them to original size through a linear layer to obtain enhanced word representation
[0067]
[0068]
[0069]
[0070] Among them, δ is operate, d in k is the word vector length, T is the transpose. Linear[*] represents the linear layer, is the training parameter matrix. Similarly, x ec Get the value K W Sum value V W , x ew As the query Q C Input into the self-modal attention network layer to obtain enhanced character representation
[0071] Specifically, the cross-modal attention network layer. Since both the glyph image and the pinyin are obtained from characters, the characters have a strong correlation with the glyphs and pinyin in the cross-modal space. The cross-modal attention network layer dynamically selects character information with different relevance weights for the glyphs and pinyin to obtain the enhanced glyph image and pinyin representation. ec As query Q, x eg (x ep ) as the key K and value V, which are input into the glyph / pinyin attention layer to finally obtain the enhanced glyph representation and the enhanced pinyin representation
[0072] Furthermore, this embodiment introduces a multi-modal gating selection fusion module to fuse these modal information. and As the input of the multimodal gated selection fusion module and calculate their gated values respectively, the mixed representation of the i-th character is obtained
[0073]
[0074]
[0075] in, σ represents the Sigmoid function, W * and b * are all learning parameters. [·] is a concatenation operation. The final fusion feature embedding of all characters is obtained
[0076] Furthermore, the fusion features are embedded into H in Input the sequence encoding layer to obtain the sequence encoding H. CNN, Bi-LSTM and transformer can all be used as the sequence encoding layer. This embodiment selects a single-layer BiLSTM as the sequence encoding layer of the model. The formula of the unidirectional LSTM is:
[0077] i=δ(W i ·H in +b i )
[0078] o=δ(W o ·H in +b o )
[0079] f=δ(W f ·H in +b f )
[0080]
[0081]
[0082] h=o*tanh(C)
[0083] Among them, i, o, and f represent the output states of the input gate, output gate, and forget gate respectively. represents the internal state of the storage unit, δ represents the sigmoid activation function, and W i,o,f,g and b i,o,f,g is the training parameter, C is the cell state, 0 is the all-zero vector, and then the hidden state h is calculated using the tanh activation function and the weight o of the output gate.
[0084] Specifically, the difference between BLSTM and LSTM is that the backward LSTM has the same definition as the forward LSTM, but is modeled in the opposite order sequence, capturing the temporal features in both directions at the same time, and then concatenating and fusing the forward and backward hidden states at the same time to obtain the final feature expression H:
[0085]
[0086] in and They represent the forward hidden state and the backward hidden state respectively.
[0087] Furthermore, H is fed into the CRF layer (conditional random field) to obtain the probability Y = [y1, y2, ..., y n ], let Y represent the predicted label distribution of any input sequence, then the probability P of label sequence Y under the condition that the input is H r (Y|H) is:
[0088]
[0089] ψ t (y t-1 ,y t ,H)=exp(WH+b)
[0090] Here s ∈(Y1,...,Y n ), γ s Represents the set of all candidate label sequences, W and b are training parameters and bias. During the training process, the model parameters are optimized by calculating the negative log-likelihood loss:
[0091] Loss ner = -logP r (Y|H)
[0092] Specifically, about Figure 2The related parameters in are explained as follows: The B-LOC column represents the final output label, B, E, M, S, and 0 represent the word label start, end, middle, single, and others, respectively. For example, in the word "Zhongshan West Road", Zhong is B, Shan is M, Xi is E, and Lu is S; O represents no predefined word label. LOC represents the label type, and ORG represents organization. Represents the gating value of each feature embedding. The gating value can also be regarded as a weight. E represents feature embedding.
[0093] Specifically, about Figure 3 The function of the multi-head attention mechanism is as follows: Each attention head performs independent linear transformation and attention calculation. Finally, the outputs of multiple attention heads are merged through shape transformation to obtain the final output result of the multi-head attention. Each attention head can focus on different features and contexts, thereby capturing richer information and enhancing the representation and expression capabilities of the model.
[0094] The beneficial effects of the present invention are as follows:
[0095] (1) The present invention makes full use of text information by simultaneously capturing the character features, word features, glyph features and phonetic features of the text.
[0096] (2) The present invention effectively solves the polysemy problem that is prevalent in the field of agricultural named entity recognition by introducing glyph features and phonetic features.
[0097] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0098] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A multimodal Chinese agricultural named entity recognition method, characterized in that: include: Obtain agricultural text data to be identified, and input the agricultural text data to be identified into a trained multimodal Chinese agricultural named entity recognition model to obtain a recognition result; the multimodal Chinese agricultural named entity recognition model includes an input embedding layer, a cross-modal and self-modal attention network layer, a multimodal gated selection fusion layer, a sequence encoding layer, and a label prediction layer connected in sequence; The input embedding layer is used to perform feature embedding extraction on the preset original text data to obtain multimodal Chinese feature information; The multimodal Chinese feature information includes: character feature embedding, word feature embedding, glyph feature embedding and pinyin feature embedding; the cross-modal and self-modal attention network layer is used to strengthen the feature information of the multimodal Chinese feature information to obtain enhanced feature information; the enhanced feature information includes: enhanced character representation, enhanced word representation, enhanced glyph representation and enhanced pinyin representation; the multimodal gated selection fusion layer is used to calculate the gating value of the enhanced feature information, and concatenate the gating values to obtain a fused feature embedding; the sequence encoding layer is used to capture the temporal features of the fused feature embedding through a preset bidirectional long short-term memory network to obtain a feature expression; the label prediction layer is used to perform Bayesian probability calculation on the feature expression using a conditional random field, and optimize the conditional parameters of the conditional random field through a maximum likelihood function to obtain the recognition result.
2. A multimodal Chinese agricultural named entity recognition method according to claim 1, characterized in that: The input embedding layer includes: A character feature acquisition unit, used for converting the original text data into a character sequence, and mapping the character sequence through a BERT-WMM model based on a self-attention algorithm to obtain the character feature embedding; a word feature acquisition unit, for constructing, according to the SoftLexicon method and the character sequence, a first word set starting with a subsequence in the character sequence, a second word set with the subsequence as an intermediate word, a third word set ending with the subsequence, and a fourth word set consisting of the subsequence, and concatenating fixed-dimensional feature embeddings of the first word set, the second word set, the third word set, and the fourth word set to obtain the word feature embedding; A glyph feature acquisition unit, used for constructing a glyph multimodal database according to the target calligraphy and the character sequence, instantiating the glyph multimodal database into a glyph image, and inputting the glyph image into a preset Tianzi grid convolutional neural network model to obtain the glyph feature embedding; A pinyin feature acquisition unit is used to construct a pinyin multimodal database of the character sequence, obtain the pinyin data of the pinyin multimodal database by matching a preset pinyin database, and use a preset feature extraction neural network model to perform pinyin feature extraction and average pinyin merging on the pinyin data to obtain the pinyin feature embedding.
3. A multimodal Chinese agricultural named entity recognition method according to claim 1, characterized in that: The cross-modal and self-modal attention network layer includes: a first attention network layer and a second attention network layer; The first attention network layer is used to convert the character feature embedding and the word feature embedding into the enhanced character representation and the enhanced word representation respectively; the second attention network layer is used to convert the glyph feature embedding and the pinyin feature embedding into the enhanced glyph representation and the enhanced pinyin representation respectively.
4. The multimodal Chinese agricultural named entity recognition method according to claim 1, characterized in that: The sequence coding layer comprises: A bidirectional capture unit, used to simultaneously perform forward temporal feature capture and backward temporal feature capture on the fusion feature embedding to obtain a forward hidden state and a backward hidden state respectively; The feature fusion unit is used to concatenate and fuse the forward hidden state and the backward hidden state at the same moment to obtain the feature expression.
5. A multimodal Chinese agricultural named entity recognition method according to claim 2, characterized in that: The pinyin data is a romanized pinyin sequence; the fixed length of each pinyin subsequence in the romanized pinyin sequence is set to 8, and the last digit of each pinyin subsequence is used to represent the tone.
6. A multimodal Chinese agricultural named entity recognition method according to claim 2, characterized in that: The target calligraphy includes: Song style, official script, cursive script and seal script.
7. A multimodal Chinese agricultural named entity recognition method according to claim 2, characterized in that: The format of the glyph image is 24 dimensions×24 dimensions.
8. A multimodal Chinese agricultural named entity recognition method according to claim 2, characterized in that: The pinyin database is an open source Pypinyin package.
Citation Information
Cited By
Double-tower entity identification method and device fusing multi-modal features, equipment and medium
CN119128610A
Multi-modal named entity recognition method based on multi-granularity feature enhancement
CN119398050A
Power operation and maintenance text-oriented information enhancement named entity recognition system and equipment
CN120409482A
Information-enhanced named entity recognition system and equipment for power operation and maintenance text
CN120409482B
Navigation notice text processing method and device based on semantic enhancement and medium
CN120996050A
