A Tumor Imaging Intelligent Diagnosis Method Based on Large Language Model Instruction Engineering
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-08-11
AI Technical Summary
但是,现有基于大语言模型的医学影像辅助诊断方案仍存在以下问题:一是多数方案仅采用简单提示词进行单轮问答,缺乏系统化指令工程设计,导致模型输出稳定性较差;二是不同病例复杂程度差异较大,而现有系统通常采用固定推理方式,无法根据病灶复杂程度动态调整推理策略;三是现有方案缺乏有效的知识增强机制,模型容易产生与临床指南不一致的诊断结果;四是部分方案虽然能够输出诊断结果,但缺乏多路径推理、一致性校验及风险控制机制,难以满足真实临床场景下对可靠性和可解释性的要求;五是现有系统大多仅给出单次诊断结果,缺乏对诊断稳定性、证据可信度及推理一致性的综合分析能力,因此在复杂恶性肿瘤影像诊断中仍存在较大的应用局限性
1、本发明通过对影像报告、临床病史、实验室检查结果及病理信息进行统一标准化处理,并结合病灶特征解析、病灶复杂度评估及多层级指令工程策略,实现了肿瘤影像诊断过程中多源信息的协同分析。与传统仅依赖单一影像特征或固定提示词的大语言模型诊断方式相比,本发明能够根据病灶复杂程度动态选择单步推理、思维链推理、思维树推理及推理与行动交替策略,提高复杂病例中的信息分析能力,使模型在不同癌种、不同影像表现及不同临床场景下均具有较好的适应能力,从而提高肿瘤影像辅助诊断结果的准确性与稳定性。
Smart Images

Figure CN122552099A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence-assisted diagnosis technology in medical imaging, and more specifically, to an intelligent diagnostic method for tumor images based on large language model instruction engineering. Background Technology
[0002] Medical imaging technology is one of the core techniques in the screening, diagnosis, staging, efficacy evaluation, and prognostic analysis of malignant tumors. Clinically, imaging examinations such as CT, MRI, ultrasound, and PET-CT are commonly used to analyze the location, morphology, boundaries, enhancement patterns, and invasion of surrounding tissues of lesions, thereby assisting radiologists in determining the nature of the tumor and making differential diagnoses. Especially for common malignant tumors such as lung cancer, breast cancer, liver cancer, gastric cancer, and prostate cancer, imaging examinations have become a crucial link in the clinical diagnosis and treatment process.
[0003] Currently, tumor imaging diagnosis relies primarily on manual image interpretation by radiologists. Because the imaging manifestations of different tumors vary significantly, and some malignant tumors lack typical imaging features in their early stages, radiologists need to analyze not only the morphological appearance of the lesion itself but also to make a comprehensive judgment based on the patient's clinical history, laboratory test results, and previous treatment information. In actual clinical practice, complex cases often present with atypical lesion enhancement patterns, overlapping imaging features, and inconspicuous abnormalities in laboratory indicators, leading to diagnostic discrepancies between radiologists of different experience levels. Simultaneously, the continuous increase in the number of imaging examinations in large hospitals places radiologists under high-intensity image interpretation conditions, increasing the likelihood of missed diagnoses, misdiagnoses, and insufficient report consistency.
[0004] With the development of artificial intelligence (AI) technology, deep learning models are increasingly being applied to the field of medical image analysis. Currently, some AI systems can perform tasks such as lung nodule detection, lesion segmentation, tumor classification, and image report generation, improving image analysis efficiency to some extent. However, most existing medical imaging AI models are typically trained for a single organ or a single disease, resulting in poor generalization ability and difficulty in applying them to complex scenarios involving multiple cancer types. Furthermore, traditional deep learning models often only analyze the image itself, lacking the ability to comprehensively utilize clinical history, laboratory test results, and medical knowledge; therefore, their auxiliary diagnostic capabilities in complex cases remain limited.
[0005] In recent years, large language models have demonstrated strong capabilities in natural language understanding, knowledge reasoning, and medical question answering, and some studies have begun to explore their use in assisting radiology report analysis and image diagnosis. However, existing medical image-assisted diagnostic solutions based on large language models still suffer from the following problems: First, most solutions only use simple prompts for single-round question answering, lacking systematic instruction engineering design, resulting in poor model output stability; second, different cases vary greatly in complexity, while existing systems typically use fixed reasoning methods and cannot dynamically adjust reasoning strategies according to the complexity of lesions; third, existing solutions lack effective knowledge enhancement mechanisms, making it easy for models to produce diagnostic results inconsistent with clinical guidelines; fourth, while some solutions can output diagnostic results, they lack multi-path reasoning, consistency verification, and risk control mechanisms, making it difficult to meet the reliability and interpretability requirements of real clinical scenarios; fifth, most existing systems only provide a single diagnostic result, lacking the ability to comprehensively analyze diagnostic stability, evidence credibility, and reasoning consistency, thus limiting their application in the diagnosis of complex malignant tumors.
[0006] Therefore, there is an urgent need for an intelligent diagnostic method for tumor imaging based on large language model instruction engineering to solve these problems. Summary of the Invention
[0007] The purpose of this invention is to solve the technical problems mentioned in the background section and to provide an intelligent diagnostic method for tumor images based on large language model instruction engineering.
[0008] The above-mentioned objective of the present invention is achieved as follows: A tumor imaging intelligent diagnosis method based on large language model instruction engineering includes the following steps: S1. Obtain the original diagnosis and treatment data of the patient to be diagnosed, and perform desensitization, field standardization and structured coding on the original diagnosis and treatment data to form standardized input data; S2. Perform lesion image feature analysis on the standardized input data, extract lesion location, lesion size, lesion edge morphology, enhancement mode, density features, signal features and tumor-related laboratory indicators, and generate lesion feature vector; S3. Based on the lesion feature vector, perform cancer type identification and lesion complexity assessment, and automatically match the corresponding instruction engineering strategy according to the cancer type and lesion complexity level; S4. Construct a diagnostic prompt context based on the matched instruction engineering strategy. The diagnostic prompt context includes at least role definition information, task constraint information, reasoning path information, knowledge retrieval information, and output format constraint information. S5. Based on the diagnostic prompt context, the knowledge enhancement module is invoked to retrieve the target knowledge fragment corresponding to the current lesion features from the medical knowledge vector database and generate an enhanced diagnostic context; S6. Input the enhanced diagnostic context into the large language model to perform multi-round reasoning analysis and generate candidate diagnostic results, imaging evidence results and differential diagnostic results; S7. Perform consistency verification and multi-path voting analysis on the candidate diagnostic results to generate the final diagnostic results and diagnostic confidence. S8. Generate a structured tumor imaging diagnostic report based on the final diagnostic results, diagnostic confidence level, and imaging evidence, and output it to the user interaction terminal.
[0009] As a preferred technical solution of the present invention, the original diagnostic and treatment data in step S1 includes at least image description data, image conclusion data, clinical history data, laboratory test data, and pathological test data; wherein, the laboratory test data includes tumor marker data, blood routine data, liver function data, and coagulation function data; and the data fields from different sources are uniformly semantically encoded through preset field mapping rules.
[0010] As a preferred technical solution of the present invention, the lesion image feature analysis in step S2 includes: Medical named entity recognition for image report text; Extract the organ location, morphological description, and enhancement feature description of the lesion; The characteristics of lesion margins, lobulation, spiculation, calcification, necrosis, enhancement degree, and restricted diffusion are converted into standardized labels; And generate lesion feature vectors according to preset feature encoding rules.
[0011] As a preferred technical solution of the present invention, the lesion complexity assessment in step S3 includes: A lesion complexity score is generated based on the number of lesions, lesion heterogeneity, image description length, number of abnormal laboratory indicators, and number of differential diagnoses. When the lesion complexity score is lower than the first threshold, the single-step inference strategy is invoked; When the lesion complexity score is between the first and second thresholds, the thought chain reasoning strategy is invoked. When the lesion complexity score is higher than the second threshold, the mind tree reasoning strategy and the ReAct reasoning strategy are invoked to jointly execute multi-path reasoning.
[0012] As a preferred technical solution of the present invention, the diagnostic prompt context in step S4 includes: Role definition hints used to restrict the identity of the model; Task constraint hints used to limit the number and order of outputs; Inference chain hints used to guide the model to progressively analyze lesion location, lesion enhancement characteristics, and malignancy risk; JSON format hints used to constrain the output structure; And safety constraint hints used to limit the range of model generation.
[0013] As a preferred technical solution of the present invention, the knowledge enhancement module in step S5 is constructed using a retrieval enhancement generation mechanism, specifically including: Establish a medical knowledge vector database that includes imaging textbooks, clinical guidelines, standard textbooks, and expert consensus. Vectorize knowledge text using a text embedding model; Generate a retrieval vector based on the lesion feature vector; Perform constrained searches based on cancer type and imaging modality; Target knowledge fragments are retrieved from a medical knowledge vector database based on vector similarity. The target knowledge fragment is then used as an enhanced context input to the large language model.
[0014] As a preferred embodiment of the present invention, step S5 further includes a dynamic retrieval control step, which includes: When the confidence level of the first round of diagnosis is lower than the preset confidence threshold, the scope of knowledge retrieval is automatically expanded. Increase the number of knowledge recalls; Add knowledge snippets about similar cases of related cancers; After regenerating the enhanced diagnostic context, multiple rounds of inference analysis are performed again.
[0015] As a preferred technical solution of the present invention, the multi-round reasoning analysis in step S6 includes: The first reasoning path is generated based on the initial diagnostic results; A second reasoning path is generated based on the differential diagnosis results; A third reasoning path is generated based on the knowledge enhancement results; Cross-validate multiple inference paths; It outputs multiple candidate diagnostic results and their corresponding diagnostic criteria.
[0016] As a preferred technical solution of the present invention, the consistency verification and multi-path voting analysis in step S7 includes: Perform at least three independent sampling inferences on the same input data; Statistically analyze the frequency of occurrence of each candidate diagnosis result; Calculate the semantic consistency between different reasoning paths; The diagnostic confidence score is generated by combining knowledge matching degree, reasoning stability, and the frequency of occurrence of diagnostic results. The candidate diagnostic result with the highest frequency and the highest consistency score was determined as the final diagnostic result.
[0017] As a preferred embodiment of the present invention, it further includes an intelligent diagnostic device deployment step, wherein the intelligent diagnostic device deployment step includes: Construct a user interaction layer, an instruction engine layer, a knowledge enhancement layer, a reasoning control layer, and an output optimization layer; Receive diagnostic requests via a web interface or hospital information system interface; Dynamically allocate model inference resources based on the number of concurrent requests; Real-time monitoring of model response time, output error rate, and system operating status; When the diagnostic confidence level is lower than the preset risk threshold, the manual review mechanism is triggered and a risk warning message is output. The large language model includes at least one of DeepSeek's DeepSeek series models and Alibaba's Qwen series models.
[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention achieves collaborative analysis of multi-source information in tumor imaging diagnosis by standardizing and unifying the processing of imaging reports, clinical history, laboratory test results, and pathological information, combined with lesion feature analysis, lesion complexity assessment, and multi-level instruction engineering strategies. Compared with traditional large language model diagnostic methods that rely solely on single imaging features or fixed prompts, this invention can dynamically select single-step reasoning, thought chain reasoning, thought tree reasoning, and alternating reasoning and action strategies based on the complexity of the lesion. This improves the information analysis capability in complex cases, giving the model better adaptability to different cancer types, different imaging manifestations, and different clinical scenarios, thereby improving the accuracy and stability of tumor imaging-assisted diagnostic results.
[0019] 2. This invention constructs a medical knowledge vector database and, combined with a retrieval enhancement generation mechanism, enables the dynamic retrieval of knowledge fragments from imaging textbooks, clinical guidelines, expert consensus, and typical cases. This allows the large language model to incorporate clinical knowledge for auxiliary analysis during the reasoning process. Simultaneously, this invention employs multi-path reasoning, consistency verification, evidence credibility analysis, and multiple independent sampling voting mechanisms to verify the stability and control risks of diagnostic results. This reduces the randomness of model outputs in complex cases and automatically triggers re-retrieval or manual review processes when retrieval relevance is insufficient, reasoning paths are inconsistent, or diagnostic confidence is low, thereby improving the reliability and clinical interpretability of the system's output results.
[0020] 3. This invention constructs an intelligent diagnostic architecture for tumor imaging, comprising a user interaction layer, an instruction engine layer, a knowledge enhancement layer, a reasoning control layer, and an output optimization layer. It can interact with hospital information systems, image archiving and communication systems, and laboratory information systems to achieve intelligent and structured output of the tumor imaging-assisted diagnostic process. The system can automatically generate structured diagnostic reports containing lesion characteristics, diagnostic results, differential diagnoses, diagnostic basis, and risk warnings. This reduces the workload of radiologists in repetitive image reading and report compilation, improves the efficiency of imaging diagnosis, and provides stable auxiliary decision support for primary hospitals or complex case diagnostic scenarios, demonstrating significant clinical application value. Attached Figure Description
[0021] Figure 1 This is a flowchart of an intelligent tumor imaging diagnostic method based on large language model instruction engineering; Figure 2 This is a flowchart illustrating how the knowledge enhancement module is constructed using a retrieval enhancement generation mechanism. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the following description is provided in conjunction with embodiments and appendices. Figure 1-2 The present invention will be further described in detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0023] The present invention will now be described in further detail with reference to the accompanying drawings.
[0024] Example 1: This embodiment provides an intelligent tumor imaging diagnostic method based on large language model instruction engineering, applicable to the image-assisted diagnosis of common malignant tumors such as lung cancer, breast cancer, rectal cancer, prostate cancer, gastric cancer, and liver cancer. This method achieves intelligent analysis, differential diagnosis, and risk assessment of malignant tumor images by standardizing image reports, clinical history, laboratory test results, and pathological information, combined with multi-level instruction engineering strategies, knowledge enhancement mechanisms, multi-path reasoning mechanisms, and consistency verification mechanisms. The entire system includes a data acquisition module, a data standardization module, a lesion feature analysis module, a complexity assessment module, an instruction engineering module, a knowledge enhancement module, a multi-round reasoning module, a consistency verification module, and a result output module. Data between these modules has a continuous transmission relationship, rather than being independent of each other.
[0025] In practical applications, the system first acquires the patient's original medical data through hospital information systems, image archiving and communication systems, laboratory information systems, or manual input interfaces. This original medical data includes imaging report data, clinical history data, laboratory test data, and pathological examination data. The document specifies that laboratory tests corresponding to different types of cancer include tumor markers, complete blood count, liver function tests, and coagulation function tests.
[0026] Let the original input data set be: ; in, Represents the original input data set; This represents image report data; This represents clinical medical history data; This indicates laboratory test data; This indicates pathological examination data.
[0027] The system first anonymizes patient names, ID numbers, phone numbers, and hospital numbers, and then standardizes and unifies the naming of fields from different sources to obtain a standardized input data set. ; in, Represents a standardized set of input data; Represents the field normalization mapping function; This represents the original input data set.
[0028] In this embodiment, the standardized input data set It is not simply a data definition, but a direct input for subsequent lesion feature extraction.
[0029] The system extracts a set of lesion features based on a standardized input dataset: ; in, Represents a set of lesion features; This represents the lesion feature extraction function; This represents a standardized set of input data.
[0030] The lesion feature set includes lesion location features, lesion size features, lesion edge morphology features, lesion enhancement features, lesion density features, lesion signal features, and laboratory abnormal features: ; in, Represents a set of lesion features; Indicates the location characteristics of the lesion; Indicates the size characteristics of the lesion; Indicates the morphological characteristics of the lesion's edge; Indicates the enhancement characteristics of the lesion; Indicates lesion density characteristics; Indicates the signal characteristics of the lesion; This indicates abnormal characteristics in the laboratory.
[0031] The system further encodes each feature in the lesion feature set numerically to form a lesion feature vector: ; in, Represents the feature vector of the lesion; Indicates the first Weighting coefficients for individual lesion features; Indicates the first Individual lesion characteristics; Indicates the number of lesion features; Indicates the lesion feature number, and .
[0032] Lesion feature vector It is not an isolated intermediate variable, but a common input for subsequent calculations of lesion heterogeneity, complexity scoring, knowledge retrieval, reasoning path generation, and final diagnostic confidence.
[0033] The system first calculates the average value of lesion features based on the lesion feature vector: ; in, This represents the average value of lesion characteristics; Indicates the number of lesion features; Indicates the first Individual lesion characteristics; Indicates the lesion feature number, and .
[0034] Then, the lesion heterogeneity score was calculated based on the average lesion characteristics: ; in, Indicates the lesion heterogeneity score; Indicates the number of lesion features; Indicates the first Individual lesion characteristics; This represents the average value of lesion characteristics; Indicates the lesion feature number, and .
[0035] Lesion heterogeneity score This score indicates the complexity of the internal imaging features of a lesion. When a lesion exhibits multiple imaging features simultaneously, such as lobulation, spiculation, necrosis, ring enhancement, and restricted diffusion, the lesion heterogeneity score increases significantly. The system further generates a lesion complexity score based on the number of lesions, the lesion heterogeneity score, the number of laboratory abnormalities, and the number of differential diagnoses. ; in, Indicates the complexity score of the lesion; This represents the weighting coefficient for the number of lesions; Indicates the number of lesions; Indicates the weighting coefficient for lesion heterogeneity; Indicates the lesion heterogeneity score; Indicates the laboratory anomaly weighting coefficient; Indicates the number of abnormal laboratory indicators; This represents the differential diagnosis weighting coefficient; Indicates the number of differential diagnoses.
[0036] Among them, the lesion complexity score Used for the following three steps: Instruction engineering strategies for selecting large language models; Second, it is used to dynamically determine the number of knowledge recalls; Used to dynamically determine the number of independent samples.
[0037] The system automatically selects the corresponding inference strategy based on the lesion complexity score: ; in, Indicates the selected instruction engineering strategy; This indicates a single-step reasoning strategy; This represents the reasoning strategy of the thought chain; This represents the reasoning strategy of mind trees; This indicates a strategy of alternating between reasoning and action; Indicates the complexity score of the lesion; This represents the first complexity threshold; This represents the second complexity threshold.
[0038] When the lesion complexity score is low, the system can complete the diagnosis using a single-step reasoning strategy. When the lesion complexity score is moderate, the system uses a thought chain reasoning strategy to guide the model to gradually analyze the lesion location, enhancement pattern, and malignancy risk. When the lesion complexity score is high, the system uses a thought tree reasoning strategy and an alternating reasoning and action strategy to generate multiple reasoning paths and calls the knowledge retrieval module for dynamic verification. The document also clearly describes strategies such as zero-sample, few-sample, thought chain, thought tree, ReAct, and retrieval enhancement generation.
[0039] The system also dynamically adjusts the number of knowledge recalled based on the lesion complexity score: ; in, Indicates the number of knowledge recalls; Indicates the number of basic knowledge recalls; This represents the knowledge recall moderating coefficient; This indicates the complexity score of the lesion.
[0040] The system also dynamically adjusts the number of independent samples based on the lesion complexity score: ; in, Indicates the total number of samples; Indicates the basic sampling number; This represents the sampling number adjustment coefficient; This indicates the complexity score of the lesion.
[0041] The system then constructs a diagnostic prompt context: ; in, This indicates the context of the diagnostic prompt; This indicates role definition information; Indicates task constraint information; Indicates inference path information; Represents knowledge retrieval information; This indicates the output format constraint information; This indicates safety constraint information.
[0042] The document outlines several key components: role definition information, task constraint information, and instruction input structure. Role definition information defines the large language model's role as a radiology diagnostic expert. Task constraint information requires the model to output the top three diagnoses, ranked by probability. Inference path information constrains the model to perform step-by-step analysis based on lesion location, lesion enhancement characteristics, laboratory abnormalities, and differential diagnosis. Knowledge retrieval information triggers enhanced retrieval generation. Output format constraint information requires the model to output in JSON format. Safety constraint information restricts the model from outputting definitive conclusions when evidence is insufficient. The document also specifies that the instruction input structure includes role definition, task requirements, clinical information, laboratory results, and image descriptions.
[0043] In the knowledge enhancement phase, the system first establishes a medical knowledge vector database. This database includes knowledge fragments from radiology textbooks, clinical guidelines, standard textbooks, expert consensus, and typical cases. Subsequently, the system uses a text embedding encoding function to vectorize the knowledge text collection. ; in, Represents a set of knowledge vectors; This represents the text embedding encoding function; Represents a collection of knowledge texts.
[0044] The system generates a retrieval vector based on the lesion feature vector and calculates the retrieval relevance between the lesion feature vector and the knowledge vector set. ; in, Indicates the relevance of the search result; Represents the feature vector of the lesion; Represents a set of knowledge vectors; · represents the vector dot product operation; " indicates the vector magnitude.
[0045] The system selects the top results based on search relevance from highest to lowest. Targeted knowledge fragments form an enhanced diagnostic context: ; in, This indicates an enhanced diagnostic context; This indicates the context of the diagnostic prompt; Indicates the first A fragment of target knowledge; Indicates the number of knowledge recalls; Indicates the sequence number of the target knowledge fragment, and .
[0046] When the search relevance is lower than the search relevance threshold, the system automatically expands the scope of knowledge retrieval: ; in, This indicates the expanded number of knowledge recalls; Indicates the number of knowledge recalls; Indicates the retrieval expansion adjustment coefficient; Indicates the retrieval relevance threshold; This indicates the relevance of the search result.
[0047] Therefore, retrieval relevance It is used not only for knowledge fragment filtering but also directly controls whether secondary retrieval is performed. After completing the construction of the enhanced diagnostic context, the system calls the large language model to perform multi-round inference and generate a candidate diagnostic set: ; in, Represents the set of candidate diagnoses; Indicates the first One candidate diagnostic result; Indicates the number of candidate diagnostic results; Indicates the candidate diagnostic result sequence number, and .
[0048] Each candidate diagnosis corresponds to a set of diagnostic evidence: ; in, Indicates the first The set of evidence corresponding to each candidate diagnostic result; Indicates the first Imaging evidence corresponding to each candidate diagnostic result; Indicates the first Laboratory evidence corresponding to each candidate diagnostic result; Indicates the first Clinical history evidence corresponding to each candidate diagnostic result; Indicates the first Knowledge-enhancing evidence corresponding to each candidate diagnostic result; Indicates the candidate diagnostic result sequence number, and .
[0049] The system further calculates the credibility score of the evidence based on the evidence set: ; in, Indicates the credibility score of the evidence; Indicates the weighting coefficient of radiological evidence; Indicates the first Imaging evidence corresponding to each candidate diagnostic result; This represents the weighting coefficient of laboratory evidence; Indicates the first Laboratory evidence corresponding to each candidate diagnostic result; This represents the weighting coefficient of clinical history evidence; Indicates the first Clinical history evidence corresponding to each candidate diagnostic result; This represents the weighting coefficient of knowledge-enhancing evidence; Indicates the first Knowledge-enhancing evidence corresponding to each candidate diagnostic result; Indicates the candidate diagnostic result sequence number, and .
[0050] Therefore, the evidence set It is not only used for definition, but also further involved in the calculation of evidence credibility score.
[0051] The system then calculates the consistency of the inference path: ; in, Indicates consistency of reasoning path; Indicates the number of candidate diagnostic results; Represents a semantic similarity function; Indicates the first One candidate diagnostic result; Indicates the primary diagnostic result; Indicates the candidate diagnostic result sequence number, and .
[0052] When the consistency of the inference path falls below the inference path consistency threshold, the system triggers a self-reflection prompt: ; in, This indicates a marker that triggers self-reflection; Indicates consistency of reasoning path; This represents the inference path consistency threshold.
[0053] The system performs multiple independent sampling inferences on the same case and calculates the frequency of the diagnostic results: ; in, Indicates the frequency of the diagnostic results; Indicates the number of times the target diagnostic result appears; This indicates the total number of samples.
[0054] The system then generates a diagnostic confidence score by comprehensively considering the frequency of diagnostic results, consistency of reasoning paths, relevance of retrieval, credibility of evidence score, and complexity of lesions. ; in, Indicates the confidence level of the diagnosis; This represents the frequency weighting coefficient of the diagnostic results. Indicates the frequency of the diagnostic results; This represents the consistency weight coefficient of the reasoning path; Indicates consistency of reasoning path; This represents the relevance weighting coefficient of the search query. Indicates the relevance of the search result; This represents the weighting coefficient for the credibility score of evidence; Indicates the credibility score of the evidence; This represents the complexity penalty weight coefficient; This indicates the complexity score of the lesion.
[0055] The system ultimately generates an output pattern based on the diagnostic confidence level: ; in, Indicates the output mode; Indicates direct output mode; Indicates a cautious output mode; Indicates manual review mode; Indicates the confidence level of the diagnosis; Indicates a high confidence threshold; This indicates the low confidence threshold.
[0056] Finally, the system generates a structured tumor imaging diagnostic report: ; Among them, Report refers to a structured tumor imaging diagnostic report; Indicates the patient's desensitization number; Loc indicates the lesion location; Feature indicates imaging characteristics; Lab indicates abnormal laboratory findings; This indicates the final diagnosis result; Indicates the results of the differential diagnosis; Indicates the confidence level of a diagnosis; Evidence indicates the basis for a diagnosis. Indicates the output mode.
[0057] Through the above steps, the system first standardizes the patient's original diagnostic data, then extracts and encodes lesion image features, and generates a lesion complexity score by combining lesion heterogeneity, laboratory abnormalities, and the number of differential diagnoses. Subsequently, it automatically selects the corresponding instruction engineering strategy based on the lesion complexity score and dynamically adjusts the knowledge recall quantity and the number of independent samplings. In the knowledge enhancement stage, the system uses lesion feature vectors to retrieve relevant knowledge fragments from the medical knowledge vector database to construct an enhanced diagnostic context. Then, a large language model completes multiple rounds of reasoning analysis to generate candidate diagnostic results and corresponding diagnostic basis. Finally, it generates a diagnostic confidence score by combining retrieval relevance, reasoning path consistency, evidence credibility score, and the frequency of diagnostic results. Based on the diagnostic confidence score, it outputs the corresponding diagnostic result or manual review prompt, thereby improving the accuracy, stability, and clinical assistance capabilities of intelligent tumor imaging diagnostic results.
[0058] Example 2: This example uses a liver tumor imaging-assisted diagnosis scenario in a tertiary hospital to illustrate the intelligent tumor imaging diagnosis method based on large language model instruction engineering described in this invention.
[0059] S1. Obtain the original medical data of the patient to be diagnosed, and perform desensitization, field standardization and structured coding on the original medical data to form standardized input data.
[0060] In this embodiment, the patient was a 58-year-old male with a history of hepatitis B. He underwent an enhanced CT scan of the upper abdomen after a liver lesion was discovered during a physical examination. The system automatically retrieved the patient's imaging report, clinical history, and laboratory test results through the hospital information system, image archiving, and communication system.
[0061] The imaging report described a roundish, low-density lesion in the right lobe of the liver with poorly defined borders. It showed significant enhancement in the arterial phase and decreased enhancement in the portal venous and delayed phases. Necrotic areas were visible within the lesion, accompanied by background changes characteristic of cirrhosis. Laboratory tests showed significantly elevated alpha-fetoprotein (AFP) levels and mildly abnormal liver function.
[0062] The system first desensitizes patient information such as name, ID number, and hospital number, and then standardizes the coding of fields from different sources. For example, different descriptions such as "right lobe of liver lesion," "low-density lesion of liver," and "abnormal enhancement lesion in liver" are uniformly converted into standardized semantic tags related to liver lesions, thereby forming standardized input data.
[0063] S2. Perform lesion image feature analysis on the standardized input data, extract lesion location, lesion size, lesion edge morphology, enhancement mode, density features, signal features and tumor-related laboratory indicators, and generate lesion feature vectors.
[0064] The lesion feature analysis module extracts information such as lesion location, lesion size, lesion margin status, enhancement pattern, necrosis manifestations, and cirrhosis background from the imaging report, and generates lesion feature information by combining it with abnormal alpha-fetoprotein results from laboratory tests.
[0065] The system identified that the current case simultaneously exhibited typical hepatocellular carcinoma-related signs such as "significant enhancement in the arterial phase," "clearing in the portal venous phase," "cirrhosis background," and "elevated alpha-fetoprotein." It also detected complex imaging features such as necrosis within the lesion and unclear boundaries. Therefore, a corresponding lesion feature vector was generated for subsequent complexity assessment and knowledge retrieval.
[0066] S3. Based on the lesion feature vector, perform cancer type identification and lesion complexity assessment, and automatically match the corresponding instruction engineering strategy according to the cancer type and lesion complexity level.
[0067] The system identifies the current case as belonging to the liver tumor diagnosis scenario based on the lesion feature vector, and further determines that the current case has a background of cirrhosis, complex enhancement pattern, obvious abnormal laboratory indicators, and multiple possible differential diagnoses. Therefore, the current case is classified as a complex case.
[0068] After completing the complexity assessment, the system did not adopt a single-step reasoning strategy, but automatically invoked the thought chain reasoning strategy and the reasoning and action alternation strategy to jointly execute multi-path reasoning, in order to improve the analysis capability of complex cases.
[0069] Meanwhile, the system automatically increases the number of knowledge recalls and the number of independent sampling inferences based on the complexity of the lesions, in order to improve the diagnostic stability of complex cases.
[0070] S4. Construct a diagnostic prompt context based on the matched instruction engineering strategy.
[0071] The instruction engine layer first generates a role definition prompt, limiting the model to perform diagnostic tasks as a radiology diagnostic expert; then it generates a task constraint prompt, requiring the model to output the top three possible diagnoses and explain the corresponding imaging evidence; then it generates an inference path prompt, guiding the model to complete the inference step by step in the order of lesion location analysis, enhancement mode analysis, background liver disease analysis, laboratory indicator analysis, and differential diagnosis analysis.
[0072] In addition, the system generates output format constraint prompts, requiring the model to output diagnostic results in structured JSON format, and also generates safety constraint prompts, restricting the model from outputting a definitive diagnosis when there is insufficient evidence.
[0073] S5. Based on the diagnostic prompt context, call the knowledge enhancement module to retrieve the target knowledge fragment corresponding to the current lesion features from the medical knowledge vector database and generate an enhanced diagnostic context.
[0074] The knowledge enhancement layer retrieves relevant knowledge fragments from the medical knowledge vector database based on lesion feature vectors. The retrieved content includes typical enhancement patterns of hepatocellular carcinoma, differential diagnostic criteria for liver lesions in the context of cirrhosis, the clinical significance of elevated alpha-fetoprotein (AFP), and imaging differences between liver metastases and hepatocellular carcinoma.
[0075] Subsequently, the system combines the aforementioned knowledge fragments with the patient's current case information to form an enhanced diagnostic context, which is then input into a large language model for analysis.
[0076] S6. Input the enhanced diagnostic context into the large language model to perform multi-round reasoning analysis and generate candidate diagnostic results, imaging evidence results and differential diagnostic results.
[0077] During the reasoning process, the large language model first gives a preliminary judgment of "hepatocellular carcinoma", and at the same time generates "liver metastasis" and "intrahepatic cholangiocarcinoma" as differential diagnoses.
[0078] The system then asked the model to verify the basis of each diagnostic result and explain the supporting and opposing evidence. The model concluded that features such as "rapid clearance after arterial phase enhancement," "cirrhotic background," and "elevated alpha-fetoprotein" were more consistent with hepatocellular carcinoma, while features such as "multiple lesions" and "significant bile duct dilatation" were missing, thus not supporting the diagnosis of intrahepatic cholangiocarcinoma.
[0079] S7. Perform consistency verification and multi-path voting analysis on the candidate diagnostic results to generate the final diagnostic results and diagnostic confidence.
[0080] To improve output stability, the system performed multiple independent sampling inferences for the same case. In all the inference results, "hepatocellular carcinoma" was ranked as the first diagnosis, with only slight differences in the differential diagnosis order in some samples. Therefore, the system determined that the current diagnosis result has high stability.
[0081] Subsequently, the system combines knowledge retrieval matching, reasoning path consistency, evidence support, and multiple sampling results to generate a high diagnostic confidence for the current case.
[0082] Since the diagnostic confidence level is higher than the high confidence threshold set by the system, the output optimization layer determines the current case as a direct output mode, without having to go through the manual review process.
[0083] S8. Generate a structured tumor imaging diagnostic report based on the final diagnostic results, diagnostic confidence level, and imaging evidence, and output it to the user interaction terminal.
[0084] Finally, the system generates a structured tumor imaging diagnostic report. This report includes the lesion location, lesion imaging characteristics, laboratory abnormalities, final diagnosis, the first three differential diagnoses, diagnostic basis, and treatment recommendations.
[0085] The final diagnosis was "highly probable hepatocellular carcinoma," and further confirmation based on pathological results was recommended.
[0086] After reviewing the results generated by the system, radiologists can directly refer to the imaging evidence and differential diagnosis provided by the system to complete the formal report. Subsequently, the patient can undergo surgery to remove the tumor.
[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent diagnosis of tumor images based on large language model instruction engineering, characterized in that, Includes the following steps: S1. Obtain the original diagnosis and treatment data of the patient to be diagnosed, and perform desensitization, field standardization and structured coding on the original diagnosis and treatment data to form standardized input data; S2. Perform lesion image feature analysis on the standardized input data, extract lesion location, lesion size, lesion edge morphology, enhancement mode, density features, signal features and tumor-related laboratory indicators, and generate lesion feature vector; S3. Based on the lesion feature vector, perform cancer type identification and lesion complexity assessment, and automatically match the corresponding instruction engineering strategy according to the cancer type and lesion complexity level; S4. Construct a diagnostic prompt context based on the matched instruction engineering strategy. The diagnostic prompt context includes at least role definition information, task constraint information, reasoning path information, knowledge retrieval information, and output format constraint information. S5. Based on the diagnostic prompt context, the knowledge enhancement module is invoked to retrieve the target knowledge fragment corresponding to the current lesion features from the medical knowledge vector database and generate an enhanced diagnostic context; S6. Input the enhanced diagnostic context into the large language model to perform multi-round reasoning analysis and generate candidate diagnostic results, imaging evidence results and differential diagnostic results; S7. Perform consistency verification and multi-path voting analysis on the candidate diagnostic results to generate the final diagnostic results and diagnostic confidence. S8. Generate a structured tumor imaging diagnostic report based on the final diagnostic results, diagnostic confidence level, and imaging evidence, and output it to the user interaction terminal.
2. The intelligent tumor imaging diagnosis method based on large language model instruction engineering according to claim 1, characterized in that, The original diagnostic and treatment data mentioned in step S1 includes at least image description data, image conclusion data, clinical history data, laboratory test data, and pathological examination data; wherein, the laboratory test data includes tumor marker data, blood routine data, liver function data, and coagulation function data; and the data fields from different sources are uniformly semantically encoded through preset field mapping rules.
3. The intelligent tumor imaging diagnosis method based on large language model instruction engineering according to claim 1, characterized in that, The lesion image feature analysis in step S2 includes: Medical named entity recognition for image report text; Extract the organ location, morphological description, and enhancement feature description of the lesion; The characteristics of lesion margins, lobulation, spiculation, calcification, necrosis, enhancement degree, and restricted diffusion are converted into standardized labels; And generate lesion feature vectors according to preset feature encoding rules.
4. The intelligent tumor imaging diagnosis method based on large language model instruction engineering according to claim 1, characterized in that, The lesion complexity assessment in step S3 includes: A lesion complexity score is generated based on the number of lesions, lesion heterogeneity, image description length, number of abnormal laboratory indicators, and number of differential diagnoses. When the lesion complexity score is lower than the first threshold, the single-step inference strategy is invoked; When the lesion complexity score is between the first and second thresholds, the thought chain reasoning strategy is invoked. When the lesion complexity score is higher than the second threshold, the mind tree reasoning strategy and the ReAct reasoning strategy are invoked to jointly execute multi-path reasoning.
5. The intelligent tumor imaging diagnosis method based on large language model instruction engineering according to claim 4, characterized in that, The diagnostic prompt context mentioned in step S4 includes: Role definition hints used to restrict the identity of the model; Task constraint hints used to limit the number and order of outputs; Inference chain hints used to guide the model to progressively analyze lesion location, lesion enhancement characteristics, and malignancy risk; JSON format hints used to constrain the output structure; And safety constraint hints used to limit the range of model generation.
6. The intelligent tumor imaging diagnosis method based on large language model instruction engineering according to claim 1, characterized in that, The knowledge enhancement module described in step S5 is constructed using a retrieval enhancement generation mechanism, specifically including: Establish a medical knowledge vector database that includes imaging textbooks, clinical guidelines, standard textbooks, and expert consensus. Vectorize knowledge text using a text embedding model; Generate a retrieval vector based on the lesion feature vector; Perform constrained searches based on cancer type and imaging modality; Target knowledge fragments are retrieved from a medical knowledge vector database based on vector similarity. The target knowledge fragment is then used as an enhanced context input to the large language model.
7. The intelligent tumor imaging diagnosis method based on large language model instruction engineering according to claim 6, characterized in that, Step S5 also includes a dynamic retrieval control step, which includes: When the confidence level of the first round of diagnosis is lower than the preset confidence threshold, the scope of knowledge retrieval is automatically expanded. Increase the number of knowledge recalls; Add knowledge snippets about similar cases of related cancers; After regenerating the enhanced diagnostic context, multiple rounds of inference analysis are performed again.
8. The intelligent diagnostic method for tumor images based on large language model instruction engineering according to claim 1, characterized in that, The multi-round reasoning analysis in step S6 includes: The first reasoning path is generated based on the initial diagnostic results; A second reasoning path is generated based on the differential diagnosis results; A third reasoning path is generated based on the knowledge enhancement results; Cross-validate multiple inference paths; It outputs multiple candidate diagnostic results and their corresponding diagnostic criteria.
9. The intelligent diagnostic method for tumor images based on large language model instruction engineering according to claim 1, characterized in that, The consistency verification and multi-path voting analysis described in step S7 include: Perform at least three independent sampling inferences on the same input data; Statistically analyze the frequency of occurrence of each candidate diagnosis result; Calculate the semantic consistency between different reasoning paths; The diagnostic confidence score is generated by combining knowledge matching degree, reasoning stability, and the frequency of occurrence of diagnostic results. The candidate diagnostic result with the highest frequency and the highest consistency score was determined as the final diagnostic result.
10. The intelligent diagnostic method for tumor images based on large language model instruction engineering according to claim 1, characterized in that, It also includes a smart diagnostic deployment step, which includes: Construct a user interaction layer, an instruction engine layer, a knowledge enhancement layer, a reasoning control layer, and an output optimization layer; Receive diagnostic requests via a web interface or hospital information system interface; Dynamically allocate model inference resources based on the number of concurrent requests; Real-time monitoring of model response time, output error rate, and system operating status; When the diagnostic confidence level is lower than the preset risk threshold, the manual review mechanism is triggered and a risk warning message is output. The large language model includes at least one of DeepSeek's DeepSeek series models and Alibaba's Qwen series models.