Method, system, device and storage medium for named entity recognition based on representation learning

By combining the multi-scale representation learning method of sentence-level attention mechanism, stroke model and pre-training model, the problems of inaccuracy and low efficiency of existing named entity recognition methods are solved, and more accurate and efficient named entity recognition is achieved. Especially when dealing with complex text data.

CN113962223BActive Publication Date: 2024-10-29XI AN JIAOTONG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111161680.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2024-10-29
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

Existing named entity recognition methods have problems of inaccuracy and low efficiency, especially when dealing with complex and diverse text data, it is difficult to effectively identify named entities.

Method used

Using the named entity recognition method based on representation learning, the word vector based on character information is obtained through the sentence-level attention mechanism, and is spliced ​​with the feature vector of the sentence where the word is located, and input into the Bi-LSTM model for training, combined with the stroke model cw2vec and The pre-trained model RoBERTa incorporates pictographic information and document-level weights for named entity recognition.

Benefits of technology

It achieves a more reasonable representation of word vectors in the latent space, improves the accuracy and efficiency of named entity recognition, and forms an end-to-end model that does not require manual participation, has fast training speed, small number of parameters, and significantly improves the F1 value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113962223B_ABST
    Figure CN113962223B_ABST
Patent Text Reader

Abstract

Based on the representation learning named entity recognition method, system, device and storage medium, a word vector based on character information is obtained according to the attention mechanism at the sentence level; the word vector based on character information is spliced ​​with the feature vector of the sentence where the word is located, and is sent as input into the Bi-LSTM model for training to obtain a trained model; the trained model is used to perform named entity recognition of the application document. In the present invention, the trained model is used to perform named entity recognition of the application document, and a more reasonable representation of the word vector in the latent space is obtained. After the entire named entity recognition model is trained, it is an end-to-end model that does not require manual participation, and the training speed is faster than that of the autoregressive model, and the number of parameters is less than that of the end-to-end autoregressive model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method, system, device and storage medium for named entity recognition based on representation learning. Background Art

[0002] (1) Rule-based approach

[0003] In the early days of the concept of named entity recognition (NER), most of the research work on NER was based on manually constructed rules, matching strings in texts according to rules, and then filtering out qualified entities. The most typical rule-based entity extraction method is that Rau, LF (1991) proposed using complex linguistic rules to continuously determine whether a string is a company name entity, which is also a sign that named entity recognition has officially become a task; after that, Collins et al. successively proposed a method of using machines to automatically discover rules and match them. They first stipulated 7 simple seed rules, and then used the DLCoTrain method to automatically discover more rules, and finally extracted related entities; in addition, some researchers have also proposed an entity extraction method that combines rules and statistical models, using a formalized semi-Markov extraction process to expand the external dictionary, and then using the entities in the external dictionary to perform similarity matching to extract new entities in the text. Although rule-based methods have relatively high accuracy, due to the strong domain-specificity of entity recognition models built using rule-based methods and the high complexity of the models, in recent years, researchers have gradually focused on statistical-based methods with greater transferability. At the same time, with the rise of machine learning, the NER task has gradually evolved into a subtask of machine learning.

[0004] (2) Statistical-based methods

[0005] In recent years, the use of statistical models to identify named entities has become mainstream, which is specifically divided into methods of identifying entity boundaries and serialization annotation.

[0006] In terms of identifying entity boundaries, Li et al. used the BdryBot framework to detect the boundaries of named entities. This framework is a pointer network that can effectively overcome the problems of non-fixed output vocabulary length and sparse entity boundary markers, and achieved optimal results on five datasets including CoNLL2003.

[0007] In terms of serialization annotation, the most popular method is Bi-LSTM+CRF, which is also the most widely used method. This method uses a bidirectional LSTM and then adds a CRF layer to the input of the combination of characters and word meanings, and more reasonably learns the relationship between the sequence and its corresponding entity annotation. In recent years, researchers have tried to improve the model effect by combining local and global information to input more reasonable word representations, improve the model framework, and combine unregistered words. Statistical methods have stronger generalization than rule-based methods, and the accuracy does not decrease significantly.

[0008] Existing named entity recognition methods have problems such as inaccuracy and low efficiency. Summary of the invention

[0009] In order to overcome the problems in the prior art, the purpose of the present invention is to provide a method, system, device and storage medium for named entity recognition based on representation learning.

[0010] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0011] A method for named entity recognition based on representation learning comprises the following steps:

[0012] According to the sentence-level attention mechanism, word vectors based on character information are obtained;

[0013] The word vector based on character information is concatenated with the feature vector of the sentence where the word is located, and is sent as input to the Bi-LSTM model for training to obtain a trained model.

[0014] The trained model is used to perform named entity recognition in application documents.

[0015] Furthermore, according to the sentence-level attention mechanism, the specific process of obtaining the word vector based on character information is as follows: the word weight after application document segmentation is obtained according to the word frequency-inverse document frequency value of the word, and then the pre-trained model RoBERTa is used to load the word vector after application document segmentation according to the word weight.

[0016] Furthermore, according to the sentence-level attention mechanism, the specific process of obtaining the word vector based on character information is as follows: the cw2vec stroke model is used to split the Chinese characters into strokes, and the probability of the known central word appearing in the context word is assumed based on the similarity between the current word c and the context word w, and the logarithmic objective function L is obtained through negative sampling based on the probability of the central word appearing in the context word, as shown in formula (3);

[0017]

[0018] Where V is the list of all words in the corpus, T(w) is all the context words in the window where the current center word w is located, σ is the sigmoid function, α is the number of negative samples obtained by the negative sampling operation, E is the expectation, and t is the sample obtained by the negative sampling operation;

[0019] The logarithmic objective function L is optimized through the gradient descent algorithm, and the context word vector is updated to obtain the word vector based on character information.

[0020] Furthermore, the feature vector of the sentence where the word is located is obtained through the following process: the weight of each word at the document level is multiplied by the weighted word vector output by the pre-trained model RoBERTa and then added to obtain the feature vector corresponding to the sentence where the word is located.

[0021] Furthermore, the word weights of the application document after word segmentation are calculated by the following formula:

[0022]

[0023]

[0024]

[0025] TF–IDF(i)=TF(i)*IDF(i) (6)

[0026] Where i is a word, TF(i) is the word frequency, IDF(i) is the inverse document frequency, m is the number of times a word appears in an application, M is the total number of words in an application, N is the number of applications, and N(i) is the number of applications in which the word appears.

[0027] Furthermore, the similarity sim between the current word c and the context word w is as shown in formula (1):

[0028]

[0029] in, Generate n-gram stroke features for the current word w through n-gram, is the stroke feature directly mapped to the context word c, and S is the set of all n-gram strokes of word w.

[0030] Furthermore, the probability p(c|w) of the central word appearing in the context word is as shown in formula (2):

[0031]

[0032] Among them, c and w are context words and central words respectively, V is the list of all words in the corpus, and c′ is each word in the list of words.

[0033] A named entity recognition system based on representation learning, characterized by comprising:

[0034] A word vector determination module based on character information is used to obtain a word vector based on character information according to a sentence-level attention mechanism;

[0035] The training module is used to concatenate the word vector based on character information with the feature vector of the sentence where the word is located, and send it as input to the Bi-LSTM model for training to obtain the trained model;

[0036] The recognition module is used to perform named entity recognition of application documents using the trained model.

[0037] A computer device comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the method for named entity recognition based on representation learning as described above is implemented.

[0038] A computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to perform the above-mentioned method for named entity recognition based on representation learning.

[0039] Compared with the prior art, the present invention has the following beneficial effects: the present invention obtains a word vector based on character information by using a sentence-level attention mechanism; the word vector based on character information is concatenated with the feature vector of the sentence in which the word is located, and is sent as input to a Bi-LSTM model for training to obtain a trained model; the trained model is used to perform named entity recognition of application documents, and a more reasonable representation of the word vector in the latent space is obtained. After the entire named entity recognition model is trained, it is an end-to-end model that does not require manual participation, and the training speed is faster than that of an autoregressive model, and the number of parameters is less than that of an end-to-end autoregressive model.

[0040] Furthermore, the word frequency-inverse document frequency value weight corresponding to the word is used as the document-level weight information of the text, and multiplied and added with the word vector mapped by the corresponding pre-trained model RoBERTa as the sequence information of the text sentence level, which can better recognize the text.

[0041] Furthermore, the stroke model cw2vec was introduced into word embedding, and the pictographic information of the text at the word level was incorporated into the training process, which can better identify entities. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of the present invention.

[0043] Figure 2This is the overall framework diagram of the named entity recognition model.

[0044] Figure 3 These are some recognition effect diagrams, where (a) is the recognition effect of one text, and (b) is the recognition effect of another text. DETAILED DESCRIPTION

[0045] The present invention is described in detail below with reference to the accompanying drawings.

[0046] A method for named entity recognition based on representation learning of the present invention comprises the following steps:

[0047] According to the sentence-level attention mechanism, word vectors based on character information are obtained;

[0048] The weight of each word at the document level is multiplied by the word vector output by the pre-trained model RoBERTa, and then added to obtain the feature vector corresponding to the sentence where the word is located. The word vector based on character information is concatenated with the feature vector of the sentence where the word is located, and sent as input to the Bi-LSTM model for training to obtain the trained model;

[0049] The trained model is used to perform named entity recognition in application documents.

[0050] For details, see Figure 1 , Figure 2 and Figure 3 , the present invention comprises the following steps:

[0051] 1) Pictographic representation of character information

[0052] In the pictographic representation part, we refer to Ant Financial’s 18-year work and adopt the cw2vec stroke model, which splits Chinese characters into strokes one by one, and sets the similarity sim between the current word c and the context word w, as shown in formula (1).

[0053]

[0054] in, Generate n-gram stroke features for the current word w through n-gram, is the stroke feature directly mapped to the context word c, and S is the set of all n-gram strokes of word w.

[0055] Then, based on the similarity between the current word c and the context word w, the probability p(c|w) of the context word appearing in the known central word is assumed, as shown in formula (2).

[0056]

[0057] Among them, c and w are context words and central words respectively, V is the list of all words in the corpus, and c′ is each word in the list of words.

[0058] At this time, the amount of calculation of the denominator is too large, so a negative sampling operation is introduced, and the logarithmic objective function L is obtained, as shown in formula (3).

[0059]

[0060] Among them, V is the list of all words in the corpus, T(w) is all the context words in the window where the current center word w is located, σ is the sigmoid function, α is the number of negative samples obtained by the negative sampling operation, E is the expectation, and t is the sample obtained by the negative sampling operation.

[0061] Finally, the logarithmic objective function L is optimized by the gradient descent algorithm, and the context word vector is updated to obtain the word vector l based on character information, with a dimension of 512. The dimension is defined according to the specific situation. The word vector based on character information is the final learned representation of w in the objective function in the latent space.

[0062] 2) Attention mechanism representation of sequence information

[0063] Here, the present invention introduces sentence-level attention information. The specific operation is: use the word frequency-inverse document frequency value (TF-IDF) of the word to obtain the word weight after the application document is segmented, use the pre-trained model RoBERTa to load the word vector after the application document is segmented, and weightedly multiply the word vectors in each sentence as the feature vector of the sentence.

[0064] The process of calculating the weight of word i is shown in equations (4), (5) and (6).

[0065]

[0066]

[0067] TF–IDF(i)=TF(i)*IDF(i) (6)

[0068] Among them, TF(i) is the term frequency, IDF(i) is the inverse document frequency, m is the number of times a certain word appears in the application, M is the total number of words in the application, N is the number of applications, and N(i) is the number of applications in which the word appears.

[0069] The weight coefficient of each word i is obtained by multiplying the word frequency TF(i) and the inverse document frequency IDF(i), and then the word weight in each sentence is normalized to obtain the word weight after the application document is segmented; as shown in formula (7).

[0070]

[0071] After obtaining the word weight of each word after word segmentation in the application document, it is multiplied and added with the word vector output by the RoBERTa pre-training model to obtain the feature vector s corresponding to the sentence where the word is located, with a dimension of 512.

[0072] After obtaining the word vector and feature vector based on character information, the word vector of the word is concatenated with the feature vector of the sentence in which the word is located, with a dimension of 512*2, and sent as input to the Bi-LSTM model for training. Finally, the obtained model is used for named entity recognition of the summary.

[0073] A named entity recognition system based on representation learning, comprising:

[0074] A word vector determination module based on character information is used to obtain a word vector based on character information according to a sentence-level attention mechanism;

[0075] The training module is used to concatenate the word vector based on character information with the feature vector of the sentence where the word is located, and send it as input to the Bi-LSTM model for training to obtain the trained model;

[0076] The recognition module is used to perform named entity recognition of application documents using the trained model.

[0077] A computer device comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the above-mentioned method for named entity recognition based on representation learning is implemented.

[0078] A computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to perform the above-mentioned method for named entity recognition based on representation learning.

[0079] The following is an explanation through a specific embodiment.

[0080] As the State Grid Corporation of China promotes theoretical innovation in UHV AC and DC power grids, smart grids and the third industrial revolution, the number of innovative power technology project applications continues to increase. Behind the State Grid Corporation of China's innovation and progress lies the arduous task of integrating and managing current power technology project applications.

[0081] In the named entity recognition of the power project application, several concepts are first defined:

[0082] (1) Entity of method used: the method used in the application, such as zero-sequence harmonic component principle, thermal step current method, electromagnetic coupling principle, etc.

[0083] (2) Field entities involved: the fields involved in the application, such as reactive power compensation, substation engineering, economic power transmission, etc.

[0084] The overall framework of the named entity recognition method based on multi-scale representation learning is as follows Figure 2 shown.

[0085] 1) Pictographic representation of character information

[0086] In the pictographic representation part, we refer to Ant Financial’s 18-year work and adopt the cw2vec stroke model, which splits Chinese characters into strokes one by one, and sets the similarity sim between the current word c and the context word w, as shown in formula (1).

[0087]

[0088] in, Generate n-gram stroke features for the current word w through n-gram, is the stroke feature directly mapped to the context word c, and S is the set of all n-gram strokes of word w.

[0089] Furthermore, we assume that the probability p(c|w) of the central word appearing in the context word is known, as shown in formula (2).

[0090]

[0091] Among them, c and w are context words and central words respectively, V is the list of all words in the corpus, and c′ is each word in the list of words.

[0092] At this time, the amount of calculation of the denominator is too large, so a negative sampling operation is introduced, and the logarithmic objective function L is obtained, as shown in formula (3).

[0093]

[0094] Among them, V is the list of all words in the corpus, T(w) is all the context words in the window where the current center word w is located, σ is the sigmoid function, α is the number of negative samples obtained by the negative sampling operation, E is the expectation, and t is the sample obtained by the negative sampling operation.

[0095] Finally, by optimizing the logarithmic objective function L through gradient descent and updating the context word vector, we can obtain the word vector l based on character information with a dimension of 512.

[0096] 2) Attention mechanism representation of sequence information

[0097] Here, the present invention introduces sentence-level attention information. The specific operation is: using TF-IDF to obtain the word weights of the electric power technology project application document summary after word segmentation, using the RoBERTa pre-trained model to load the word vectors of the electric power technology project application document summary after word segmentation, and weighted multiplication of the word vectors in each sentence as the feature vector of the sentence.

[0098] The process of calculating the weight of word i is shown in equations (4), (5) and (6).

[0099]

[0100]

[0101] TF–IDF(i)=TF(i)*IDF(i) (6)

[0102] Among them, TF(i) is the term frequency, IDF(i) is the inverse document frequency, m is the number of times a certain word appears in the electric power technology project application, M is the total number of words in the electric power technology project application, N is the number of electric power technology project applications, and N(i) is the number of electric power technology project applications in which the word appears.

[0103] The weight coefficient of each word i is obtained by multiplying the word frequency TF(i) and the inverse document frequency IDF(i), and then the word weight in each sentence is normalized, as shown in formula (7).

[0104]

[0105] After obtaining the weight of each word at the document level, it is multiplied and added with the word vector output by the RoBERTa pre-trained model to obtain the feature vector s corresponding to the sentence where the word is located, with a dimension of 512.

[0106] After obtaining the word vector and feature vector based on character information, the word vector of the word is concatenated with the feature vector of the sentence in which the word is located, with a dimension of 512*2, and is sent as input to the Bi-LSTM model for training. The training ends after 8 batches (epochs). Finally, the obtained model is used to perform named entity recognition of the abstract of the power technology project application document. Some recognition results are shown in the figure below. Figure 3 As shown in (a) and (b), it can be seen that the recognition effect is good.

[0107] Named Entity Recognition Effect

[0108] In order to match these two heterogeneous data, named entity recognition must be performed on the text data first. To further verify the effectiveness of the method proposed in the present invention, the present invention selects Bi-LSTM+CRF as the baseline to perform an ablation experiment. The results are shown in Table 2.

[0109] Table 2 Entity recognition results

[0110]

[0111] From the results in Table 2, it can be seen that the multi-scale representation learning method combining character, sentence and document levels proposed in the present invention achieves the best effect in named entity recognition, and the F1 value is 0.25 better than that using the pre-trained model RoBerta.

[0112] It is worth noting that after using the cw2vec model, whether combined with the multi-scale information fusion method proposed in this paper or the pre-trained model RoBerta method, the final model effect has been significantly improved, and the F1 value has increased significantly, proving that in the processing of Chinese text, cw2vec can indeed capture the pictographic information unique to Chinese characters that RoBerta cannot capture. After comparing the multi-scale representation method combining words, sentences, and documents proposed in this paper, the model effect has improved but not significantly. Analysis believes that this may be because the structure of the RoBerta model itself has a part that combines word and sentence level information, so the model improvement is not very obvious.

[0113] It can be seen that named entity recognition technology in natural language processing can solve this problem. By extracting relevant entities in the document, it can effectively manage the electric power technology project application documents.

[0114] The present invention uses a statistical-based method and combines the sentence-level attention mechanism with the stroke-based Chinese word vector embedding to improve the effect of the named entity recognition model and enhance the management efficiency of electric power technology project applications.

[0115] The present invention obtains a more reasonable representation of word vectors in latent space; the trained model is an end-to-end model and does not require human intervention; the training speed is faster than that of autoregressive models, and the number of parameters is less than that of end-to-end autoregressive models.

[0116] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0117] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.

[0118] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0119] In the present invention, "module", "device", "system" and the like refer to related entities applied to computers, such as hardware, a combination of hardware and software, software or software in execution, etc. In detail, for example, an element can be, but is not limited to, a process, a processor, an object, an executable element, an execution thread, a program and / or a computer running on a processor. In addition, an application or script program running on a server, a server can all be an element. One or more elements can be in an execution process and / or thread, and an element can be localized on a computer and / or distributed between two or more computers, and can be operated by various computer-readable media. An element can also communicate through local and / or remote processes according to a signal with one or more data packets, for example, a signal from a data that interacts with another element in a local system, a distributed system, and / or a network on the Internet through a signal to interact with other systems.

[0120] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include" and "comprise" include not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such processes, methods, articles or equipment. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or equipment that includes the elements.

[0121] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0122] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0123] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A named entity recognition method based on representation learning, characterized in that: The following steps are involved: According to the sentence-level attention mechanism, word vectors based on character information are obtained; The word vector based on character information is concatenated with the feature vector of the sentence in which the word is located, and the concatenated vector is fed into the Bi-LSTM model as input for training to obtain the trained model. Use the trained model to perform named entity recognition on application documents; The specific process of obtaining word vectors based on character information using the sentence-level attention mechanism is as follows: the word weights of the application document after word segmentation are obtained based on the word frequency-inverse document frequency value, and then the pre-trained model RoBERTa is used to load the word vectors of the application document after word segmentation based on the word weights; According to the sentence-level attention mechanism, the specific process of obtaining word vectors based on character information is as follows: the cw2vec stroke model is used to split Chinese characters into strokes, and the probability of the central word appearing in the context word is assumed based on the similarity between the current word c and the context word w. Then, the logarithmic objective function L is obtained based on the probability of the central word appearing in the context word through negative sampling operation, as shown in formula (3); Where V is the list of all words in the corpus, T(w) is the context words of the window where the current center word w is located, σ is the sigmoid function, α is the number of negative samples obtained by the negative sampling operation, E is the expectation, and t is the sample obtained by the negative sampling operation; Optimize the logarithmic objective function L through the gradient descent algorithm and update the context word vector to obtain the word vector based on character information; The feature vector of the sentence in which the word is located is obtained through the following process: the weight of each word at the document level is multiplied by the weighted word vector output by the pre-trained model RoBERTa, and then added to obtain the feature vector corresponding to the sentence in which the word is located.

2. The method for named entity recognition based on representation learning according to claim 1, characterized in that The word weight of the application document after word segmentation is calculated using the following formula: TF–IDF(i)=TF(i)*IDF(i) (6) Where i is a word, TF(i) is the word frequency, IDF(i) is the inverse document frequency, m is the number of times a word appears in the application, M is the total number of words in the application, N is the number of applications, and N(i) is the number of applications in which the word appears.

3. The method for named entity recognition based on representation learning according to claim 2, characterized in that The similarity sim between the current word c and the context word w is shown in formula (1): in, Generate n-gram stroke features for the current word w through n-gram, is the stroke feature directly mapped to the context word c, and S is the set of all n-gram strokes of word w.

4. The method for named entity recognition based on representation learning according to claim 2, characterized in that The probability p(c|w) of the central word appearing in the context word is shown in formula (2): Among them, c and w are context words and center words respectively, V is the list of all words in the corpus, and c′ is each word in the list.

5. A named entity recognition system based on representation learning, characterized in that: include: A character-based word vector determination module is used to obtain character-based word vectors based on the sentence-level attention mechanism; The training module is used to concatenate the word vector based on character information with the feature vector of the sentence in which the word is located, and feed it into the Bi-LSTM model as input for training to obtain the trained model; The recognition module is used to perform named entity recognition in application documents using the trained model; The specific process of obtaining word vectors based on character information using the sentence-level attention mechanism is as follows: the word weights of the application document after word segmentation are obtained based on the word frequency-inverse document frequency value, and then the pre-trained model RoBERTa is used to load the word vectors of the application document after word segmentation based on the word weights; According to the sentence-level attention mechanism, the specific process of obtaining word vectors based on character information is as follows: the cw2vec stroke model is used to split Chinese characters into strokes, and the probability of the central word appearing in the context word is assumed based on the similarity between the current word c and the context word w. Then, the logarithmic objective function L is obtained based on the probability of the central word appearing in the context word through negative sampling operation, as shown in formula (3); Where V is the list of all words in the corpus, T(w) is the context words of the window where the current center word w is located, σ is the sigmoid function, α is the number of negative samples obtained by the negative sampling operation, E is the expectation, and t is the sample obtained by the negative sampling operation; Optimize the logarithmic objective function L through the gradient descent algorithm and update the context word vector to obtain the word vector based on character information; The feature vector of the sentence in which the word is located is obtained through the following process: the weight of each word at the document level is multiplied by the weighted word vector output by the pre-trained model RoBERTa, and then added to obtain the feature vector corresponding to the sentence in which the word is located.

6. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the method for named entity recognition based on representation learning according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the method for named entity recognition based on representation learning according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Named entity identification method capable of combining attention mechanism and multi-target cooperative training

    CN108628823A

  • Method and device for identifying named entities in statements

    CN111859964A

  • Biomedical named entity recognition method and system

    CN112541356A

  • Representation learning for input classification via topic sparse autoencoder and entity embedding

    US20200184339A1

  • Machine reading understanding method and apparatus, storage medium, and device

    WO2021082953A1