A named entity recognition method based on self-supervised learning

Through self-supervised learning methods, positive and negative example sentence pairs are constructed, word embedding is optimized and bidirectional LSTM and CRF layers are combined, which solves the problem of accented words in naming entity recognition, improves recognition accuracy and reduces errors caused by word abbreviation, and enhances cross-domain applicability.

CN114239584BActive Publication Date: 2025-08-15HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111539122.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-08-15
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

The existing naming entity recognition method fails to effectively learn the interpretation of ambiguous words in the current context during the word embedding stage, resulting in insufficient recognition accuracy, high requirements for general corpus, and poor cross-domain applicability.

Method used

By constructing positive and negative example sentence pairs, using embedding encoder and deep neural network to optimize word embedding, combining bidirectional LSTM and CRF layers for entity recognition, and using public knowledge graphs to correct results to solve the definition problem of acensorial words.

Benefits of technology

It improves the accuracy of naming entity recognition, especially when dealing with accent words, better represents the meaning of words in the current context, reduces entity type recognition errors caused by word abbreviations, and enhances cross-domain applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239584B_ABST
    Figure CN114239584B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for named entity recognition based on self-supervised learning. The method comprises: preprocessing a data set, constructing positive and negative sentence pairs using the processed data set, and encoding the sentences in the positive and negative sentence pairs using an embedding encoder; learning different interpretations of entities in different contexts based on different entity features and a similarity matrix in a named entity recognition model based on self-supervised learning, and learning feature vectors based on the similarities between the positive and negative sentence pairs to accommodate language differences in different corpora. The present invention improves the accuracy of named entity recognition and, through a knowledge graph, resolves the problem of entity type recognition errors in output results caused by word abbreviations, thereby more accurately predicting entities and entity types, and enabling word embedding vectors of polysemous words to better represent the meaning of the word in the current context.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a named entity recognition method, and more particularly to a named entity recognition method based on self-supervised learning. Background Art

[0002] Most existing named entity recognition methods extract entities and entity types from text. The primary task of named entity recognition is to identify and categorize proper nouns such as names of people and places, as well as meaningful quantitative phrases such as time and date, within text. There are three main approaches to named entity recognition: rule-based, statistical, and supervised learning.

[0003] Rule-based methods mainly extract entities from text by pre-building some special rules. Rule-based methods have high accuracy in certain specific fields, but it is precisely because rule-based methods only have high accuracy in certain specific fields that they have great limitations, such as poor cross-domain portability. Statistical methods mainly perform statistics on text information and mine word features from text corpora. Statistical methods have high requirements for corpora, and there are currently few general corpora suitable for evaluating large-scale named entity recognition tasks, which also limits the development of this method to a certain extent. Supervised learning-based methods mainly obtain classifiers through training from training data and apply the classifiers to new entity recognition. Supervised learning-based methods solve the limitations of rule-based methods in specific fields to a certain extent, and also solve the problem of high requirements for general corpora to a certain extent. However, this method does not learn the expression of polysemous words in the current context well in the word embedding stage.

[0004] The present invention utilizes self-supervised learning to further learn polysemous words, proposes a named entity recognition method based on self-supervised learning, and constructs a complete named entity recognition model. Summary of the Invention

[0005] One purpose of the present invention is to address the problem that existing named entity recognition technology does not learn the meaning of polysemous words in the current context well in the word embedding stage, and to provide a named entity recognition method based on self-supervised learning. Based on an arbitrary corpus, a comparative sub-supervised learning model is used to enable the word embedding of polysemous words to better represent the meaning of the word in the current context, thereby improving the recognition of named entities.

[0006] The technical solutions adopted in the present invention are as follows:

[0007] Step 1: Preprocess the dataset;

[0008] 1-1 Connect the words with labeled entity types in the dataset into sentences;

[0009] 1-2 Replace the sentence in step 1-1 with i Translate into sentence a in any language i Then, sentence a i Use with s i Translate the same language into positive sentences

[0010] Step 2: Construct a set of positive and negative sentence pairs from the sentences processed in step 1, where the positive sentence pair set is The set consists of negative sentence pairs. Set composition, the negative sentence pairs consist of the original sentence and the translated sentences of the rest of the sentences in the corpus;

[0011] Step 3: Use the embedding encoder to perform embedding encoding on the sentences in the positive sentence pairs and the negative sentence pairs respectively;

[0012] Step 4: Input the word embedding vector after embedding encoding into the deep neural network layer DNN;

[0013] Step 5: Calculate the similarity between the output vectors of the positive sentence pair and the output vectors of the negative sentence pair obtained in step 4, and concatenate the calculation results into a new similarity matrix M by row. sim ; and use the contrast loss function l through back propagation and gradient descent algorithm to optimize the embedding encoder f in step 3 k Parameters in;

[0014] Step 6: Obtain sentences consisting of words with labeled entity types, build a dataset, and then further divide it into training set and test set;

[0015] Step 7: Build a named entity recognition model based on self-supervised learning, which includes a main network and a correction module in cascade order; then use the training set to train the main network, and then use the test set to test the trained main network. Finally, use the correction module to correct the output of the main network after the test;

[0016] The main network includes the embedding encoder f after step 5 optimization k , bidirectional LSTM layer, CRF layer;

[0017] The modification module includes a phrase retrieval module and an entity type modification module; wherein the phrase retrieval module is used to obtain the potential entity set of the main network input item and filter out the entities that exist in the public knowledge graph. The potential entity and the entity type are then constructed into a potential entity set PE; the potential entity set includes each word, a phrase consisting of multiple words, and the entity type corresponding to each word and phrase; the entity type modification module is used to receive the potential entity set PE output by the phrase retrieval module and the entity type label output by the main network, and then compare the entity type output by the main network with the entity type corresponding to each potential entity in the main network input item in the potential entity set PE. If they are consistent, no modification is required; if they are inconsistent, the output result of the main network is corrected;

[0018] Step 8: Use the tested self-supervised learning-based named entity recognition model to implement named entity recognition of text.

[0019] Another object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the above method.

[0020] Yet another object of the present invention is to provide a computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor implements the above method when executing the executable code.

[0021] The technical solution provided by the present invention has the following beneficial effects:

[0022] The present invention constructs positive and negative sentence pairs by translating sentences into multiple intermediate languages. In actual use, a queue is used to store negative sentence pairs. The current mini-batch data will enter the queue, and the oldest mini-batch data will be removed from the queue. The advantage of using a queue is that the queue size and batch size can be decoupled. That is, the queue size is no longer constrained by the batch size constraint, which effectively solves the problem of requiring a large number of negative mini-batches in self-supervised learning.

[0023] The present invention uses a similarity function to measure the similarity of word embedding vectors in a sentence in the vector representation space, and adopts a momentum moving average method to slowly update the parameters of the embedding encoder. This can avoid the loss of feature consistency due to drastic changes in the embedding encoder parameters and can also keep the embedding encoder in a state of being updated. Through the similarity function and momentum moving average method, the embedding encoder can make the encoding of polysemous words in the word embedding encoding stage more consistent with their interpretation in the current context;

[0024] The present invention solves the problem of entity type recognition errors caused by word abbreviations in the output results by disclosing the knowledge graph, and further improves the accuracy of entity recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 Flow chart of the method of the present invention;

[0026] Figure 2 Optimizing the flow chart for embedding encoders for self-supervised learning;

[0027] Figure 3 This is a structural diagram of the named entity recognition model based on self-supervised learning of the present invention;

[0028] Figure 4 This is a structural diagram of a correction module in the named entity recognition model based on self-supervised learning of the present invention; DETAILED DESCRIPTION

[0029] The specific embodiments of the present invention are described in further detail below with reference to the accompanying drawings. Figure 1 As shown, where:

[0030] Step 1: Preprocess the dataset;

[0031] 1-1 Connect the words with labeled entity types in the dataset into sentences;

[0032] The entities are proper nouns such as names of people, places and institutions in the text;

[0033] 1-2 Replace the sentence in step 1-1 with i Translate into sentence a in any language i Then, sentence a i Use with s i Translate the same language into positive sentences

[0034] Step 2: Construct a set of positive and negative sentence pairs from the sentences processed in step 1, where the positive sentence pair set is The set consists of negative sentence pairs. Set composition, the negative sentence pairs consist of the original sentence and the translated sentences of the rest of the sentences in the corpus;

[0035] Step 3: Use the embedding encoder to embed the sentences in the positive sentence pairs and the negative sentence pairs respectively. Specifically:

[0036] The sentence s i Input to the embedding encoder f q (query-encoder) performs word embedding encoding and obtains the encoded result q i ; At the same time, the sentence s i Corresponding positive and negative example sentences Input to the embedding encoder f k (key-encoder) performs word embedding encoding and obtains the encoded result

[0037] The embedding encoder f q 、f k The initialization parameter θ q ,θ k same;

[0038] Step 4: Input the word embedding vector after embedding encoding into the deep neural network layer (DNN);

[0039] The deep neural network layer includes a first fully connected layer, a ReLU layer and a second fully connected layer.

[0040] (1) The first fully connected layer: The embedding vector output by the unoptimized embedding encoder is converted into an output vector of the same dimension through a layer of linear transformation;

[0041] o dense1 =Wx input +b

[0042] Among them, dense1 represents the output vector, x input represents the embedding vector output by the unoptimized embedding encoder, W represents the weight matrix, and b represents the bias vector;

[0043] (2) Relu layer: Inputting the output vector of the first fully connected layer into the Relu activation function can keep the convergence speed of the model at a stable state;

[0044] o dense2 =max(o dense1 ,0)

[0045] Among them, dense2 Represents the output vector of the Relu layer;

[0046] (3) The second fully connected layer: converts the output vector of the ReLU layer into an output vector with the same dimension as the number of predicted entity types;

[0047] Step 5: Calculate the similarity between the output vectors of the positive sentence pair and the output vectors of the negative sentence pair obtained in step 4, and concatenate the calculation results into a new similarity matrix M by row. sim ; and use the contrast loss function l through back propagation and gradient descent algorithm to optimize the embedding encoder f in step 3 kThe specific operations are as follows:

[0048] 5-1 DNN output vector The similarity function sim(·) is used to calculate the similarity and obtain the similarity of the positive examples of similar sentences. Negative similarity of dissimilar sentences Then r + and r - According to row aggregation, the similarity matrix M is obtained by aggregation. sim :

[0049]

[0050] 5-2 Use the following contrast loss function l to measure the similarity between positive and negative sentence pairs in the vector representation space:

[0051]

[0052] Where τ is a hyperparameter that adjusts the similarity to match the input level of the function, exp(·) represents an exponential function with the natural constant e as the base, and sum(·) represents the row-wise addition of matrix elements.

[0053] 5-3 Using the contrast loss function l to optimize the embedding encoder f through back propagation and gradient descent algorithm k Parameters in;

[0054] where f k Update θ using momentum moving average k , and use a queue to store the data after f k The encoded mini-batch data (key) is stored in the queue as the current sentence s i Negative sentence pairs The current mini-batch of data will enter the queue, and the oldest mini-batch of data will be removed from the queue. The momentum moving average method is as follows:

[0055] θ k ←mθ k +(1-m)θ q

[0056] Where m is momentum;

[0057] Figure 2 Optimizing the flow chart for embedding encoders for self-supervised learning;

[0058] Step 6: Obtain sentences consisting of words with labeled entity types, build a dataset, and then further divide it into training set and test set;

[0059] Step 7: Build a named entity recognition model based on self-supervised learning, such as Figure 3 It includes a main network and a correction module that are cascaded in sequence; the main network is then trained using a training set, the trained main network is tested using a test set, and finally the correction module is used to correct the output of the main network after the test;

[0060] a) The main network includes the embedding encoder f after step 5 optimization k , bidirectional LSTM layer, CRF layer;

[0061] 1) Optimized embedding encoder f k , used to encode each word in a sentence into a word embedding vector; the input is a complete sentence, and the output is the word embedding vector of each word in the sentence;

[0062] 2) Bidirectional LSTM layer, used to learn the dependency information between words; the input is the word embedding vector, and the output is the word embedding vector containing the dependency information between words;

[0063] Compared to RNN, LSTM has only one hidden state h t , LSTM has one more cell state c t , the hidden state and cell state can store all valid information before and after time t. LSTM uses three gate control units to protect and control information. These three gates are input gate, forget gate and output gate. The first step of LSTM is to discard some information retained during the long sequence training process. This step is completed by the forget gate, which reads h t-1 and x t , through the sigmoid activation function, output a value between 0 and 1, 0 means completely discarded, 1 means completely retained, the calculation method of the forget gate is as follows:

[0064] f t =σ(W f h t-1 +U f x t +b f )

[0065] where x t is the embedding encoder f k Output word embedding vector, h t-1 is the hidden state of LSTM at time t-1, W f and U f They are h in the forget gate respectively t-1 and x t The weight matrix, b fis the bias vector of the forget gate, σ(·) represents the sigmod activation function, f t is the output of the forget gate;

[0066] The second step is to update the cell state c t . In the update c t Before the update, an input gate is needed to determine which information needs to be updated and a tanh layer is used to determine the candidate update content (candidate value vector z). The calculation method through the input gate and tanh layer is similar to that of the forget gate, and its calculation method is as follows:

[0067] i t =σ(W i h t-1 +U i x t +b i )

[0068] z=tanh(W z h t-1 +U z x t +b z )

[0069] Where W i and U i They are h in the input gate respectively t-1 and x t The weight matrix, b i is the bias vector of the input gate, i t is the output of the input gate; W z and U z They are h in the candidate value vector t-1 and x t The weight matrix, b z is the bias vector of the candidate value vector;

[0070] Then update the cell state c by matrix dot multiplication t :

[0071] c t =f t ⊙c t-1 +i t ⊙z

[0072] Where ⊙ represents the dot multiplication operation of the matrix;

[0073] The last step of LSTM is to update the hidden state h t . Update h t The cell state c t The tanh layer is used to process a value between -1 and 1, which is then multiplied by the output of the output gate to update the state h. t, the calculation method of the output gate is similar to that of the forget gate and the input gate.

[0074] ox=σ(W o h t-1 +U o x t +b o )

[0075] h t =o t ⊙tanh(c t )

[0076] Where W o and U o They are h in the output gate respectively t-1 and x t The weight matrix, b o is the bias vector of the output gate, o t is the output of the output gate;

[0077] For many sequence labeling tasks, accessing both past and future information is valuable, but the hidden state of a unidirectional LSTM can only access information from the past. To simultaneously access both past and future information, a bidirectional LSTM is used. The output of a bidirectional LSTM is a score for each token belonging to each class. After calculating the score, it needs to be normalized by softmax:

[0078]

[0079] where γ i represents the normalized result of the tag score of the i-th token, x i Represents the label score vector of the i-th token, and n is the size of the label type;

[0080] 3) CRF layer, used to further correct the recognition results; the input is the output vector of the bidirectional LSTM layer,

[0081] The output is the entity label for each word;

[0082] CRF is a typical discriminant model that is used to further correct the recognition results. For named entity recognition tasks, its output results may contain some meaningless characters, and the model does not consider the dependencies between labels. CRF can reasonably combine contextual information to extract the dependencies between labels, so that the recognized entities meet the labeling rules.

[0083] In CRF, there are two very important scores: the Emission score and the Transition score. The Emission score comes from the output of the bidirectional LSTM model, specifically predicting the score of each class label for each token. The Transition score is the probability of transitioning from one class label to another. The Transition matrix can be trained to change the transition probability of internal labels. With the Emission score and Transition score, we can calculate the path score of the current output sequence, as shown in the formula:

[0084]

[0085] T i,j =em i +trans i,j

[0086] where em i and trans i,j are the Emission score of the i-th token in a sentence and the Transition score of the label transferred from the i-th token to the j-th token, T i,j is the sum of the number of Emissionscore and Transition score in a sentence. CRF is trained as follows:

[0087]

[0088] Among them, Path real is the path score of the correct path during training, Path i is the path score of the i-th possible path, and loss represents the loss function of the CRF layer;

[0089] b) The correction module includes a phrase search module and an entity type modification module, such as Figure 4 ;

[0090] 1) Phrase retrieval module, which is used to obtain the potential entity set of the main network input item and filter out the entities that exist in the public knowledge graph. The potential entity set includes each word and a phrase consisting of multiple words; the input is a sentence, and the output is a potential entity set PE in the sentence; the specific steps of the retrieval are:

[0091] i. Find all the permutations and combinations of words in a sentence into phrases. For example, the sentence "The European Commission" can get the set Pe = {The, European, Commission, The European, European Commission, The European Commission};

[0092] ii. Input each potential entity in the set Pe obtained in step i into the public knowledge graph If the potential entity and the entity type corresponding to the potential entity can be retrieved in the public knowledge graph, the potential entity and the entity type are added to the potential entity set PE;

[0093] The potential entity set PE is, for example, {TheEuropeanCommission:Organization,…};

[0094] 2) Entity type modification module, which is used to receive the potential entity set PE output by the phrase retrieval module and the entity type label output by the main network, and then compare the entity type label output by the main network with the entity type corresponding to each potential entity in the main network input item in the potential entity set PE. If they are consistent, no modification is required.

[0095] If there is any inconsistency, correct the output of the main network;

[0096] Step 8: Use the tested self-supervised learning-based named entity recognition model (MBBCD) to realize named entity recognition of text.

[0097] The performance evaluation of this invention uses the Conll2003 English public dataset. The following table shows the data volume of this dataset:

[0098] Number of articles Number of sentences Number of words training set 946 14987 203621 Development set 216 3466 51362 Test set 231 3684 46435

[0099] The dataset contains four entity types: place names, personal names, organization names, and other entities. The entity annotation method uses the BIO annotation method: the BIO annotation method stipulates that all named entities begin with the B tag, I indicates the inside of the named entity, and O indicates the outside of the named entity. If a word in the corpus is annotated with B / I-XXX, B / I indicates that the word belongs to the beginning or inside of the named entity, that is, the word is part of the named entity, and XXX indicates the type of the named entity. The following table shows the specific distribution of the number of entities in the training set, development set, and test set of the dataset:

[0100] Place name Name Organization Name Other entities training set 7140 6600 6321 3438 Development set 1837 1842 1341 922 Test set 1668 1617 1661 702

[0101] In step 7, the DBpedia English knowledge graph is used to correct the entity type recognition caused by word abbreviations in the output results. The following table shows the entity recognition results of the present invention on the above test set:

[0102] Precision Recall Micro-F1 BiLSTM 0.8190 0.7302 0.7720 BiLSTM-CRF 0.8478 0.7307 0.7849 CNN-BiLSTM 0.7572 0.8083 0.7820 CNN-BiLSTM-CRF 0.8049 0.8147 0.8098 Glove-Bilstm 0.8401 0.7433 0.7888 Glove-Bilstm-CRF 0.8628 0.7523 0.8038 Glove-CNN-Bilstm 0.8107 0.8004 0.8055 Bert-Bilstm-CRF 0.9124 0.9152 0.9138 MBBCD 0.9188 0.9381 0.9283

[0103] In the above entity recognition result table, CNN is used for character-level encoding, and the role of Glove is to provide pre-trained word vectors. The named entity recognition model based on self-supervised learning (MBBCD) is the named entity recognition method based on self-supervised learning proposed in the present invention. The experiment uses precision, recall and Micro-F1 as performance evaluation indicators for entity recognition. The annotation method in the named entity simultaneously determines the entity boundary and entity type. Only when the entity boundary and entity type are accurately marked at the same time, the recognition result of the current entity is correct. Based on the true positives (TP), false positives (FP) and false negatives (FN) of the data, the precision (Precision), recall (Recall) and F1 value (F1-score) of the named entity recognition task can be calculated from the above data. TP is defined as the ability to correctly identify the entity boundary and entity type, FP is defined as the ability to correctly identify the entity but the entity boundary or entity type is incorrectly judged, and FN is defined as the entity that should have been recognized but was not actually recognized.

[0104] According to the definition of precision: for a given data set, the precision is the ratio of the number of correctly classified samples to the total number of samples. The calculation method of precision in the named entity recognition task can be obtained:

[0105]

[0106] According to the definition of recall rate Recall: Recall rate is used to describe the ratio of positive examples judged as true in the classifier to the total proportion, the calculation method of recall rate in named entity recognition task can be obtained:

[0107]

[0108] According to the definition of Micro-F1 value: Micro-F1 value is the harmonic mean index of precision and recall rate, which is a comprehensive index that balances the influence of precision and recall rate. Therefore, the calculation method of Micro-F1 value is:

[0109]

Claims

1. A named entity recognition method based on self-supervised learning, characterized by The method comprises the following steps: Step 1: Preprocess the dataset; 1-1 Connect the words with labeled entity types in the dataset into sentences; 1-2 Replace the sentence in step 1-1 with i Translate into sentence a in any language i Then, sentence a i Use with s i Translate the same language into positive sentences Step 2: Construct a set of positive and negative sentence pairs from the sentences processed in step 1, where the positive sentence pair set is The set consists of negative sentence pairs. Set composition, the negative sentence pairs consist of the original sentence and the translated sentences of the rest of the sentences in the corpus; Step 3: Use the embedding encoder to perform embedding encoding on the sentences in the positive sentence pairs and the negative sentence pairs respectively; Step 4: Input the word embedding vector after embedding encoding into the deep neural network layer DNN; Step 5: Calculate the similarity between the output vectors of the positive sentence pair and the output vectors of the negative sentence pair obtained in step 4, and concatenate the calculation results into a new similarity matrix M by row. sim ; and use the contrast loss function l through back propagation and gradient descent algorithm to optimize the embedding encoder f in step 3 k The specific operations are as follows: 5-1 DNN output vector The similarity function sim(·) is used to calculate the similarity and obtain the similarity of the positive examples of similar sentences. Negative similarity of dissimilar sentences Then r + and r - According to row aggregation, the similarity matrix M is obtained by aggregation. sim : 5-2 Use the following contrast loss function l to measure the similarity between positive and negative sentence pairs in the vector representation space: Where τ is a hyperparameter, exp(·) represents the exponential function with the natural constant e as the base, and the sum(·) function represents the addition of matrix elements by row; 5-3 Using the contrast loss function l to optimize the embedding encoder f through back propagation and gradient descent algorithm k Parameters in; Step 6: Obtain sentences consisting of words with labeled entity types, build a dataset, and then further divide it into training set and test set; Step 7: Build a named entity recognition model based on self-supervised learning, which includes a main network and a correction module in cascade order; then use the training set to train the main network, and then use the test set to test the trained main network. Finally, use the correction module to correct the output of the main network after the test; The main network includes the embedding encoder f after step 5 optimization k , bidirectional LSTM layer, CRF layer; The modification module includes a phrase retrieval module and an entity type modification module; wherein the phrase retrieval module is used to obtain the potential entity set of the main network input item and filter out the entities that exist in the public knowledge graph. The potential entity and the entity type are then constructed into a potential entity set PE; the potential entity includes each word and a phrase consisting of multiple words; the entity type modification module is used to receive the potential entity set PE output by the phrase retrieval module and the entity type label output by the main network, and then compare the entity type output by the main network with the entity type corresponding to each potential entity in the main network input item in the potential entity set PE. If they are consistent, no modification is required; if they are inconsistent, the output result of the main network is corrected; Step 8: Use the tested self-supervised learning-based named entity recognition model to implement named entity recognition of text.

2. A method for named entity recognition based on self-supervised learning as claimed in claim 1, characterized in that The embedding encoder f q 、f k The initialization parameter θ q ,θ k same.

3. A method for named entity recognition based on self-supervised learning as claimed in claim 1, characterized in that Step 3 specifically is: The sentence s i Input to the embedding encoder f q Perform word embedding encoding and obtain the encoded result q i ; At the same time, the corresponding positive and negative sentences of sentence si Input to the embedding encoder f k Perform word embedding encoding and obtain the encoded result 4. A method for named entity recognition based on self-supervised learning as claimed in claim 1, characterized in that The deep neural network layer includes a first fully connected layer, a Relu layer and a second fully connected layer; (1) The first fully connected layer: embedding encoder f q 、f k The output embedding vector is transformed into an output vector of the same dimension through a layer of linear transformation; o dense1 =Wx input +b Among them, dense1 represents the output vector, x input represents the embedding vector output by the unoptimized embedding encoder, W represents the weight matrix, and b represents the bias vector; (2) Relu layer: The output vector of the first fully connected layer is input into the Relu activation function to maintain the convergence speed of the model at a stable state; o dense2 =max(o dense1 ,0) Among them, dense2 Represents the output vector of the Relu layer; (3) The second fully connected layer: converts the output vector of the ReLU layer into an output vector with the same dimension as the number of predicted entity types.

5. A method for named entity recognition based on self-supervised learning as claimed in claim 1, characterized in that The embedding encoder fk updates θ using momentum moving average k , the momentum moving average method is as follows: i k ← mth k +(1-m)θ g Where m is the momentum.

6. A method for named entity recognition based on self-supervised learning as claimed in claim 1, characterized in that The optimized embedding encoder fk is used to encode each word in the sentence into a word embedding vector; the input is a complete sentence, and the output is the word embedding vector of each word in the sentence; The bidirectional LSTM layer is used to learn the dependency information between words; The input is a word embedding vector, and the output is a word embedding vector containing the dependency information between words; The CRF layer is used to further correct the recognition results; the input is the output vector of the bidirectional LSTM layer, and the output is the entity type label of each word.

7. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.

8. A computing device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Text named entity recognition method based on Bi-LSTM, CNN and CRF

    CN106569998A

  • BERT-FLAT-based Chinese named entity recognition method

    CN112270193A