Medical examination conclusion generation method and device based on large language model
Through the medical examination conclusion generation method based on the large language model, the medical examination inference knowledge base and the large language model are used for reasoning, and the problem of low efficiency and accuracy of medical examination conclusion generation is solved, and efficient and accurate generation of medical examination conclusions is achieved.
Patent Information
- Application Number
- CN202410725950.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-06-05
AI Technical Summary
In medical scenarios, doctors or medical professionals need to spend a lot of time and effort to manually interpret medical examination performance to generate medical examination conclusions, resulting in inefficiency and insufficient accuracy.
Using a medical examination conclusion generation method based on a large language model, by obtaining medical examination performance text, extracting matching knowledge from the medical examination reasoning knowledge base, constructing samples and prompt texts, using a large language model to reason to generate conclusions, reducing the burden of manual interpretation and improve the accuracy of the conclusions.
It improves the efficiency and accuracy of the generation of medical examination conclusions, reduces the work burden of doctors and medical professionals, and reduces the difficulty of training large language models through small sample learning.
Smart Images

Figure CN118315012B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present application relate to the field of artificial intelligence technology, and in particular, to a method and device for generating medical examination conclusions based on a large language model. Background Art
[0002] In actual medical scenarios, medical examinations refer to a series of procedures and tests performed by doctors or medical professionals on patients to assess health status, diagnose diseases, monitor disease progression, or determine the effectiveness of treatment. Medical examinations can be divided into many types, such as: physical examination (observing the appearance of the examinee, auscultation, measuring vital signs), laboratory tests (blood tests, urine tests, stool tests), imaging tests (X-rays, computed tomography, magnetic resonance imaging, ultrasound), functional tests (electrocardiograms, pulmonary function tests, endoscopy), special tests (positron emission tomography, bone density tests).
[0003] After a medical examination is performed on a patient, a medical report related to the medical examination is usually issued. The content of this medical report can include not only the personal information of the examinee (e.g. name, contact information, medical record number, etc.), but also the medical examination manifestations and medical examination conclusions. Medical examination manifestations are specific conditions or phenomena directly observed through various examination methods (e.g. laboratory tests, imaging tests, functional tests, etc.) during the medical examination. These manifestations can be specific values (e.g., the content of a certain protein in the blood), morphological descriptions (e.g., the shape and distribution of lung shadows on X-rays), functional assessment results (e.g., changes in the waveform of an electrocardiogram), or other measurable indicators. The medical examination conclusion is a summary judgment of the examinee's health status or disease state based on a comprehensive analysis of the medical examination manifestations and other clinical information. It usually clearly indicates whether the examination findings indicate the presence of a certain disease, the severity of the disease, the evaluation of the treatment effect, or other medical judgments. In short, the medical examination conclusion is a high-level summary of the medical examination manifestations, which aims to provide doctors and patients with a clear basis for diagnosing or excluding specific diseases. Therefore, in practical applications, how to efficiently and accurately obtain medical examination conclusions corresponding to the medical examination performance has become an urgent problem to be solved. Summary of the invention
[0004] One or more embodiments of the present application provide the following technical solutions:
[0005] The present application provides a method for generating a medical examination conclusion based on a large language model, the method comprising:
[0006] Obtaining target performance text corresponding to the target medical examination;
[0007] Extracting medical examination reasoning knowledge matching the target expression text from a medical examination reasoning knowledge base; wherein the medical examination reasoning knowledge includes the expression text and conclusion text corresponding to the medical examination;
[0008] constructing a sample based on the extracted medical examination reasoning knowledge, and constructing a prompt text based on the sample and the target performance text;
[0009] The prompt text is input into a large language model, and the large language model outputs a target conclusion text corresponding to the target medical examination obtained by reasoning based on the target performance text under the guidance of the sample.
[0010] The present application also provides a device for generating a medical examination conclusion based on a large language model, the device comprising:
[0011] An acquisition module, acquiring a target performance text corresponding to a target medical examination;
[0012] An extraction module extracts medical examination reasoning knowledge matching the target expression text from a medical examination reasoning knowledge base; wherein the medical examination reasoning knowledge includes the expression text and conclusion text corresponding to the medical examination;
[0013] A construction module, which constructs a sample based on the extracted medical examination reasoning knowledge, and constructs a prompt text based on the sample and the target performance text;
[0014] An output module inputs the prompt text into a large language model, and the large language model outputs a target conclusion text corresponding to the target medical examination obtained by reasoning based on the target performance text under the guidance of the sample.
[0015] The present application also provides an electronic device, comprising:
[0016] processor;
[0017] a memory for storing processor-executable instructions;
[0018] The processor implements the steps of any of the above methods by running the executable instructions.
[0019] The present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of any of the methods described above.
[0020] In the above technical scheme, for the target expression text corresponding to the target medical examination, medical examination reasoning knowledge matching the target expression text can be first extracted from the medical examination reasoning knowledge base, and the medical examination reasoning knowledge can include the expression text and conclusion text corresponding to the medical examination. Then, a sample is constructed based on the extracted medical examination reasoning knowledge, and a prompt text is further constructed based on the sample and the target expression text. Finally, the prompt text can be input into a large language model, and the large language model outputs the target conclusion text corresponding to the target medical examination obtained by reasoning based on the target expression text under the guidance of the sample.
[0021] By adopting the above method, on the one hand, it is no longer necessary for doctors or medical professionals to manually determine the medical examination conclusion corresponding to the medical examination based on the medical examination performance corresponding to the medical examination. Instead, a large language model can be used to infer based on the medical examination performance to generate the corresponding medical examination conclusion, thereby improving the efficiency of generating the medical examination conclusion. On the other hand, samples can be generated based on medical examination reasoning knowledge matching the medical examination performance, and the large language model can learn how to generate the corresponding conclusion text based on the performance text shown by the sample, and then infer based on the medical examination performance to generate the corresponding medical examination conclusion, thereby improving the pertinence of the generated medical examination conclusion and improving the accuracy of the generated medical examination conclusion. On the other hand, the prompt text of the large language model can be further constructed based on the constructed sample and medical examination performance, that is, the sample can be provided to the large language model in a small sample learning manner, so that the language model can be effectively learned on a limited and small number of samples, reducing the difficulty of training the large language model. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The following is a description of the accompanying drawings required for use in describing the exemplary embodiments, wherein:
[0023] Figure 1 It is a schematic diagram of a medical examination conclusion generation process based on a large language model shown in an exemplary embodiment of the present application.
[0024] Figure 2 It is a flowchart of a method for generating medical examination conclusions based on a large language model, shown as an exemplary embodiment of the present application.
[0025] Figure 3 It is a schematic diagram of the reasoning steps of inferring the conclusion text from the presentation text, shown in an exemplary embodiment of the present application.
[0026] Figure 4 It is a structural schematic diagram of a device shown in an exemplary embodiment of the present application.
[0027] Figure 5It is a block diagram of a medical examination conclusion generating device based on a large language model, shown as an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0028] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the present application. On the contrary, they are only examples consistent with some aspects of one or more embodiments of the present application.
[0029] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this application. In some other embodiments, the steps included in the method may be more or less than those described in this application. In addition, a single step described in this application may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this application may also be combined into a single step for description in other embodiments.
[0030] In actual medical scenarios, medical examinations refer to a series of procedures and tests performed by doctors or medical professionals on patients to assess health status, diagnose disease, monitor disease progression, or determine the effectiveness of treatment. Medical examinations can be divided into many types, such as: physical examination, laboratory test, imaging test, functional test, special examination.
[0031] Medical examination findings are specific conditions or phenomena directly observed through various examination methods during the medical examination. These findings can be specific numerical values, morphological descriptions, functional assessment results, or other measurable indicators. The medical examination conclusion is a summary judgment of the examinee's health status or disease status based on a comprehensive analysis of the medical examination findings and other clinical information. It usually clearly indicates whether the examination findings indicate the presence of a certain disease, the severity of the disease, the evaluation of treatment effects, or other medical judgments. In short, the medical examination conclusion is a high-level summary of the medical examination findings, which aims to provide doctors and patients with a clear basis for diagnosing or excluding specific diseases.
[0032] Medical examination findings can be presented in a variety of forms, such as text and images (e.g., X-rays, electrocardiograms, etc.), while medical examination conclusions are usually presented in text form. Taking imaging examinations as an example, medical examination findings may include not only radiological images such as X-rays, CT images, or MRI images obtained by performing radiological scans on the subject, but also descriptive texts for body parts, organs, or lesions displayed in the obtained radiological images; for example, assuming that a magnetic resonance imaging examination of the subject's prostate is performed, then the medical examination findings corresponding to this examination may include not only the MRI image of the subject's prostate, but also the following descriptive text: the prostate volume is enlarged and protrudes upward toward the bottom of the bladder, no obvious abnormal signals are seen in the prostate on T1WI, nodular and slightly high signal shadows are seen in the transition zone to the left of the prostate on T2WI, DWI shows high signal, and after enhancement, the enhancement is obviously uneven. The medical examination conclusion may include text that describes a summary judgment of the subject's health status or disease status; for example, the medical examination conclusion corresponding to a magnetic resonance imaging examination of the subject's prostate may include the following text: prostate hyperplasia, considering the PI-RADS classification, combined with clinical data, it may be prostate cancer, which requires further evaluation.
[0033] For the conclusion of medical examination, doctors or medical professionals are usually required to manually check the medical examination results, interpret and analyze the medical examination results, and if necessary, combine other clinical information to obtain a summary judgment on the health status or disease status of the examinee as the medical examination conclusion corresponding to the medical examination results. This process includes understanding the preliminary results from the medical examination results to extracting the exact medical examination conclusion, which involves highly specialized and meticulous work and usually requires a lot of time and energy from doctors or medical professionals.
[0034] This application aims to provide a technical solution for generating medical examination conclusions based on large language models (LLMs), so as to efficiently and accurately obtain medical examination conclusions corresponding to medical examination performance, reduce the burden on doctors or medical professionals, and reduce labor costs. Specifically, the technical solution provided by this application uses a large language model and is based on the idea of few-shot learning to generate medical examination conclusions corresponding to medical examination performance.
[0035] A large language model is a deep learning model trained with a large amount of text data, which can be used to generate natural language text or understand the meaning of natural language text. A large language model can handle a variety of natural language tasks, such as text classification, named entity recognition, question answering, dialogue, etc., and is an important path to artificial intelligence.
[0036] In the field of natural language processing, large-scale text data sets are usually referred to as corpuses. Corpuses can contain various types of text data, such as literary works, academic papers, legal documents, news reports, daily conversations, emails, online forum posts, etc. By learning the text data in the corpus, large language models can obtain and understand the laws and patterns of natural language, thereby achieving effective processing and generation of human language.
[0037] Large language models usually use the Transformer architecture, that is, large language models are usually deep learning models based on the Transformer architecture. Deep learning models based on the Transformer architecture are a type of neural network model that uses the Transformer architecture. This model performs well in fields such as natural language processing.
[0038] Transformer is a neural network model used for sequence-to-sequence modeling. Transformer does not need to rely on recursive structures, can parallelize training and reasoning, and speed up model processing. In deep learning models based on the Transformer architecture, a multi-layer Transformer encoder is usually used to extract features from the input sequence, and a Transformer decoder is used to convert the extracted features into an output sequence. At the same time, such models usually also use a self-attention mechanism to capture long-distance dependencies in the input sequence, and use residual connections and regularization methods to accelerate training and improve model performance.
[0039] A pre-trained model is a large language model that is pre-trained on large-scale unlabeled text data. A pre-trained model is a general model that is not designed and optimized for a specific task. In order to adapt the pre-trained model to specific application scenarios and task requirements, fine-tuning is required to improve the performance of the model on specific tasks. The large language model that is finally put into use is usually a model that is further fine-tuned on the basis of the pre-trained model and is a supervised learning model based on labeled text data. Pre-training and fine-tuning are complementary processes. Pre-training enables the model to have a wide range of language understanding capabilities, while fine-tuning makes the model more professional and accurate in specific tasks.
[0040] That is, the training process of a large language model can be divided into two stages: pre-training and fine-tuning. In the pre-training stage, unsupervised learning (e.g., self-supervised learning) can be used to perform pre-training on large-scale, unlabeled text data sets (e.g., online encyclopedias, online articles, books, etc.). Specifically, the missing part or the next word can be predicted based on the context, and statistical laws and language structures such as semantics and syntax can be learned. The prediction loss can be minimized through back-propagation and optimization algorithms (e.g., gradient descent), and model parameters can be iteratively updated to gradually improve the model's ability to understand language. In the fine-tuning stage, you can select corresponding supervised learning tasks (for example, text classification, named entity recognition, question-answering system, dialogue system, etc.) according to the specific application scenarios and task requirements, and prepare task-specific text datasets, so that you can use the pre-trained model as the starting point for fine-tuning, and use supervised learning to perform fine-tuning training on the task-specific text dataset. Specifically, you can perform the task based on the text dataset, and minimize the loss used to measure the performance of the model in processing specific tasks through back propagation and optimization algorithms (for example, gradient descent method), iteratively update the model parameters, and gradually improve the performance of the model on specific tasks.
[0041] It should be noted that the pre-trained large language model is usually called the base model of the large language model, and the fine-tuned large language model is called the service model of the large language. The language understanding ability learned by the large language model in the pre-training and fine-tuning stages enables the large language model to understand, analyze and integrate text information, perform logical inference, knowledge reasoning or problem solving when faced with complex problems or tasks. This ability is usually called the reasoning ability of the large language model.
[0042] Large language models usually perform specific tasks under the guidance of prompt text (which can be called prompt). Prompt text is an initial text or text fragment provided to the large language model, which is intended to stimulate the model to produce corresponding output. Through the prompt text, you can clearly tell the large language model what task you expect it to perform, such as: answering a question, simulating a conversation, writing an article, translating text, etc. At the same time, the prompt text can provide the large language model with the necessary background information and context, so that the large language model can understand the logic, style, theme or position that should be followed when generating content. In addition, the prompt text can also stimulate the large language model to show its inherent knowledge reserves or specific language capabilities, such as: explaining complex concepts, citing regulations, imitating the writing style of a specific writer, etc.
[0043] Few-shot learning is an important branch of machine learning and deep learning. It focuses on how to enable algorithms to learn effectively and generalize to unseen data even with only a small number of training samples. In traditional machine learning tasks, models often require a large amount of labeled data to achieve good performance, and few-shot learning aims to reduce this dependence on large-scale data. The key challenge of few-shot learning is how to capture the inherent laws and characteristics of data from limited examples, so as to achieve recognition of new categories or execution of tasks. Few-shot learning is widely used in many fields such as image classification, object recognition, natural language processing, etc., and is especially suitable for scenarios where it is difficult to obtain a large amount of labeled data.
[0044] In the technical solution provided in the present application, for the target expression text corresponding to the target medical examination, medical examination reasoning knowledge matching the target expression text can be first extracted from the medical examination reasoning knowledge base, and the medical examination reasoning knowledge can include the expression text and conclusion text corresponding to the medical examination. Then, a sample is constructed based on the extracted medical examination reasoning knowledge, and a prompt text is further constructed based on the sample and the target expression text. Finally, the prompt text can be input into a large language model, and the large language model outputs the target conclusion text corresponding to the target medical examination obtained by reasoning based on the target expression text under the guidance of the sample.
[0045] By adopting the above method, on the one hand, it is no longer necessary for doctors or medical professionals to manually determine the medical examination conclusion corresponding to the medical examination based on the medical examination performance corresponding to the medical examination. Instead, a large language model can be used to infer based on the medical examination performance to generate the corresponding medical examination conclusion, thereby improving the efficiency of generating the medical examination conclusion. On the other hand, samples can be generated based on medical examination reasoning knowledge matching the medical examination performance, and the large language model can learn how to generate the corresponding conclusion text based on the performance text shown by the sample, and then infer based on the medical examination performance to generate the corresponding medical examination conclusion, thereby improving the pertinence of the generated medical examination conclusion and improving the accuracy of the generated medical examination conclusion. On the other hand, the prompt text of the large language model can be further constructed based on the constructed sample and medical examination performance, that is, the sample can be provided to the large language model in a small sample learning manner, so that the language model can be effectively learned on a limited and small number of samples, reducing the difficulty of training the large language model.
[0046] Please refer to Figure 1 , Figure 1 It is a schematic diagram of a medical examination conclusion generation process based on a large language model shown in an exemplary embodiment of the present application.
[0047] In this embodiment, after one or more medical examinations (which may be referred to as target medical examinations) are performed on the examinee, a medical examination performance corresponding to the target medical examination may be obtained. The medical examination performance may be presented in a text form, referred to as a target performance text. In order to obtain a medical examination conclusion corresponding to the medical examination performance, as a medical examination conclusion corresponding to the target medical examination, the target performance text may be first obtained, so as to obtain the medical examination conclusion by performing specific processing on the target performance text. The medical examination conclusion may also be presented in a text form, referred to as a target conclusion text.
[0048] When the above-mentioned target expression text is obtained, in order to generate samples that match the target expression text, so that the large language model can learn from the generated samples and obtain more targeted reasoning capabilities, medical examination reasoning knowledge that matches the target expression text can be extracted from the medical examination reasoning knowledge base, so as to generate samples that match the target expression text based on the extracted medical examination reasoning knowledge.
[0049] The medical examination reasoning knowledge base stores medical examination reasoning knowledge. For a medical examination reasoning knowledge entry, the medical examination reasoning knowledge entry may include a presentation text (specifically, a text paragraph or a text chapter, etc.) corresponding to the medical examination and a conclusion text.
[0050] When the medical examination reasoning knowledge matching the target expression text is extracted from the medical examination reasoning knowledge base, a sample can be constructed based on the extracted medical examination reasoning knowledge, and the number of constructed samples can be limited and small. After the sample is constructed, the prompt text of the large language model can be further constructed based on the sample and the target expression text.
[0051] In practical applications, the constructed samples can be provided to the model through small sample learning. That is, before the model receives the actual question, several complete examples containing questions and answers are shown to guide the model to learn how to generate corresponding answers based on the question.
[0052] When the prompt text is constructed, the prompt text can be input into a large language model, and the large language model outputs a conclusion text corresponding to the target medical examination obtained by reasoning based on the target expression text contained in the prompt text under the guidance of the sample contained in the prompt text, that is, the target conclusion text. Specifically, the large language model can first learn the sample to learn how to generate the corresponding conclusion text based on the expression text shown in the sample, and then reason based on the target expression text to generate the target conclusion text.
[0053] Specifically, in order to constrain the reasoning process of the large language model to generate the conclusion text based on the performance text, so that the format of the generated conclusion text is more consistent, for a medical examination reasoning knowledge entry stored in the above-mentioned medical examination reasoning knowledge base, the medical examination reasoning knowledge entry can not only include a performance text corresponding to the medical examination (specifically, it can be a text paragraph or a text chapter, etc.) and a conclusion text, but also include a description text of the reasoning steps of inferring the conclusion text from the performance text. In this case, a limited and small number of chain-of-thought samples can be constructed based on the extracted medical examination reasoning knowledge. After constructing the chain-of-thought sample, the prompt text of the large language model can be further constructed based on the chain-of-thought sample and the above-mentioned target performance text.
[0054] In practical applications, thought chain samples can guide the model through complete examples of questions, intermediate reasoning steps, and answers, and learn to imitate such reasoning patterns.
[0055] At this time, the large language model can respond to the prompt text and output a description text (which can be called a target description text) of the reasoning steps based on the target performance text under the guidance of the thought chain sample, and output the target conclusion text inferred. Specifically, the large language model can first learn the thought chain sample, learn the reasoning mode shown by the thought chain sample, and then imitate such reasoning mode, reason based on the target performance text, and output the target description text used to describe the reasoning steps in this reasoning process, as well as the target conclusion text inferred.
[0056] The following Figure 1 The process of generating medical examination conclusions based on a large language model is shown in detail.
[0057] Please refer to Figure 2 , Figure 2 It is a flowchart of a method for generating medical examination conclusions based on a large language model, shown as an exemplary embodiment of the present application.
[0058] In this embodiment, the above-mentioned method for generating medical examination conclusions based on a large language model can be applied to a server. The server can be a server including an independent physical host, or a server cluster composed of multiple independent physical hosts; or the server can be a virtual server, a cloud server, etc. carried by a host cluster. Alternatively, the above-mentioned method for generating medical examination conclusions based on a large language model can be applied to electronic devices with certain computing capabilities, such as tablet computers, laptop computers, desktop computers, PCs (Personal Computers), and PDAs (Personal Digital Assistants).
[0059] like Figure 2 As shown, the above-mentioned method for generating medical examination conclusions based on a large language model may include the following steps:
[0060] Step 202: Obtain a target performance text corresponding to the target medical examination.
[0061] In this embodiment, after one or more medical examinations (which may be referred to as target medical examinations) are performed on the examinee, a medical examination performance corresponding to the target medical examination may be obtained. The medical examination performance may be presented in a text form, referred to as a target performance text. In order to obtain a medical examination conclusion corresponding to the medical examination performance, as a medical examination conclusion corresponding to the target medical examination, the target performance text may be first obtained, so as to obtain the medical examination conclusion by performing specific processing on the target performance text. The medical examination conclusion may also be presented in a text form, referred to as a target conclusion text.
[0062] Step 204: extracting medical examination reasoning knowledge matching the target expression text from the medical examination reasoning knowledge base; wherein the medical examination reasoning knowledge includes the expression text and conclusion text corresponding to the medical examination.
[0063] In this embodiment, when the above-mentioned target expression text is obtained, in order to generate samples that match the target expression text, so that the large language model can learn from the generated samples and obtain more targeted reasoning capabilities, medical examination reasoning knowledge that matches the target expression text can be extracted from the medical examination reasoning knowledge base, so as to generate samples that match the target expression text based on the extracted medical examination reasoning knowledge.
[0064] Among them, the above-mentioned medical examination reasoning knowledge base stores medical examination reasoning knowledge. For a medical examination reasoning knowledge item, the medical examination reasoning knowledge item may include a performance text corresponding to the medical examination (specifically, it may be a text paragraph or a text chapter, etc.) and a conclusion text; for example, assuming that a performance text corresponding to the medical examination is "the prostate volume is enlarged and protrudes upward to the bottom of the bladder. No obvious abnormal signal is found in the prostate on T1WI. On T2WI, nodular and slightly high signal shadows are seen in the transition zone of the prostate to the left. DWI shows high signal and obvious uneven enhancement after enhancement." Then a conclusion text corresponding to the medical examination may be "prostate hyperplasia, considering PI-RADS classification, combined with clinical, it may be prostate cancer, and further evaluation is required."
[0065] In some embodiments, in order to constrain the reasoning process of the large language model generating the conclusion text based on the performance text so that the format of the generated conclusion text is more consistent, for a medical examination reasoning knowledge item stored in the above-mentioned medical examination reasoning knowledge base, the medical examination reasoning knowledge item may not only include a performance text (specifically, a text paragraph or a text chapter, etc.) and a conclusion text corresponding to the medical examination, but also include a description text of the reasoning steps of inferring the conclusion text from the performance text; for example, assuming that a performance text corresponding to the medical examination is "the prostate volume is enlarged and protrudes upward to the bottom of the bladder. No obvious abnormal signal is found in the prostate on T1WI. On T2WI, nodular and slightly high signal shadows are seen in the transition zone to the left of the prostate. DWI shows high signal, After enhancement, there is obvious uneven enhancement”, then the description text of the reasoning step based on the performance text can be "From the increase in prostate volume and its upward protrusion toward the bladder base, it can be seen that the prostate volume has increased to the extent of protruding toward the bladder base, indicating prostate hyperplasia; no obvious abnormal signal was found in the prostate on T1WI, nodular and other slightly high signal shadows were found in the transition zone to the left of the prostate on T2WI, DWI showed high signal, and after enhancement, there was obvious uneven enhancement, which showed that there was nodular signal abnormality in the transition zone to the left of the prostate. Considering the PI-RADS classification and combining with the clinical data, it may be prostate cancer, which requires further evaluation". Accordingly, a conclusion text corresponding to the medical examination can be "prostate hyperplasia, considering the PI-RADS classification and combining with the clinical data, it may be prostate cancer, which requires further evaluation".
[0066] In some embodiments, as described above, a medical examination reasoning knowledge item stored in the medical examination reasoning knowledge base may include a performance text corresponding to the medical examination. In this case, when extracting the medical examination reasoning knowledge that matches the target performance text from the medical examination reasoning knowledge base, the text similarity between the target performance text and the performance texts included in each medical examination reasoning knowledge item stored in the medical examination reasoning knowledge base may be calculated, and the medical examination reasoning knowledge items whose text similarity reaches a certain threshold or a certain number (i.e., TopN, where N is the number) of the highest text similarities are extracted as the medical examination reasoning knowledge that matches the target performance text.
[0067] Alternatively, when extracting medical examination reasoning knowledge that matches the above-mentioned target expression text from the above-mentioned medical examination reasoning knowledge base, feature extraction can be performed on the target expression text to obtain a feature vector corresponding to the target expression text, and feature extraction can be performed on the expression text contained in each medical examination reasoning knowledge item stored in the medical examination reasoning knowledge base to obtain a feature vector corresponding to the expression text contained in each medical examination reasoning knowledge item; at this time, the vector similarity between the feature vector corresponding to the target expression text and the feature vector corresponding to the expression text contained in each medical examination reasoning knowledge item can be calculated, and the medical examination reasoning knowledge items whose vector similarity reaches a certain threshold or a certain number (i.e., Top N, N is the number) of the medical examination reasoning knowledge items with the highest vector similarity are extracted as the medical examination reasoning knowledge that matches the target expression text.
[0068] Feature extraction refers to extracting representative and discriminative information from raw data and converting it into a form that can be understood and processed by a machine learning algorithm, namely, a feature vector. When performing feature extraction on the above-mentioned query text, the Word2Vec algorithm can be used to generate a word embedding corresponding to the query text as a feature vector corresponding to the query text; alternatively, the query text can be input into a machine learning model that can be used for text feature extraction, and the machine learning model performs feature extraction on the query text to obtain a feature vector corresponding to the query text. Among them, the machine learning model that can be used for text feature extraction can be a convolutional neural network (CNN), or it can be a basic model or service model of a large language model, and this application does not impose any special restrictions on this.
[0069] It should be noted that, an offline calculation method can be used to perform feature extraction on the expression text contained in each medical examination reasoning knowledge item stored in the above-mentioned medical examination reasoning knowledge base in advance, obtain a feature vector corresponding to the expression text contained in each medical examination reasoning knowledge item, and store the obtained feature vector in correspondence with each medical examination reasoning knowledge item, and then directly obtain the stored feature vector corresponding to the expression text contained in each medical examination reasoning knowledge item. Alternatively, an online calculation method can be used to perform feature extraction on the expression text contained in each medical examination reasoning knowledge item stored in the above-mentioned medical examination reasoning knowledge base in real time after obtaining the above-mentioned target expression text, and obtain a feature vector corresponding to the expression text contained in each medical examination reasoning knowledge item.
[0070] Step 206: construct a sample based on the extracted medical examination reasoning knowledge, and construct a prompt text based on the sample and the target performance text.
[0071] In this embodiment, when medical examination reasoning knowledge matching the target expression text is extracted from the medical examination reasoning knowledge base, a sample can be constructed based on the extracted medical examination reasoning knowledge, and the number of constructed samples can be limited and small. After the sample is constructed, a prompt text of a large language model can be further constructed based on the sample and the target expression text.
[0072] In practical applications, the constructed samples can be provided to the model in a small sample learning manner, that is, before the model receives the actual question, several complete examples containing questions and answers are shown to guide the model to learn how to generate corresponding answers based on the question. For example, when further constructing the prompt text of the large language model based on the constructed sample and the above-mentioned target expression text, the sample can be placed before the target expression text, and by adding context information, the large language model can learn for the sample and learn how to generate the corresponding conclusion text based on the expression text shown in the sample, so that it can reason based on the target expression text to generate the corresponding conclusion text.
[0073] In some embodiments, as described above, a medical examination reasoning knowledge entry stored in the above-mentioned medical examination reasoning knowledge base may include a performance text and a conclusion text corresponding to the medical examination, as well as a description text of the reasoning steps of inferring the conclusion text from the performance text. In this case, a limited and small number of thought chain samples can be constructed based on the extracted medical examination reasoning knowledge. After constructing the thought chain sample, the prompt text of the large language model can be further constructed based on the thought chain sample and the above-mentioned target performance text.
[0074] Thought chaining is a way of thinking or problem-solving strategy, especially in the fields of artificial intelligence and cognitive science, which emphasizes the step-by-step logical reasoning process of problem solving. Thought chaining can be introduced into the training and use of large language models, aiming to enhance the model's ability to interpret and solve complex problems by explicitly expressing the intermediate reasoning steps.
[0075] Thinking chain emphasizes breaking down the problem-solving process into a series of sequential, logically related steps, which includes identifying the key elements of the problem, listing possible solution paths, and evaluating the feasibility of each path until the final answer is reached. By including the thinking and reasons for each step in the input or output of the model, the decision-making process becomes transparent, which is critical for understanding the decision logic of the model and improving interpretability. The purpose of thinking chain is to make the machine's thinking process closer to that of humans. By imitating how humans think step by step to solve complex problems, it helps the model make reasonable inferences in the absence of direct training data.
[0076] It should be noted that the specific implementation of the thought chain can involve constructing a training data set containing intermediate reasoning steps, or directly embedding this step-by-step reasoning format in the Prompt of the large language model, guiding the large language model to generate the thinking process or reasoning steps behind it while generating the answer.
[0077] Thought chain samples can contain key content such as problem statements, intermediate reasoning steps, and final answers, which are used to guide and train large language models for step-by-step logical reasoning and problem solving.
[0078] The problem statement is a specific problem or task description that needs to be solved, which can be a math problem, logical reasoning, fact query, or any inquiry that requires a series of thinking steps to get an answer. In the thinking chain sample constructed in this embodiment, the problem statement can include a performance text corresponding to the medical examination.
[0079] The intermediate reasoning step is the core part of the thinking chain sample, which includes a series of logical reasoning, calculations or analyses that start from the problem and gradually derive the answer. Each step should be coherent, and the previous step should reasonably lead to the next step until the final answer is reached. For example, when solving math problems, this may involve formula application, variable substitution, calculation simplification, etc.; in logical reasoning tasks, it may include premise analysis, hypothesis verification, etc. In the thinking chain sample constructed in this embodiment, the intermediate reasoning step may include a descriptive text of the reasoning step of inferring the conclusion text corresponding to the medical examination from the performance text corresponding to the medical examination.
[0080] The final answer is the answer to the question that is clearly given after all the intermediate reasoning steps. This answer should be the natural result of the reasoning chain and closely connected with the previous reasoning steps. In the thinking chain sample constructed in this embodiment, the final answer can include the conclusion text corresponding to the medical examination.
[0081] In practical applications, the thought chain sample can guide the model through complete examples of questions, intermediate reasoning steps and answers, and learn to imitate such reasoning patterns. For example, when further constructing the prompt text of the large language model based on the constructed thought chain sample and the above-mentioned target performance text, the thought chain sample can be placed before the target performance text, and by adding context information, the large language model first learns the thought chain sample, learns the reasoning pattern shown by the thought chain sample, and then imitates such reasoning pattern, performs reasoning based on the target performance text, and outputs the reasoning steps in this reasoning process, as well as the reasoned conclusion text.
[0082] Step 208: Input the prompt text into a large language model, and the large language model outputs a target conclusion text corresponding to the target medical examination obtained by reasoning based on the target performance text under the guidance of the sample.
[0083] In this embodiment, when the above-mentioned prompt text is constructed, the prompt text can be input into the large language model, and the large language model outputs the conclusion text corresponding to the above-mentioned target medical examination obtained by reasoning based on the above-mentioned target expression text contained in the prompt text under the guidance of the above-mentioned sample contained in the prompt text, that is, the above-mentioned target conclusion text. Specifically, the large language model can first learn the sample, learn how to generate the corresponding conclusion text based on the expression text shown in the sample, and then reason based on the target expression text to generate the target conclusion text.
[0084] In some embodiments, as described above, the prompt text can be constructed based on the thought chain sample and the target expression text. In this case, the large language model can respond to the prompt text and output a description text (which can be called a target description text) of the reasoning steps based on the target expression text under the guidance of the thought chain sample, and output the above-mentioned target conclusion text at the same time. Specifically, the large language model can first learn the thought chain sample, learn the reasoning pattern shown by the thought chain sample, and then imitate such a reasoning pattern, reason based on the target expression text, and output the target description text used to describe the reasoning steps in this reasoning process, as well as the inferred target conclusion text.
[0085] In some embodiments, in order to further improve the accuracy of the generated target conclusion text, the description text and / or the target conclusion text output by the large language model may be regularized.
[0086] Regular expression verification is verification based on regular expressions. By performing regular expression verification on the text generated by the large language model, it can be ensured that the generated text meets specific format or pattern requirements; for example, ensuring that the generated text meets the expected data format standard helps to filter out non-standard content and ensure data quality and consistency; by matching specific keywords or patterns through regular expressions, it can be used to filter out text containing sensitive words, illegal content, or text that does not comply with policy regulations to maintain content compliance; in some highly formatted text generation tasks, regular expressions can be used to check whether there are grammatical errors or inconsistencies in the text.
[0087] If the regular check of the above-mentioned target description text passes, the above-mentioned target expression text and the above-mentioned target description text can be stored as medical examination reasoning knowledge in the above-mentioned medical examination reasoning knowledge base to update the medical examination reasoning knowledge stored in the medical examination reasoning knowledge base.
[0088] Alternatively, if the regular check of the above-mentioned target description text and the above-mentioned target conclusion text passes, the above-mentioned target expression text, the above-mentioned target conclusion text and the above-mentioned target description text can be stored as medical examination reasoning knowledge in the above-mentioned medical examination reasoning knowledge base to update the medical examination reasoning knowledge stored in the medical examination reasoning knowledge base.
[0089] In addition, a medical report corresponding to the target medical examination may be generated based on the target performance text and the target conclusion text, and the medical report may be output to a user corresponding to the target medical examination.
[0090] In some embodiments, if the regularization check of the above-mentioned target description text and / or the above-mentioned target conclusion text fails, the above-mentioned steps 204 to 208 can be re-executed, that is, the medical examination reasoning knowledge matching the above-mentioned target expression text can be re-extracted from the above-mentioned medical examination reasoning knowledge base, and a sample (specifically, a thinking chain sample) is constructed based on the extracted medical examination reasoning knowledge, and a prompt text is constructed based on the sample and the target expression text, and the prompt text is input into the above-mentioned large language model, and the large language model outputs the target conclusion text obtained by reasoning based on the target expression text under the guidance of the sample; or, the large language model outputs the target description text of the reasoning steps of reasoning based on the target expression text under the guidance of the sample, and the inferred target conclusion text.
[0091] As mentioned above, a medical examination reasoning knowledge entry stored in the above medical examination reasoning knowledge base may include a representation text and a conclusion text corresponding to the medical examination, and a description text of the reasoning steps for inferring the conclusion text from the representation text. The following describes in detail the reasoning steps for inferring the conclusion text from the representation text.
[0092] Please refer to Figure 3 , Figure 3 It is a schematic diagram of the reasoning steps of inferring the conclusion text from the presentation text, shown in an exemplary embodiment of the present application.
[0093] like Figure 3 As shown, the reasoning steps of inferring the above conclusion text from the above performance text may specifically include the following steps:
[0094] Step 302: Convert the presentation text into structured text; wherein the structured text includes at least one text substructure.
[0095] Step 304: Determine sub-conclusion texts corresponding to each text substructure included in the structured text.
[0096] Step 306: Integrate the sub-conclusion texts corresponding to the various text substructures to generate the conclusion text.
[0097] In this embodiment, the presentation text can be first converted into a structured text including at least one text substructure, and then the sub-conclusion texts corresponding to the various text substructures included in the structured text can be determined. Finally, the sub-conclusion texts corresponding to the various text substructures included in the structured text can be integrated to generate the conclusion text.
[0098] In this case, in order to reduce the amount of data of the medical examination reasoning knowledge stored in the above-mentioned medical examination reasoning knowledge base and reduce the storage cost, the above-mentioned description text can be simplified, that is, for a medical examination reasoning knowledge item, the medical examination reasoning knowledge item can include a representation text and a conclusion text corresponding to the medical examination, as well as a structured text converted from the representation text and a sub-conclusion text corresponding to each text substructure included in the structured text, as shown in the following Table 1:
[0099] Table 1
[0100]
[0101] Correspondingly, when generating thought chain samples based on simplified medical examination reasoning knowledge, context information can be supplemented so that the structured text converted from the expression text and the sub-conclusion text corresponding to each text substructure included in the structured text are completed into a descriptive text of the reasoning steps of inferring the corresponding conclusion text from the expression text.
[0102] In some embodiments, the text substructure may include a text key-value pair, wherein for a text key-value pair, the key in the text key-value pair may be a text identifying the part to be examined, and the value in the text key-value pair may be a text representing the part to be examined.
[0103] In some embodiments, when the sub-conclusion texts corresponding to the various text substructures included in the above-mentioned structured text are integrated to generate the above-mentioned conclusion text, in order to ensure that the generated conclusion text is simple and clear, the sub-conclusion texts indicating abnormalities of the examined parts in the sub-conclusion texts corresponding to the various text substructures included in the structured text can be spliced to generate the conclusion text.
[0104] For example, suppose a performance text is "The prostate volume increases and protrudes upward to the bottom of the bladder. No obvious abnormal signal is found in the prostate on T1WI. On T2WI, nodular and slightly high signal shadows are found in the transition zone to the left of the prostate. DWI shows high signal, and after enhancement, it is obviously unevenly enhanced. No obvious abnormality is found in the bilateral seminal vesicles, and the bladder seminal vesicle angle exists. No obvious abnormal signal shadow is found in the bladder cavity. No obvious enlarged lymph nodes are found in the pelvic floor and bilateral inguinal areas, and there is a small amount of fluid in the pelvic cavity. No obvious abnormal signal changes are found in the bones of the pelvis. A small abnormal signal shadow of the left femoral head is scanned." Then the structured text converted from the performance text can include the following text key-value pairs:
[0105] (prostate gland, enlarged in size);
[0106] (The transition zone on the left side of the prostate, nodular and slightly high signal shadows);
[0107] (No abnormalities were found in the seminal vesicle and bladder seminal vesicle angle);
[0108] (bladder cavity, no abnormality found);
[0109] (No obvious enlarged lymph nodes were found in the pelvic floor and bilateral inguinal areas);
[0110] (Pelvic cavity, a little effusion);
[0111] (Pelvic bone, no abnormalities found);
[0112] (Left femoral head, small abnormal signal shadow).
[0113] The sub-conclusion text corresponding to the text key-value pair (prostate, increased volume) can be "prostate hyperplasia", the sub-conclusion text corresponding to the text key-value pair (prostate transition zone to the left, nodular and other slightly high signal shadows) can be "Considering the PI-RADS classification, combined with the clinical data, it may be prostate cancer, which requires further evaluation", the sub-conclusion text corresponding to the text key-value pair (seminal vesicle and bladder seminal vesicle angle, no abnormalities found) can be "normal", the sub-conclusion text corresponding to the text key-value pair (bladder cavity, no abnormalities found) can be "normal", and the sub-conclusion text corresponding to the text key-value pair ( The sub-conclusion text corresponding to the text key-value pair (pelvic floor and bilateral inguinal areas, no obvious enlarged lymph nodes) can be "normal", the sub-conclusion text corresponding to the text key-value pair (pelvic cavity, a small amount of effusion) can be "pelvic effusion needs to be combined with clinical evaluation", the sub-conclusion text corresponding to the text key-value pair (pelvic bone, no abnormality) can be "normal", and the sub-conclusion text corresponding to the text key-value pair (left femoral head, small abnormal signal shadow) can be "need to combine clinical consideration to see if it is related to the tumor, consider further imaging or biomarker examination". Finally, the sub-conclusion texts indicating abnormalities in the examined parts can be spliced, and the generated conclusion text can be "prostate hyperplasia, considering PI-RADS classification, combined with clinical, it may be prostate cancer, which needs further evaluation. Pelvic effusion needs to be combined with clinical evaluation. It needs to be combined with clinical consideration to see if it is related to the tumor, consider further imaging or biomarker examination".
[0114] In some embodiments, the generated conclusion text may not only include a sub-conclusion text indicating an abnormality in the examined part, but may also include additional context. The additional context may refer to background knowledge, environmental information, context clues, and additional instructions related to the corresponding performance text, which can help the generated conclusion text better follow the intention, meet the needs, and ensure the accuracy and coherence of the conclusion text. In practical applications, the additional context may be the context in the corresponding performance text, user personal information, domain knowledge, spatiotemporal background, implicit social and cultural common sense, etc.
[0115] Continuing with the above example, the final generated conclusion text may be "Prostate hyperplasia, nodular and other slightly high signal shadows are present in the transition zone to the left of the prostate. Considering the PI-RADS classification and clinical analysis, it may be prostate cancer and requires further evaluation. There is a small amount of fluid in the pelvic cavity, which requires clinical evaluation. A small abnormal signal shadow is seen in the left femoral head, which requires clinical consideration to determine whether it is related to the tumor, and further imaging or biomarker examinations should be considered."
[0116] In such Figures 1 to 3In the technical solution provided by the illustrated embodiment, for the target expression text corresponding to the target medical examination, medical examination reasoning knowledge matching the target expression text can be first extracted from the medical examination reasoning knowledge base, and the medical examination reasoning knowledge can include the expression text and conclusion text corresponding to the medical examination. Then, a sample can be constructed based on the extracted medical examination reasoning knowledge, and a prompt text can be further constructed based on the sample and the target expression text. Finally, the prompt text can be input into a large language model, and the large language model outputs the target conclusion text corresponding to the target medical examination obtained by reasoning based on the target expression text under the guidance of the sample.
[0117] By adopting the above method, on the one hand, it is no longer necessary for doctors or medical professionals to manually determine the medical examination conclusion corresponding to the medical examination based on the medical examination performance corresponding to the medical examination. Instead, a large language model can be used to infer based on the medical examination performance to generate the corresponding medical examination conclusion, thereby improving the efficiency of generating the medical examination conclusion. On the other hand, samples can be generated based on medical examination reasoning knowledge matching the medical examination performance, and the large language model can learn how to generate the corresponding conclusion text based on the performance text shown by the sample, and then infer based on the medical examination performance to generate the corresponding medical examination conclusion, thereby improving the pertinence of the generated medical examination conclusion and improving the accuracy of the generated medical examination conclusion. On the other hand, the prompt text of the large language model can be further constructed based on the constructed sample and medical examination performance, that is, the sample can be provided to the large language model in a small sample learning manner, so that the language model can be effectively learned on a limited and small number of samples, reducing the difficulty of training the large language model.
[0118] Corresponding to the aforementioned method embodiments, the present application also provides device embodiments.
[0119] Please refer to Figure 4 , Figure 4 It is a structural diagram of a device shown in an exemplary embodiment of the present application. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408 and a non-volatile memory 410, and of course may also include other required hardware. One or more embodiments of the present application can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of the present application do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic module, but can also be hardware or logic devices.
[0120] Please refer to Figure 5 , Figure 5 It is a block diagram of a medical examination conclusion generating device based on a large language model, shown as an exemplary embodiment of the present application.
[0121] The above-mentioned medical examination conclusion generation device based on large language model can be applied to Figure 4 The device shown is used to implement the technical solution of the present application. The device includes:
[0122] An acquisition module 502 acquires a target performance text corresponding to a target medical examination;
[0123] An extraction module 504 extracts medical examination reasoning knowledge matching the target expression text from a medical examination reasoning knowledge base; wherein the medical examination reasoning knowledge includes the expression text and conclusion text corresponding to the medical examination;
[0124] A construction module 506 constructs a sample based on the extracted medical examination reasoning knowledge, and constructs a prompt text based on the sample and the target performance text;
[0125] The output module 508 inputs the prompt text into a large language model, and the large language model outputs a target conclusion text corresponding to the target medical examination obtained by reasoning based on the target performance text under the guidance of the sample.
[0126] In some embodiments, the medical examination reasoning knowledge further includes a description text of the reasoning steps of inferring the conclusion text from the performance text; the sample is a thought chain sample;
[0127] The step of inputting the prompt text into a large language model, and outputting a target conclusion text corresponding to the target medical examination obtained by reasoning based on the target performance text under the guidance of the sample, by the large language model, includes:
[0128] The prompt text is input into a large language model, and the large language model outputs a target description text of the reasoning steps based on the target performance text under the guidance of the thought chain sample, as well as the inferred target conclusion text corresponding to the target medical examination.
[0129] In some embodiments, the apparatus further comprises:
[0130] A verification module performs regularization verification on the target description text and the target conclusion text;
[0131] The storage module stores the target performance text, the target conclusion text and the target description text as medical examination reasoning knowledge in the medical examination reasoning knowledge base if the regular check passes.
[0132] In some embodiments, the apparatus further comprises:
[0133] The generation module generates a medical report corresponding to the target medical examination based on the target performance text and the target conclusion text if the regular check passes, and outputs the medical report to the user corresponding to the target medical examination.
[0134] In some embodiments, the extraction module, the construction module and the output module are further used to:
[0135] If the regular check fails, medical examination reasoning knowledge that matches the target expression text is re-extracted from the medical examination reasoning knowledge base, a thought chain sample is constructed based on the extracted medical examination reasoning knowledge, and a prompt text is constructed based on the thought chain sample and the target expression text, and the prompt text is input into the large language model.
[0136] In some embodiments, the inference step of inferring the conclusion text from the performance text includes:
[0137] Converting the presentation text into a structured text; wherein the structured text includes at least one text substructure;
[0138] Determining sub-conclusion texts corresponding to each text substructure included in the structured text;
[0139] The sub-conclusion texts corresponding to the respective text substructures are integrated to generate the conclusion text.
[0140] In some embodiments, the text substructure includes a text key-value pair; wherein the key in the text key-value pair is the inspected part identification text, and the value in the text key-value pair is the inspected part representation text.
[0141] In some embodiments, the integrating the sub-conclusion texts corresponding to the respective text substructures to generate the conclusion text includes:
[0142] The sub-conclusion texts indicating abnormality of the examined part in the sub-conclusion texts corresponding to the respective text sub-structures are concatenated to generate the conclusion text.
[0143] For the device embodiment, it basically corresponds to the method embodiment, so the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the technical solution of the present application.
[0144] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0145] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0146] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0147] Computer readable media include permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0148] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device 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, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0149] The above specific embodiments of the present application are described. Other embodiments are within the scope of the present application. In some cases, the actions or steps recorded in the present application can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0150] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings. The term "and / or" refers to and includes any or all possible combinations of one or more associated listed items.
[0151] The description of the terms "one embodiment", "some embodiments", "example", "specific example" or "an implementation method" etc. used in one or more embodiments of the present application means that the specific features or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present application. The schematic description of these terms is not necessarily for the same embodiment. Moreover, the specific features or characteristics described can be combined in a suitable manner in one or more embodiments of the present application. In addition, different embodiments and specific features or characteristics in different embodiments can be combined without contradicting each other.
[0152] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".
[0153] The above description is merely a preferred embodiment of one or more embodiments of the present application and is not intended to limit one or more embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application shall be included in the scope of protection of one or more embodiments of the present application.
[0154] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A method for generating a medical examination conclusion based on a large language model, the method comprising: Obtaining target performance text corresponding to the target medical examination; Extracting medical examination reasoning knowledge matching the target expression text from a medical examination reasoning knowledge base; wherein the medical examination reasoning knowledge includes the expression text and conclusion text corresponding to the medical examination, and a description text of the reasoning steps of inferring the conclusion text from the expression text; Constructing a thought chain sample based on the extracted medical examination reasoning knowledge, and constructing a prompt text based on the sample and the target performance text; The prompt text is input into a large language model, and the large language model outputs a target description text of the reasoning steps based on the target performance text under the guidance of the thought chain sample, as well as the inferred target conclusion text corresponding to the target medical examination.
2. The method according to claim 1, further comprising: Performing regularization verification on the target description text and the target conclusion text; If the regular check passes, the target performance text, the target conclusion text and the target description text are taken as medical examination reasoning knowledge and stored in the medical examination reasoning knowledge base.
3. The method according to claim 2, further comprising: If the regular check passes, a medical report corresponding to the target medical examination is generated based on the target performance text and the target conclusion text, and the medical report is output to a user corresponding to the target medical examination.
4. The method according to claim 2, further comprising: If the regular check fails, medical examination reasoning knowledge that matches the target expression text is re-extracted from the medical examination reasoning knowledge base, a thought chain sample is constructed based on the extracted medical examination reasoning knowledge, and a prompt text is constructed based on the thought chain sample and the target expression text, and the prompt text is input into the large language model.
5. According to the method of claim 1, the inference step of inferring the conclusion text from the performance text comprises: Converting the presentation text into a structured text; wherein the structured text includes at least one text substructure; Determining sub-conclusion texts corresponding to each text substructure included in the structured text; The sub-conclusion texts corresponding to the respective text substructures are integrated to generate the conclusion text.
6. The method according to claim 5, wherein the text substructure comprises text key-value pairs; wherein, The key in the text key-value pair is the inspected part identification text, and the value in the text key-value pair is the inspected part representation text.
7. The method according to claim 5, wherein the sub-conclusion texts corresponding to the respective text substructures are integrated to generate the conclusion text, comprising: The sub-conclusion texts indicating abnormality of the examined part in the sub-conclusion texts corresponding to the respective text sub-structures are concatenated to generate the conclusion text.
8. A device for generating a medical examination conclusion based on a large language model, the device comprising: An acquisition module, acquiring a target performance text corresponding to a target medical examination; An extraction module extracts medical examination reasoning knowledge matching the target expression text from a medical examination reasoning knowledge base; wherein the medical examination reasoning knowledge includes the expression text and conclusion text corresponding to the medical examination, and a description text of the reasoning steps of inferring the conclusion text from the expression text; A construction module, which constructs a thought chain sample based on the extracted medical examination reasoning knowledge, and constructs a prompt text based on the sample and the target performance text; An output module inputs the prompt text into a large language model, and the large language model outputs a target description text of the reasoning steps based on the target performance text under the guidance of the thought chain sample, as well as an inferred target conclusion text corresponding to the target medical examination.
9. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 7 by running the executable instructions.
10. A computer-readable storage medium having computer instructions stored thereon, wherein the instructions are executed by a processor to implement the method according to any one of claims 1 to 7.
