A disease phenotype term matching method, device, computer equipment and medium
By using large language models and sentence embedding techniques, phenotypic information prediction models are trained and terms are matched from the HPO standard term library, the problem of low accuracy of HPO phenotypic information recognition in clinical text is solved, and the accuracy and efficiency of recognition is improved.
Patent Information
- Application Number
- CN202410230337.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-02-29
AI Technical Summary
The prior art has low accuracy when identifying HPO phenotypic information in clinical texts and lacks HPO labeling data sets in the Chinese field, resulting in inefficiency and insufficient accuracy.
Using a large language model combined with sentence embedding technology, a phenotype information prediction model is trained, diagnostic text is input to obtain phenotype information, converted into vector representation, and the most matching term is selected from the HPO standard term library as the final term.
Improve the accuracy of identification of phenotypic information in clinical texts and reduce the possibility of misidentification, especially when dealing with clinical records with complex semantic or irregular expression, and improve the recognition of complex and rare phenotypes.
Smart Images

Figure CN118468866B_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of medical technology, and in particular to a disease phenotype term matching method, apparatus, computer equipment and medium. Background Art
[0002] Genetic diseases and rare diseases have always received special attention in the medical field. In recent years, with the continuous advancement of genetic research technology, genetic testing for genetic diseases has become more comprehensive and efficient. High-throughput sequencing technology, especially Next-Generation Sequencing (NGS) (Behjati & Tarpey, 2013), is widely used in the field of genetic diseases, making comprehensive analysis of gene variations possible and providing more genetic information for accurate diagnosis of genetic diseases.
[0003] Human Phenotype Ontology (HPO) (Robinson et al., 2008) plays a key role in the standardization of clinical phenotypes of genetic diseases. However, genetic counselors have always needed to carefully read the patient's clinical description, understand the symptoms and signs, and then translate them into the corresponding HPO terms when converting clinical cases into HPO. When dealing with a large number of cases, the efficiency is significantly affected and it is cumbersome and time-consuming. In addition, traditional methods are easily affected by individual subjective judgments and have problems such as inaccurate judgments, resulting in inconsistency and lack of accuracy in standardization.
[0004] PhenoTagger uses BioBERT to identify phenotypic information in clinical texts, but the BERT model needs to be fine-tuned on a large amount of manually labeled data to improve the accuracy of HPO recognition tasks, which limits the model's ability to generalize to unseen concepts. At the same time, PhenoTagger is mainly used to solve the HPO recognition and annotation of English medical corpus. There are currently several open source HPO annotation datasets in the English field, and the data acquisition cost is relatively low, while there is no HPO annotation dataset in the Chinese field, which requires a lot of manpower for annotation. Summary of the invention
[0005] In order to solve the problem of low accuracy in identifying HPO phenotypes in clinical texts in the above-mentioned prior art, the embodiments of this specification provide a disease phenotype term matching method, apparatus, computer equipment and medium.
[0006] The embodiments of the present specification provide a disease phenotype term matching method, the method comprising: inputting disease-related text in a diagnostic text into a phenotype information prediction model to obtain phenotype information output by the phenotype information prediction model, wherein the phenotype information prediction model is obtained by training an initial large language model with phenotype labels and training sample data; converting the phenotype information into a corresponding vector representation; based on the vector representation of the phenotype information, selecting a term with the highest matching degree with the vector representation from an HPO standard term library; and determining the term as the final term of the diagnostic text.
[0007] According to one aspect of the embodiments of the present specification, the phenotypic information prediction model is trained in the following manner: obtaining Chinese sample vocabulary and English sample vocabulary with a preset initial data ratio and a preset initial weight as training sample data; inputting the training sample data into an initial large language model to obtain initial phenotypic information output by the initial large language model; calculating a loss value of the initial large language model based on the initial phenotypic information; iteratively updating the preset initial data ratio and the preset initial weight of the initial large language model based on the loss value to obtain the term matching model.
[0008] According to one aspect of an embodiment of the present specification, calculating the loss value of the initial large language model based on the initial phenotypic information includes: calculating the loss of the Chinese sample vocabulary trained by the initial large language model based on the initial Chinese phenotypic information output by the initial large language model and the Chinese phenotypic labels in the phenotypic labels; calculating the loss of the English sample vocabulary trained by the initial large language model based on the initial English phenotypic information output by the initial large language model and the English phenotypic labels in the phenotypic labels; determining the overall loss value of the initial large language model based on the loss of the Chinese sample vocabulary and the preset initial weight of the Chinese vocabulary, and the loss of the English sample vocabulary and the preset initial weight of the English sample vocabulary.
[0009] According to one aspect of an embodiment of the present specification, iteratively updating a preset initial data ratio and a preset initial weight of an initial large language model based on a loss value includes: updating the preset initial weight of an English sample vocabulary according to a learning rate associated with the initial large language model and the weight and the loss of an English sample vocabulary; updating the preset initial weight of a Chinese sample vocabulary according to a learning rate associated with the initial large language model and the weight and the loss of a Chinese sample vocabulary; and updating the data ratio of the Chinese sample vocabulary to the English sample vocabulary according to a learning rate associated with the initial large language model and the data ratio and the preset initial data ratio.
[0010] According to one aspect of an embodiment of this specification, the method includes: updating a preset initial data ratio and a preset initial weight of an initial large language model by the following formula:
[0011]
[0012]
[0013] β′=β-η β ;
[0014] Among them, w zh and w en They represent the preset initial weights of the Chinese vocabulary training task and the English vocabulary training task respectively; L represents the total loss function of the initial large language model, η w represents the learning rate of the initial large language model related to the weight, η β represents the learning rate of the initial large language model related to the data ratio, w e ' n represents the weight of the updated English vocabulary, w z ' h Represents the weight of the updated Chinese vocabulary.
[0015] According to one aspect of the embodiments of this specification, the method further includes: updating the model parameters of the model using a gradient descent algorithm; calculating the loss value output by the initial large language model based on the updated model parameters, the updated data ratio of the initial large language model and the updated weights; when the loss value converges to a preset numerical range or the number of iterations reaches a preset threshold, determining that the model training is completed and obtaining a term matching model.
[0016] According to one aspect of an embodiment of the present specification, based on the vector representation of the phenotypic information, selecting the term with the highest matching degree with the vector representation from the HPO standard term library includes: concatenating the vector representations of all terms in the HPO standard term library into a matrix; calculating the similarity between the vector corresponding to the phenotypic information and the matrix; and selecting the HPO term corresponding to the vector with the greatest similarity as the term with the highest matching degree with the phenotypic information.
[0017] The embodiments of the present specification also provide a disease phenotype term matching device, the device comprising: a phenotype information acquisition unit, used to input disease-related text in a diagnostic text into a phenotype information prediction model to obtain phenotype information output by the phenotype information prediction model, wherein the phenotype information prediction model is obtained by training an initial large language model with phenotype labels and sample vocabulary; a vector representation acquisition unit, used to convert the phenotype information into a corresponding vector representation; a matching degree determination unit, used to select a term with the highest matching degree with the vector representation from an HPO standard term library based on the vector representation of the phenotype information; and a term determination unit, used to use the term as the final term of the diagnostic text.
[0018] An embodiment of the present specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the disease phenotype term matching method is implemented when the processor executes the computer program.
[0019] The embodiments of this specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the disease phenotype term matching method is implemented.
[0020] This manual uses a large language model combined with sentence embedding technology to more accurately identify phenotypic information in clinical texts. When processing clinical records with complex semantics or irregular expressions, it reduces the possibility of misidentification and improves the accuracy of identifying complex and rare phenotypes. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 Shown is a flow chart of a disease phenotype term matching method according to an embodiment of this specification;
[0023] Figure 2 The figure is a flow chart of a method for training a phenotypic information prediction model according to an embodiment of the present specification;
[0024] Figure 3 The flowchart of a method for determining the loss value of an initial large language model according to an embodiment of the present specification is shown;
[0025] Figure 4 The figure is a flow chart of a method for iteratively updating an initial large language model according to an embodiment of the present specification;
[0026] Figure 5 The figure is a flow chart of a method for determining a term matching model according to an embodiment of the present specification;
[0027] Figure 6 The figure shows a schematic diagram of the structure of a disease phenotype term matching device according to an embodiment of the present specification;
[0028] Figure 7 The figure shows a specific structural schematic diagram of the disease phenotype term matching device according to the embodiment of this specification;
[0029] Figure 8The figure shows a schematic diagram of the structure of a computer device according to an embodiment of the present specification.
[0030] Description of the accompanying symbols:
[0031] 601. Phenotype information acquisition unit;
[0032] 6011. Training sample data determination module;
[0033] 6012. Initial phenotypic information acquisition module;
[0034] 6013, loss value determination module;
[0035] 602, vector representation acquisition unit;
[0036] 603. Matching degree determination unit;
[0037] 604. Terminology determination unit;
[0038] 802. Computer equipment;
[0039] 804, processor;
[0040] 806. Memory;
[0041] 808, driving mechanism;
[0042] 810, input / output module;
[0043] 812. Input device;
[0044] 814. Output device;
[0045] 816. Presentation equipment;
[0046] 818. Graphical user interface;
[0047] 820, network interface;
[0048] 822, communication link;
[0049] 824. Communication bus. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0051] It should be noted that the terms "first", "second", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0052] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.
[0053] It should be noted that the disease phenotype term matching method and device of this specification can be used in the field of medical technology, and can also be used in the field of natural language technology. This specification does not limit the application field of the disease phenotype term matching method and device.
[0054] Figure 1 The flowchart of a disease term phenotype matching method according to an embodiment of the present specification is shown, which specifically includes the following steps:
[0055] Step 101: input the disease-related text in the diagnosis text into a phenotype information prediction model to obtain phenotype information output by the phenotype information prediction model.
[0056] In the embodiments of this specification, phenotype HPO is a standard medical term for describing a disease. The phenotype information prediction model is obtained by training an initial large language model with phenotype labels and training sample data. In the embodiments of this specification, the diagnostic text may be text information from paper medical records, electronic medical records, diagnostic reports or other descriptive information related to the disease. The diagnostic text may contain some text descriptions that are not related to the disease, such as the patient's name, age and other information, so the diagnostic text needs to be standardized, including: text cleaning, removal of sensitive information, word segmentation, screening, filtering and other preprocessing, and the text related to the disease is processed from the diagnostic text. Specifically, the text in the diagnostic text that is not related to the disease information is filtered out by means such as semantic recognition.
[0057] For example, the diagnosis text is an electronic medical record issued by a doctor for a patient A, which is described as: Name: A; Age, 32 years old; Pre-pregnancy check-up, past medical history: 2022 thyroid cancer, unilateral thyroidectomy, no postoperative radiotherapy or chemotherapy, due to low thyroid, 1.5 tablets of Euthyrox were given to maintain thyroid function. The text not related to the disease in the diagnosis text includes: "Name: A; Age, 32 years old". The corresponding text related to the disease is: Pre-pregnancy check-up, past medical history: 2022 thyroid cancer, unilateral thyroidectomy, no postoperative radiotherapy or chemotherapy, due to low thyroid, 1.5 tablets of Euthyrox were given to maintain thyroid function.
[0058] For another example, the medical record written by the doctor for Patient B is described as follows: The patient is 45 years old, female, and came to this hospital for the first time on January 12, 2024. She is deaf-mute. The patient's brothers have hearing loss and their speech is not clear. The patient's son is deaf and his speech is not clear. The patient's daughter has hearing loss and her speech is not clear. The text unrelated to the disease in the diagnosis text includes: "The patient is 45 years old, female, and came to this hospital for the first time on January 12, 2024." The corresponding text related to the disease is: "Deaf-mute. The patient's brothers have hearing loss and their speech is not clear. The patient's son is deaf and his speech is not clear. The patient's daughter has hearing loss and her speech is not clear."
[0059] Furthermore, the disease-related text in the diagnosis text is input into the phenotypic information prediction model, which is trained by the large language model (LLM). Among them, the phenotypic language prediction model can learn the characteristics of the input text and output relatively accurate phenotypic information corresponding to the input text, and can also filter out auxiliary words, modal particles, punctuation marks, etc. in the diagnosis text. Taking the medical record of patient B mentioned above as an example, the text related to the disease of patient B is input into the phenotypic information prediction model, and the output is: "hearing impairment".
[0060] Step 102, convert the phenotypic information into a corresponding vector representation. In the embodiment of this specification, the phenotypic information output by the phenotypic information prediction model is the output result that the model considers to be standard or closest to the standard, but the result may not necessarily match the HPO standard phenotypic information, so it is necessary to further compare the phenotypic information output by the phenotypic information prediction model with the terms in the HPO standard database and perform a secondary match. Therefore, this step requires processing the phenotypic information into a vector representation.
[0061] Step 103, based on the vector representation of the phenotypic information, select the term with the highest matching degree with the vector representation from the HPO standard terminology library. In this step, the Human Phenotype Ontology (HPO) standard terminology library includes a large number of medical standard terms. While converting the phenotypic information output by the phenotypic information prediction model into a vector, it is also necessary to convert the terms in the HPO standard terminology library into a vector representation. In this step, the cosine similarity is used to calculate the vector corresponding to the phenotype output by the model, and the cosine similarity with the HPO term vector, so as to determine the matching degree.
[0062] Step 104, determining the term as the final term of the diagnosis text.
[0063] In the embodiments of the present specification, based on the FastAPI framework, an API interface is used to receive clinical diagnosis text and return matching terms.
[0064] This manual uses a large language model combined with sentence embedding technology to more accurately identify phenotypic information in clinical texts. This not only improves the accuracy of entity recognition, but also reduces the possibility of misidentification, especially when dealing with clinical records with complex semantics or irregular expressions, and improves the accuracy of recognition of complex and rare phenotypes.
[0065] Figure 2 The flowchart of a method for training a phenotypic information prediction model according to an embodiment of the present specification is shown, which specifically includes the following steps:
[0066] Step 201, obtain Chinese sample vocabulary and English sample vocabulary with a preset initial data ratio and a preset initial weight as training sample data. The original terms in the HPO database are all in English, and some English terms have corresponding Chinese. Therefore, the training sample data used for model training in this specification is a mixed Chinese and English sample vocabulary. Among them, the training sample data prepared before model training includes samples with an initial data ratio, that is, the ratio of Chinese sample vocabulary to English sample vocabulary is a preset initial data ratio, and the preset initial data ratio can be adjusted during the model training process. Further, the Chinese sample vocabulary and English sample vocabulary in the training sample data have preset initial weights respectively, wherein the preset initial weight represents the importance of the Chinese sample vocabulary or the English sample vocabulary in the training sample data. Similar to the preset initial data ratio, the preset initial weight can also be adjusted during the model training process.
[0067] In the training sample data of this step, the number of Chinese sample words is relatively small compared to the number of English sample words. In the embodiment of this specification, if the preset initial data ratio is denoted as β, which is used to control the ratio of Chinese and English sample words during the model training process, the composition of the training sample data is as follows: β·d zh+(1-β)·d en ; where d zh represents the number of Chinese sample words, d en Indicates the number of English sample words.
[0068] Step 202: input the training sample data into the initial large language model to obtain initial phenotype information output by the initial large language model.
[0069] In this specification, different languages have different structures and grammars when expressing the same concept. In this specification, the large language model LLM can process and learn more diverse and complex data, and can better understand and process high-level semantics and contextual information. For the case where the amount of Chinese data is small, LLM can better utilize English data to make up for the lack of Chinese data due to its strong generalization ability, while ordinary models (such as Bert, AlBert) may not be able to effectively handle this data imbalance. Therefore, this specification uses a large language model as the initial model and trains it. LLM is suitable for multi-task learning, that is, learning from data in one language and applying it to another language.
[0070] Step 203, calculate the loss value of the initial large language model based on the initial phenotypic information. In the embodiment of this specification, the phenotypic information prediction model trains a multilingual task, including: predicting phenotypic information based on the input Chinese sample vocabulary and predicting phenotypic information based on the input English sample vocabulary. Therefore, this step calculates the loss value of the initial large language model, which is determined by calculating the loss value of the Chinese training task and the loss value of the English training task respectively. For a detailed description of determining the loss value of the Chinese and English training tasks, see Figure 3 .
[0071] Step 204, iteratively updates the preset initial data ratio and preset initial weight of the initial large language model based on the loss value to obtain the phenotype information prediction model. In this step, the training process of the initial large language model is iterated based on the loss value obtained from each training of the initial large language model. The iterative process specifically adjusts the preset initial data ratio and preset initial weight of the training sample data, and adjusts the model parameters of the initial large language model until the preset conditions for training completion are met, and a trained phenotype information prediction model is obtained.
[0072] Figure 3 The flowchart of a method for determining the loss value of an initial large language model according to an embodiment of the present specification is shown, which specifically includes the following steps:
[0073] Step 301, according to the initial Chinese phenotype information output by the initial large language model and the Chinese phenotype label in the phenotype label, calculate the loss of the Chinese sample vocabulary of the initial large language model training. In the embodiment of this specification, before the model training, in addition to preparing the training sample data, the labels corresponding to the training sample data are also prepared, which are the phenotype labels corresponding to the Chinese sample vocabulary and the phenotype labels corresponding to the English sample vocabulary. The phenotype label represents the HPO phenotype corresponding to the Chinese sample vocabulary or the English sample vocabulary, that is, the HPO standard description.
[0074] In this step, the initial Chinese phenotypic information obtained by the model is not standard phenotypic data. Based on the initial Chinese phenotypic information and the Chinese phenotypic labels, the loss of Chinese sample vocabulary in this model training is calculated.
[0075] Step 302, based on the initial English phenotype information output by the initial large language model and the English phenotype label in the phenotype label, calculate the loss of the English sample vocabulary for the initial large language model training. In this step, the initial English phenotype information of the model is not standard phenotype data. Based on the initial English phenotype information and the English phenotype label, calculate the loss of the English sample vocabulary in this model training.
[0076] Step 303, determining the overall loss value of the initial large language model according to the loss of the Chinese sample vocabulary and the preset initial weight of the Chinese vocabulary, and the loss of the English sample vocabulary and the preset initial weight of the English sample vocabulary.
[0077] In the embodiment of this specification, the overall loss value of the initial large language model can be determined according to the following formula:
[0078] L=w zh ·L zh +w en ·L en ; Among them, w zh represents the preset initial weight of Chinese sample vocabulary, w en represents the preset initial weight of the English sample vocabulary, L zh represents the loss of Chinese sample vocabulary, L en represents the loss of English sample vocabulary, and L represents the overall loss value of the initial large prediction model.
[0079] Figure 4 The flowchart of a method for iteratively updating an initial large language model according to an embodiment of the present specification is shown, which specifically includes the following steps:
[0080] Step 401, based on the learning rate associated with the initial large language model and the loss of the English sample vocabulary, update the preset initial weight of the English sample vocabulary. In the embodiment of this specification, the updated weight of the English sample vocabulary is determined by the following formula: Among them, we ' n represents the weight of the updated English sample vocabulary, w en represents the preset initial weight of the English vocabulary sample, L represents the loss function of the initial large language model, η w Represents the learning rate associated with the initial large language model weights.
[0081] Step 402, based on the learning rate associated with the initial large language model and the loss of the Chinese sample vocabulary, update the preset initial weight of the Chinese sample vocabulary. In the embodiment of this specification, the updated weight of the English sample vocabulary is determined by the following formula: Among them, w z ' h represents the weight of the updated Chinese sample vocabulary, w zh represents the preset initial weight of the Chinese vocabulary sample, L represents the loss function of the initial large language model, η w Represents the learning rate associated with the initial large language model weights.
[0082] Step 403, based on the learning rate related to the initial large language model and the data ratio and the preset initial data ratio, the data ratio of the Chinese sample vocabulary and the English sample vocabulary is updated. In this step, the formula for updating the data ratio of the Chinese and English sample vocabulary is as follows:
[0083] β′=β-η β ;
[0084] Among them, η β represents the learning rate of the initial large language model related to the data ratio, w e ' n represents the weight of the updated English vocabulary, w′ zh Represents the weight of the updated Chinese vocabulary.
[0085] Figure 5 The flowchart of a method for determining a term matching model in an embodiment of this specification is shown, which specifically includes the following steps:
[0086] Step 501, update the model parameters of the model using the gradient descent algorithm. In this specification, the gradient descent is represented by the following formula:
[0087] Among them, θ represents the model parameters, η θ is the learning rate of the model related to the model parameters, Represents the gradient of the loss function L with respect to the model parameter θ. This represents the rate of change or slope of the loss function with respect to the parameter θ in the parameter space. During the optimization process, by calculating the gradient, we can know how to adjust θ to reduce the value of the loss function L, thereby optimizing the model performance.
[0088] Step 502, calculate the loss value corresponding to the initial large language model after the current training according to the updated model parameters, the data ratio of the updated initial large language model and the updated weight. In this step, after each iteration of updating the initial large language model, the loss value of the initial large language model after the current training is determined according to the phenotype information and phenotype label output by the initial large language model after the current training.
[0089] Step 503, when the loss value converges to a preset numerical range or the number of iterations reaches a preset threshold, the model training is determined to be completed, and a phenotypic information prediction model is obtained. In this step, if the loss value of the initial large language model after a certain update iteration converges to a preset numerical range, or the loss value is less than a preset threshold, or the number of iterations of the initial large language model reaches a preset threshold, the large language model training is determined to be completed, and the trained model is the phenotypic information prediction model.
[0090] In some embodiments of the present specification, based on the vector representation of the phenotypic information, selecting the term with the highest match with the vector representation from the HPO standard term library includes: concatenating the vector representations of all terms in the HPO standard term library into a matrix; calculating the similarity between the vector corresponding to the phenotypic information and the matrix; and selecting the HPO term corresponding to the vector with the greatest similarity as the term with the highest match with the phenotypic information.
[0091] In the embodiments of the present specification, all the terms in the HPO standard terminology library are uniformly converted into vector representations to obtain a large number of vectors, and the vectors of all the terms are further spliced into a matrix form. The text related to the disease in the diagnostic text is input into the phenotypic information prediction model, and the phenotypic information output by the obtained model is processed into a vector representation. Further, the vector similarity corresponding to the phenotypic information is calculated with the matrix spliced into all the vectors in the HPO terminology library to obtain the similarity between the vector corresponding to the phenotypic information and the vector corresponding to each term in the HPO terminology library. Finally, the term in the HPO terminology library corresponding to the maximum similarity is used as the term with the highest matching degree with the phenotypic information.
[0092] For example, in step 101, the disease-related text in the diagnosis text of patient A is input into the phenotype information prediction model, and the phenotype output by the model is: "visual impairment", and the phenotype information is matched with the HPO term library, and the term with the highest matching degree is: abnormal vision (HP:0000504).
[0093] like Figure 6The figure shows a schematic diagram of the structure of a disease phenotype term matching device according to an embodiment of the present specification. The figure describes the basic structure of the disease phenotype term matching device, wherein the functional units and modules can be implemented by software, or a general chip or a specific chip can be used to implement disease phenotype term matching. The device specifically includes:
[0094] A phenotype information acquisition unit 601 is used to input disease-related text in the diagnosis text into a phenotype information prediction model to obtain phenotype information output by the phenotype information prediction model, wherein the phenotype information prediction model is obtained by training an initial large language model with phenotype labels and sample vocabulary;
[0095] A vector representation acquisition unit 602, used to convert the phenotypic information into a corresponding vector representation;
[0096] A matching degree determination unit 603 is used to select a term with the highest matching degree with the vector representation from the HPO standard term library according to the vector representation of the phenotypic information;
[0097] The term determination unit 604 is used to use the term as the final term of the diagnosis text.
[0098] This specification aims to more accurately identify phenotypic information in clinical texts by using a large language model combined with sentence embedding technology. When processing clinical records with complex semantics or irregular expressions, it reduces the possibility of misidentification and improves the accuracy of identifying complex and rare phenotypes.
[0099] As an example of this specification, please refer to Figure 7 Shown is a schematic diagram of the specific structure of the disease phenotype term matching device in the embodiment of this specification.
[0100] As an embodiment of this specification, the phenotype information acquisition unit 601 further includes:
[0101] The training sample data determination module 6011 is used to obtain Chinese sample words and English sample words with a preset initial data ratio and a preset initial weight as training sample data;
[0102] An initial phenotypic information acquisition module 6012 is used to input the training sample data into the initial large language model to obtain the initial phenotypic information output by the initial large language model;
[0103] The loss value determination module 6013 is used to calculate the loss value of the initial large language model according to the initial phenotype information.
[0104] like Figure 8The structure diagram of a computer device provided in an embodiment of the present specification is shown, and the disease phenotype term matching method described in the present specification can be executed by the computer device. The computer device 802 may include one or more processors 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any memory 806, which is used to store any kind of information such as code, settings, data, etc. Non-limiting, for example, the memory 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 802. In one case, when the processor 804 executes an associated instruction stored in any memory or a combination of memories, the computer device 802 can perform any operation of the associated instruction. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0105] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 812, and the output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0106] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0107] Corresponds to Figures 1 to 5 The method in the embodiment of the present specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.
[0108] The embodiment of the present specification also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 1 to 5 The method shown.
[0109] It should be understood that in the various embodiments of this specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.
[0110] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this specification generally indicates that the associated objects before and after are in an "or" relationship.
[0111] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.
[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0113] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.
[0115] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0117] Specific embodiments are used in this specification to illustrate the principles and implementation methods of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of this specification. At the same time, for those skilled in the art, according to the ideas of this specification, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this specification.
Claims
1. A disease phenotype term matching method, characterized in that: The method comprises: Inputting disease-related text in the diagnosis text into a phenotype information prediction model to obtain phenotype information output by the phenotype information prediction model, wherein the phenotype information prediction model is obtained by training an initial large language model with phenotype labels and training sample data, wherein training the phenotype information prediction model includes: obtaining Chinese sample vocabulary and English sample vocabulary with a preset initial data ratio and a preset initial weight as training sample data; Input the training sample data into the initial large language model to obtain the initial phenotype information output by the initial large language model; The loss value of the initial large language model is calculated based on the initial phenotype information; it includes: Calculate the loss of the Chinese sample vocabulary for training the initial large language model according to the initial Chinese phenotype information output by the initial large language model and the Chinese phenotype label in the phenotype label; Calculate the loss of the English sample vocabulary for training the initial large language model according to the initial English phenotype information output by the initial large language model and the English phenotype label in the phenotype label; Determine the overall loss value of the initial large language model according to the loss of the Chinese sample vocabulary and the preset initial weight of the Chinese sample vocabulary, and the loss of the English sample vocabulary and the preset initial weight of the English sample vocabulary; Iteratively updating a preset initial data ratio and a preset initial weight of the initial large language model based on the loss value to obtain the phenotype information prediction model; Converting the phenotypic information into a corresponding vector representation; According to the vector representation of the phenotypic information, selecting a term with the highest matching degree with the vector representation from the HPO standard term library; The term is determined as the final term of the diagnostic text.
2. The disease phenotype term matching method according to claim 1, characterized in that: The preset initial data ratio and preset initial weight of the initial large language model that are iteratively updated based on the loss value include: Update the preset initial weights of the English sample vocabulary according to the learning rate associated with the initial large language model and the loss of the English sample vocabulary; Update the preset initial weights of the Chinese sample vocabulary according to the learning rate associated with the initial large language model and the weight and the loss of the Chinese sample vocabulary; The data ratio of the Chinese sample vocabulary and the English sample vocabulary is updated according to the learning rate related to the initial large language model and the data ratio and the preset initial data ratio.
3. The disease phenotype term matching method according to claim 2, characterized in that: The method includes: updating a preset initial data ratio and a preset initial weight of an initial large language model by the following formula: b ′ =β-η β ; Among them, w zh and w en They represent the preset initial weights of the Chinese vocabulary training task and the English vocabulary training task respectively; L represents the total loss function of the initial large language model, η w represents the learning rate of the initial large language model related to the weight, η β represents the learning rate of the initial large language model related to the data ratio, w e ′ n represents the weight of the updated English vocabulary, w z ′ h represents the weight of the updated Chinese vocabulary, β ′ represents the data ratio of updated Chinese and English sample vocabulary, and β represents the preset initial data ratio.
4. The disease phenotype term matching method according to claim 3, characterized in that: The method further comprises: Update the model parameters of the model using the gradient descent algorithm; According to the updated model parameters, the updated data ratio of the initial large language model and the updated weights, the loss value corresponding to the initial large language model after the current training is calculated; When the loss value converges to a preset numerical range or the number of iterations reaches a preset threshold, the model training is determined to be completed and a phenotypic information prediction model is obtained.
5. The disease phenotype term matching method according to claim 1, characterized in that: According to the vector representation of the phenotypic information, the terms with the highest matching degree with the vector representation are selected from the HPO standard term library, including: Concatenate the vector representations of all terms in the HPO standard terminology database into a matrix; Calculating the similarity between the vector corresponding to the phenotypic information and the matrix; The HPO term corresponding to the vector with the greatest similarity is taken as the term with the highest matching degree with the phenotypic information.
6. A disease phenotype term matching device, characterized in that: The device comprises: A phenotype information acquisition unit is used to input disease-related text in the diagnosis text into a phenotype information prediction model to obtain phenotype information output by the phenotype information prediction model, wherein the phenotype information prediction model is obtained by training an initial large language model with phenotype labels and sample vocabulary; wherein training the phenotype information prediction model includes: obtaining Chinese sample vocabulary and English sample vocabulary with a preset initial data ratio and a preset initial weight as training sample data; Input the training sample data into the initial large language model to obtain the initial phenotype information output by the initial large language model; The loss value of the initial large language model is calculated based on the initial phenotype information; it includes: Calculate the loss of the Chinese sample vocabulary for training the initial large language model according to the initial Chinese phenotype information output by the initial large language model and the Chinese phenotype label in the phenotype label; Calculate the loss of the English sample vocabulary for training the initial large language model according to the initial English phenotype information output by the initial large language model and the English phenotype label in the phenotype label; Determine the overall loss value of the initial large language model according to the loss of the Chinese sample vocabulary and the preset initial weight of the Chinese sample vocabulary, and the loss of the English sample vocabulary and the preset initial weight of the English sample vocabulary; Iteratively updating a preset initial data ratio and a preset initial weight of the initial large language model based on the loss value to obtain the phenotype information prediction model; A vector representation acquisition unit, used for converting phenotypic information into corresponding vector representation; A matching degree determination unit, configured to select, based on the vector representation of the phenotypic information, a term with the highest matching degree with the vector representation from the HPO standard term library; A term determination unit is used for taking the term as the final term of the diagnosis text.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method, device and medium for determining phenotypic information of clinical description information
CN112687328A