Medical entity concept recognition method, device, equipment and storage medium
By using the candidate generator and sorter of the pre-trained BERT model, target concepts that have not appeared in medical entities are screened out, which solves the difficulty of traditional methods in identifying medical entities that have not appeared in the past, and achieves accurate prediction of medical entity concepts. and efficiency improvement.
Patent Information
- Application Number
- CN202110592931.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-28
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-05-28
AI Technical Summary
It is difficult for traditional medical entity concept normalization methods to accurately predict the concepts of medical entities that have not appeared before, especially due to the diversity of lexical and grammatical changes, which causes natural language processing technology to encounter difficulties in the biomedical field.
Using the pre-trained BERT model, through the candidate generator and candidate sorter, candidate concepts of the medical entities to be identified are screened from the knowledge base, and the top N targets are screened out based on the preset sorting rules and loss value calculations. concept to achieve accurate prediction of medical entities that have never appeared before.
Through the pairwise prediction ability of the BERT model, it can accurately identify medical entity concepts that have not appeared before, improve the accuracy and efficiency of medical entity recognition, and solve the shortcomings of traditional methods in ambiguity elimination.
Smart Images

Figure CN113204968B
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital medical technology. Specifically, the present application relates to a medical entity concept recognition method, device, equipment and storage medium. Background Art
[0002] The mining and analysis of unstructured text in the biomedical field provides great opportunities for the development of medicine, however, the diversity of vocabulary and grammatical variations poses key problems for the development of natural language processing (NLP) technology. For example, the medical entities of heart attack, myocardial infarction, myocardial infarction and cardiovascular stroke all refer to the same concept, and it is crucial to eliminate the ambiguity of these terms by linking them to the corresponding concepts in the ontology or knowledge base. This task is called concept normalization.
[0003] Traditional concept normalization methods are usually implemented through string matching and dictionary lookup, but this implementation method cannot accurately predict the concepts of medical entities that have never appeared. Summary of the invention
[0004] The main purpose of this application is to provide a medical entity concept recognition method, device, equipment and storage medium to accurately predict the concept of medical entities that have not appeared.
[0005] In order to achieve the above-mentioned invention object, the present application provides a method for concept identification of medical entities, which comprises the following steps:
[0006] Acquiring text information, and extracting a medical entity to be identified from the text information;
[0007] Input the medical entity to be identified into a pre-trained BERT model, and use the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used to screen out a number of candidate concepts from a knowledge base, and generate a candidate concept list based on the candidate concepts;
[0008] The candidate sorter of the BERT model is used to filter out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
[0009] Preferably, the step of generating a candidate concept list corresponding to the medical entity to be identified using the candidate generator of the BERT model comprises:
[0010] Determine a first hidden vector and a preset first weight corresponding to the to-be-identified medical entity using the candidate generator;
[0011] Calculate the score values of all concepts in the knowledge base when describing the medical entity to be identified respectively according to the first hidden vector and the first weight;
[0012] Obtain one-hot encoding vectors of all concepts, calculate first standard classification loss values of all concepts according to the one-hot encoding vectors and scoring values, and determine a list of candidate concepts corresponding to the medical entity to be identified based on the first standard classification loss values.
[0013] Preferably, the step of determining a candidate concept list corresponding to the to-be-identified medical entity based on the first standard classification loss value comprises:
[0014] Calculating the concept probability of each concept using the first standard classification loss value of all concepts; wherein the concept probability is used to characterize the possibility that each concept belongs to the concept describing the medical entity to be identified;
[0015] A number of candidate concepts are screened out from the knowledge base according to the concept probabilities, and a candidate concept list is generated based on the candidate concepts.
[0016] Preferably, the step of selecting the top N candidate concepts from the candidate concept list using the candidate sorter of the BERT model comprises:
[0017] Determine a second hidden vector and a preset second weight corresponding to the medical entity to be identified by using the candidate sorter of the BERT model;
[0018] Connecting the second hidden vectors of all candidate concepts in the candidate concept list to form a matrix;
[0019] Calculating a second standard classification loss value of the candidate concept using the matrix and a preset second weight;
[0020] Based on the ranking order of the second standard classification loss values, the top N candidate concepts are screened out.
[0021] Preferably, the step of connecting the second hidden vectors of all candidate concepts in the candidate concept list to form a matrix comprises:
[0022] Obtaining synonyms of all candidate concepts in the candidate concept list;
[0023] The hidden vector of the synonym is determined to obtain a second hidden vector, and the second hidden vectors of all candidate concepts are connected to form a matrix.
[0024] Furthermore, after the step of using the candidate sorter of the BERT model to select the top N candidate concepts from the candidate concept list, the method further includes:
[0025] Determine the semantic types of the top N candidate concepts, and select the first candidate concept with the correct semantic type and the second candidate concept with the wrong semantic type from the top N candidate concepts;
[0026] Generate a third candidate concept based on the second candidate concept with an incorrect semantic type; wherein the third candidate concept is the complement of the set of the second candidate concepts;
[0027] Calculate the score of the first candidate concept in the semantic type to obtain a first score;
[0028] Calculate the score of the second candidate concept in the semantic type to obtain a second score;
[0029] Calculate the score of the third candidate concept in the semantic type to obtain a third score;
[0030] Calculate a first comprehensive score according to the first score and the third score;
[0031] Calculate a second comprehensive score according to the second score and the third score;
[0032] Calculate the total loss value using the first comprehensive score and the second comprehensive score;
[0033] Determining whether the total loss value is within a preset threshold;
[0034] If so, the top N candidate concepts are used as target concepts of the medical entity to be identified.
[0035] Preferably, the step of calculating the first comprehensive score according to the first score and the third score comprises the following formula:
[0036]
[0037] The step of calculating the second comprehensive score according to the first score and the third score includes the following formula:
[0038]
[0039] The step of calculating the total loss value using the first comprehensive score and the second comprehensive score comprises:
[0040]
[0041] in, is the first score, is the second score, is the third score, n is the candidate concept with incorrect semantic type, N(y) is the set of candidate concepts with incorrect semantic type, P(y) is the complement of N(y), P is the candidate concept in the complement, t is the candidate concept with correct semantic type, and t∈P(y), m1 and m2 are control and and and The hyperparameter of the minimum distance between R , λ, and μ are constants.
[0042] The present application also provides a medical entity concept recognition device, which includes:
[0043] An acquisition module, used to acquire text information and extract the medical entity to be identified from the text information;
[0044] A generation module, used for inputting the medical entity to be identified into a pre-trained BERT model, and using the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used for screening out a number of candidate concepts from a knowledge base, and generating a candidate concept list based on the candidate concepts;
[0045] A screening module is used to use the candidate sorter of the BERT model to screen out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
[0046] The present application also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0047] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0048] The present application provides a medical entity concept recognition method, device, equipment and storage medium. First, text information is obtained, and the medical entity to be recognized is extracted from the text information. The medical entity to be recognized is input into a pre-trained BERT model, and a candidate generator of the BERT model is used to generate a candidate concept list corresponding to the medical entity to be recognized; then, the candidate sorter of the BERT model is used to screen out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be recognized, thereby screening out suitable candidate concepts from an existing knowledge base through the candidate generator of the BERT model, and further screening out target concepts that meet the requirements through the candidate sorter. Since the candidate sorter performs paired predictions on the medical entity to be recognized and the candidate concepts, the concept of the medical entity that has not appeared can be accurately predicted. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of a process flow of a medical entity concept recognition method according to an embodiment of the present application;
[0050] Figure 2 This is a schematic block diagram of the structure of a device for identifying a medical entity concept according to an embodiment of the present application;
[0051] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.
[0052] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.
[0054] Reference Figure 1 The present application proposes a medical entity concept recognition method, which is executed by a computer device, and is used to solve the problem that traditional concept normalization methods are usually implemented through string matching and dictionary search, and it is difficult to accurately predict the concept of medical entities that have not appeared. In one embodiment, the medical entity concept recognition method includes the following steps:
[0055] S11, acquiring text information, and extracting a medical entity to be identified from the text information;
[0056] S12, inputting the medical entity to be identified into a pre-trained BERT model, and using the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used to screen out a number of candidate concepts from a knowledge base, and generate a candidate concept list based on the candidate concepts;
[0057] S13. Utilize the candidate sorter of the BERT model to filter out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
[0058] As described in step S11, the text information of the present invention can be an abbreviation, a noun phrase, or a simple text, and the text information includes at least one medical entity to be identified. The goal of the present invention is to determine the concept C to which the medical entity m to be identified belongs. m , the concept C m A paragraph of text explaining the meaning of the medical entity to be identified m. The medical entity to be identified may refer to the name of a disease, an organ, a drug name, etc.
[0059] In addition, the present invention can also predetermine a medical entity list M = {m1, m2, ..., m n} and a concept set C = {c1, c2, ..., c t} ontology or knowledge base, the medical entity list includes multiple medical entities, and the ontology or knowledge base includes the determined concepts corresponding to each medical entity. The goal of concept normalization is to find a mapping function c j =f(m i ), which maps each medical entity to its correct concept.
[0060] In one embodiment, after acquiring the text information, the text information can also be denoised to determine redundant text from the text information, and the redundant text can be filtered to obtain the target text information, and the medical entity to be identified can be extracted from the target text information, thereby denoising the text information and filtering out redundant text in the text information to reduce the amount of text information that needs to be processed, thereby improving the efficiency of data processing.
[0061] As described in step S12 above, the BERT model is a natural speech model that can use context information to predict the words to be recognized. The BERT model of the present invention is composed of a candidate generator and a candidate sorter. The candidate generator is used to screen out a number of candidate concepts from existing concepts in an ontology or knowledge base, and generate a candidate concept list based on the candidate concepts; the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
[0062] When training the BERT model, a large number of medical entities and manually annotated standard concepts of the medical entities can be obtained from the knowledge base. The BERT model is trained multiple times based on a large number of medical entities and standard concepts. When the BERT model converges, a trained BERT model is obtained.
[0063] As described in step S13 above, after the candidate generator generates several candidate concepts, it is necessary to further screen out target concepts that meet the requirements from the candidate concepts. When screening the candidate concepts, they can be sorted according to relevance, preference or importance, and the top N candidate concepts can be screened out from the candidate concept list.
[0064] The present application provides a method for conceptual recognition of medical entities. First, text information is acquired, and medical entities to be recognized are extracted from the text information. The medical entities to be recognized are input into a pre-trained BERT model, and a candidate generator of the BERT model is used to generate a candidate concept list corresponding to the medical entities to be recognized; then, the candidate sorter of the BERT model is used to screen out the top N candidate concepts from the candidate concept list to obtain a target concept of the medical entity to be recognized, thereby screening out suitable candidate concepts from an existing knowledge base through the candidate generator of the BERT model, and further screening out target concepts that meet the requirements through the candidate sorter. Since the candidate sorter performs paired predictions on the medical entities to be recognized and the candidate concepts, the concepts of medical entities that have not appeared can be accurately predicted.
[0065] In one embodiment, in step S12, the step of using the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified may specifically include:
[0066] S121, using the candidate generator to determine a first hidden vector and a preset first weight corresponding to the medical entity to be identified;
[0067] S122, calculating the score values of all concepts in the knowledge base when describing the medical entity to be identified respectively according to the first hidden vector and the first weight;
[0068] S123. Obtain one-hot encoding vectors of all concepts, calculate first standard classification loss values of all concepts according to the one-hot encoding vectors and the scoring values, and determine a list of candidate concepts corresponding to the medical entity to be identified based on the first standard classification loss values.
[0069] As described in step S121 above, the first hidden vector is the vector corresponding to the implicit meaning of the medical entity to be identified in the candidate generator. The hidden vector V corresponding to the first input token generated by the candidate generator of the BERT model can be used. m ∈R H as the first hidden vector and from the classification layer W∈R with weights |C|×H A preset first weight is extracted from the first latent vector, where the first weight is used to evaluate the importance level of the first hidden vector.
[0070] As described in step S122 above, this step may calculate the score values of all concepts in the knowledge base when describing the medical entity to be identified according to the first hidden vector and the first weight, which may specifically include the following formula:
[0071] p(C)=softmax(V m W T );
[0072] Among them, the V m is the first hidden vector, W T is the first weight.
[0073] As described in the above step S123, this step obtains the one-hot encoding vectors of all concepts. When there are multiple concepts, the one-hot encoding vector is the average vector of all concepts. Then, the first standard classification loss value of all concepts is calculated based on the one-hot encoding vector and the score value. Based on the first standard classification loss value, the candidate concept list corresponding to the medical entity to be identified is determined, that is, the most likely candidate concept is selected and input into the candidate sorter to improve the recognition accuracy of the concept of the medical entity to be identified. The step S113 may specifically include the following formula:
[0074] L G =y*log(softmax(V m W T ));
[0075] Where y is a one-hot encoded vector, |y|=|C|.
[0076] In one embodiment, in step S123, the step of determining the candidate concept list corresponding to the to-be-identified medical entity based on the first standard classification loss value may specifically include:
[0077] S1231, calculating the concept probability of each concept using the first standard classification loss value of all concepts; wherein the concept probability is used to characterize the possibility that each concept belongs to the concept describing the medical entity to be identified;
[0078] S1232. Filter out a number of candidate concepts from the knowledge base according to the concept probabilities, and generate a candidate concept list based on the candidate concepts.
[0079] As described in step S1231 above, this step can convert the first standard classification loss value of each concept into a corresponding concept probability according to a preset conversion rule, wherein the value of the concept probability is proportional to the first standard classification loss value.
[0080] As described in the above step S1232, this step selects several candidate concepts with top concept probabilities from the knowledge base according to the concept probabilities, and generates a candidate concept list based on the candidate concepts, so as to accurately select the candidate concepts that are most likely to describe the medical entity to be identified, and input the candidate concept list containing the candidate concepts into the candidate sorter to further improve the recognition accuracy of the concepts of the medical entity to be identified.
[0081] In one embodiment, in step S13, the step of using the candidate sorter of the BERT model to select the top N candidate concepts from the candidate concept list may specifically include:
[0082] S131, using the candidate sorter of the BERT model to determine the second hidden vector and the preset second weight corresponding to the medical entity to be identified;
[0083] S132, connecting the second hidden vectors of all candidate concepts in the candidate concept list to form a matrix;
[0084] S133, calculating a second standard classification loss value of the candidate concept using the matrix and a preset second weight;
[0085] S134. Based on the order of the second standard classification loss values, select the top N candidate concepts.
[0086] As described in step S131 above, the second hidden vector is the vector corresponding to the implicit meaning of the medical entity to be identified in the candidate sorter, and the hidden vector V(m,c m )∈R H As the second hidden vector, the second hidden vector contains vectors corresponding to the medical entity to be identified and the candidate concept, that is, the medical entity to be identified and the candidate concept appear in pairs.
[0087] As described in step S132 above, this step connects the second hidden vectors of all candidate concepts to form a matrix A preset second weight is extracted from the classification layer with weights, and the second weight is used to evaluate the importance level of the second hidden vector.
[0088] As described in step S133 above, this step may use the matrix and the preset second weight to calculate the second standard classification loss value of the candidate concept, which may specifically include the following formula:
[0089]
[0090] Among them, the is the second hidden vector, the W T is the second weight.
[0091] As described in the above step S134, after obtaining the second standard classification loss value, the second standard classification loss value is sorted in descending order, and the top N candidate concepts are screened out according to the sorting result to obtain the target candidate concept, so as to realize paired prediction of the medical entity to be identified and the candidate concept, and comprehensively consider the medical entity to be identified and the candidate concept to accurately predict the concept of the medical entity that has not appeared.
[0092] In one embodiment, in step S132, the step of connecting the second hidden vectors of all candidate concepts in the candidate concept list to form a matrix may specifically include:
[0093] S1321, obtaining synonyms of all candidate concepts in the candidate concept list;
[0094] S1322: Determine the hidden vector of the synonym to obtain a second hidden vector, and connect the second hidden vectors of all candidate concepts to form a matrix.
[0095] In this embodiment, the candidate sorter input of the present invention includes the medical entity m to be identified and the candidate concept c m All synonyms of [CLS]m[SEP]syn1(c m )[SEP]…[SEP]syn S (c m )[SEP], where syn i (c m ) is the concept c m Then determine the hidden vector V(m,c m )∈R H, get the second hidden vector, which corresponds to the first input token ([CLS]) produced by each input in the candidate ranker of the BERT model, and then concatenate the second hidden vectors of all candidate concepts to form a matrix To use this matrix and the second weight W∈R of the classification layer H A second standard classification loss value is calculated, including the following formula:
[0096]
[0097] Where y is a one-hot encoded vector, |y|=|C m |.
[0098] In one embodiment, in step S13, after the step of using the candidate sorter of the BERT model to select the top N candidate concepts from the candidate concept list, the following may also be included:
[0099] Determine the semantic types of the top N candidate concepts, and select the first candidate concept with the correct semantic type and the second candidate concept with the wrong semantic type from the top N candidate concepts;
[0100] Generate a third candidate concept based on the second candidate concept with an incorrect semantic type; wherein the third candidate concept is the complement of the set of the second candidate concepts;
[0101] Calculate the score of the first candidate concept in the semantic type to obtain a first score;
[0102] Calculate the score of the second candidate concept in the semantic type to obtain a second score;
[0103] Calculate the score of the third candidate concept in the semantic type to obtain a third score;
[0104] Calculate a first comprehensive score according to the first score and the third score;
[0105] Calculate a second comprehensive score according to the second score and the third score;
[0106] Calculate the total loss value using the first comprehensive score and the second comprehensive score;
[0107] Determining whether the total loss value is within a preset threshold;
[0108] If yes, the top N candidate concepts are used as the target concepts of the medical entity to be identified;
[0109] If not, rescreen the candidate concepts.
[0110] In this embodiment, in order to consider more useful information, this embodiment proposes a semantic type regularizer, which will be optimized when candidate concepts with correct semantic types are ranked above candidate concepts with incorrect types. The semantic type of a candidate concept is considered correct only when the semantic type of the candidate concept completely matches the semantic type of the actual concept. The semantic type regularizer of this embodiment is composed of and It consists of two parts. It is used to calculate the first comprehensive score, which is used to evaluate the correctness of the semantic type of the top N candidate concepts. The second comprehensive score is used to calculate the scoring of semantic type errors of the top N candidate concepts, so as to calculate the total loss value based on the first comprehensive score and the second comprehensive score, and to analyze the proportion of candidate concepts with correct semantic types and candidate concepts with incorrect types.
[0111] This embodiment takes the semantic type of the concept into consideration through a semantic type regularizer and incorporates the semantic type into the prediction, thereby integrating more information and improving the prediction performance of the medical entity.
[0112] Preferably, the step of calculating the first comprehensive score according to the first score and the third score may include the following formula:
[0113]
[0114] The step of calculating the second comprehensive score according to the first score and the third score includes the following formula:
[0115]
[0116] The step of calculating the total loss value using the first comprehensive score and the second comprehensive score comprises:
[0117]
[0118] in, is the first score, is the second score, is the third score, n is the candidate concept with incorrect semantic type, N(y) is the set of candidate concepts with incorrect semantic type, P(y) is the complement of N(y), P is the candidate concept in the complement, t is the candidate concept with correct semantic type, and t∈P(y), m1 and m2 are control and and and The hyperparameter of the minimum distance between R , λ, and μ are constants.
[0119] The medical entity concept recognition method of the embodiment of the present application can also be applied to the blockchain field, such as storing the above-mentioned BERT model on the blockchain.
[0120] The above-mentioned blockchain 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.
[0121] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, network monitoring, node equipment health monitoring, etc.
[0122] Reference Figure 2 In an embodiment of the present application, a device for identifying a medical entity concept is also provided, comprising:
[0123] An acquisition module 11 is used to acquire text information and extract the medical entity to be identified from the text information;
[0124] A generation module 12 is used to input the medical entity to be identified into a pre-trained BERT model, and use the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used to screen out a number of candidate concepts from a knowledge base, and generate a candidate concept list based on the candidate concepts;
[0125] The screening module 13 is used to use the candidate sorter of the BERT model to screen out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
[0126] The text information of the present invention can be an abbreviation, a noun phrase, or a simple text, and the text information includes at least one medical entity to be identified. The goal of the present invention is to determine the concept C to which the medical entity m to be identified belongs. m , the concept C m A paragraph of text explaining the meaning of the medical entity to be identified m. The medical entity to be identified may refer to the name of a disease, an organ, a drug name, etc.
[0127] In addition, the present invention can also predetermine a medical entity list M = {m1, m2, ..., m n} and a concept set C = {c1, c2, ..., c t} ontology or knowledge base, the medical entity list includes multiple medical entities, and the ontology or knowledge base includes the determined concepts corresponding to each medical entity. The goal of concept normalization is to find a mapping function c j =f(m i ), which maps each medical entity to its correct concept.
[0128] In one embodiment, after acquiring the text information, the text information can also be denoised to determine redundant text from the text information, and the redundant text can be filtered to obtain the target text information, and the medical entity to be identified can be extracted from the target text information, thereby denoising the text information and filtering out redundant text in the text information to reduce the amount of text information that needs to be processed, thereby improving the efficiency of data processing.
[0129] Among them, the BERT model is a natural speech model that can use context information to predict the words to be recognized. The BERT model of the present invention is composed of a candidate generator and a candidate sorter. The candidate generator is used to screen out several candidate concepts from existing concepts in an ontology or knowledge base, and generate a candidate concept list based on the candidate concepts; the candidate sorter is used to sort all candidate concepts in the candidate concept list according to preset sorting rules.
[0130] When training the BERT model, a large number of medical entities and manually annotated standard concepts of the medical entities can be obtained from the knowledge base. The BERT model is trained multiple times based on a large number of medical entities and standard concepts. When the BERT model converges, a trained BERT model is obtained.
[0131] After the candidate generator generates several candidate concepts, it is necessary to further screen out target concepts that meet the requirements from the candidate concepts. When screening the candidate concepts, they can be sorted according to relevance, preference or importance, and the top N candidate concepts can be screened out from the candidate concept list.
[0132] As described above, it can be understood that the various components of the medical entity concept identification device proposed in the present application can realize the functions of any one of the medical entity concept identification methods described above, and the specific structure will not be repeated.
[0133] Reference Figure 3 In an embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the storage medium. The database of the computer device is used for data such as relationship extraction models and drug discovery models. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for conceptual recognition of medical entities is implemented.
[0134] The processor executes the medical entity concept recognition method, including:
[0135] Acquiring text information, and extracting a medical entity to be identified from the text information;
[0136] Input the medical entity to be identified into a pre-trained BERT model, and use the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used to screen out a number of candidate concepts from a knowledge base, and generate a candidate concept list based on the candidate concepts;
[0137] The candidate sorter of the BERT model is used to filter out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
[0138] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a method for conceptually identifying a medical entity is implemented, comprising the steps of:
[0139] Acquiring text information, and extracting a medical entity to be identified from the text information;
[0140] Input the medical entity to be identified into a pre-trained BERT model, and use the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used to screen out a number of candidate concepts from a knowledge base, and generate a candidate concept list based on the candidate concepts;
[0141] The candidate sorter of the BERT model is used to filter out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
[0142] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in the present application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0143] In summary, the greatest beneficial effects of this application are:
[0144] The present application provides a medical entity concept recognition method, device, equipment and storage medium. First, text information is obtained, and the medical entity to be recognized is extracted from the text information. The medical entity to be recognized is input into a pre-trained BERT model, and a candidate generator of the BERT model is used to generate a candidate concept list corresponding to the medical entity to be recognized; then, the candidate sorter of the BERT model is used to screen out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be recognized, thereby screening out suitable candidate concepts from an existing knowledge base through the candidate generator of the BERT model, and further screening out target concepts that meet the requirements through the candidate sorter. Since the candidate sorter performs paired predictions on the medical entity to be recognized and the candidate concepts, the concept of the medical entity that has not appeared can be accurately predicted.
[0145] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0146] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A concept recognition method for medical entities, It is characterized in that The following steps are involved: Acquiring text information, and extracting a medical entity to be identified from the text information; Input the medical entity to be identified into a pre-trained BERT model, and use the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used to screen out a number of candidate concepts from a knowledge base, and generate a candidate concept list based on the candidate concepts; The candidate sorter of the BERT model is used to filter out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule; After the step of using the candidate sorter of the BERT model to select the top N candidate concepts from the candidate concept list, the method further includes: Determine the semantic types of the top N candidate concepts, and select the first candidate concept with the correct semantic type and the second candidate concept with the wrong semantic type from the top N candidate concepts; Generate a third candidate concept based on the second candidate concept with an incorrect semantic type; wherein the third candidate concept is the complement of the set of the second candidate concepts; Calculate the score of the first candidate concept in the semantic type to obtain a first score; Calculate the score of the second candidate concept in the semantic type to obtain a second score; Calculate the score of the third candidate concept in the semantic type to obtain a third score; Calculate a first comprehensive score based on the first score and the third score; wherein the first comprehensive score is used to evaluate the correctness of the semantic types of the candidate concepts ranked in the top N positions; Calculate a second comprehensive score based on the second score and the third score; wherein the second comprehensive score is used to evaluate the scoring of semantic type errors of the top N candidate concepts; Calculate the total loss value using the first comprehensive score and the second comprehensive score; Determining whether the total loss value is within a preset threshold; If so, the top N candidate concepts are used as target concepts of the medical entity to be identified.
2. The method according to claim 1, It is characterized in that The step of generating a candidate concept list corresponding to the medical entity to be identified by using the candidate generator of the BERT model comprises: Determine a first hidden vector and a preset first weight corresponding to the to-be-identified medical entity using the candidate generator; Calculate the score values of all concepts in the knowledge base when describing the medical entity to be identified respectively according to the first hidden vector and the first weight; Obtain one-hot encoding vectors of all concepts, calculate first standard classification loss values of all concepts according to the one-hot encoding vectors and scoring values, and determine a list of candidate concepts corresponding to the medical entity to be identified based on the first standard classification loss values.
3. The method according to claim 2, It is characterized in that The step of determining a candidate concept list corresponding to the to-be-identified medical entity based on the first standard classification loss value comprises: Calculating the concept probability of each concept using the first standard classification loss value of all concepts; wherein the concept probability is used to characterize the possibility that each concept belongs to the concept describing the medical entity to be identified; A number of candidate concepts are screened out from the knowledge base according to the concept probabilities, and a candidate concept list is generated based on the candidate concepts.
4. The method according to claim 1, It is characterized in that The step of selecting the top N candidate concepts from the candidate concept list using the candidate sorter of the BERT model comprises: Determine a second hidden vector and a preset second weight corresponding to the medical entity to be identified by using the candidate sorter of the BERT model; Connecting the second hidden vectors of all candidate concepts in the candidate concept list to form a matrix; Calculating a second standard classification loss value of the candidate concept using the matrix and a preset second weight; Based on the ranking order of the second standard classification loss values, the top N candidate concepts are screened out.
5. The method according to claim 4, It is characterized in that The step of connecting the second hidden vectors of all candidate concepts in the candidate concept list to form a matrix comprises: Obtaining synonyms of all candidate concepts in the candidate concept list; The hidden vector of the synonym is determined to obtain a second hidden vector, and the second hidden vectors of all candidate concepts are connected to form a matrix.
6. The method according to claim 1, It is characterized in that The step of calculating the first comprehensive score according to the first score and the third score includes the following formula: The step of calculating the second comprehensive score according to the first score and the third score includes the following formula: The step of calculating the total loss value using the first comprehensive score and the second comprehensive score includes the following formula: in, is the first score, is the second score, is the third score, n is the candidate concept with incorrect semantic type, N(y) is the set of candidate concepts with incorrect semantic type, P(y) is the complement of N(y), P is the candidate concept in the complement, t is the candidate concept with correct semantic type, and t∈P(y), m1 and m2 are control and and and The hyperparameter of the minimum distance between R , λ, and μ are constants.
7. A device for identifying the concept of medical entities, It is characterized in that A method for performing concept identification of a medical entity according to any one of claims 1 to 6, comprising: An acquisition module, used to acquire text information and extract the medical entity to be identified from the text information; A generation module, used for inputting the medical entity to be identified into a pre-trained BERT model, and using the candidate generator of the BERT model to generate a candidate concept list corresponding to the medical entity to be identified; wherein the candidate generator is used for screening out a number of candidate concepts from a knowledge base, and generating a candidate concept list based on the candidate concepts; A screening module is used to use the candidate sorter of the BERT model to screen out the top N candidate concepts from the candidate concept list to obtain the target concept of the medical entity to be identified; wherein N is a positive integer greater than or equal to 1, and the candidate sorter is used to sort all candidate concepts in the candidate concept list according to a preset sorting rule.
8. A computer device, It is characterized in that include: processor; Memory; A computer program, wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program being configured to execute the medical entity concept identification method according to any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the medical entity concept recognition method according to any one of claims 1 to 6.
