Named entity recognition method, device, computer equipment and readable storage medium

By preprocessing and dictionary matching of medical texts, candidate abbreviations and supplementary entities are generated and screened, which solves the problem of inability to identify abbreviations and specific information entities in microbial entity extraction in the existing technology, and improves the accuracy and completeness of extraction.

CN112257446BActive Publication Date: 2024-10-29PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011123404.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-20
Publication Date
2024-10-29
Estimated Expiration
2040-10-20

AI Technical Summary

Technical Problem

In the existing microbial entity extraction task, it is impossible to accurately identify the abbreviated forms of microorganisms in the literature and entities with specific information, resulting in low accuracy of identification results.

Method used

By obtaining medical texts for preprocessing, the target entities are extracted based on the preset dictionary, and candidate abbreviation entities and candidate supplementary entities are generated. The CharCNN network and position encoding layer are used for screening, and the fully connected layer is combined for classification processing to obtain the target abbreviation entities and target entities. Supplement entities to form target data.

Benefits of technology

The accuracy of microbial entity extraction is improved, abbreviations and entities with specific information can be identified, and the completeness and comprehensiveness of the extraction process are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112257446B_ABST
    Figure CN112257446B_ABST
Patent Text Reader

Abstract

The present invention discloses a named entity recognition method, an apparatus, a computer device and a readable storage medium, and relates to the technical field of natural language processing, including obtaining a medical text, preprocessing the medical text to obtain a text to be processed; extracting microbial entities from the text to be processed based on a preset dictionary to obtain a target entity; generating multiple candidate abbreviation entities according to a first preset rule and the target entity, and using a first model to obtain the target abbreviation entity; generating multiple candidate supplementary entities according to a second preset rule and the target entity, and using a second model to obtain the target supplementary entity; generating target data based on the target entity, the target abbreviation entity and the target supplementary entity, and solving the technical problem that the existing entity extraction based on dictionary matching cannot consider abbreviations or entities with specific information and has a low accuracy rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a named entity recognition method, device, computer equipment and readable storage medium. Background Art

[0002] With the development of electronic information technology, in the medical field, a medical knowledge graph has been formed by summarizing and organizing medical knowledge. Microbial information is very important in some medical literature on viral infections and bacterial infections. The types of microorganisms are closely related to the treatment of related diseases. For example, the most common pneumonia, bacterial pneumonia, and viral pneumonia have very different treatment and diagnosis methods. Pneumonia caused by different types of viruses is also very different. Therefore, accurately extracting microbial information from medical literature has high business value.

[0003] In the existing microbial entity extraction tasks, most of them are extracted based on dictionary matching. However, in the existing extraction process, microorganisms often appear in the literature in the form of abbreviations. At the same time, microorganisms also appear in the literature with specific strain information, while dictionaries usually can only identify microbial entities with full names. As a result, there are many omissions in the recognition process and the accuracy of the recognition results is low. Summary of the invention

[0004] The purpose of the present invention is to provide a method, apparatus, computer device and readable storage medium for named entity recognition, which are used to solve the technical problem that the existing entity extraction based on dictionary matching of microorganisms cannot consider abbreviations or entities with specific information, resulting in low accuracy.

[0005] To achieve the above object, the present invention provides a method for named entity recognition, comprising:

[0006] Acquire a medical text, and preprocess the medical text to obtain a text to be processed;

[0007] Extracting microbial entities from the text to be processed based on a preset dictionary to obtain target entities;

[0008] Generate multiple candidate abbreviation entities according to the first preset rule and the target entity, and use the first model to screen from the candidate abbreviation entities to obtain candidate abbreviation entities corresponding to the entity as the target abbreviation entity;

[0009] Generate a plurality of candidate supplementary entities according to a second preset rule and the target entity, and screen the candidate supplementary entities using a second model to obtain a target supplementary entity;

[0010] Target data is generated based on the target entity, the target abbreviation entity and the target supplementary entity.

[0011] Further, the generating of multiple candidate abbreviation entities according to the first preset rule and the target entity includes the following:

[0012] Obtain a target entity, and extract a character string of a preset length according to the entity;

[0013] After serializing the character string, preset characters are added to obtain a candidate abbreviation entity corresponding to the target entity.

[0014] Further, the first model is used to screen the candidate abbreviation entities to obtain the candidate abbreviation entity corresponding to the target entity as the target abbreviation entity, including the following:

[0015] Obtain any candidate abbreviation entity, input the candidate abbreviation entity and the target entity into the CharCNN network at the same time, and obtain a first vector and a second vector corresponding to the candidate abbreviation entity and the target entity respectively;

[0016] After concatenating the first vector and the second vector, a classification process is performed using a fully connected layer to obtain a judgment result;

[0017] When the judgment result is no, obtaining another candidate abbreviation entity;

[0018] When the judgment result is yes, the candidate abbreviation entity is obtained as the target abbreviation entity.

[0019] Further, a plurality of candidate supplementary entities are generated according to the second preset rule and the target entity, including the following:

[0020] Obtain a target entity, and determine whether the target entity is at the end of the sentence;

[0021] When the target entity is not located at the end of the sentence, a subsequent word adjacent to the target entity is obtained, and the target entity and the subsequent word adjacent to the target entity are concatenated as a candidate supplementary entity.

[0022] Further, the second model is used to screen the candidate supplementary entities to obtain the target supplementary entity, including the following:

[0023] Obtain any candidate supplementary entity, process the candidate supplementary entity using a CharCNN layer, and obtain a feature vector corresponding to the candidate supplementary entity;

[0024] synchronously processing the candidate supplementary entity using a position coding layer to obtain a position vector corresponding to the candidate supplementary entity;

[0025] The feature vector and the position vector are concatenated and input into a fully connected layer for processing to obtain a classification result;

[0026] When the classification result is no, obtaining another candidate supplementary entity;

[0027] When the classification result is yes, the candidate supplementary entity is obtained as a target candidate supplementary entity.

[0028] Further, the synchronously using a position coding layer to process the candidate supplementary entity to obtain a position vector corresponding to the candidate supplementary entity includes the following:

[0029] Acquire the candidate supplementary entity, and calculate the length data of the candidate supplementary entity;

[0030] A target vector is established according to the length data and a third preset rule as a position vector corresponding to the candidate supplementary entity.

[0031] Furthermore, before the second model is used to screen the candidate supplementary entities to obtain the target supplementary entity, the second model is trained, including the following:

[0032] Acquire a training sample, wherein the sample includes a plurality of sample entities, the sample entity corresponds to a plurality of associated entities, and each associated entity includes a sample label;

[0033] Obtain any associated entity, and process the associated entity using a CharCNN layer to obtain a first sample vector;

[0034] synchronously using a position coding layer to process the associated entity to obtain a second sample vector;

[0035] The first sample vector and the second sample vector are concatenated and input into a fully connected layer for processing to obtain a sample classification result;

[0036] The sample classification result is compared with the sample label corresponding to the associated entity, and the parameters of the second model are adjusted until the training is completed to obtain the trained second model.

[0037] To achieve the above object, the present invention further provides a named entity recognition device, comprising:

[0038] An acquisition module is used to acquire medical texts, pre-process the medical texts, and obtain texts to be processed;

[0039] An extraction module, used for extracting microbial entities from the text to be processed based on a preset dictionary to obtain target entities;

[0040] A first processing module, configured to generate a plurality of candidate abbreviation entities according to a first preset rule and the entity, and to screen the candidate abbreviation entities using a first model to obtain candidate abbreviation entities corresponding to the target entity as the target abbreviation entity;

[0041] A second processing module, configured to generate a plurality of candidate supplementary entities according to a second preset rule and the entity, and screen the candidate supplementary entities using a second model to obtain a target supplementary entity;

[0042] A generating module is used to generate target data based on the target entity, the target abbreviation entity and the target supplementary entity.

[0043] To achieve the above objectives, the present invention also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned named entity recognition method when executing the computer program.

[0044] To achieve the above objectives, the present invention also provides a computer-readable storage medium, which includes multiple storage media, each storage medium storing a computer program, and the computer programs stored in the multiple storage media jointly implement the steps of the above-mentioned named entity recognition method when executed by a processor.

[0045] The named entity recognition method, apparatus, computer equipment and readable storage medium provided by the present invention first obtain the target entity (i.e., the full name entity) by dictionary matching in this scheme, then generate candidate abbreviation entities and use the first model to judge and obtain the target abbreviation entity data, thereby realizing the extraction of abbreviation entities in the process of extracting entities based on medical texts, and then generate candidate supplementary entities and use the second model to judge each candidate supplementary entity, thereby realizing the extraction of some entities containing specific information (number, strain type, etc.) in the process of extracting entities based on medical texts, and finally all entities are grouped, thereby solving the technical problem that the existing entity extraction of microorganisms based on dictionary matching cannot consider abbreviations or entities with specific information, thereby having a low accuracy rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flowchart of Embodiment 1 of the method for named entity recognition of the present invention;

[0047] Figure 2 A flowchart of generating multiple candidate abbreviation entities according to the first preset rule and the target entity in the first embodiment of the method for named entity recognition of the present invention;

[0048] Figure 3A flowchart of using the first model to screen from the candidate abbreviation entities in the first embodiment of the named entity recognition method of the present invention to obtain the candidate abbreviation entities corresponding to the target entity as the target abbreviation entity;

[0049] Figure 4 A flowchart of training the first model before using the first model to screen from the candidate abbreviation entities and obtain the candidate abbreviation entities corresponding to the target entity as the target abbreviation entity in the first embodiment of the named entity recognition method of the present invention;

[0050] Figure 5 A flowchart of generating a plurality of candidate supplementary entities according to a second preset rule and the target entity in Embodiment 1 of the method for named entity recognition of the present invention;

[0051] Figure 6 A flowchart of using the second model to screen the candidate supplementary entities to obtain the target supplementary entity in the first embodiment of the named entity recognition method of the present invention;

[0052] Figure 7 This is a flowchart of training the second model before using the second model to screen the candidate supplementary entities and obtain the target supplementary entity in the first embodiment of the named entity recognition method of the present invention;

[0053] Figure 8 A schematic diagram of a program module of a second embodiment of the named entity recognition device of the present invention;

[0054] Fig. 9 Schematic diagram of the hardware structure of the computer device in the third embodiment of the computer device of the present invention.

[0055] Reference numerals:

[0056] 6. Named entity recognition device 61. Acquisition module 62. Extraction 63

[0057] 631, first processing unit 632, second processing unit 641, third processing unit

[0058] 642, third processing unit 7, computer device 71, memory

[0059] 72. Processor 73. Network interface DETAILED DESCRIPTION

[0060] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

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

[0062] The named entity recognition method, device, computer equipment and readable storage medium provided by the present invention are applicable to the field, and provide a named entity recognition method based on an acquisition module, an extraction module, a first processing module, a second processing module and a generation module. The present invention acquires medical texts through the acquisition module and performs preprocessing (specifically, normalization and morphological restoration operations and elimination of singular and plural numbers, tenses, etc.), and uses the extraction module to extract entities based on the preprocessed medical texts and a preset dictionary to obtain target entities consistent with the preset dictionary, and then, different from the prior art, the first processing module is used to generate multiple candidate abbreviation entities and the first model is used to screen out the target entities that are consistent with the target entities as target abbreviation entities, and the second processing module is used to generate multiple candidate supplementary entities and the second model is used to screen and obtain the target supplementary entity, and finally the target entity, the target abbreviation entity and the target supplementary entity are collected by the generation module to obtain the target data, and the target abbreviation entity and the target supplementary entity are extracted autonomously, so as to solve the technical problem that the entity extraction based on dictionary matching microorganisms cannot consider abbreviations or entities with specific information, thereby having a low accuracy rate.

[0063] Embodiment 1

[0064] See also Figure 1 A named entity recognition method of this embodiment is applied to the server side. This application can be applied to smart medical scenarios to promote the construction of smart cities, including the following steps:

[0065] S100: Acquire a medical text, and pre-process the medical text to obtain a text to be processed;

[0066] Specifically, the preprocessing of the medical text in this solution includes but is not limited to normalization and morphological restoration operations as well as elimination of singulars, plurals, tenses, etc. Specifically, normalization can map the data to a range of 0 to 1 for processing, and can also facilitate comparison and weighting of indicators of different units or magnitudes; morphological restoration is to remove the affixes of words and extract the main parts of the words; elimination of singulars, plurals, tenses, etc. can be achieved by removing meaningless words, such as to, a, the, etc. Other technical means for natural language preprocessing can also be used here to reduce interference with the extraction based on the preset dictionary in the subsequent step S200.

[0067] S200: extracting microbial entities from the text to be processed based on a preset dictionary to obtain target entities;

[0068] Specifically, the text is extracted based on the preset dictionary, that is, the entity data in the text corresponding to the preset dictionary is directly filtered out. For example, "Lactobacillus AU513B can cause pneumonia. In this study we learn the effect of aspirin on Lb.AU513B". If there is only the word "Lactobacillus" in the dictionary, then only "Lactobacillus" is extracted in this step. It should be noted that this is directly obtained from the dictionary, so the full name of the entity can be directly obtained, but the entity abbreviation cannot be obtained.

[0069] S300: Generate multiple candidate abbreviation entities according to a first preset rule and the target entity, and use a first model to screen the candidate abbreviation entities to obtain candidate abbreviation entities corresponding to the entity as the target abbreviation entity;

[0070] The first model includes two parallel processed Char CNN networks, one for receiving entity data and the other for inputting candidate abbreviation entity data one by one. A fully connected layer is connected after the two Char CNN networks to determine whether the input candidate abbreviation entity is an abbreviation of the target entity.

[0071] Specifically, the method generates multiple candidate abbreviation entities according to the first preset rule and the target entity, referring to Figure 2 , including the following:

[0072] S311: Acquire a target entity, and extract a character string of a preset length according to the target entity;

[0073] In this scheme, the character string of preset length is preset to be one letter, two letters or three letters, that is, one character, two characters or three characters. The abbreviation of the microbial entity is generally composed of 1-3 letters in the full name in order, but the letters that constitute it are random. Therefore, in this scheme, all possible situations are enumerated to generate all entity abbreviations that may correspond to the target entity.

[0074] S312: Serializing the character string and adding preset characters to obtain a candidate abbreviation entity corresponding to the target entity.

[0075] The abbreviation of a microorganism is generally composed of 1-3 letters in the full name in order, and a "." is added at the end. Therefore, in the above implementation, the preset character is ".". By adding the preset character to the end of the serialized string, all candidate abbreviation entities can be obtained.

[0076] The above S311 and S312 are used to list the candidate abbreviation entities that may correspond to the target entity. It is necessary to screen all the above candidate abbreviation entities to obtain the abbreviation entity corresponding to the target entity. Specifically, the first model is used to screen the candidate abbreviation entities to obtain the candidate abbreviation entities corresponding to the target entity as the target abbreviation entity. Figure 3 , including the following:

[0077] S321: Obtain any candidate abbreviation entity, input the candidate abbreviation entity and the target entity into the CharCNN network at the same time, and obtain a first vector and a second vector corresponding to the candidate abbreviation entity and the target entity respectively;

[0078] The first model includes two inputs, one is any candidate abbreviation entity, and the other is a target entity. The output is "yes" or "no", which is used to indicate whether the input candidate abbreviation entity matches the target entity. The CharCNN network is used to process the candidate abbreviation entity and the target entity respectively, and two CharCNN networks with the same structure are set. The CharCNN network is a character-level convolutional neural network, which is used to extract the glyph structures of the candidate abbreviation entity and the target entity respectively.

[0079] S322: concatenate the first vector and the second vector and perform classification processing using a fully connected layer to obtain a judgment result;

[0080] The above fully connected layer is used to achieve binary classification with output as "yes" or "no".

[0081] S323: when the judgment result is no, obtaining another candidate abbreviation entity;

[0082] When the judgment result is no, the candidate abbreviation entity does not match the target entity, and it is necessary to replace another candidate abbreviation entity and repeat the above S321-S322 to judge again.

[0083] S324: When the judgment result is yes, the candidate abbreviation entity is obtained as the target abbreviation entity.

[0084] When the judgment result is yes, the candidate abbreviation entity matches the target entity.

[0085] Specifically, before using the first model to screen the candidate abbreviation entities and obtain the candidate abbreviation entities corresponding to the target entity as the target abbreviation entity, the first model is trained. Figure 4 , including the following:

[0086] S331: Acquire a training sample, wherein the training sample includes a plurality of sample full name-abbreviation pairs, and each of the sample full name-abbreviation pairs corresponds to a sample label;

[0087] In the above steps, the training samples can be manually generated, including reasonable and unreasonable full name-abbreviation pairs, and each full name-abbreviation pair is labeled, or they can be directly obtained from a database or generated autonomously using a model.

[0088] S332: Obtain a sample full name-abbreviation pair, input the sample full name and the sample abbreviation into the CharCNN network at the same time, and obtain a first processing vector and a second processing vector corresponding to the candidate abbreviation entity and the target entity respectively;

[0089] S333: concatenating the first processing vector and the second processing vector and performing classification processing using a fully connected layer to obtain a sample judgment result;

[0090] S334: Compare the sample judgment result with the sample label, adjust the first model until the training is completed, and obtain the trained first model.

[0091] Step S332 of the above training process is consistent with step S333 and steps S321-S322 in the processing process. The training samples are used to enable the first model to autonomously learn how to extract glyph features and how to classify according to the features. After the training is completed, the processing process of the above steps S321-S333 is used to overcome the situation in the prior art that abbreviations cannot be considered based on dictionary matching. Candidate abbreviation entities are generated through steps S311-S312, and the first model is used in steps S321-S323 to screen and obtain the target abbreviation entity that matches the target entity, and the extraction of the abbreviation entity is autonomously completed, which further improves the accuracy of the entity extraction results.

[0092] S400: generating a plurality of candidate supplementary entities according to a second preset rule and the target entity, and screening the candidate supplementary entities using a second model to obtain a target supplementary entity;

[0093] In this embodiment, the candidate supplementary entity is obtained by expanding the boundary of the target entity. Since some microorganisms contain specific information (such as strain information, for example, "actobacillus AU513B"), entities that may contain specific information are obtained as candidate supplementary entities through the above-mentioned candidate supplementary entity method, and then the candidate supplementary entities are judged.

[0094] Specifically, a plurality of candidate supplementary entities are generated according to the second preset rule and the target entity, see Figure 5 , including the following:

[0095] S411: Acquire a target entity and determine whether the target entity is at the end of the sentence;

[0096] As mentioned above, the candidate supplementary entity is an extension of the target entity, generally a microbial entity with specific information. The entity and the specific information are arranged in sequence, so it is necessary to extend backward according to the position of the target entity. If the target entity is already at the end of the sentence, it means that it cannot be extended backward, and there is no candidate supplementary entity. If the target entity is in the middle or head of the sentence, it is possible that the adjacent words on the back side are combined into an entity with specific information.

[0097] S412: When the target entity is not at the end of the sentence, obtain a subsequent word adjacent to the target entity, and concatenate the target entity and the subsequent word adjacent to the target entity as a candidate supplementary entity.

[0098] As an example, take "Lactobacillus AU513B can cause pneumonia" as an example. Assuming that Lactobacillus is extracted according to the above steps, it is determined whether Lactobacillus is at the end of the sentence. If Lactobacillus is already at the end of the sentence, we think that there will be no more strain information. Therefore, there is no need to expand Lactobacillus. If Lactobacillus is not at the end of the sentence, the word after Lactobacillus is included in the candidate supplementary entity, that is, "Lactobacillus AU513B" is obtained. Then, according to the steps described below, it is determined whether "Lactobacillus AU513B" is a target supplementary entity (i.e., whether it is a reasonable microbial entity).

[0099] According to the aforementioned steps S411-S412, a candidate supplementary entity is obtained according to the position of the target entity in the sentence. However, the candidate supplementary entity may not be an entity with specific information consistent with the target entity. Therefore, it is necessary to judge the candidate supplementary entities one by one. Specifically, the second model is used to screen the candidate supplementary entities to obtain the target supplementary entity. Figure 6 , including the following steps:

[0100] S421: Obtain any candidate supplementary entity, and process the candidate supplementary entity using a CharCNN layer to obtain a feature vector corresponding to the candidate supplementary entity;

[0101] In the above steps, the CharCNN layer captures the glyph features of the string and converts them into "glyph vectors". For example, many strain texts are features such as a combination of uppercase letters and numbers. The CharCNN layer includes a character encoding layer and a convolution-pooling layer. Because the input of the model is a one-hot representation vector of the character, the character encoding must be available first. The convolution-pooling layer consists of 9 neural networks, including 6 convolutional layers and 3 fully connected layers. Two dropout layers are added between the three fully connected layers to achieve model regularization. The CharCNN layer can be used to identify the features of the candidate supplementary entity.

[0102] S422: synchronously using a position coding layer to process the candidate supplementary entity to obtain a position vector corresponding to the candidate supplementary entity;

[0103] Based on the above steps S421-S422, the second model includes two inputs, one is the candidate supplementary entity (i.e., obtaining the feature vector), and the other is the range of the extended character string (i.e., obtaining the position vector). For example, the positions of the character string 0-12 in "Lactobacillus AU513B" are the results of the original dictionary extraction (i.e., Lactobacillus), and the character string 14-19 is the result of our expansion (i.e., AU513B), so we take the two numbers 12 and 14 as the second input.

[0104] The position coding layer obtains the position information of the candidate supplementary entity, and specifically, converts the position information into a vector according to a preset rule. More specifically, the synchronous use of the position coding layer to process the candidate supplementary entity in step S422 to obtain a position vector corresponding to the candidate supplementary entity includes the following:

[0105] S422-1: Obtain the candidate supplementary entity, and calculate the length data of the candidate supplementary entity;

[0106] In the above steps, in order to establish the target vector, it is necessary to keep consistent with the length of the candidate supplementary entity, so that the character strings at different positions are marked differently according to the third preset rule in step S422-2, so as to distinguish the target entity from the extended character string.

[0107] S422-2: Establish a target vector according to the length data and a third preset rule as a position vector corresponding to the candidate supplementary entity.

[0108] The third preset rule is that in the target vector, the position value corresponding to the target entity string is 1, the position corresponding to the extended string (that is, the string corresponding to the next word of the target entity) is 0, and the value of the blank part in the middle is 2.

[0109] As an example but not a limitation, for "Lactobacillus AU513B", a vector with a length of 20 is generated, in which the position value corresponding to the original string is 1, the position corresponding to the extended string is 0, and the value of the blank part in the middle is 2. The vector generated for "Lactobacillus AU513B" is "11111111111112000000".

[0110] S423: splicing the feature vector and the position vector and inputting them into a fully connected layer for processing to obtain a classification result;

[0111] Specifically, the classification result includes "yes" or "no". When the judgment result is yes, it means that the extended string matches the target entity, that is, the candidate supplementary entity is a target entity with specific information. When the judgment result is no, it means that the candidate supplementary entity does not match the target entity, and there is no extended entity here.

[0112] S424: When the classification result is yes, acquiring the candidate supplementary entity as a target candidate supplementary entity.

[0113] S425: When the classification result is no, obtaining another candidate supplementary entity.

[0114] Before using the second model to screen the candidate supplementary entities and obtain the target supplementary entity, the second model is trained. Figure 7 , including the following:

[0115] S431: Acquire a training sample, where the sample includes a plurality of sample entities, the sample entity corresponds to a plurality of associated entities, and each associated entity includes a sample label;

[0116] For example, the sample entity is Lactobacillus, and the associated entities are "Lactobacillus AU513B" (whose corresponding sample label is yes, that is, it is a reasonable sample supplement entity corresponding to the sample entity) and "Lactobacilluscan" (whose corresponding sample label is no, that is, it is an unreasonable sample supplement entity corresponding to the sample entity).

[0117] S432: Acquire any associated entity based on the training sample, and process the associated entity using a CharCNN layer to obtain a first vector;

[0118] S433: synchronously using a position coding layer to process the associated entity to obtain a second vector;

[0119] S434: concatenating the first vector and the second vector and inputting the concatenated vector into a fully connected layer for processing to obtain a sample classification result;

[0120] Steps S432-S434 in the above training process are consistent with those in the processing process and will not be described in detail here.

[0121] S435: Compare the sample classification result with the sample label corresponding to the associated entity, adjust the parameters of the second model until the training is completed, and obtain the trained second model.

[0122] The second model learns the reasonable feature vectors and position vectors of microorganism designations through training samples, thereby learning to judge any input and improving the accuracy of the obtained target supplementary entities.

[0123] S500: Generate target data based on the target entity, the target abbreviation entity and the target supplementary entity.

[0124] In the above implementation, the target entity, target abbreviation entity and target supplementary entity are merged to obtain the final target data. Compared with the existing method based on dictionary matching, abbreviation entities and supplementary entities (extended entities) are added to solve the technical problem that the existing entity extraction of microorganisms based on dictionary matching cannot consider abbreviations or entities with specific information, resulting in low accuracy.

[0125] In this scheme, the full name of the microbial entity is first obtained from the text to be processed by dictionary matching, and then candidate abbreviation entities are generated according to the first preset rule. The first model is used to judge the matching degree between each candidate abbreviation entity and the target entity, and the target abbreviation entity data is obtained, so as to realize the extraction of abbreviation data corresponding to the microbial entity in the process of extracting microbial entities based on medical texts, and then the candidate supplementary entity is obtained according to the second preset rule, and the second model is used to judge each candidate supplementary entity, so as to realize the extraction of part of the microbial entity data containing specific information (number, strain type, etc.) in the process of extracting microbial entities based on medical texts, and further improve the integrity and comprehensiveness of entity extraction in medical texts.

[0126] The above-mentioned target entity, target abbreviation entity and target supplementary entity can be uploaded to the blockchain for subsequent use as reference samples or training samples. Uploading to the blockchain can ensure its security and fairness and transparency to users. The user device can download the summary information from the blockchain to verify whether the priority list has been tampered with. Subsequently, the voice file of the corresponding amount data can also be downloaded from the blockchain for voice broadcast, without the need for a generation process, effectively improving the efficiency of voice processing.

[0127] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0128] Embodiment 2:

[0129] See also Figure 8 A named entity recognition device 6 of this embodiment includes: an acquisition module 61, an extraction module 62, a first processing module 63, a second processing module 64 and a generation module 65.

[0130] An acquisition module 61 is used to acquire medical texts and pre-process the medical texts to obtain texts to be processed;

[0131] An extraction module 62 is used to extract microbial entities from the text to be processed based on a preset dictionary to obtain a target entity;

[0132] A first processing module 63 is used to generate a plurality of candidate abbreviation entities according to a first preset rule and the target entity, and to select from the candidate abbreviation entities using a first model to obtain candidate abbreviation entities corresponding to the target entity as the target abbreviation entity;

[0133] Preferably, the first processing module 63 includes the following:

[0134] The first processing unit 631 is used to obtain a target entity, extract a character string of a preset length according to the entity, and add preset characters to the character string after serialization to obtain a candidate abbreviation entity corresponding to the target entity;

[0135] The second processing unit 632 is used to obtain any candidate abbreviation entity, input the candidate abbreviation entity and the target entity into the CharCNN network at the same time, and obtain a first vector and a second vector corresponding to the candidate abbreviation entity and the target entity respectively; after splicing the first vector and the second vector, a classification process is performed using a fully connected layer to obtain a judgment result; when the judgment result is no, another candidate abbreviation entity is obtained; when the judgment result is yes, the candidate abbreviation entity is obtained as the target abbreviation entity.

[0136] A second processing module 64 is used to generate a plurality of candidate supplementary entities according to a second preset rule and the target entity, and screen the candidate supplementary entities using a second model to obtain a target supplementary entity;

[0137] Preferably, the second processing module 64 includes:

[0138] The third processing unit 641 is used to obtain the target entity and determine whether the target entity is at the end of the sentence; when the target entity is not at the end of the sentence, obtain the next word adjacent to the target entity, and concatenate the target entity and the next word adjacent to the target entity as a candidate supplementary entity.

[0139] The fourth processing unit 642 is used to obtain any candidate supplementary entity, use the CharCNN layer to process the candidate supplementary entity, and obtain a feature vector corresponding to the candidate supplementary entity; simultaneously use the position encoding layer to process the candidate supplementary entity to obtain a position vector corresponding to the candidate supplementary entity; concatenate the feature vector and the position vector and input them into the fully connected layer for processing to obtain a classification result; when the classification result is no, obtain another candidate supplementary entity; when the classification result is yes, obtain the candidate supplementary entity as the target candidate supplementary entity.

[0140] The generating module 65 is used to generate target data based on the target entity, the target abbreviation entity and the target supplementary entity.

[0141] The technical solution is based on natural language processing of semantic analysis in speech semantics. The medical text is acquired and preprocessed through an acquisition module to reduce the impact on the subsequent entity extraction process. The extraction module is used to extract entities based on the preprocessed medical text and a preset dictionary to obtain a target entity consistent with the preset dictionary. Then, a first processing module is used to generate multiple candidate abbreviation entities and a first model is used to screen out the target abbreviation entities that are consistent with the target entity. A second processing module is then used to generate multiple candidate supplementary entities and a second model is used to screen and obtain the target supplementary entity. Finally, the target entity, the target abbreviation entity and the target supplementary entity are combined to generate target data through the generation of targets. This is different from the prior art in which only dictionary matching is used for entity extraction. This solves the technical problem that the existing entity extraction based on dictionary matching of microorganisms cannot consider abbreviations or entities with specific information, thereby resulting in low accuracy.

[0142] In the present solution, during the processing of the first processing module, the first processing unit generates candidate abbreviation entities based on preset rules and target entities, and then each candidate abbreviation entity is screened, which is easy to implement and has a high accuracy rate. During the second processing module, the third processing unit generates candidate supplementary entities based on preset rules and target entities, and then each candidate supplementary entity is judged, which further improves the accuracy of the extraction results, further reduces the omission of abbreviation entities and entities with specific information during the extraction process, ensures that all entities are completely extracted from the medical text, and improves the integrity and comprehensiveness of the entity extraction in the medical text.

[0143] Embodiment three:

[0144] To achieve the above-mentioned purpose, the present invention further provides a computer device 7, which may include multiple computer devices. The components of the named entity recognition device 6 of the second embodiment may be dispersed in different computer devices 7. The computer device 7 may be a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that executes a program. The computer device of this embodiment includes at least but is not limited to: a memory 51, a processor 72, a network interface 73 and a named entity recognition device 6 that can be interconnected through a system bus, such as Fig. 9 It should be pointed out that Fig. 9 Only a computer device with components is shown, but it should be understood that implementing all of the components shown is not a requirement and more or fewer components may alternatively be implemented.

[0145] In this embodiment, the memory 71 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 71 can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 71 can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 71 can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory 71 is generally used to store the operating system and various application software installed on the computer device, such as the program code of the named entity recognition device 6 of the first embodiment. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or are to be output.

[0146] The processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 72 is generally used to control the overall operation of the computer device. In this embodiment, the processor 72 is used to run the program code stored in the memory 71 or process data, such as running the named entity recognition device to implement the named entity recognition method of the first embodiment.

[0147] The network interface 73 may include a wireless network interface or a wired network interface, and the network interface 73 is generally used to establish a communication connection between the computer device 7 and other computer devices 7. For example, the network interface 73 is used to connect the computer device 7 to an external terminal through a network, and to establish a data transmission channel and a communication connection between the computer device 7 and the external terminal. The network may be a wireless or wired network such as an Intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, or Wi-Fi.

[0148] It should be pointed out that Fig. 9 Only a computer device 7 having components 71 - 73 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0149] In this embodiment, the named entity recognition device 6 stored in the memory 71 can also be divided into one or more program modules, and the one or more program modules are stored in the memory 71 and executed by one or more processors (processor 72 in this embodiment) to complete the present invention.

[0150] Embodiment 4:

[0151] To achieve the above purpose, the present invention also provides a computer-readable storage system, which includes multiple storage media, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, CD, server, App application store, etc., on which a computer program is stored, and the program implements the corresponding function when executed by the processor 72. The computer-readable storage medium of this embodiment is used to store the named entity recognition device, and when executed by the processor 72, the named entity recognition method of embodiment 1 is implemented.

[0152] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0154] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for named entity recognition, characterized in that: include: Acquire a medical text, and preprocess the medical text to obtain a text to be processed; Extracting microbial entities from the text to be processed based on a preset dictionary to obtain target entities; Generate multiple candidate abbreviation entities according to the first preset rule and the target entity, and use the first model to screen from the candidate abbreviation entities to obtain candidate abbreviation entities corresponding to the target entity as the target abbreviation entity; Generate multiple candidate supplementary entities according to the second preset rule and the target entity, and use the second model to screen the candidate supplementary entities to obtain the target supplementary entity; wherein the candidate supplementary entity is obtained by extending the boundary of the target entity, and the second model is used to screen the candidate supplementary entity to obtain the target supplementary entity, including the following: obtain any candidate supplementary entity, use the CharCNN layer to process the candidate supplementary entity, and obtain a feature vector corresponding to the candidate supplementary entity; simultaneously use the position encoding layer to process the candidate supplementary entity to obtain a position vector corresponding to the candidate supplementary entity; splice the feature vector and the position vector and input them into the fully connected layer for processing to obtain a classification result; when the classification result is no, obtain another candidate supplementary entity; when the classification result is yes, obtain the candidate supplementary entity as the target supplementary entity; Target data is generated based on the target entity, the target abbreviation entity and the target supplementary entity.

2. The method for named entity recognition according to claim 1, characterized in that: The step of generating a plurality of candidate abbreviation entities according to the first preset rule and the target entity includes the following: Obtain a target entity, and extract a character string of a preset length according to the entity; After serializing the character string, preset characters are added to obtain a candidate abbreviation entity corresponding to the target entity.

3. The method for named entity recognition according to claim 1, characterized in that: The first model is used to screen the candidate abbreviation entities to obtain the candidate abbreviation entities corresponding to the target entity as the target abbreviation entity, including the following: Obtain any candidate abbreviation entity, input the candidate abbreviation entity and the target entity into the CharCNN network at the same time, and obtain a first vector and a second vector corresponding to the candidate abbreviation entity and the target entity respectively; After concatenating the first vector and the second vector, a classification process is performed using a fully connected layer to obtain a judgment result; When the judgment result is no, obtaining another candidate abbreviation entity; When the judgment result is yes, the candidate abbreviation entity is obtained as the target abbreviation entity.

4. The method for named entity recognition according to claim 1, characterized in that: Generate multiple candidate supplementary entities according to the second preset rule and the target entity, including the following: Obtain a target entity, and determine whether the target entity is at the end of the sentence; When the target entity is not located at the end of the sentence, a subsequent word adjacent to the target entity is obtained, and the target entity and the subsequent word adjacent to the target entity are concatenated as a candidate supplementary entity.

5. The method for named entity recognition according to claim 1, characterized in that: The synchronously using a position coding layer to process the candidate supplementary entity to obtain a position vector corresponding to the candidate supplementary entity includes the following: Acquire the candidate supplementary entity, and calculate the length data of the candidate supplementary entity; A target vector is established according to the length data and a third preset rule as a position vector corresponding to the candidate supplementary entity.

6. The method for named entity recognition according to claim 1, characterized in that: Before using the second model to screen the candidate supplementary entities and obtain the target supplementary entity, the second model is trained, including the following: Acquire a training sample, wherein the sample includes a plurality of sample entities, the sample entity corresponds to a plurality of associated entities, and each associated entity includes a sample label; Obtain any associated entity, and process the associated entity using a CharCNN layer to obtain a first sample vector; synchronously using a position coding layer to process the associated entity to obtain a second sample vector; The first sample vector and the second sample vector are concatenated and input into a fully connected layer for processing to obtain a sample classification result; The sample classification result is compared with the sample label corresponding to the associated entity, and the parameters of the second model are adjusted until the training is completed to obtain the trained second model.

7. A named entity recognition device, characterized in that: include: An acquisition module is used to acquire medical texts, pre-process the medical texts, and obtain texts to be processed; An extraction module, used for extracting microbial entities from the text to be processed based on a preset dictionary to obtain target entities; A first processing module, configured to generate a plurality of candidate abbreviation entities according to a first preset rule and the target entity, and to screen the candidate abbreviation entities using a first model to obtain candidate abbreviation entities corresponding to the target entity as the target abbreviation entity; The second processing module is used to generate multiple candidate supplementary entities according to the second preset rule and the target entity, and use the second model to screen the candidate supplementary entities to obtain the target supplementary entity; wherein the candidate supplementary entity is obtained by extending the boundary of the target entity, and the second model is used to screen the candidate supplementary entity to obtain the target supplementary entity, including the following: obtaining any candidate supplementary entity, using the CharCNN layer to process the candidate supplementary entity, and obtaining a feature vector corresponding to the candidate supplementary entity; synchronously using the position encoding layer to process the candidate supplementary entity, and obtaining a position vector corresponding to the candidate supplementary entity; splicing the feature vector and the position vector and inputting them into the fully connected layer for processing to obtain a classification result; when the classification result is no, obtaining another candidate supplementary entity; when the classification result is yes, obtaining the candidate supplementary entity as the target supplementary entity; A generating module is used to generate target data based on the target entity, the target abbreviation entity and the target supplementary entity.

8. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the named entity recognition method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, comprising a plurality of storage media, each storage medium storing a computer program, characterized in that: The computer programs stored in the multiple storage media, when executed by a processor, jointly implement the steps of the named entity recognition method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • The invention discloses a tSext abbreviation upervised word vector-based text abbreviation recognition method recognition method and system based on supervision word vectors

    CN109614493A

  • Biomedical named entity identification method based on depth boundary combination

    CN111126040A